@consciousclouds/shell-primitive 0.1.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@consciousclouds/shell-primitive` are documented here.
4
+
5
+ ## 0.1.0
6
+
7
+ - Initial extraction of the neutral **Shell Primitive** from the live
8
+ `@consciousclouds/operator-shell` frame (SDK adoption-hardening, slice 3a).
9
+ - `ShellFrame`: the product-free layout skeleton (header · sidebar · main ·
10
+ optional assistant panel · optional overlays), the generalized
11
+ `assistant*` placement mechanics (`AssistantBehavior = push | overlay |
12
+ rail`, `assistantWidth`, `assistantOpen`) with the main-region reflow, and
13
+ `workspaceChrome` (`framed | edge-to-edge`).
14
+ - Reflow motion sourced from `@consciousclouds/tokens` motion tokens (no
15
+ hand-rolled durations/easings).
16
+ - Source-consumed only (not yet published); `@consciousclouds/operator-shell`
17
+ delegates its frame to it, dropping Chief into the assistant slot.
package/LICENSE ADDED
@@ -0,0 +1,194 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship made available under
36
+ the License, as indicated by a copyright notice that is included in
37
+ or attached to the work (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean, as submitted to the Licensor for inclusion
48
+ in the Work by the copyright owner or by an individual or Legal Entity
49
+ authorized to submit on behalf of the copyright owner. For the purposes
50
+ of this definition, "submitted" means any form of electronic, verbal,
51
+ or written communication sent to the Licensor or its representatives,
52
+ including but not limited to communication on electronic mailing lists,
53
+ source code control systems, and issue tracking systems that are managed
54
+ by, or on behalf of, the Licensor for the purpose of discussing and
55
+ improving the Work, but excluding communication that is conspicuously
56
+ marked or designated in writing by the copyright owner as "Not a
57
+ Contribution."
58
+
59
+ "Contributor" shall mean Licensor and any Legal Entity on behalf of
60
+ whom a Contribution has been received by the Licensor and included
61
+ within the Work.
62
+
63
+ 2. Grant of Copyright License. Subject to the terms and conditions of
64
+ this License, each Contributor hereby grants to You a perpetual,
65
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
66
+ copyright license to reproduce, prepare Derivative Works of,
67
+ publicly display, publicly perform, sublicense, and distribute the
68
+ Work and such Derivative Works in Source or Object form.
69
+
70
+ 3. Grant of Patent License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ (except as stated in this section) patent license to make, have made,
74
+ use, offer to sell, sell, import, and otherwise transfer the Work,
75
+ where such license applies only to those patent claims licensable
76
+ by such Contributor that are necessarily infringed by their
77
+ Contribution(s) alone or by the combination of their Contribution(s)
78
+ with the Work to which such Contribution(s) was submitted. If You
79
+ institute patent litigation against any entity (including a cross-claim
80
+ or counterclaim in a lawsuit) alleging that the Work or any
81
+ Contribution embodied within the Work constitutes direct or contributory
82
+ patent infringement, then any patent licenses granted to You under
83
+ this License for that Work shall terminate as of the date such
84
+ litigation is filed.
85
+
86
+ 4. Redistribution. You may reproduce and distribute copies of the
87
+ Work or Derivative Works thereof in any medium, with or without
88
+ modifications, and in Source or Object form, provided that You
89
+ meet the following conditions:
90
+
91
+ (a) You must give any other recipients of the Work or Derivative Works
92
+ a copy of this License; and
93
+
94
+ (b) You must cause any modified files to carry prominent notices
95
+ stating that You changed the files; and
96
+
97
+ (c) You must retain, in the Source form of any Derivative Works that
98
+ You distribute, all copyright, patent, trademark, and attribution
99
+ notices from the Source form of the Work, excluding those notices
100
+ that do not pertain to any part of the Derivative Works; and
101
+
102
+ (d) If the Work includes a "NOTICE" text file as part of its
103
+ distribution, You must include a readable copy of the attribution
104
+ notices contained within such NOTICE file, in at least one of the
105
+ following places: within a NOTICE text provided as part of the
106
+ Derivative Works; within the Source form or documentation, if
107
+ provided along with the Derivative Works; or, within a display
108
+ generated by the Derivative Works, if and wherever such third-party
109
+ notices normally appear. The contents of the NOTICE file are for
110
+ informational purposes only and do not modify the License. You may
111
+ add Your own attribution notices within Derivative Works that You
112
+ distribute, alongside or in addition to the NOTICE text from the
113
+ Work, provided that such additional attribution notices cannot be
114
+ construed as modifying the License.
115
+
116
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
117
+ any Contribution intentionally submitted for inclusion in the Work by
118
+ You to the Licensor shall be under the terms and conditions of this
119
+ License, without any additional terms or conditions.
120
+
121
+ 6. Trademarks. This License does not grant permission to use the trade
122
+ names, trademarks, service marks, or product names of the Licensor,
123
+ except as required for reasonable and customary use in describing the
124
+ origin of the Work and reproducing the content of the NOTICE file.
125
+
126
+ 7. Disclaimer of Warranty. Unless required by applicable law or
127
+ agreed to in writing, Licensor provides the Work (and each
128
+ Contributor provides its Contributions) on an "AS IS" BASIS,
129
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
130
+ implied, including, without limitation, any conditions of TITLE,
131
+ MERCHANTIBILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
132
+ responsible for determining the appropriateness of using or
133
+ redistributing the Work and assume any risks associated with Your
134
+ exercise of permissions under this License.
135
+
136
+ 8. Limitation of Liability. In no event and under no legal theory,
137
+ whether in tort (including negligence), contract, or otherwise,
138
+ unless required by applicable law (such as deliberate and grossly
139
+ negligent acts) or agreed to in writing, shall any Contributor be
140
+ liable to You for damages, including any direct, indirect, special,
141
+ incidental, or exemplary damages of any character arising as a result
142
+ of this License or out of the use or inability to use the Work
143
+ (including but not limited to damages for loss of goodwill, work
144
+ stoppage, computer failure or malfunction, or all other commercial
145
+ damages or losses), even if such Contributor has been advised of the
146
+ possibility of such damages.
147
+
148
+ 9. Accepting Warranty or Liability. While redistributing the Work or
149
+ Derivative Works thereof, You may choose to offer, and charge a fee
150
+ for, acceptance of support, warranty, indemnity, or other liability
151
+ obligations and/or rights consistent with this License. However, in
152
+ accepting such obligations, You may offer such obligations only on
153
+ Your own behalf and on Your sole responsibility, not on behalf of any
154
+ other Contributor, and only if You agree to indemnify, defend, and
155
+ hold each Contributor harmless for any liability incurred by, or
156
+ claims asserted against, such Contributor by reason of your accepting
157
+ any such warranty or additional liability.
158
+
159
+ Copyright 2024 Conscious Clouds
160
+
161
+ Licensed under the Apache License, Version 2.0 (the "License");
162
+ you may not use this file except in compliance with the License.
163
+ You may obtain a copy of the License at
164
+
165
+ http://www.apache.org/licenses/LICENSE-2.0
166
+
167
+ Unless required by applicable law or agreed to in writing, software
168
+ distributed under the License is distributed on an "AS IS" BASIS,
169
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
170
+ See the License for the specific language governing permissions and
171
+ limitations under the License.
172
+
173
+ ---
174
+
175
+ Portions of this package are derived from shadcn/ui (https://ui.shadcn.com),
176
+ Copyright (c) 2023 shadcn, licensed under the MIT License:
177
+
178
+ Permission is hereby granted, free of charge, to any person obtaining a copy
179
+ of this software and associated documentation files (the "Software"), to deal
180
+ in the Software without restriction, including without limitation the rights
181
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
182
+ copies of the Software, and to permit persons to whom the Software is
183
+ furnished to do so, subject to the following conditions:
184
+
185
+ The above copyright notice and this permission notice shall be included in all
186
+ copies or substantial portions of the Software.
187
+
188
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
189
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
190
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
191
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
192
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
193
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
194
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # @consciousclouds/shell-primitive
2
+
3
+ The neutral shell **frame** — mechanism, not meaning. It is the shared
4
+ primitive the three Frontend-Platform shells (Operator / Business / Consumer)
5
+ frame around, implementing the LOCKED doctrine amendment _"Three distinct
6
+ shells, one shared primitive"_ (frontend-platform-doctrine.md, layer 3·5): the
7
+ **frame owns mechanism, the shells own meaning.**
8
+
9
+ ## What it is
10
+
11
+ A single `ShellFrame` component that owns the product-free scaffolding:
12
+
13
+ - **The layout skeleton** — the `@consciousclouds/ui` `SidebarProvider` /
14
+ `SidebarInset` arrangement: a full-width header bar above an
15
+ icon-collapsible sidebar, a main/workspace region, and an **optional**
16
+ right-side assistant panel.
17
+ - **Region slots** — `header`, `sidebar`, `children` (the main region), an
18
+ optional `overlays` slot (portal/dialog surfaces mounted inside the frame's
19
+ provider context), and an **optional `assistant` slot**.
20
+ - **The assistant-panel placement mechanics** — the neutral `push | overlay |
21
+ rail` behavior, the panel width, and the **main-region reflow** (the gap
22
+ that animates as the panel occupies space). Driven by `assistantBehavior`,
23
+ `assistantWidth`, and `assistantOpen`. If **no** assistant slot is passed,
24
+ no panel and no reflow render — _"a shell without an assistant"_ falls out
25
+ for free.
26
+ - **Workspace chrome** — `framed` (a floating rounded container) or
27
+ `edge-to-edge` (flat).
28
+ - **Motion from tokens** — the reflow transition reads its duration/easing
29
+ from `@consciousclouds/tokens` (`motionTokens`), never hand-rolled numbers.
30
+
31
+ ## What it is NOT
32
+
33
+ It has **no** knowledge of Chief, of a `TurnAdapter`, of the nav engine, of
34
+ the permission guard, or of anything operator-specific. It depends only on
35
+ `@consciousclouds/ui` and `@consciousclouds/tokens`. The assistant slot is a
36
+ plain `ReactNode`: whatever surface a shell drops in (the operator shell drops
37
+ in Chief) owns its own open/close and focus lifecycle — the frame only reflows
38
+ the main region around it.
39
+
40
+ See `docs/design/frontend-platform-doctrine.md`.
@@ -0,0 +1,87 @@
1
+ /**
2
+ * ShellFrame — the neutral shell FRAME: the one layout skeleton every
3
+ * Frontend-Platform shell (Operator / Business / Consumer) frames around.
4
+ * MECHANISM, not meaning — it knows nothing of any product, of Chief, of a
5
+ * transport, of the nav engine, or of the permission guard. It owns only the
6
+ * arrangement:
7
+ *
8
+ * - a full-width header bar (the `header` slot) above
9
+ * - an icon-collapsible sidebar (the `sidebar` slot) and
10
+ * - a main / workspace region (`children`), with
11
+ * - an OPTIONAL right-side assistant panel (the `assistant` slot).
12
+ *
13
+ * The assistant-panel PLACEMENT is a frame concern; the assistant's turn flow,
14
+ * open/close lifecycle, focus return, and its own panel-width / scrim are the
15
+ * SLOT's concern (whatever node a shell drops in — the operator shell drops in
16
+ * Chief). The frame's job is the MAIN-REGION REFLOW: the gap between the
17
+ * workspace and the panel animates as the panel occupies space, given
18
+ * (assistant present + behavior + open + width).
19
+ *
20
+ * - `push` (default): the workspace visibly reflows beside an in-flow panel
21
+ * at `lg+` (the gap opens from 0 to 1rem when the panel opens).
22
+ * - `overlay`: the panel floats over the workspace — no reflow (the gap
23
+ * stays 0; the slot renders its own floating drawer).
24
+ * - `rail`: an always-present in-flow rail at `xl+` — the gap is always open
25
+ * at `xl+`.
26
+ *
27
+ * If NO assistant slot is passed, no panel and no reflow render at all: "a
28
+ * shell without an assistant" falls out for free (the gap is permanently 0 and
29
+ * the workspace fills the inset). This is exactly what the future Business /
30
+ * Consumer shells rely on when they frame around ShellFrame without Chief.
31
+ *
32
+ * The reflow motion is read from @consciousclouds/tokens (`motionTokens`) —
33
+ * the platform's single source of truth for duration/easing — never
34
+ * hand-rolled numbers. Everything else is layout composed over
35
+ * @consciousclouds/ui's `SidebarProvider` / `SidebarInset`.
36
+ */
37
+ import * as React from "react";
38
+ /**
39
+ * How the assistant panel occupies space — the neutral generalization of the
40
+ * Chief region's layout behavior. Chrome only; it moves the panel and reflows
41
+ * the workspace, never the assistant's turn flow.
42
+ */
43
+ export type AssistantBehavior = "push" | "overlay" | "rail";
44
+ /** The main region's chrome: a floating rounded container, or the flat layout. */
45
+ export type ShellWorkspaceChrome = "framed" | "edge-to-edge";
46
+ export interface ShellFrameProps {
47
+ /** The full-width top chrome (a header bar). Rendered above sidebar + main. */
48
+ header: React.ReactNode;
49
+ /** The left navigation rail (an icon-collapsible sidebar). */
50
+ sidebar: React.ReactNode;
51
+ /** The main / workspace content — fills the inset beside the sidebar. */
52
+ children: React.ReactNode;
53
+ /**
54
+ * OPTIONAL assistant panel — the right-side AI/assistant surface. The node
55
+ * owns its OWN open/close, focus, and panel-width animation; the frame only
56
+ * reflows the main region around it. Absent ⇒ no panel and no reflow ("a
57
+ * shell without an assistant").
58
+ */
59
+ assistant?: React.ReactNode;
60
+ /**
61
+ * How the assistant panel occupies space (default `push`) — drives the
62
+ * main-region reflow. Ignored when no `assistant` is present.
63
+ */
64
+ assistantBehavior?: AssistantBehavior;
65
+ /**
66
+ * The assistant panel's reflow width in px (default 420) — surfaced to the
67
+ * slot as the `--assistant-width` CSS custom property so a width-less
68
+ * assistant can size to the frame's declared reflow width. (An assistant
69
+ * that ships its own panel width, like Chief, simply ignores it.)
70
+ */
71
+ assistantWidth?: number;
72
+ /**
73
+ * Whether the assistant panel is open (default `false`) — drives the reflow
74
+ * for `push`. `rail` is always in-flow at `xl+`; `overlay` never reflows.
75
+ */
76
+ assistantOpen?: boolean;
77
+ /** The main region's chrome (default `framed`). */
78
+ workspaceChrome?: ShellWorkspaceChrome;
79
+ /**
80
+ * OPTIONAL overlay surfaces (e.g. a command palette) mounted inside the
81
+ * frame's provider context but out of flow — portals/dialogs that must sit
82
+ * within the shell's React tree without disturbing the layout.
83
+ */
84
+ overlays?: React.ReactNode;
85
+ }
86
+ export declare function ShellFrame({ header, sidebar, children, assistant, assistantBehavior, assistantWidth, assistantOpen, workspaceChrome, overlays, }: ShellFrameProps): import("react/jsx-runtime").JSX.Element;
87
+ //# sourceMappingURL=ShellFrame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShellFrame.d.ts","sourceRoot":"","sources":["../../src/frame/ShellFrame.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAE5D,kFAAkF;AAClF,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,cAAc,CAAC;AAE7D,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,8DAA8D;IAC9D,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,yEAAyE;IACzE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mDAAmD;IACnD,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAcD,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAS,EACT,iBAA0B,EAC1B,cAAoB,EACpB,aAAqB,EACrB,eAA0B,EAC1B,QAAQ,GACT,EAAE,eAAe,2CA2DjB"}
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { motionTokens } from "@consciousclouds/tokens";
4
+ import { SidebarInset, SidebarProvider, cn } from "@consciousclouds/ui";
5
+ /**
6
+ * The reflow transition — motion from the token vocabulary, applied inline so
7
+ * the timing travels with the JS values (no hand-rolled `duration-300 /
8
+ * ease-in-out`). The gap VALUES stay Tailwind classes; only the timing is
9
+ * tokenized here.
10
+ */
11
+ const REFLOW_TRANSITION = {
12
+ transitionProperty: "gap",
13
+ transitionDuration: `${motionTokens.duration.base}s`,
14
+ transitionTimingFunction: `cubic-bezier(${motionTokens.easing.standard.join(", ")})`,
15
+ };
16
+ export function ShellFrame({ header, sidebar, children, assistant, assistantBehavior = "push", assistantWidth = 420, assistantOpen = false, workspaceChrome = "framed", overlays, }) {
17
+ const framed = workspaceChrome === "framed";
18
+ const hasAssistant = assistant != null;
19
+ // The main-region reflow gap: opens (0 → 1rem) as the panel takes space.
20
+ // Only ever non-zero when an assistant is present — no assistant ⇒ no reflow.
21
+ const reflowGap = !hasAssistant
22
+ ? "gap-0"
23
+ : assistantBehavior === "rail"
24
+ ? "gap-0 xl:gap-4"
25
+ : assistantBehavior === "push" && assistantOpen
26
+ ? "gap-0 lg:gap-4"
27
+ : "gap-0";
28
+ return (_jsxs(SidebarProvider, { className: "h-svh flex-col overflow-hidden", style: {
29
+ "--header-height": "3.5rem",
30
+ "--assistant-width": `${assistantWidth}px`,
31
+ }, children: [header, overlays, _jsxs("div", { className: "flex min-h-0 flex-1", children: [sidebar, _jsx(SidebarInset, { className: "min-h-0 flex-row overflow-hidden", children: framed ? (
32
+ // FRAMED workspace chrome: the workspace floats as a rounded
33
+ // container, a sibling card beside the assistant panel; the gap
34
+ // animates alongside the panel so the reflow reads as one motion.
35
+ _jsxs("div", { className: cn("flex min-h-0 min-w-0 flex-1 p-4 lg:p-6", reflowGap), style: REFLOW_TRANSITION, children: [_jsx("div", { className: "min-w-0 flex-1 overflow-y-auto rounded-xl bg-muted/50 shadow-panel p-4 lg:p-6", children: children }), assistant] })) : (
36
+ // EDGE-TO-EDGE workspace chrome: the flat layout (no reflow gap).
37
+ _jsxs(_Fragment, { children: [_jsx("div", { className: "min-w-0 flex-1 overflow-y-auto p-4 lg:p-6", children: children }), assistant] })) })] })] }));
38
+ }
39
+ //# sourceMappingURL=ShellFrame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShellFrame.js","sourceRoot":"","sources":["../../src/frame/ShellFrame.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAyCb,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAqDxE;;;;;GAKG;AACH,MAAM,iBAAiB,GAAwB;IAC7C,kBAAkB,EAAE,KAAK;IACzB,kBAAkB,EAAE,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,GAAG;IACpD,wBAAwB,EAAE,gBAAgB,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;CACrF,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,SAAS,EACT,iBAAiB,GAAG,MAAM,EAC1B,cAAc,GAAG,GAAG,EACpB,aAAa,GAAG,KAAK,EACrB,eAAe,GAAG,QAAQ,EAC1B,QAAQ,GACQ;IAChB,MAAM,MAAM,GAAG,eAAe,KAAK,QAAQ,CAAC;IAC5C,MAAM,YAAY,GAAG,SAAS,IAAI,IAAI,CAAC;IAEvC,yEAAyE;IACzE,8EAA8E;IAC9E,MAAM,SAAS,GAAG,CAAC,YAAY;QAC7B,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,iBAAiB,KAAK,MAAM;YAC5B,CAAC,CAAC,gBAAgB;YAClB,CAAC,CAAC,iBAAiB,KAAK,MAAM,IAAI,aAAa;gBAC7C,CAAC,CAAC,gBAAgB;gBAClB,CAAC,CAAC,OAAO,CAAC;IAEhB,OAAO,CACL,MAAC,eAAe,IACd,SAAS,EAAC,gCAAgC,EAC1C,KAAK,EACH;YACE,iBAAiB,EAAE,QAAQ;YAC3B,mBAAmB,EAAE,GAAG,cAAc,IAAI;SACpB,aAGzB,MAAM,EACN,QAAQ,EACT,eAAK,SAAS,EAAC,qBAAqB,aACjC,OAAO,EACR,KAAC,YAAY,IAAC,SAAS,EAAC,kCAAkC,YACvD,MAAM,CAAC,CAAC,CAAC;wBACR,6DAA6D;wBAC7D,gEAAgE;wBAChE,kEAAkE;wBAClE,eACE,SAAS,EAAE,EAAE,CAAC,wCAAwC,EAAE,SAAS,CAAC,EAClE,KAAK,EAAE,iBAAiB,aAMxB,cAAK,SAAS,EAAC,+EAA+E,YAC3F,QAAQ,GACL,EAGL,SAAS,IACN,CACP,CAAC,CAAC,CAAC;wBACF,kEAAkE;wBAClE,8BACE,cAAK,SAAS,EAAC,2CAA2C,YAAE,QAAQ,GAAO,EAC1E,SAAS,IACT,CACJ,GACY,IACX,IACU,CACnB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @consciousclouds/shell-primitive — the neutral shell FRAME (Layer 3·5 of the
3
+ * Frontend Platform): the shared layout primitive the Operator / Business /
4
+ * Consumer shells frame around. MECHANISM, not meaning.
5
+ *
6
+ * `ShellFrame` owns the arrangement (header · sidebar · main · optional
7
+ * assistant panel · optional overlays), the generalized assistant-panel
8
+ * placement mechanics (`AssistantBehavior` = push | overlay | rail, plus
9
+ * `assistantWidth` / `assistantOpen`), the main-region reflow, and the
10
+ * workspace chrome (`framed` | `edge-to-edge`). It imports NOTHING
11
+ * product-specific — no Chief, no TurnAdapter, no nav engine, no permission
12
+ * guard — only @consciousclouds/ui + @consciousclouds/tokens. The assistant
13
+ * slot is a plain ReactNode; the slot owns its own turn flow, open/close, and
14
+ * focus lifecycle. If no assistant slot is passed, no panel/reflow renders —
15
+ * "a shell without an assistant." See
16
+ * docs/design/frontend-platform-doctrine.md.
17
+ */
18
+ export { ShellFrame } from "./frame/ShellFrame.js";
19
+ export type { AssistantBehavior, ShellFrameProps, ShellWorkspaceChrome, } from "./frame/ShellFrame.js";
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,oBAAoB,GACrB,MAAM,uBAAuB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @consciousclouds/shell-primitive — the neutral shell FRAME (Layer 3·5 of the
3
+ * Frontend Platform): the shared layout primitive the Operator / Business /
4
+ * Consumer shells frame around. MECHANISM, not meaning.
5
+ *
6
+ * `ShellFrame` owns the arrangement (header · sidebar · main · optional
7
+ * assistant panel · optional overlays), the generalized assistant-panel
8
+ * placement mechanics (`AssistantBehavior` = push | overlay | rail, plus
9
+ * `assistantWidth` / `assistantOpen`), the main-region reflow, and the
10
+ * workspace chrome (`framed` | `edge-to-edge`). It imports NOTHING
11
+ * product-specific — no Chief, no TurnAdapter, no nav engine, no permission
12
+ * guard — only @consciousclouds/ui + @consciousclouds/tokens. The assistant
13
+ * slot is a plain ReactNode; the slot owns its own turn flow, open/close, and
14
+ * focus lifecycle. If no assistant slot is passed, no panel/reflow renders —
15
+ * "a shell without an assistant." See
16
+ * docs/design/frontend-platform-doctrine.md.
17
+ */
18
+ export { ShellFrame } from "./frame/ShellFrame.js";
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@consciousclouds/shell-primitive",
3
+ "version": "0.1.0",
4
+ "description": "ConsciousClouds Shell Primitive — the neutral shell FRAME (mechanism, not meaning): the header + sidebar + main-region layout skeleton over @consciousclouds/ui, the responsive assistant-panel placement mechanics (push | overlay | rail reflow), and workspace chrome (framed | edge-to-edge). No product, no Chief, no nav, no permission guard. The shared primitive the Operator / Business / Consumer shells frame around. Layer 3·5 of the Frontend Platform.",
5
+ "license": "Apache-2.0",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./styles/source.css": "./styles/source.css"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "styles",
19
+ "README.md",
20
+ "CHANGELOG.md",
21
+ "LICENSE"
22
+ ],
23
+ "scripts": {
24
+ "build": "tsc -p tsconfig.build.json",
25
+ "clean": "rm -rf dist",
26
+ "test": "bun test",
27
+ "type-check": "tsc --noEmit",
28
+ "prepublishOnly": "bun run clean && bun run build && bun run type-check"
29
+ },
30
+ "dependencies": {
31
+ "@consciousclouds/ui": "0.1.0"
32
+ },
33
+ "peerDependencies": {
34
+ "@consciousclouds/tokens": "0.1.0",
35
+ "react": ">=18.0.0"
36
+ },
37
+ "devDependencies": {
38
+ "@consciousclouds/tokens": "0.1.0",
39
+ "@happy-dom/global-registrator": "^20.10.3",
40
+ "@types/react": "^19.2.7",
41
+ "@types/react-dom": "^19.2.1",
42
+ "happy-dom": "^20.10.3",
43
+ "react": "19.2.4",
44
+ "react-dom": "19.2.4",
45
+ "typescript": "^5.7.2"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
50
+ "engines": {
51
+ "bun": ">=1.0.0",
52
+ "node": ">=18.0.0"
53
+ }
54
+ }
@@ -0,0 +1,15 @@
1
+ /*
2
+ * @consciousclouds/shell-primitive — Tailwind v4 source registration.
3
+ *
4
+ * Tailwind v4 does not scan node_modules: without this, the frame's layout /
5
+ * reflow utility classes (they exist ONLY inside this package) would be
6
+ * missing from an app's generated CSS. A consuming shell registers this from
7
+ * its own `styles/source.css` (see @consciousclouds/operator-shell), so an
8
+ * app that already imports the shell's source picks these up transitively —
9
+ * no extra app-level import.
10
+ *
11
+ * The path is relative to THIS file, so it resolves inside the installed
12
+ * package regardless of where the consuming app lives.
13
+ */
14
+
15
+ @source "../dist";