{"version":3,"file":"web-Byrj7rwE.mjs","names":["Scroll","rampClass","SpaceStep","cn","SingleLineProvider","railClass","React","ReactNode","ColumnSizing","fill","fit","ColumnInset","scrollBody","inset","ColumnProps","ColumnBaseProps","HTMLAttributes","HTMLElement","header","body","footer","rules","hideScrollbar","gap","as","ElementType","ref","Ref","fitRows","slots","filter","Boolean","join","Column","t0","$","_c","className","rest","t1","t2","t3","t4","t5","t6","t7","undefined","As","t8","x","regionInset","t9","t10","t11","style","gridTemplateColumns","gridTemplateRows","t12","t13","t14","t15","_c","cn","React","ReactNode","BandRule","RULE_CLASS","Record","top","bottom","both","BandProps","HTMLAttributes","HTMLDivElement","rule","children","ref","Ref","Band","t0","$","_c","className","rest","t1","t2","t3","t4","_c","slots","$","c","body","className","footer","header","inset","ref","rest","t1","t2","t3","t4","t5","t6","t7","t0","scrollBody","rules","hideScrollbar","fill","fit","gap","As","t8","cn","railClass","rampClass","regionInset","t9","t10","t11","t12","t13","Scroll","t14","t15","SingleLineProvider","RULE_CLASS","children","rule","web_default"],"sources":["../../../../../__A__/dev/singularity/.claude/worktrees/att-1794515063-e6dm4h/plugins/primitives/plugins/css/plugins/column/web/internal/column.tsx","../../../../../__A__/dev/singularity/.claude/worktrees/att-1794515063-e6dm4h/plugins/primitives/plugins/css/plugins/column/web/internal/band.tsx","../../../../../__A__/dev/singularity/.claude/worktrees/att-1794515063-e6dm4h/plugins/primitives/plugins/css/plugins/column/web/index.ts"],"sourcesContent":["import { Scroll } from \"@plugins/primitives/plugins/css/plugins/scroll/web\";\nimport {\n rampClass,\n type SpaceStep,\n} from \"@plugins/primitives/plugins/css/plugins/space-ramp/core\";\nimport {\n cn,\n SingleLineProvider,\n} from \"@plugins/primitives/plugins/css/plugins/ui-kit/web\";\nimport { railClass } from \"@plugins/primitives/plugins/css/plugins/rail/core\";\nimport type React from \"react\";\nimport type { ReactNode } from \"react\";\n\n/**\n * How the column is sized: `fill` fills its flex-col parent (`min-h-0\n * flex-1`); `fit` hugs its content up to its own `max-h-*` (in `className`),\n * past which the body takes what is left and scrolls. Mutually exclusive.\n */\ntype ColumnSizing =\n | {\n /** Emit the flex-child fill pair (`min-h-0 flex-1`) so the column fills\n * its own flex-col parent. Defaults to false. */\n fill?: boolean;\n fit?: false;\n }\n | {\n /** Hug the content up to the column's own max-height (a `max-h-*` in\n * `className`), then scroll the body. Laid out as a grid (`fitRows`). */\n fit: true;\n fill?: false;\n };\n\n/**\n * Who pays the column's inline inset. `inset` makes each of the column's\n * regions a REGION OWNER at that step: the header, the body's scroller and the\n * footer each pay AND publish it (`rail-x-`, owed 0) — so the scroller\n * and its scrollbar still reach the column's edge while its content lands on\n * the rail, and a follower inside (a DataView's bands) pays nothing more.\n * Not the app-shell sidebar's owe/follow split: a follower region would make\n * every follower inside it pay a second time (nested followers each pay).\n * It needs the managed `Scroll` body to own the body's region, so a plain\n * `scrollBody={false}` body cannot take one (tsc).\n */\ntype ColumnInset =\n | {\n /** Wrap `body` in a `` cell. Defaults to true. */\n scrollBody?: true;\n /**\n * Open the column as a region inset by this ramp step: header, body and\n * footer content lands on the rail (and bands on its text rail — a\n * column's body is rows, so the text rail is one row pad further in) by\n * doing nothing. Each region also takes the step as block padding.\n * Content inside declares NO inset of its own.\n */\n inset?: SpaceStep;\n }\n | {\n /** A plain flexible body that manages its own overflow. */\n scrollBody: false;\n inset?: undefined;\n };\n\nexport type ColumnProps = ColumnBaseProps & ColumnSizing & ColumnInset;\n\ninterface ColumnBaseProps extends React.HTMLAttributes {\n /** Rigid top region — never shrinks (`shrink-0`). */\n header?: ReactNode;\n /** Flexible middle region — by default wrapped in `` so\n * it absorbs the column's slack and scrolls; set `scrollBody={false}` for a\n * plain flexible region that manages its own overflow. */\n body?: ReactNode;\n /** Rigid bottom region — never shrinks (`shrink-0`). */\n footer?: ReactNode;\n /**\n * Draw the rules between regions: a hairline under the header and one over\n * the footer, spanning the column (the strips are the column's own, never a\n * `border-b px-* py-*` recipe in the slot content).\n */\n rules?: boolean;\n /** Hide the scrollbar chrome on the managed `Scroll` body while keeping it\n * scrollable. Only applies when `scrollBody` is true. Defaults to false. */\n hideScrollbar?: boolean;\n /** Gap role from the spacing ramp between regions. Defaults to `none` (flush). */\n gap?: SpaceStep;\n /** Host element/component. Defaults to a `div`. */\n as?: React.ElementType;\n /** Forwarded to the rendered element (mirrors Surface/Card/Row). */\n ref?: React.Ref;\n}\n\n/**\n * The named-slot **column** primitive — a vertical stack of up to three role\n * slots — `header` / `body` / `footer` — laid out as a flex column with the\n * `rigid | flexible | rigid` fill policy baked into one place: the header/footer\n * wrappers are `shrink-0` (never crushed), and the body is the single flexible\n * region.\n *\n * `Column`'s requirement is the textbook flex-column (rigid header,\n * growing+scrolling body, rigid footer) — exactly what `Scroll`'s `fill`\n * (`min-h-0 flex-1 overflow-y-auto`) was built for. So `Column` owns the\n * `flex flex-col` + rigid wrappers and **delegates the scroll body to `Scroll`**\n * (composition); `Scroll` stays the single owner of `overflow`.\n *\n * Callers write roles, never mechanics (no per-call-site `shrink-0` / `min-h-0` /\n * `flex-1`). Only present slots render — an absent slot produces no region. Caller\n * `className` composes last.\n */\n/**\n * The `fit` column's row tracks, one per PRESENT slot: header and footer\n * `auto`, the body `minmax(0, 1fr)`. A grid with a max-height sizes its `fr`\n * row against that max once its content would exceed it — so the column hugs\n * its content, then stops at its max and the body row takes what is left\n * (definite, so a `h-full` child of the body resolves against it). A flex\n * column cannot: a flexed item's height is not definite under an `auto`-height\n * container, so a non-scrolling body wrapper's `h-full` child overflows it.\n */\nfunction fitRows(slots: {\n header: boolean;\n body: boolean;\n footer: boolean;\n}): string {\n return [\n slots.header && \"auto\",\n slots.body && \"minmax(0, 1fr)\",\n slots.footer && \"auto\",\n ]\n .filter(Boolean)\n .join(\" \");\n}\n\nexport function Column({\n header,\n body,\n footer,\n scrollBody = true,\n inset,\n rules = false,\n hideScrollbar = false,\n fill = false,\n fit = false,\n gap = \"none\",\n as: As = \"div\",\n ref,\n className,\n ...rest\n}: ColumnProps) {\n // Each region opens its own region at the step — pays and publishes it, with\n // the text rail one row pad in (a column's content is rows) — and takes the\n // same step as block padding, so two regions sit one step apart on each side\n // of their boundary (a group gap, as before the column owned the inset).\n const regionInset =\n inset && cn(railClass({ x: inset }), \"rail-rows\", rampClass(\"py\", inset));\n return (\n // Flow container (always vertical): RESETS the single-line contract so stacked\n // regions wrap — `whitespace-normal` re-wraps raw text and the `SingleLine`\n // reset stops leaves from truncating, in case the column is nested inside a\n // line container (Row/Bar).\n \n \n {header != null && (\n
\n {header}\n
\n )}\n {body != null &&\n (scrollBody ? (\n \n {body}\n
\n ) : (\n
{body}
\n ))}\n {footer != null && (\n
\n {footer}\n
\n )}\n \n \n );\n}\n","import { cn } from \"@plugins/primitives/plugins/css/plugins/ui-kit/web\";\nimport type React from \"react\";\nimport type { ReactNode } from \"react\";\n\n/** Which edge(s) of the band carry its hairline. */\nexport type BandRule = \"top\" | \"bottom\" | \"both\";\n\nconst RULE_CLASS: Record = {\n top: \"border-t\",\n bottom: \"border-b\",\n both: \"border-y\",\n};\n\nexport interface BandProps extends React.HTMLAttributes {\n /** The hairline edge(s). A band is a strip BETWEEN content — it always has one. */\n rule: BandRule;\n children: ReactNode;\n /** Forwarded to the rendered element. */\n ref?: React.Ref;\n}\n\n/**\n * A rule-bearing strip in the middle of a region — a toolbar between two\n * lists, a summary over a log, a \"3 more\" line under a list.\n *\n * It bleeds its hairline to the region's edge and puts its own content on the\n * region's TEXT rail (`rail-band`): the rail itself in a plain region, one row\n * pad further in for a region holding padded rows (`rail-rows`) — so a band's\n * label lines up with the rows' text above and below it, whichever host it was\n * dropped in, and moving it to another host moves nothing. The block step is\n * fixed (`py-sm`): the strip declares no inset of its own to pick.\n *\n * Not for a surface's FIRST or LAST strip: that is the surface's own `header` /\n * `footer` (an overlay panel's, a `Column`'s), which also bleeds through the\n * surface's block padding — a band cannot know it is first, so it would sit\n * under that padding twice. Not for a box of ROWS either: rows already sit on\n * the rail and pad themselves; a band would indent them a second time.\n */\nexport function Band({ rule, children, className, ref, ...rest }: BandProps) {\n return (\n \n {/* Republishes the band's padding as the rail, so a child can bleed to\n the region edge out of it (`rail-band-region`). */}\n
{children}
\n \n );\n}\n","import type { PluginDefinition } from \"@plugins/framework/plugins/web-sdk/core\";\n\nexport { Column, type ColumnProps } from \"./internal/column\";\nexport { Band, type BandProps, type BandRule } from \"./internal/band\";\n\nexport default {\n description:\n \"Vertical named-slot layout primitive: stacks a rigid header, a flexible scrolling body, and a rigid footer in one flex column. Owns the rigid|flexible|rigid fill policy (shrink-0 header/footer, Scroll body); callers write roles, never shrink-0/min-h-0/flex-1 mechanics. `inset` makes each region (header, body scroller, footer) a region owner at that step (rail-x- + rail-rows), `rules` draws its header/footer hairlines; is the rule-bearing strip mid-content, its text on the host's text rail.\",\n contributions: [],\n} satisfies PluginDefinition;\n"],"mappings":";;;;;;;AAoHA,SAAS4B,QAAQC,GAIN;CACT,OAAO;EACLA,EAAMX,UAAU;EAChBW,EAAMV,QAAQ;EACdU,EAAMT,UAAU;CAAM,CACvB,CACEU,OAAOC,OAAO,CAAC,CACfC,KAAK,GAAG;AACb;AAEA,SAAOC,OAAAC,GAAA;CAAA,IAAAC,IAAAC,EAAA,EAAA,GAAAjB,GAAAkB,GAAAjB,GAAAF,GAAAL,GAAAa,GAAAY,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC,GAAAC;CAAA,AAAAV,EAAA,OAAAD,KAeOf,IAAAgB,EAAA,IAAAE,IAAAF,EAAA,IAAAf,IAAAe,EAAA,IAAAjB,IAAAiB,EAAA,IAAAtB,IAAAsB,EAAA,IAAAT,IAAAS,EAAA,IAAAG,IAAAH,EAAA,IAAAI,IAAAJ,EAAA,IAAAK,IAAAL,EAAA,IAAAM,IAAAN,EAAA,KAAAO,IAAAP,EAAA,KAAAQ,IAAAR,EAAA,KAAAS,IAAAT,EAAA,KAAAU,IAAAV,EAAA,QAfS,gCAAAvB,YAAA2B,aAAAlB,OAAAmB,GAAAlB,eAAAm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