@starci/grammar 0.16.1 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/.build-stamp.json +4 -4
- package/dist/common/components-navigation.css +33 -5
- package/dist/common/registry.d.ts +3 -1
- package/dist/common/registry.d.ts.map +1 -1
- package/dist/common/registry.js +2 -2
- package/dist/common/registry.js.map +1 -1
- package/dist/common/renderers.d.ts +2 -1
- package/dist/common/renderers.d.ts.map +1 -1
- package/dist/common/renderers.js +2 -1
- package/dist/common/renderers.js.map +1 -1
- package/dist/common/styles.css +119 -84
- package/dist/core/branch/SurfaceListCard/index.d.ts +1 -0
- package/dist/core/branch/SurfaceListCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceListCard/index.js +4 -2
- package/dist/core/branch/SurfaceListCard/index.js.map +1 -1
- package/dist/core/composite/ChatBubble/index.d.ts +1 -1
- package/dist/core/composite/ChatBubble/index.js +1 -1
- package/dist/core/composite/FillViewport/index.d.ts +1 -1
- package/dist/core/composite/FillViewport/index.js +1 -1
- package/dist/core/composite/Freestyle/index.d.ts +19 -0
- package/dist/core/composite/Freestyle/index.d.ts.map +1 -0
- package/dist/core/composite/Freestyle/index.js +9 -0
- package/dist/core/composite/Freestyle/index.js.map +1 -0
- package/dist/core/composite/Stepper/index.d.ts +3 -2
- package/dist/core/composite/Stepper/index.d.ts.map +1 -1
- package/dist/core/composite/Stepper/index.js +2 -1
- package/dist/core/composite/Stepper/index.js.map +1 -1
- package/dist/core/composition/Page/index.d.ts +1 -1
- package/dist/core/composition/Page/index.js +1 -1
- package/dist/core/composition/PaneGrid/index.d.ts +78 -0
- package/dist/core/composition/PaneGrid/index.d.ts.map +1 -0
- package/dist/core/composition/PaneGrid/index.js +93 -0
- package/dist/core/composition/PaneGrid/index.js.map +1 -0
- package/dist/core/composition/PaneGrid/layout.d.ts +48 -0
- package/dist/core/composition/PaneGrid/layout.d.ts.map +1 -0
- package/dist/core/composition/PaneGrid/layout.js +83 -0
- package/dist/core/composition/PaneGrid/layout.js.map +1 -0
- package/package.json +1 -1
- package/dist/core/composition/ChatWorkspace/classNames.d.ts +0 -37
- package/dist/core/composition/ChatWorkspace/classNames.d.ts.map +0 -1
- package/dist/core/composition/ChatWorkspace/classNames.js +0 -38
- package/dist/core/composition/ChatWorkspace/classNames.js.map +0 -1
- package/dist/core/composition/ChatWorkspace/index.d.ts +0 -48
- package/dist/core/composition/ChatWorkspace/index.d.ts.map +0 -1
- package/dist/core/composition/ChatWorkspace/index.js +0 -42
- package/dist/core/composition/ChatWorkspace/index.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type FreestyleProps = {
|
|
3
|
+
/** The app's own elements. Grammar components used inside keep their Grammar paint and contract. */
|
|
4
|
+
readonly children?: ReactNode;
|
|
5
|
+
/** The app's own CSS class for this region. */
|
|
6
|
+
readonly className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Why no Grammar component fits, in a few words (for example "sign-in brand art"). Required: Freestyle is a last
|
|
9
|
+
* resort, and the reason is stamped on the DOM as `data-grammar-freestyle-reason`.
|
|
10
|
+
*/
|
|
11
|
+
readonly reason: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The sanctioned escape hatch (owner ruling grammar-freestyle-region): a region that fills its host where the app writes its
|
|
15
|
+
* own plain elements and app CSS (layout, paint, radius, arbitrary values, absolutely positioned art) because no Grammar
|
|
16
|
+
* component fits. The rest of the page still follows the Grammar. It adds no paint of its own and is a last resort.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Freestyle: ({ children, className, reason }: FreestyleProps) => import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/composite/Freestyle/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,MAAM,cAAc,GAAG;IACzB,oGAAoG;IACpG,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAC1B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,iCAAiC,cAAc,gCAUxE,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@heroui/react";
|
|
3
|
+
/**
|
|
4
|
+
* The sanctioned escape hatch (owner ruling grammar-freestyle-region): a region that fills its host where the app writes its
|
|
5
|
+
* own plain elements and app CSS (layout, paint, radius, arbitrary values, absolutely positioned art) because no Grammar
|
|
6
|
+
* component fits. The rest of the page still follows the Grammar. It adds no paint of its own and is a last resort.
|
|
7
|
+
*/
|
|
8
|
+
export const Freestyle = ({ children, className, reason }) => (_jsx("div", { className: cn("starci-core-freestyle", className), "data-component": "Freestyle", "data-tier": "composite", "data-grammar-freestyle": "true", "data-grammar-freestyle-reason": reason, children: children }));
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/composite/Freestyle/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAelC;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAkB,EAAE,EAAE,CAAC,CAC1E,cACI,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,oBAClC,WAAW,eAChB,WAAW,4BACE,MAAM,mCACE,MAAM,YAEpC,QAAQ,GACP,CACT,CAAA"}
|
|
@@ -24,7 +24,7 @@ export type StepperProps = {
|
|
|
24
24
|
/**
|
|
25
25
|
* The flow is loading (knowledge STATE-8): step labels stay real text when given (an empty label draws a Skeleton text line), each
|
|
26
26
|
* marker becomes a static Skeleton circle, descriptions are not drawn, no step is current or a button, and the landmark is `aria-busy`.
|
|
27
|
-
*
|
|
27
|
+
* The horizontal connector lines keep the border colour, since no step is complete.
|
|
28
28
|
*/
|
|
29
29
|
readonly isLoading?: boolean;
|
|
30
30
|
};
|
|
@@ -33,7 +33,8 @@ export declare const stepStateFor: (steps: ReadonlyArray<StepperStep>, currentSt
|
|
|
33
33
|
/**
|
|
34
34
|
* A multi-step flow's progress. The current step carries `aria-current="step"`; each step exposes
|
|
35
35
|
* `data-grammar-step-state`. With `onStepSelect` the steps are buttons and the arrow keys move
|
|
36
|
-
* between them.
|
|
36
|
+
* between them. A horizontal stepper centres each marker over its label and joins the markers with a connector line
|
|
37
|
+
* (accent after a completed step); below 30rem it keeps only the current step's label in the paint.
|
|
37
38
|
* Contract: list HIERARCHY-3 (+FOCUS-2 when interactive), step STATE-1, marker A11Y-2, control FOCUS-1.
|
|
38
39
|
*/
|
|
39
40
|
export declare const Stepper: ({ label, steps, currentStepId, orientation, onStepSelect, stateLabel, renderMarker, className, isLoading, }: StepperProps) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/composite/Stepper/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKtC,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAA;AAE5E,MAAM,MAAM,WAAW,GAAG;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAA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,YAAY,gCA+Ed,CAAA"}
|
|
@@ -16,7 +16,8 @@ export const stepStateFor = (steps, currentStepId, index) => {
|
|
|
16
16
|
/**
|
|
17
17
|
* A multi-step flow's progress. The current step carries `aria-current="step"`; each step exposes
|
|
18
18
|
* `data-grammar-step-state`. With `onStepSelect` the steps are buttons and the arrow keys move
|
|
19
|
-
* between them.
|
|
19
|
+
* between them. A horizontal stepper centres each marker over its label and joins the markers with a connector line
|
|
20
|
+
* (accent after a completed step); below 30rem it keeps only the current step's label in the paint.
|
|
20
21
|
* Contract: list HIERARCHY-3 (+FOCUS-2 when interactive), step STATE-1, marker A11Y-2, control FOCUS-1.
|
|
21
22
|
*/
|
|
22
23
|
export const Stepper = ({ label, steps, currentStepId, orientation = "horizontal", onStepSelect, stateLabel, renderMarker, className, isLoading = false, }) => isLoading ? (_jsx("nav", { "aria-label": label, "aria-busy": "true", className: navigationClassName("starci-core-stepper", className), "data-component": "Stepper", "data-tier": "composite", "data-loading": "true", "data-grammar-stepper-orientation": orientation, "data-grammar-stepper-interactive": "false", children: _jsx("ol", { className: "starci-core-stepper-list", "data-contract": "HIERARCHY-3 STATE-8", children: steps.map((step) => (_jsx("li", { className: "starci-core-step", "data-contract": "STATE-1", "data-grammar-step-state": "upcoming", "data-grammar-current": "false", "data-grammar-skeleton": "true", children: _jsxs("span", { className: "starci-core-step-body", children: [_jsx("span", { "aria-hidden": "true", className: "starci-core-step-marker starci-core-step-skeleton-marker", "data-grammar-step-marker": "true", children: _jsx(Skeleton, { shape: "circle", size: "sm" }) }), _jsx("span", { className: "starci-core-step-copy", children: step.label === "" ? _jsx("span", { "aria-hidden": "true", className: "starci-core-step-skeleton-label", children: _jsx(Skeleton, { shape: "text" }) }) : _jsx("span", { className: "starci-core-step-label", "data-grammar-step-label": "true", children: step.label }) })] }) }, step.id))) }) })) : (_jsx("nav", { "aria-label": label, className: navigationClassName("starci-core-stepper", className), "data-component": "Stepper", "data-tier": "composite", "data-grammar-stepper-orientation": orientation, "data-grammar-stepper-interactive": onStepSelect === undefined ? "false" : "true", children: _jsx("ol", { className: "starci-core-stepper-list", "data-contract": onStepSelect === undefined ? "HIERARCHY-3" : "HIERARCHY-3 FOCUS-2", onKeyDown: onStepSelect === undefined ? undefined : (event) => { moveFocusBetweenPeers(event, "[data-grammar-step-control]", orientation === "vertical" ? "vertical" : "horizontal"); }, children: steps.map((step, index) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/composite/Stepper/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AAkC5D,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAiC,EAAE,aAAqB,EAAE,KAAa,EAAoB,EAAE;IACtH,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;IACzB,IAAI,IAAI,EAAE,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC,KAAK,CAAA;IAChD,MAAM,YAAY,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,aAAa,CAAC,CAAA;IACnF,IAAI,KAAK,KAAK,YAAY;QAAE,OAAO,SAAS,CAAA;IAC5C,OAAO,YAAY,IAAI,CAAC,IAAI,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAA;AAC9E,CAAC,CAAA;AAED
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/composite/Stepper/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAGZ,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;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,CACZ,IApBI,IAAI,CAAC,EAAE,CAqBX,CACR,CAAA;QACL,CAAC,CAAC,GACD,GACH,CACT,CAAA"}
|
|
@@ -47,7 +47,7 @@ export type PageProps = PageStandardProps | PageBleedProps;
|
|
|
47
47
|
/**
|
|
48
48
|
* One route page: the header band across the region, then the body in the page measure and gutter, one region step
|
|
49
49
|
* below it. Page is the single owner of the page inset and the page's vertical rhythm; layout frames (WorkspaceShell,
|
|
50
|
-
* PrimaryRailLayout,
|
|
50
|
+
* PrimaryRailLayout, PaneGrid) only place regions and never wrap a page in a PageContainer. Page tabs are the
|
|
51
51
|
* header's `tabs`, never a Tabs at the top of the body (lint `page-tabs-in-header`), and a route page renders nothing
|
|
52
52
|
* beside its Page (lint `route-page-is-one-page`). `chrome="bleed"` is the app surface: the body fills the region edge to
|
|
53
53
|
* edge, under the trail alone or under a band.
|
|
@@ -8,7 +8,7 @@ const isBand = (chrome, header) => chrome === "standard" || header.title !== und
|
|
|
8
8
|
/**
|
|
9
9
|
* One route page: the header band across the region, then the body in the page measure and gutter, one region step
|
|
10
10
|
* below it. Page is the single owner of the page inset and the page's vertical rhythm; layout frames (WorkspaceShell,
|
|
11
|
-
* PrimaryRailLayout,
|
|
11
|
+
* PrimaryRailLayout, PaneGrid) only place regions and never wrap a page in a PageContainer. Page tabs are the
|
|
12
12
|
* header's `tabs`, never a Tabs at the top of the body (lint `page-tabs-in-header`), and a route page renders nothing
|
|
13
13
|
* beside its Page (lint `route-page-is-one-page`). `chrome="bleed"` is the app surface: the body fills the region edge to
|
|
14
14
|
* edge, under the trail alone or under a band.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
2
|
+
import { type PaneResponsive, type PaneTrack } from "./layout.js";
|
|
3
|
+
export type { PaneBreakpoint, PaneByBreakpoint, PaneResponsive, PaneTrack } from "./layout.js";
|
|
4
|
+
type PaneBaseProps = {
|
|
5
|
+
/** The name of this pane in the grid's `areas`. */
|
|
6
|
+
readonly area: string;
|
|
7
|
+
/** `true`: the pane stands on the grammar surface ground (flat: no border, radius or shadow). Default: transparent on the host canvas. */
|
|
8
|
+
readonly surface?: boolean;
|
|
9
|
+
readonly className?: string;
|
|
10
|
+
/** Rendered as given: the pane imposes no padding, layout or structure on it. */
|
|
11
|
+
readonly children?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
type PaneScrollProps = {
|
|
14
|
+
/** The pane is its own vertical scroll owner; it then needs an accessible name. */
|
|
15
|
+
readonly scroll: true;
|
|
16
|
+
readonly label: string;
|
|
17
|
+
} | {
|
|
18
|
+
readonly scroll?: false;
|
|
19
|
+
/** Accessible name; a pane with a label is exposed as a region. */
|
|
20
|
+
readonly label?: string;
|
|
21
|
+
};
|
|
22
|
+
type PaneCollapseProps = {
|
|
23
|
+
/** Wherever the pane's area is not arranged (below 48rem for a single `areas`) the pane becomes a Drawer opened from a trigger above the grid. */
|
|
24
|
+
readonly collapse: "drawer";
|
|
25
|
+
/** Accessible name of the drawer. */
|
|
26
|
+
readonly collapseLabel: string;
|
|
27
|
+
/** Visible and accessible label of the trigger. */
|
|
28
|
+
readonly openLabel: string;
|
|
29
|
+
/** Accessible label of the drawer's close control. */
|
|
30
|
+
readonly closeLabel: string;
|
|
31
|
+
/** Controlled drawer state. */
|
|
32
|
+
readonly isOpen: boolean;
|
|
33
|
+
/** Receives trigger, backdrop, close-control and Escape changes. */
|
|
34
|
+
readonly onOpenChange: (isOpen: boolean) => void;
|
|
35
|
+
} | {
|
|
36
|
+
readonly collapse?: undefined;
|
|
37
|
+
readonly collapseLabel?: never;
|
|
38
|
+
readonly openLabel?: never;
|
|
39
|
+
readonly closeLabel?: never;
|
|
40
|
+
readonly isOpen?: never;
|
|
41
|
+
readonly onOpenChange?: never;
|
|
42
|
+
};
|
|
43
|
+
export type PaneProps = PaneBaseProps & PaneScrollProps & PaneCollapseProps;
|
|
44
|
+
/**
|
|
45
|
+
* One pane of a PaneGrid, placed by `area`. Panes sit flush; the divider on its start edges is drawn from the grid's
|
|
46
|
+
* layout at each breakpoint, and the pane paints nothing else unless `surface` is set.
|
|
47
|
+
*/
|
|
48
|
+
export declare const Pane: (props: PaneProps) => import("react").JSX.Element;
|
|
49
|
+
export type PaneGridProps = Omit<ComponentPropsWithoutRef<"section">, "aria-label" | "children"> & {
|
|
50
|
+
/** Accessible name for the whole grid landmark. */
|
|
51
|
+
readonly label: string;
|
|
52
|
+
/**
|
|
53
|
+
* `grid-template-areas` rows, for example `["a b c", "d d d"]`; `.` is an empty cell. Give an object keyed by
|
|
54
|
+
* breakpoint (`base`, `medium` from 48rem, `wide` from 70rem) to rearrange: a pane whose area is missing at a
|
|
55
|
+
* breakpoint is hidden there, or becomes a drawer when it has `collapse="drawer"`. A single array arranges the
|
|
56
|
+
* grid from `base` up, except that a pane with `collapse="drawer"` leaves it below 48rem.
|
|
57
|
+
*/
|
|
58
|
+
readonly areas: PaneResponsive<ReadonlyArray<string>>;
|
|
59
|
+
/** Column tracks, left to right (also per breakpoint); a missing track is `fill`. */
|
|
60
|
+
readonly columns?: PaneResponsive<ReadonlyArray<PaneTrack>>;
|
|
61
|
+
/** Row tracks, top to bottom (also per breakpoint); a missing track is `fill`. */
|
|
62
|
+
readonly rows?: PaneResponsive<ReadonlyArray<PaneTrack>>;
|
|
63
|
+
/** `Pane` elements as direct children. */
|
|
64
|
+
readonly children?: ReactNode;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Generic bounded pane grid: named areas laid out flush, a divider between adjacent panes, each pane optionally on the
|
|
68
|
+
* surface ground and optionally its own scroll owner.
|
|
69
|
+
*
|
|
70
|
+
* The host supplies a height; the grid fills it and owns the height chain below. Panes sit with no gap and one
|
|
71
|
+
* divider line (n-1, never doubled, none on an outer edge) separates neighbours: vertical between columns, horizontal
|
|
72
|
+
* between rows. The arrangement is chosen per breakpoint by CSS container queries on the
|
|
73
|
+
* grid's own width, so there is no layout shift. A pane with `collapse="drawer"` becomes a Drawer opened from a
|
|
74
|
+
* trigger above the grid wherever its area is not arranged. Grammar supplies layout only and no business meaning:
|
|
75
|
+
* the app composes its own pieces into the panes. While a drawer is open its pane renders a second time inside it.
|
|
76
|
+
*/
|
|
77
|
+
export declare const PaneGrid: (props: PaneGridProps) => import("react").JSX.Element;
|
|
78
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/composition/PaneGrid/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAMH,KAAK,wBAAwB,EAG7B,KAAK,SAAS,EACjB,MAAM,OAAO,CAAA;AAGd,OAAO,EAQH,KAAK,cAAc,EACnB,KAAK,SAAS,EACjB,MAAM,aAAa,CAAA;AAEpB,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAO9F,KAAK,aAAa,GAAG;IACjB,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,0IAA0I;IAC1I,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAChC,CAAA;AAED,KAAK,eAAe,GACd;IACE,mFAAmF;IACnF,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACzB,GACC;IACE,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAA;IACvB,mEAAmE;IACnE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAC1B,CAAA;AAEL,KAAK,iBAAiB,GAChB;IACE,kJAAkJ;IAClJ,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,qCAAqC;IACrC,QAAQ,CAAC,aA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QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAChC,CAAA;AAqBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,gCA6C5C,CAAA"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn, Drawer } from "@heroui/react";
|
|
4
|
+
import { Children, createContext, isValidElement, useContext, useMemo, } from "react";
|
|
5
|
+
import { VerticalScrollRegion } from "../../composite/VerticalScrollRegion/index.js";
|
|
6
|
+
import { SurfaceNesting } from "../../surfaceContext.js";
|
|
7
|
+
import { buildResponsivePaneGridModels, paneBreakpoints, parseAreas, trackToCss, } from "./layout.js";
|
|
8
|
+
const PaneModelsContext = createContext(undefined);
|
|
9
|
+
/**
|
|
10
|
+
* One pane of a PaneGrid, placed by `area`. Panes sit flush; the divider on its start edges is drawn from the grid's
|
|
11
|
+
* layout at each breakpoint, and the pane paints nothing else unless `surface` is set.
|
|
12
|
+
*/
|
|
13
|
+
export const Pane = (props) => {
|
|
14
|
+
const { area, surface = false, className, label, scroll = false, children } = props;
|
|
15
|
+
const models = useContext(PaneModelsContext);
|
|
16
|
+
const shown = scroll ? "flex" : "block";
|
|
17
|
+
const vars = {};
|
|
18
|
+
let hasEdge = false;
|
|
19
|
+
if (models !== undefined) {
|
|
20
|
+
for (const breakpoint of paneBreakpoints) {
|
|
21
|
+
const edges = models[breakpoint].edges[area];
|
|
22
|
+
vars[`--starci-core-pane-d-${breakpoint}`] = edges === undefined ? "none" : shown;
|
|
23
|
+
vars[`--starci-core-pane-i-${breakpoint}`] = edges?.inline === true ? "1px" : "0px";
|
|
24
|
+
vars[`--starci-core-pane-b-${breakpoint}`] = edges?.block === true ? "1px" : "0px";
|
|
25
|
+
hasEdge = hasEdge || edges?.inline === true || edges?.block === true;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const style = { gridArea: area, ...vars };
|
|
29
|
+
const body = scroll
|
|
30
|
+
? (_jsx(VerticalScrollRegion, { "aria-label": label, className: "starci-core-pane-scroll", "data-contract": "OVERFLOW-4 OVERFLOW-5", isScrollable: true, children: children }))
|
|
31
|
+
: children;
|
|
32
|
+
const content = surface ? _jsx(SurfaceNesting, { children: body }) : body;
|
|
33
|
+
const shared = {
|
|
34
|
+
className: cn("starci-core-pane", className),
|
|
35
|
+
"data-component": "Pane",
|
|
36
|
+
"data-tier": "composition",
|
|
37
|
+
"data-grammar-pane-area": area,
|
|
38
|
+
"data-grammar-pane-surface": surface ? "true" : undefined,
|
|
39
|
+
"data-grammar-pane-scroll": scroll ? "true" : undefined,
|
|
40
|
+
"data-contract": hasEdge ? "BOUNDARY-1" : undefined,
|
|
41
|
+
style,
|
|
42
|
+
};
|
|
43
|
+
return label === undefined || scroll
|
|
44
|
+
? _jsx("div", { ...shared, children: content })
|
|
45
|
+
: _jsx("section", { ...shared, "aria-label": label, children: content });
|
|
46
|
+
};
|
|
47
|
+
const isPane = (child) => isValidElement(child) && child.type === Pane;
|
|
48
|
+
/** Whether the area is in the first grid column wherever it appears: its drawer then opens from the start side. */
|
|
49
|
+
const isStartColumn = (models, area) => paneBreakpoints.some((breakpoint) => parseAreas(models[breakpoint].areas).some((row) => row[0] === area));
|
|
50
|
+
const gridVars = (models, hasTrigger) => {
|
|
51
|
+
const vars = {};
|
|
52
|
+
for (const breakpoint of paneBreakpoints) {
|
|
53
|
+
const model = models[breakpoint];
|
|
54
|
+
vars[`--starci-core-pane-grid-areas-${breakpoint}`] = model.areas.map((row) => `"${row}"`).join(" ");
|
|
55
|
+
vars[`--starci-core-pane-grid-columns-${breakpoint}`] = model.columns.map(trackToCss).join(" ");
|
|
56
|
+
vars[`--starci-core-pane-grid-rows-${breakpoint}`] = model.rows.map(trackToCss).join(" ");
|
|
57
|
+
vars[`--starci-core-pane-grid-triggers-${breakpoint}`] = hasTrigger(breakpoint) ? "flex" : "none";
|
|
58
|
+
}
|
|
59
|
+
return vars;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Generic bounded pane grid: named areas laid out flush, a divider between adjacent panes, each pane optionally on the
|
|
63
|
+
* surface ground and optionally its own scroll owner.
|
|
64
|
+
*
|
|
65
|
+
* The host supplies a height; the grid fills it and owns the height chain below. Panes sit with no gap and one
|
|
66
|
+
* divider line (n-1, never doubled, none on an outer edge) separates neighbours: vertical between columns, horizontal
|
|
67
|
+
* between rows. The arrangement is chosen per breakpoint by CSS container queries on the
|
|
68
|
+
* grid's own width, so there is no layout shift. A pane with `collapse="drawer"` becomes a Drawer opened from a
|
|
69
|
+
* trigger above the grid wherever its area is not arranged. Grammar supplies layout only and no business meaning:
|
|
70
|
+
* the app composes its own pieces into the panes. While a drawer is open its pane renders a second time inside it.
|
|
71
|
+
*/
|
|
72
|
+
export const PaneGrid = (props) => {
|
|
73
|
+
const { label, areas, columns, rows, className, children, ...sectionProps } = props;
|
|
74
|
+
const panes = Children.toArray(children).filter(isPane);
|
|
75
|
+
const drawers = panes.filter((pane) => pane.props.collapse === "drawer");
|
|
76
|
+
const collapsedKey = drawers.map((pane) => pane.props.area).join(" ");
|
|
77
|
+
const models = useMemo(() => buildResponsivePaneGridModels(areas, columns, rows, new Set(collapsedKey === "" ? [] : collapsedKey.split(" "))), [areas, columns, rows, collapsedKey]);
|
|
78
|
+
const style = gridVars(models, (breakpoint) => drawers.some((pane) => models[breakpoint].edges[pane.props.area] === undefined));
|
|
79
|
+
return (_jsxs("section", { ...sectionProps, "aria-label": label, className: cn("starci-core-pane-grid", className), "data-component": "PaneGrid", "data-tier": "composition", "data-grammar-pane-grid": "true", children: [drawers.length === 0 ? null : (_jsx("div", { className: "starci-core-pane-grid-triggers", "data-contract": "BOUNDARY-1 PADDING-4 PADDING-2", style: style, children: drawers.map((pane) => (_jsx(PaneDrawer, { pane: pane, placement: isStartColumn(models, pane.props.area) ? "left" : "right", models: models }, pane.props.area))) })), _jsx(PaneModelsContext.Provider, { value: models, children: _jsx("div", { className: "starci-core-pane-grid-tracks", "data-contract": "GAP-0", style: style, children: panes }) })] }));
|
|
80
|
+
};
|
|
81
|
+
const PaneDrawer = ({ pane, placement, models }) => {
|
|
82
|
+
const { props } = pane;
|
|
83
|
+
if (props.collapse !== "drawer")
|
|
84
|
+
return null;
|
|
85
|
+
const triggerStyle = {};
|
|
86
|
+
const vars = {};
|
|
87
|
+
for (const breakpoint of paneBreakpoints) {
|
|
88
|
+
vars[`--starci-core-pane-trigger-${breakpoint}`] = models[breakpoint].edges[props.area] === undefined ? "inline-flex" : "none";
|
|
89
|
+
}
|
|
90
|
+
Object.assign(triggerStyle, vars);
|
|
91
|
+
return (_jsxs(Drawer, { isOpen: props.isOpen, onOpenChange: props.onOpenChange, children: [_jsx(Drawer.Trigger, { className: "starci-core-pane-trigger", style: triggerStyle, "data-contract": "PADDING-3 SURFACE-2 FONT-2 TONE-1", children: props.openLabel }), _jsx(Drawer.Backdrop, { children: _jsx(Drawer.Content, { className: "starci-core-pane-drawer-content", placement: placement, children: _jsx(Drawer.Dialog, { className: "starci-core-pane-drawer-dialog", "data-grammar-nesting": "surface", children: _jsxs(SurfaceNesting, { children: [_jsx(Drawer.Header, { children: _jsx(Drawer.Heading, { children: props.collapseLabel }) }), _jsx(Drawer.CloseTrigger, { "aria-label": props.closeLabel, className: "starci-core-pane-drawer-close", "data-contract": "SURFACE-2 TONE-1" }), _jsx(Drawer.Body, { className: "starci-core-pane-drawer-body", "data-contract": "OVERFLOW-2 PADDING-0", children: _jsx(VerticalScrollRegion, { "aria-label": props.collapseLabel, className: "starci-core-pane-drawer-scroll", "data-contract": "OVERFLOW-4 OVERFLOW-5", "data-grammar-pane-area": props.area, isScrollable: true, children: props.children }) })] }) }) }) })] }));
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/composition/Pa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C,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAA;IAClI,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;IACjC,OAAO,CACH,MAAC,MAAM,IAAC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,aAC1D,KAAC,MAAM,CAAC,OAAO,IAAC,SAAS,EAAC,0BAA0B,EAAC,KAAK,EAAE,YAAY,mBAAgB,mCAAmC,YACtH,KAAK,CAAC,SAAS,GACH,EACjB,KAAC,MAAM,CAAC,QAAQ,cACZ,KAAC,MAAM,CAAC,OAAO,IAAC,SAAS,EAAC,iCAAiC,EAAC,SAAS,EAAE,SAAS,YAC5E,KAAC,MAAM,CAAC,MAAM,IAAC,SAAS,EAAC,gCAAgC,0BAAsB,SAAS,YACpF,MAAC,cAAc,eACX,KAAC,MAAM,CAAC,MAAM,cACV,KAAC,MAAM,CAAC,OAAO,cAAE,KAAK,CAAC,aAAa,GAAkB,GAC1C,EAChB,KAAC,MAAM,CAAC,YAAY,kBACJ,KAAK,CAAC,UAAU,EAC5B,SAAS,EAAC,+BAA+B,mBAC3B,kBAAkB,GAClC,EACF,KAAC,MAAM,CAAC,IAAI,IAAC,SAAS,EAAC,8BAA8B,mBAAe,sBAAsB,YACtF,KAAC,oBAAoB,kBACL,KAAK,CAAC,aAAa,EAC/B,SAAS,EAAC,gCAAgC,mBAC5B,uBAAuB,4BACb,KAAK,CAAC,IAAI,EAClC,YAAY,kBAEX,KAAK,CAAC,QAAQ,GACI,GACb,IACD,GACL,GACH,GACH,IACb,CACZ,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure layout maths for PaneGrid: reads `grid-template-areas` rows and answers, for every named area, which of its
|
|
3
|
+
* start edges touch another pane. The divider is drawn on exactly those edges, so n panes in a row have n-1 lines and
|
|
4
|
+
* none is doubled.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A track size by role. `fill`, `fill-2` and `fill-3` share the free space in proportion 1, 2 and 3 (1fr, 2fr, 3fr);
|
|
8
|
+
* `compact`, `standard` and `wide` are the grammar's Rail widths; `auto` is the content's size.
|
|
9
|
+
*/
|
|
10
|
+
export type PaneTrack = "auto" | "fill" | "fill-2" | "fill-3" | "compact" | "standard" | "wide";
|
|
11
|
+
export declare const trackToCss: (track: PaneTrack) => string;
|
|
12
|
+
export declare const isPaneTrack: (value: string) => value is PaneTrack;
|
|
13
|
+
export type PaneEdges = {
|
|
14
|
+
/** A pane sits to the inline-start of this one: the vertical divider is drawn on its start edge. */
|
|
15
|
+
readonly inline: boolean;
|
|
16
|
+
/** A pane sits above this one: the horizontal divider is drawn on its block-start edge. */
|
|
17
|
+
readonly block: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type PaneGridModel = {
|
|
20
|
+
readonly areas: ReadonlyArray<string>;
|
|
21
|
+
readonly columns: ReadonlyArray<PaneTrack>;
|
|
22
|
+
readonly rows: ReadonlyArray<PaneTrack>;
|
|
23
|
+
readonly edges: Readonly<Record<string, PaneEdges>>;
|
|
24
|
+
};
|
|
25
|
+
export declare const parseAreas: (areas: ReadonlyArray<string>) => ReadonlyArray<ReadonlyArray<string>>;
|
|
26
|
+
/**
|
|
27
|
+
* Build the model. `collapsed` names the areas that leave the grid (they became drawers): a column or row that holds
|
|
28
|
+
* only collapsed areas disappears with its track, so the remaining panes close the gap.
|
|
29
|
+
*/
|
|
30
|
+
export declare const buildPaneGridModel: (areas: ReadonlyArray<string>, columns: ReadonlyArray<PaneTrack> | undefined, rows: ReadonlyArray<PaneTrack> | undefined, collapsed: ReadonlySet<string>) => PaneGridModel;
|
|
31
|
+
/** The grammar's pane breakpoints, mobile first: `base` below 48rem (the compact boundary), `medium` from 48rem, `wide` from 70rem. */
|
|
32
|
+
export declare const paneBreakpoints: readonly ["base", "medium", "wide"];
|
|
33
|
+
export type PaneBreakpoint = typeof paneBreakpoints[number];
|
|
34
|
+
/** A value per breakpoint; a missing `medium` or `wide` inherits the next smaller one. */
|
|
35
|
+
export type PaneByBreakpoint<T> = {
|
|
36
|
+
readonly base: T;
|
|
37
|
+
readonly medium?: T;
|
|
38
|
+
readonly wide?: T;
|
|
39
|
+
};
|
|
40
|
+
/** One value for every breakpoint, or one per breakpoint. */
|
|
41
|
+
export type PaneResponsive<T> = T | PaneByBreakpoint<T>;
|
|
42
|
+
export declare const resolvePaneValue: <T>(value: PaneResponsive<T>, breakpoint: PaneBreakpoint) => T;
|
|
43
|
+
/**
|
|
44
|
+
* The grid model at every breakpoint. A single `areas` with collapsing panes arranges the full grid from `medium` up and,
|
|
45
|
+
* at `base`, the same grid without the collapsed areas (their columns and rows leave with them).
|
|
46
|
+
*/
|
|
47
|
+
export declare const buildResponsivePaneGridModels: (areas: PaneResponsive<ReadonlyArray<string>>, columns: PaneResponsive<ReadonlyArray<PaneTrack>> | undefined, rows: PaneResponsive<ReadonlyArray<PaneTrack>> | undefined, collapsed: ReadonlySet<string>) => Readonly<Record<PaneBreakpoint, PaneGridModel>>;
|
|
48
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/core/composition/PaneGrid/layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAA;AAY/F,eAAO,MAAM,UAAU,GAAI,OAAO,SAAS,KAAG,MAAyB,CAAA;AAGvE,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,KAAK,IAAI,SAA8B,CAAA;AAInF,MAAM,MAAM,SAAS,GAAG;IACpB,oGAAoG;IACpG,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,2FAA2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CAAC,EAAE,YAAY,cAAc,KAAG,CAK1F,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GACtC,OAAO,cAAc,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,EAC5C,SAAS,cAAc,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,EAC7D,MAAM,cAAc,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,EAC1D,WAAW,WAAW,CAAC,MAAM,CAAC,KAC/B,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,aAAa,CAAC,CAUhD,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure layout maths for PaneGrid: reads `grid-template-areas` rows and answers, for every named area, which of its
|
|
3
|
+
* start edges touch another pane. The divider is drawn on exactly those edges, so n panes in a row have n-1 lines and
|
|
4
|
+
* none is doubled.
|
|
5
|
+
*/
|
|
6
|
+
const trackCss = {
|
|
7
|
+
auto: "auto",
|
|
8
|
+
fill: "minmax(0, 1fr)",
|
|
9
|
+
"fill-2": "minmax(0, 2fr)",
|
|
10
|
+
"fill-3": "minmax(0, 3fr)",
|
|
11
|
+
compact: "minmax(14rem, var(--starci-core-rail-compact, 16rem))",
|
|
12
|
+
standard: "minmax(16rem, var(--starci-core-rail-standard, 20rem))",
|
|
13
|
+
wide: "minmax(20rem, var(--starci-core-rail-wide, 24rem))",
|
|
14
|
+
};
|
|
15
|
+
export const trackToCss = (track) => trackCss[track];
|
|
16
|
+
const tracks = new Set(["auto", "fill", "fill-2", "fill-3", "compact", "standard", "wide"]);
|
|
17
|
+
export const isPaneTrack = (value) => tracks.has(value);
|
|
18
|
+
const emptyCell = ".";
|
|
19
|
+
export const parseAreas = (areas) => areas.map((row) => row.trim().split(/\s+/).filter((cell) => cell !== ""));
|
|
20
|
+
const fillTracks = (given, count) => Array.from({ length: count }, (_, index) => given?.[index] ?? "fill");
|
|
21
|
+
/**
|
|
22
|
+
* Build the model. `collapsed` names the areas that leave the grid (they became drawers): a column or row that holds
|
|
23
|
+
* only collapsed areas disappears with its track, so the remaining panes close the gap.
|
|
24
|
+
*/
|
|
25
|
+
export const buildPaneGridModel = (areas, columns, rows, collapsed) => {
|
|
26
|
+
const matrix = parseAreas(areas);
|
|
27
|
+
const columnCount = matrix.reduce((max, row) => Math.max(max, row.length), 0);
|
|
28
|
+
const allColumns = fillTracks(columns, columnCount);
|
|
29
|
+
const allRows = fillTracks(rows, matrix.length);
|
|
30
|
+
const isGone = (cell) => cell === undefined || collapsed.has(cell);
|
|
31
|
+
const keepColumn = Array.from({ length: columnCount }, (_, c) => collapsed.size === 0 || !matrix.every((row) => isGone(row[c])));
|
|
32
|
+
const keepRow = matrix.map((row) => collapsed.size === 0 || !row.every((cell) => isGone(cell)));
|
|
33
|
+
const kept = matrix
|
|
34
|
+
.filter((_, r) => keepRow[r])
|
|
35
|
+
.map((row) => row.filter((_, c) => keepColumn[c]).map((cell) => (collapsed.has(cell) ? emptyCell : cell)));
|
|
36
|
+
const box = new Map();
|
|
37
|
+
kept.forEach((row, r) => row.forEach((cell, c) => {
|
|
38
|
+
if (cell === emptyCell)
|
|
39
|
+
return;
|
|
40
|
+
const known = box.get(cell);
|
|
41
|
+
box.set(cell, known === undefined
|
|
42
|
+
? { r0: r, c0: c, c1: c }
|
|
43
|
+
: { r0: Math.min(known.r0, r), c0: Math.min(known.c0, c), c1: Math.max(known.c1, c) });
|
|
44
|
+
}));
|
|
45
|
+
const edges = {};
|
|
46
|
+
box.forEach(({ r0, c0, c1 }, name) => {
|
|
47
|
+
const left = kept[r0]?.[c0 - 1];
|
|
48
|
+
const above = Array.from({ length: c1 - c0 + 1 }, (_, i) => kept[r0 - 1]?.[c0 + i]);
|
|
49
|
+
edges[name] = {
|
|
50
|
+
inline: left !== undefined && left !== emptyCell,
|
|
51
|
+
block: above.some((cell) => cell !== undefined && cell !== emptyCell),
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
areas: kept.map((row) => row.join(" ")),
|
|
56
|
+
columns: allColumns.filter((_, c) => keepColumn[c]),
|
|
57
|
+
rows: allRows.filter((_, r) => keepRow[r]),
|
|
58
|
+
edges,
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
/** The grammar's pane breakpoints, mobile first: `base` below 48rem (the compact boundary), `medium` from 48rem, `wide` from 70rem. */
|
|
62
|
+
export const paneBreakpoints = ["base", "medium", "wide"];
|
|
63
|
+
const isByBreakpoint = (value) => typeof value === "object" && value !== null && !Array.isArray(value) && "base" in value;
|
|
64
|
+
export const resolvePaneValue = (value, breakpoint) => {
|
|
65
|
+
if (!isByBreakpoint(value))
|
|
66
|
+
return value;
|
|
67
|
+
if (breakpoint === "base")
|
|
68
|
+
return value.base;
|
|
69
|
+
if (breakpoint === "medium")
|
|
70
|
+
return value.medium ?? value.base;
|
|
71
|
+
return value.wide ?? value.medium ?? value.base;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* The grid model at every breakpoint. A single `areas` with collapsing panes arranges the full grid from `medium` up and,
|
|
75
|
+
* at `base`, the same grid without the collapsed areas (their columns and rows leave with them).
|
|
76
|
+
*/
|
|
77
|
+
export const buildResponsivePaneGridModels = (areas, columns, rows, collapsed) => {
|
|
78
|
+
const none = new Set();
|
|
79
|
+
const dropsAtBase = !isByBreakpoint(areas);
|
|
80
|
+
const model = (breakpoint) => buildPaneGridModel(resolvePaneValue(areas, breakpoint), columns === undefined ? undefined : resolvePaneValue(columns, breakpoint), rows === undefined ? undefined : resolvePaneValue(rows, breakpoint), dropsAtBase && breakpoint === "base" ? collapsed : none);
|
|
81
|
+
return { base: model("base"), medium: model("medium"), wide: model("wide") };
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../../src/core/composition/PaneGrid/layout.ts"],"names":[],"mappings":"AAAA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
|
-
* The bounded height chain, the rail track, the composer boundary and the compact drawer are all
|
|
5
|
-
* drawn by `.starci-core-chat-workspace*` in `src/common/styles.css`. The names below are hooks;
|
|
6
|
-
* the rail-less layout keeps its own class because it is a structural variant, not a utility.
|
|
7
|
-
*/
|
|
8
|
-
/** Bounded height chain for a workbench supplied with height by its host. */
|
|
9
|
-
export declare const chatWorkspaceClassName: string;
|
|
10
|
-
/** Header remains outside every workspace-owned scroll region. */
|
|
11
|
-
export declare const chatWorkspaceHeaderClassName: string;
|
|
12
|
-
/** Compact rail disclosure has its own non-scrolling action boundary. */
|
|
13
|
-
export declare const chatWorkspaceRailTriggerBoundaryClassName: string;
|
|
14
|
-
/** Visible, keyboard-sized trigger for the compact supporting overlay. */
|
|
15
|
-
export declare const chatWorkspaceRailTriggerClassName: string;
|
|
16
|
-
/** Primary work region and the persistent rail share the remaining bounded height. */
|
|
17
|
-
export declare const chatWorkspaceLayoutClassName: string;
|
|
18
|
-
/** Bind the layout column to the same authored widths as Core Rail. */
|
|
19
|
-
export declare const getChatWorkspaceLayoutClassName: (_railWidth: "compact" | "standard" | "wide", hasRail: boolean) => import("tailwind-variants").CnReturn;
|
|
20
|
-
/** Main task owner: only its conversation child scrolls. */
|
|
21
|
-
export declare const chatWorkspacePrimaryClassName: string;
|
|
22
|
-
/** The conversation is the single primary bounded scroll owner. */
|
|
23
|
-
export declare const chatWorkspaceConversationClassName: string;
|
|
24
|
-
/** Composer remains reachable at the terminal edge without duplicating scroll padding. */
|
|
25
|
-
export declare const chatWorkspaceComposerClassName: string;
|
|
26
|
-
/** Persistent supporting rail fills the same bounded layout track as the task owner. */
|
|
27
|
-
export declare const chatWorkspaceInlineRailClassName: string;
|
|
28
|
-
/** Keep the compact vendor drawer on one safe viewport width. */
|
|
29
|
-
export declare const chatWorkspaceDrawerContentClassName: string;
|
|
30
|
-
/** The dialog and its body extend the bounded height chain into the overlay. */
|
|
31
|
-
export declare const chatWorkspaceDrawerDialogClassName: string;
|
|
32
|
-
export declare const chatWorkspaceDrawerBodyClassName: string;
|
|
33
|
-
/** Scroll owner inside the compact supporting overlay. */
|
|
34
|
-
export declare const chatWorkspaceOverlayRailClassName: string;
|
|
35
|
-
/** Make the vendor-provided overlay exit easy to target in every input mode. */
|
|
36
|
-
export declare const chatWorkspaceDrawerCloseClassName: string;
|
|
37
|
-
//# sourceMappingURL=classNames.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../../../../src/core/composition/ChatWorkspace/classNames.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,QAAmE,CAAA;AAEtG,kEAAkE;AAClE,eAAO,MAAM,4BAA4B,QAAiF,CAAA;AAE1H,yEAAyE;AACzE,eAAO,MAAM,yCAAyC,QAA+G,CAAA;AAErK,0EAA0E;AAC1E,eAAO,MAAM,iCAAiC,QAA6F,CAAA;AAE3I,sFAAsF;AACtF,eAAO,MAAM,4BAA4B,QAAiF,CAAA;AAE1H,uEAAuE;AACvE,eAAO,MAAM,+BAA+B,GACxC,YAAY,SAAS,GAAG,UAAU,GAAG,MAAM,EAC3C,SAAS,OAAO,yCAC+E,CAAA;AAEnG,4DAA4D;AAC5D,eAAO,MAAM,6BAA6B,QAAmF,CAAA;AAE7H,mEAAmE;AACnE,eAAO,MAAM,kCAAkC,QAA6F,CAAA;AAE5I,0FAA0F;AAC1F,eAAO,MAAM,8BAA8B,QAAqF,CAAA;AAEhI,wFAAwF;AACxF,eAAO,MAAM,gCAAgC,QAA2F,CAAA;AAExI,iEAAiE;AACjE,eAAO,MAAM,mCAAmC,QAAiG,CAAA;AAEjJ,gFAAgF;AAChF,eAAO,MAAM,kCAAkC,QAA+F,CAAA;AAC9I,eAAO,MAAM,gCAAgC,QAA2F,CAAA;AAExI,0DAA0D;AAC1D,eAAO,MAAM,iCAAiC,QAA6F,CAAA;AAE3I,gFAAgF;AAChF,eAAO,MAAM,iCAAiC,QAA6F,CAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { cn } from "@heroui/react";
|
|
2
|
-
/**
|
|
3
|
-
* Chat-workspace geometry is SHIPPED.
|
|
4
|
-
*
|
|
5
|
-
* The bounded height chain, the rail track, the composer boundary and the compact drawer are all
|
|
6
|
-
* drawn by `.starci-core-chat-workspace*` in `src/common/styles.css`. The names below are hooks;
|
|
7
|
-
* the rail-less layout keeps its own class because it is a structural variant, not a utility.
|
|
8
|
-
*/
|
|
9
|
-
/** Bounded height chain for a workbench supplied with height by its host. */
|
|
10
|
-
export const chatWorkspaceClassName = cn("starci-core-chat-workspace") ?? "starci-core-chat-workspace";
|
|
11
|
-
/** Header remains outside every workspace-owned scroll region. */
|
|
12
|
-
export const chatWorkspaceHeaderClassName = cn("starci-core-chat-workspace-header") ?? "starci-core-chat-workspace-header";
|
|
13
|
-
/** Compact rail disclosure has its own non-scrolling action boundary. */
|
|
14
|
-
export const chatWorkspaceRailTriggerBoundaryClassName = cn("starci-core-chat-workspace-rail-trigger-boundary") ?? "starci-core-chat-workspace-rail-trigger-boundary";
|
|
15
|
-
/** Visible, keyboard-sized trigger for the compact supporting overlay. */
|
|
16
|
-
export const chatWorkspaceRailTriggerClassName = cn("starci-core-chat-workspace-rail-trigger") ?? "starci-core-chat-workspace-rail-trigger";
|
|
17
|
-
/** Primary work region and the persistent rail share the remaining bounded height. */
|
|
18
|
-
export const chatWorkspaceLayoutClassName = cn("starci-core-chat-workspace-layout") ?? "starci-core-chat-workspace-layout";
|
|
19
|
-
/** Bind the layout column to the same authored widths as Core Rail. */
|
|
20
|
-
export const getChatWorkspaceLayoutClassName = (_railWidth, hasRail) => cn(chatWorkspaceLayoutClassName, !hasRail && "starci-core-chat-workspace-layout-without-rail");
|
|
21
|
-
/** Main task owner: only its conversation child scrolls. */
|
|
22
|
-
export const chatWorkspacePrimaryClassName = cn("starci-core-chat-workspace-primary") ?? "starci-core-chat-workspace-primary";
|
|
23
|
-
/** The conversation is the single primary bounded scroll owner. */
|
|
24
|
-
export const chatWorkspaceConversationClassName = cn("starci-core-chat-workspace-conversation") ?? "starci-core-chat-workspace-conversation";
|
|
25
|
-
/** Composer remains reachable at the terminal edge without duplicating scroll padding. */
|
|
26
|
-
export const chatWorkspaceComposerClassName = cn("starci-core-chat-workspace-composer") ?? "starci-core-chat-workspace-composer";
|
|
27
|
-
/** Persistent supporting rail fills the same bounded layout track as the task owner. */
|
|
28
|
-
export const chatWorkspaceInlineRailClassName = cn("starci-core-chat-workspace-inline-rail") ?? "starci-core-chat-workspace-inline-rail";
|
|
29
|
-
/** Keep the compact vendor drawer on one safe viewport width. */
|
|
30
|
-
export const chatWorkspaceDrawerContentClassName = cn("starci-core-chat-workspace-drawer-content") ?? "starci-core-chat-workspace-drawer-content";
|
|
31
|
-
/** The dialog and its body extend the bounded height chain into the overlay. */
|
|
32
|
-
export const chatWorkspaceDrawerDialogClassName = cn("starci-core-chat-workspace-drawer-dialog") ?? "starci-core-chat-workspace-drawer-dialog";
|
|
33
|
-
export const chatWorkspaceDrawerBodyClassName = cn("starci-core-chat-workspace-drawer-body") ?? "starci-core-chat-workspace-drawer-body";
|
|
34
|
-
/** Scroll owner inside the compact supporting overlay. */
|
|
35
|
-
export const chatWorkspaceOverlayRailClassName = cn("starci-core-chat-workspace-overlay-rail") ?? "starci-core-chat-workspace-overlay-rail";
|
|
36
|
-
/** Make the vendor-provided overlay exit easy to target in every input mode. */
|
|
37
|
-
export const chatWorkspaceDrawerCloseClassName = cn("starci-core-chat-workspace-drawer-close") ?? "starci-core-chat-workspace-drawer-close";
|
|
38
|
-
//# sourceMappingURL=classNames.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classNames.js","sourceRoot":"","sources":["../../../../src/core/composition/ChatWorkspace/classNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAElC;;;;;;GAMG;AAEH,6E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