@ismail-elkorchi/ui-shell 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/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # @ismail-elkorchi/ui-shell
2
+
3
+ Tailwind-friendly shell components (activity bar, sidebars, status bar, and an optional frame layout) for Light DOM layouts. They render Tailwind utility classes, depend on `@ismail-elkorchi/ui-primitives` for controls, and stay framework-agnostic.
4
+
5
+ ## Build & distribution
6
+
7
+ - `npm run build` emits ESM + `.d.ts` modules into `dist/` for `index/register/router`, layout, activity bar, sidebar, secondary sidebar, and status bar.
8
+ - Tailwind scanning helper ships as `dist/tailwind-source.css`.
9
+ - Published output contains only `dist/` plus this README; TypeScript sources stay in the workspace.
10
+
11
+ ## Layout layer
12
+
13
+ - Regions: left rail (`activity-bar`), primary sidebar, main content, optional secondary sidebar, and status bar.
14
+ - `uik-shell-layout` stitches the regions together and tags them with `data-region` attributes to keep the layout contract visible in the DOM.
15
+ - Shell components expose only UI surface/state; business logic should live in the host app.
16
+ - **Contract**: Shell components use `ui-primitives` strictly via their public API (attributes/props). They do not rely on Tailwind utility injection to style the internals of primitives (no `class="text-red-500"` on a `uik-button`).
17
+
18
+ ## Using the components
19
+
20
+ ```ts
21
+ import {html} from 'lit';
22
+ import '@ismail-elkorchi/ui-primitives/register';
23
+ import '@ismail-elkorchi/ui-shell/register';
24
+ import type {ActivityBarItem} from '@ismail-elkorchi/ui-shell/activity-bar';
25
+
26
+ const activityItems: ActivityBarItem[] = [
27
+ {
28
+ id: 'explorer',
29
+ label: 'Explorer',
30
+ icon: 'M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z'
31
+ },
32
+ {id: 'search', label: 'Search', icon: 'M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'}
33
+ ];
34
+
35
+ html`
36
+ <uik-shell-layout
37
+ .activityBar=${html`
38
+ <uik-shell-activity-bar
39
+ .items=${activityItems}
40
+ .activeId=${'explorer'}
41
+ @activity-select=${(e: CustomEvent<{id: string}>) => console.log(e.detail.id)}>
42
+ </uik-shell-activity-bar>
43
+ `}
44
+ .primarySidebar=${html`
45
+ <uik-shell-sidebar
46
+ heading="Explorer"
47
+ .actions=${html`<uik-button variant="ghost" size="icon">…</uik-button>`}
48
+ .body=${html`<!-- put your file tree or filters here -->`}>
49
+ </uik-shell-sidebar>
50
+ `}
51
+ .mainContent=${html`<main class="flex-1">Your editor or tabs</main>`}
52
+ .secondarySidebar=${html`
53
+ <uik-shell-secondary-sidebar
54
+ .open=${true}
55
+ heading="AI Assistant"
56
+ .body=${html`<p class="text-sm text-muted-foreground">Auxiliary tools live here.</p>`}
57
+ @secondary-close=${() => console.log('close secondary')}></uik-shell-secondary-sidebar>
58
+ `}
59
+ .statusBar=${html`
60
+ <uik-shell-statusbar message="Ready" tone="info" .meta=${'3 files selected'}></uik-shell-statusbar>
61
+ `}
62
+ ?showSecondary=${true}>
63
+ </uik-shell-layout>
64
+ `;
65
+ ```
66
+
67
+ ### Component notes
68
+
69
+ - `uik-shell-activity-bar`: accepts `.items` (id/label/icon/path) and emits `activity-select`.
70
+ - `uik-shell-sidebar`: header/heading with `.actions`, `.body`, and optional `.footer`; `paddedBody`/`scrollBody` toggle spacing and scroll.
71
+ - `uik-shell-secondary-sidebar`: controlled via `.open`; emits `secondary-close` when the close button is clicked.
72
+ - `uik-shell-statusbar`: `.message` + `.tone` colorizes the left side; `.meta` renders on the right (string becomes an outline badge).
73
+
74
+ ## Routing store
75
+
76
+ A tiny EventTarget-based router lives in `@ismail-elkorchi/ui-shell/router`. It is framework-light, keeps state in memory (no history), and is meant for desktop flows that only need named views and optional subviews/tabs.
77
+
78
+ ```ts
79
+ import {createAppShellRouter, APP_SHELL_NAV_EVENT, type AppShellNavigationDetail} from '@ismail-elkorchi/ui-shell/router';
80
+
81
+ const routes = [
82
+ {id: 'explorer', label: 'Explorer', subviews: ['code', 'prompt', 'apply'], defaultSubview: 'code'},
83
+ {id: 'search', label: 'Search'},
84
+ {id: 'settings', label: 'Settings'}
85
+ ] as const;
86
+
87
+ export const shellRouter = createAppShellRouter({routes, initialView: 'explorer', initialSubview: 'code'});
88
+
89
+ // React to navigation anywhere in the app
90
+ const unsubscribe = shellRouter.subscribe(({view, subview}) => {
91
+ console.log('Current location', view, subview);
92
+ });
93
+
94
+ // Wire Lit components through events
95
+ html`
96
+ <uik-shell-activity-bar
97
+ .items=${routes.map(r => ({id: r.id, label: r.label ?? r.id}))}
98
+ .activeId=${shellRouter.current.view}
99
+ @activity-select=${(e: CustomEvent<{id: string}>) => shellRouter.navigate(e.detail.id)}>
100
+ </uik-shell-activity-bar>
101
+
102
+ <editor-area
103
+ .activeTab=${shellRouter.current.subview ?? 'code'}
104
+ @tab-change=${(e: CustomEvent<{tab: string}>) => shellRouter.navigate(shellRouter.current.view, e.detail.tab)}>
105
+ </editor-area>
106
+ `;
107
+
108
+ // Listen to the low-level navigation event if you prefer EventTarget
109
+ window.addEventListener(APP_SHELL_NAV_EVENT, (event: Event) => {
110
+ const detail = (event as CustomEvent<AppShellNavigationDetail>).detail;
111
+ console.log(detail.from, detail.to, detail.route);
112
+ });
113
+ ```
114
+
115
+ - Routes are simple `{id, label?, subviews?, defaultSubview?}` objects.
116
+ - `navigate(view, subview?)` resolves subviews per route (keeping the last used subview for that route).
117
+ - `subscribe` immediately fires with the current location and returns an unsubscribe function.
118
+
119
+ ## Tailwind v4 scanning
120
+
121
+ The package ships Tailwind class strings in TypeScript. Add the source hint before importing Tailwind:
122
+
123
+ ```css
124
+ @import '@ismail-elkorchi/ui-tokens/index.css';
125
+ @import '@ismail-elkorchi/ui-shell/tailwind-source.css'; /* pulls in @source "./**/*.{ts,js}" */
126
+ @source "./**/*.{ts,js,html}";
127
+ @import 'tailwindcss';
128
+ ```
129
+
130
+ Adjust the `@source` path to match the location of your entry CSS. Alternatively, add the line yourself:
131
+
132
+ ```css
133
+ @source "../../node_modules/@ismail-elkorchi/ui-shell/**/*.{ts,js}";
134
+ ```
135
+
136
+ Make sure these appear in the renderer entry CSS so Tailwind keeps the shell utilities during tree-shaking.
@@ -0,0 +1,25 @@
1
+ import { LitElement, svg } from 'lit';
2
+ import '@ismail-elkorchi/ui-primitives/button';
3
+ export type ActivityBarIcon = string | ReturnType<typeof svg>;
4
+ export interface ActivityBarItem {
5
+ id: string;
6
+ label: string;
7
+ icon?: ActivityBarIcon;
8
+ tooltip?: string;
9
+ }
10
+ export declare class AppShellActivityBar extends LitElement {
11
+ accessor items: ActivityBarItem[];
12
+ accessor activeId: string;
13
+ accessor footer: unknown;
14
+ createRenderRoot(): this;
15
+ private emitSelect;
16
+ private renderIcon;
17
+ private renderItem;
18
+ render(): import("lit-html").TemplateResult<1>;
19
+ }
20
+ declare global {
21
+ interface HTMLElementTagNameMap {
22
+ 'uik-shell-activity-bar': AppShellActivityBar;
23
+ }
24
+ }
25
+ //# sourceMappingURL=ActivityBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityBar.d.ts","sourceRoot":"","sources":["../ActivityBar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAiB,GAAG,EAAC,MAAM,KAAK,CAAC;AAGnD,OAAO,uCAAuC,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBACa,mBAAoB,SAAQ,UAAU;IACnB,QAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,CAAM;IAC3C,QAAQ,CAAC,QAAQ,SAAM;IACnB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAQ;IAErD,gBAAgB;IAIzB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,UAAU;IAuBT,MAAM;CAWhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,wBAAwB,EAAE,mBAAmB,CAAC;KAC/C;CACF"}
@@ -0,0 +1,81 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, nothing, svg } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ import '@ismail-elkorchi/ui-primitives/button';
10
+ let AppShellActivityBar = class AppShellActivityBar extends LitElement {
11
+ #items_accessor_storage = [];
12
+ get items() { return this.#items_accessor_storage; }
13
+ set items(value) { this.#items_accessor_storage = value; }
14
+ #activeId_accessor_storage = '';
15
+ get activeId() { return this.#activeId_accessor_storage; }
16
+ set activeId(value) { this.#activeId_accessor_storage = value; }
17
+ #footer_accessor_storage = null;
18
+ get footer() { return this.#footer_accessor_storage; }
19
+ set footer(value) { this.#footer_accessor_storage = value; }
20
+ createRenderRoot() {
21
+ return this;
22
+ }
23
+ emitSelect(id) {
24
+ this.dispatchEvent(new CustomEvent('activity-select', { detail: { id }, bubbles: true, composed: true }));
25
+ }
26
+ renderIcon(item) {
27
+ if (!item.icon)
28
+ return html `<span class="text-xs font-semibold">${item.label.charAt(0).toUpperCase()}</span>`;
29
+ if (typeof item.icon === 'string') {
30
+ return svg `<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="${item.icon}"></path>`;
31
+ }
32
+ return item.icon;
33
+ }
34
+ renderItem(item) {
35
+ const isActive = this.activeId === item.id;
36
+ return html `
37
+ <div class="relative w-12 h-12 flex items-center justify-center">
38
+ <div class="${isActive ? 'absolute left-0 w-[2px] h-full bg-primary rounded-r-sm' : 'hidden'}"></div>
39
+ <uik-button
40
+ variant="ghost"
41
+ size="icon"
42
+ class="w-12 h-12"
43
+ ?muted=${!isActive}
44
+ ?active=${isActive}
45
+ aria-pressed=${isActive ? 'true' : 'false'}
46
+ aria-label=${item.label}
47
+ title=${item.tooltip ?? item.label}
48
+ @click=${() => {
49
+ this.emitSelect(item.id);
50
+ }}>
51
+ <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">${this.renderIcon(item)}</svg>
52
+ </uik-button>
53
+ </div>
54
+ `;
55
+ }
56
+ render() {
57
+ return html `
58
+ <aside
59
+ data-region="activity-bar"
60
+ class="w-12 bg-secondary flex flex-col items-center py-2 flex-shrink-0 text-muted-foreground h-full">
61
+ ${this.items.map(item => this.renderItem(item))}
62
+ <div class="flex-1"></div>
63
+ ${this.footer ?? nothing}
64
+ </aside>
65
+ `;
66
+ }
67
+ };
68
+ __decorate([
69
+ property({ attribute: false })
70
+ ], AppShellActivityBar.prototype, "items", null);
71
+ __decorate([
72
+ property({ type: String })
73
+ ], AppShellActivityBar.prototype, "activeId", null);
74
+ __decorate([
75
+ property({ attribute: false })
76
+ ], AppShellActivityBar.prototype, "footer", null);
77
+ AppShellActivityBar = __decorate([
78
+ customElement('uik-shell-activity-bar')
79
+ ], AppShellActivityBar);
80
+ export { AppShellActivityBar };
81
+ //# sourceMappingURL=ActivityBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityBar.js","sourceRoot":"","sources":["../ActivityBar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAC,MAAM,KAAK,CAAC;AACnD,OAAO,EAAC,aAAa,EAAE,QAA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,MAAM,CAAC,CAAC,CAAC,OAAO;uBAC7B,IAAI,CAAC,KAAK;kBACf,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK;mBACzB,GAAG,EAAE;YACZ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC3B,CAAC;uFAC4E,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;;;KAGvG,CAAC;IACJ,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA;;;;UAIL,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;;UAE7C,IAAI,CAAC,MAAM,IAAI,OAAO;;KAE3B,CAAC;IACJ,CAAC;CACF,CAAA;AAtDwC;IAAtC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;gDAAwC;AAClC;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;mDAAwB;AACV;IAAtC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;iDAAiC;AAHnD,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CAuD/B"}
@@ -0,0 +1,17 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class AppShellLayout extends LitElement {
3
+ accessor activityBar: unknown;
4
+ accessor primarySidebar: unknown;
5
+ accessor mainContent: unknown;
6
+ accessor secondarySidebar: unknown;
7
+ accessor statusBar: unknown;
8
+ accessor showSecondary: boolean;
9
+ createRenderRoot(): this;
10
+ render(): import("lit-html").TemplateResult<1>;
11
+ }
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ 'uik-shell-layout': AppShellLayout;
15
+ }
16
+ }
17
+ //# sourceMappingURL=AppShellLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppShellLayout.d.ts","sourceRoot":"","sources":["../AppShellLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgB,MAAM,KAAK,CAAC;AAG9C,qBACa,cAAe,SAAQ,UAAU;IACd,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAQ;IACrC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAQ;IACxC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAQ;IACrC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAQ;IAC1C,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAQ;IACtC,QAAQ,CAAC,aAAa,UAAS;IAEjD,gBAAgB;IAIhB,MAAM;CAYhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -0,0 +1,66 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, nothing } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ let AppShellLayout = class AppShellLayout extends LitElement {
10
+ #activityBar_accessor_storage = null;
11
+ get activityBar() { return this.#activityBar_accessor_storage; }
12
+ set activityBar(value) { this.#activityBar_accessor_storage = value; }
13
+ #primarySidebar_accessor_storage = null;
14
+ get primarySidebar() { return this.#primarySidebar_accessor_storage; }
15
+ set primarySidebar(value) { this.#primarySidebar_accessor_storage = value; }
16
+ #mainContent_accessor_storage = null;
17
+ get mainContent() { return this.#mainContent_accessor_storage; }
18
+ set mainContent(value) { this.#mainContent_accessor_storage = value; }
19
+ #secondarySidebar_accessor_storage = null;
20
+ get secondarySidebar() { return this.#secondarySidebar_accessor_storage; }
21
+ set secondarySidebar(value) { this.#secondarySidebar_accessor_storage = value; }
22
+ #statusBar_accessor_storage = null;
23
+ get statusBar() { return this.#statusBar_accessor_storage; }
24
+ set statusBar(value) { this.#statusBar_accessor_storage = value; }
25
+ #showSecondary_accessor_storage = false;
26
+ get showSecondary() { return this.#showSecondary_accessor_storage; }
27
+ set showSecondary(value) { this.#showSecondary_accessor_storage = value; }
28
+ createRenderRoot() {
29
+ return this;
30
+ }
31
+ render() {
32
+ return html `
33
+ <div class="flex flex-col h-full w-full bg-background text-foreground" data-layout-layer="shell">
34
+ <div class="flex flex-1 min-h-0 overflow-hidden">
35
+ ${this.activityBar ?? nothing} ${this.primarySidebar ?? nothing}
36
+ <div class="flex-1 min-w-0 h-full flex flex-col" data-region="main">${this.mainContent ?? nothing}</div>
37
+ ${this.showSecondary ? (this.secondarySidebar ?? nothing) : nothing}
38
+ </div>
39
+ ${this.statusBar ? html `<div class="flex-shrink-0">${this.statusBar}</div>` : nothing}
40
+ </div>
41
+ `;
42
+ }
43
+ };
44
+ __decorate([
45
+ property({ attribute: false })
46
+ ], AppShellLayout.prototype, "activityBar", null);
47
+ __decorate([
48
+ property({ attribute: false })
49
+ ], AppShellLayout.prototype, "primarySidebar", null);
50
+ __decorate([
51
+ property({ attribute: false })
52
+ ], AppShellLayout.prototype, "mainContent", null);
53
+ __decorate([
54
+ property({ attribute: false })
55
+ ], AppShellLayout.prototype, "secondarySidebar", null);
56
+ __decorate([
57
+ property({ attribute: false })
58
+ ], AppShellLayout.prototype, "statusBar", null);
59
+ __decorate([
60
+ property({ type: Boolean })
61
+ ], AppShellLayout.prototype, "showSecondary", null);
62
+ AppShellLayout = __decorate([
63
+ customElement('uik-shell-layout')
64
+ ], AppShellLayout);
65
+ export { AppShellLayout };
66
+ //# sourceMappingURL=AppShellLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppShell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AAC,SAAS,EAAE,KAAK,EAAC,CAAC;iDAAsC;AAC5B;IAAtC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;oDAAyC;AAC/B;IAAtC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;iDAAsC;AAC5B;IAAtC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;sDAA2C;AACjC;IAAtC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;+CAAoC;AAC7B;IAAnC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;mDAAgC;AAN/C,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAwB1B"}
@@ -0,0 +1,18 @@
1
+ import { LitElement, nothing } from 'lit';
2
+ import '@ismail-elkorchi/ui-primitives/button';
3
+ import '@ismail-elkorchi/ui-primitives/separator';
4
+ export declare class AppShellSecondarySidebar extends LitElement {
5
+ accessor open: boolean;
6
+ accessor heading: string;
7
+ accessor body: unknown;
8
+ accessor footer: unknown;
9
+ createRenderRoot(): this;
10
+ private close;
11
+ render(): import("lit-html").TemplateResult<1> | typeof nothing;
12
+ }
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ 'uik-shell-secondary-sidebar': AppShellSecondarySidebar;
16
+ }
17
+ }
18
+ //# sourceMappingURL=SecondarySidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecondarySidebar.d.ts","sourceRoot":"","sources":["../SecondarySidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAQ,OAAO,EAAC,MAAM,KAAK,CAAC;AAG9C,OAAO,uCAAuC,CAAC;AAC/C,OAAO,0CAA0C,CAAC;AAElD,qBACa,wBAAyB,SAAQ,UAAU;IAC3B,QAAQ,CAAC,IAAI,UAAS;IACvB,QAAQ,CAAC,OAAO,SAAM;IAClB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAQ;IAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAQ;IAErD,gBAAgB;IAIzB,OAAO,CAAC,KAAK,CAEX;IAEO,MAAM;CAqChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,6BAA6B,EAAE,wBAAwB,CAAC;KACzD;CACF"}
@@ -0,0 +1,84 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, nothing } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ import '@ismail-elkorchi/ui-primitives/button';
10
+ import '@ismail-elkorchi/ui-primitives/separator';
11
+ let AppShellSecondarySidebar = class AppShellSecondarySidebar extends LitElement {
12
+ #open_accessor_storage = false;
13
+ get open() { return this.#open_accessor_storage; }
14
+ set open(value) { this.#open_accessor_storage = value; }
15
+ #heading_accessor_storage = '';
16
+ get heading() { return this.#heading_accessor_storage; }
17
+ set heading(value) { this.#heading_accessor_storage = value; }
18
+ #body_accessor_storage = null;
19
+ get body() { return this.#body_accessor_storage; }
20
+ set body(value) { this.#body_accessor_storage = value; }
21
+ #footer_accessor_storage = null;
22
+ get footer() { return this.#footer_accessor_storage; }
23
+ set footer(value) { this.#footer_accessor_storage = value; }
24
+ createRenderRoot() {
25
+ return this;
26
+ }
27
+ close = () => {
28
+ this.dispatchEvent(new CustomEvent('secondary-close', { bubbles: true, composed: true }));
29
+ };
30
+ render() {
31
+ if (!this.open)
32
+ return nothing;
33
+ return html `
34
+ <aside
35
+ data-region="secondary-sidebar"
36
+ class="w-80 bg-card flex flex-col border-l border-border flex-shrink-0 h-full text-foreground">
37
+ <div class="h-10 px-4 flex items-center justify-between bg-card select-none flex-shrink-0">
38
+ <span class="text-xs font-bold uppercase tracking-wider text-muted-foreground truncate">
39
+ ${this.heading || 'Secondary'}
40
+ </span>
41
+ <uik-button
42
+ variant="ghost"
43
+ size="icon"
44
+ class="h-7 w-7"
45
+ muted
46
+ aria-label="Close secondary sidebar"
47
+ title="Close secondary sidebar"
48
+ @click=${this.close}>
49
+ <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
50
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
51
+ </svg>
52
+ </uik-button>
53
+ </div>
54
+ <uik-separator orientation="horizontal"></uik-separator>
55
+ <div class="flex-1 overflow-y-auto p-4 custom-scrollbar text-sm text-muted-foreground">
56
+ ${this.body ?? html `<p class="text-xs italic">Secondary sidebar content</p>`}
57
+ </div>
58
+ ${this.footer
59
+ ? html `
60
+ <uik-separator orientation="horizontal"></uik-separator>
61
+ <div class="p-3 border-t border-border bg-card">${this.footer}</div>
62
+ `
63
+ : nothing}
64
+ </aside>
65
+ `;
66
+ }
67
+ };
68
+ __decorate([
69
+ property({ type: Boolean })
70
+ ], AppShellSecondarySidebar.prototype, "open", null);
71
+ __decorate([
72
+ property({ type: String })
73
+ ], AppShellSecondarySidebar.prototype, "heading", null);
74
+ __decorate([
75
+ property({ attribute: false })
76
+ ], AppShellSecondarySidebar.prototype, "body", null);
77
+ __decorate([
78
+ property({ attribute: false })
79
+ ], AppShellSecondarySidebar.prototype, "footer", null);
80
+ AppShellSecondarySidebar = __decorate([
81
+ customElement('uik-shell-secondary-sidebar')
82
+ ], AppShellSecondarySidebar);
83
+ export { AppShellSecondarySidebar };
84
+ //# sourceMappingURL=SecondarySidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecondarySidebar.js","sourceRoot":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nC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;oDAAuB;AACd;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;uDAAuB;AACT;IAAtC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;oDAA+B;AACrB;IAAtC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;sDAAiC;AAJnD,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CAmDpC"}
@@ -0,0 +1,20 @@
1
+ import { LitElement } from 'lit';
2
+ import '@ismail-elkorchi/ui-primitives/separator';
3
+ export declare class AppShellSidebar extends LitElement {
4
+ accessor heading: string;
5
+ accessor subtitle: string;
6
+ accessor paddedBody: boolean;
7
+ accessor scrollBody: boolean;
8
+ accessor actions: unknown;
9
+ accessor body: unknown;
10
+ accessor footer: unknown;
11
+ createRenderRoot(): this;
12
+ private getBodyClasses;
13
+ render(): import("lit-html").TemplateResult<1>;
14
+ }
15
+ declare global {
16
+ interface HTMLElementTagNameMap {
17
+ 'uik-shell-sidebar': AppShellSidebar;
18
+ }
19
+ }
20
+ //# sourceMappingURL=Sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../Sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgB,MAAM,KAAK,CAAC;AAG9C,OAAO,0CAA0C,CAAC;AAElD,qBACa,eAAgB,SAAQ,UAAU;IACnB,QAAQ,CAAC,OAAO,SAAM;IACtB,QAAQ,CAAC,QAAQ,SAAM;IACtB,QAAQ,CAAC,UAAU,UAAQ;IAC3B,QAAQ,CAAC,UAAU,UAAQ;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAQ;IACjC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAQ;IAC9B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAQ;IAErD,gBAAgB;IAIzB,OAAO,CAAC,cAAc;IAcb,MAAM;CA+BhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}
@@ -0,0 +1,105 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, nothing } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ import '@ismail-elkorchi/ui-primitives/separator';
10
+ let AppShellSidebar = class AppShellSidebar extends LitElement {
11
+ #heading_accessor_storage = '';
12
+ get heading() { return this.#heading_accessor_storage; }
13
+ set heading(value) { this.#heading_accessor_storage = value; }
14
+ #subtitle_accessor_storage = '';
15
+ get subtitle() { return this.#subtitle_accessor_storage; }
16
+ set subtitle(value) { this.#subtitle_accessor_storage = value; }
17
+ #paddedBody_accessor_storage = true;
18
+ get paddedBody() { return this.#paddedBody_accessor_storage; }
19
+ set paddedBody(value) { this.#paddedBody_accessor_storage = value; }
20
+ #scrollBody_accessor_storage = true;
21
+ get scrollBody() { return this.#scrollBody_accessor_storage; }
22
+ set scrollBody(value) { this.#scrollBody_accessor_storage = value; }
23
+ #actions_accessor_storage = null;
24
+ get actions() { return this.#actions_accessor_storage; }
25
+ set actions(value) { this.#actions_accessor_storage = value; }
26
+ #body_accessor_storage = null;
27
+ get body() { return this.#body_accessor_storage; }
28
+ set body(value) { this.#body_accessor_storage = value; }
29
+ #footer_accessor_storage = null;
30
+ get footer() { return this.#footer_accessor_storage; }
31
+ set footer(value) { this.#footer_accessor_storage = value; }
32
+ createRenderRoot() {
33
+ return this;
34
+ }
35
+ getBodyClasses() {
36
+ return [
37
+ 'flex-1',
38
+ 'min-h-0',
39
+ 'flex',
40
+ 'flex-col',
41
+ this.paddedBody ? 'p-3' : '',
42
+ this.scrollBody ? 'overflow-y-auto custom-scrollbar' : '',
43
+ 'gap-3'
44
+ ]
45
+ .filter(Boolean)
46
+ .join(' ');
47
+ }
48
+ render() {
49
+ return html `
50
+ <aside
51
+ data-region="primary-sidebar"
52
+ class="w-80 bg-background flex flex-col border-r border-border flex-shrink-0 h-full">
53
+ <div class="h-10 px-4 flex items-center justify-between bg-background select-none flex-shrink-0">
54
+ <div class="min-w-0">
55
+ ${this.heading
56
+ ? html `<div class="text-xs font-bold uppercase tracking-wider text-muted-foreground truncate">
57
+ ${this.heading}
58
+ </div>`
59
+ : nothing}
60
+ ${this.subtitle
61
+ ? html `<div class="text-[11px] text-muted-foreground truncate">${this.subtitle}</div>`
62
+ : nothing}
63
+ </div>
64
+ <div class="flex items-center gap-1">${this.actions ?? nothing}</div>
65
+ </div>
66
+ <uik-separator orientation="horizontal"></uik-separator>
67
+ <div class="flex-1 min-h-0 flex flex-col overflow-hidden">
68
+ <div class="${this.getBodyClasses()}">${this.body ?? nothing}</div>
69
+ ${this.footer
70
+ ? html `
71
+ <uik-separator orientation="horizontal"></uik-separator>
72
+ <div class="p-3 border-t border-border bg-card">${this.footer}</div>
73
+ `
74
+ : nothing}
75
+ </div>
76
+ </aside>
77
+ `;
78
+ }
79
+ };
80
+ __decorate([
81
+ property({ type: String })
82
+ ], AppShellSidebar.prototype, "heading", null);
83
+ __decorate([
84
+ property({ type: String })
85
+ ], AppShellSidebar.prototype, "subtitle", null);
86
+ __decorate([
87
+ property({ type: Boolean })
88
+ ], AppShellSidebar.prototype, "paddedBody", null);
89
+ __decorate([
90
+ property({ type: Boolean })
91
+ ], AppShellSidebar.prototype, "scrollBody", null);
92
+ __decorate([
93
+ property({ attribute: false })
94
+ ], AppShellSidebar.prototype, "actions", null);
95
+ __decorate([
96
+ property({ attribute: false })
97
+ ], AppShellSidebar.prototype, "body", null);
98
+ __decorate([
99
+ property({ attribute: false })
100
+ ], AppShellSidebar.prototype, "footer", null);
101
+ AppShellSidebar = __decorate([
102
+ customElement('uik-shell-sidebar')
103
+ ], AppShellSidebar);
104
+ export { AppShellSidebar };
105
+ //# sourceMappingURL=Sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../Sidebar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE1D,OAAO,0CAA0C,CAAC;AAG3C,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IACV,4BAAU,EAAE,CAAC;IAAb,IAAA,OAAO,6CAAM;IAAb,IAAA,OAAO,mDAAM;IACb,6BAAW,EAAE,CAAC;IAAd,IAAA,QAAQ,8CAAM;IAAd,IAAA,QAAQ,oDAAM;IACb,+BAAa,IAAI,CAAC;IAAlB,IAAA,UAAU,gDAAQ;IAAlB,IAAA,UAAU,sDAAQ;IAClB,+BAAa,IAAI,CAAC;IAAlB,IAAA,UAAU,gDAAQ;IAAlB,IAAA,UAAU,sDAAQ;IACf,4BAAmB,IAAI,CAAC;IAAxB,IAAA,OAAO,6CAAiB;IAAxB,IAAA,OAAO,mDAAiB;IACxB,yBAAgB,IAAI,CAAC;IAArB,IAAA,IAAI,0CAAiB;IAArB,IAAA,IAAI,gDAAiB;IACrB,2BAAkB,IAAI,CAAC;IAAvB,IAAA,MAAM,4CAAiB;IAAvB,IAAA,MAAM,kDAAiB;IAErD,gBAAgB;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,cAAc;QACpB,OAAO;YACL,QAAQ;YACR,SA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CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;6CAAiC;AAPnD,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA0D3B"}
@@ -0,0 +1,19 @@
1
+ import { LitElement } from 'lit';
2
+ import '@ismail-elkorchi/ui-primitives/badge';
3
+ type StatusTone = 'info' | 'success' | 'error' | 'muted';
4
+ export declare class AppShellStatusbar extends LitElement {
5
+ accessor message: string;
6
+ accessor tone: StatusTone;
7
+ accessor meta: unknown;
8
+ accessor actions: unknown;
9
+ createRenderRoot(): this;
10
+ private getToneClass;
11
+ render(): import("lit-html").TemplateResult<1>;
12
+ }
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ 'uik-shell-statusbar': AppShellStatusbar;
16
+ }
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=Statusbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Statusbar.d.ts","sourceRoot":"","sources":["../Statusbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAgB,MAAM,KAAK,CAAC;AAG9C,OAAO,sCAAsC,CAAC;AAE9C,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAEzD,qBACa,iBAAkB,SAAQ,UAAU;IACrB,QAAQ,CAAC,OAAO,SAAW;IAC3B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAU;IAC/B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAQ;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAQ;IAEtD,gBAAgB;IAIzB,OAAO,CAAC,YAAY;IAiBX,MAAM;CAgBhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
@@ -0,0 +1,73 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, nothing } from 'lit';
8
+ import { customElement, property } from 'lit/decorators.js';
9
+ import '@ismail-elkorchi/ui-primitives/badge';
10
+ let AppShellStatusbar = class AppShellStatusbar extends LitElement {
11
+ #message_accessor_storage = 'Ready';
12
+ get message() { return this.#message_accessor_storage; }
13
+ set message(value) { this.#message_accessor_storage = value; }
14
+ #tone_accessor_storage = 'info';
15
+ get tone() { return this.#tone_accessor_storage; }
16
+ set tone(value) { this.#tone_accessor_storage = value; }
17
+ #meta_accessor_storage = null;
18
+ get meta() { return this.#meta_accessor_storage; }
19
+ set meta(value) { this.#meta_accessor_storage = value; }
20
+ #actions_accessor_storage = null;
21
+ get actions() { return this.#actions_accessor_storage; }
22
+ set actions(value) { this.#actions_accessor_storage = value; }
23
+ createRenderRoot() {
24
+ return this;
25
+ }
26
+ getToneClass() {
27
+ switch (this.tone) {
28
+ case 'info':
29
+ return 'text-foreground';
30
+ case 'success':
31
+ return 'text-green-300';
32
+ case 'error':
33
+ return 'text-red-300';
34
+ case 'muted':
35
+ return 'text-muted-foreground';
36
+ default: {
37
+ const _exhaustive = this.tone;
38
+ return _exhaustive;
39
+ }
40
+ }
41
+ }
42
+ render() {
43
+ const metaContent = typeof this.meta === 'string' ? html `<uik-badge variant="outline">${this.meta}</uik-badge>` : this.meta;
44
+ return html `
45
+ <footer
46
+ data-region="status-bar"
47
+ class="h-6 bg-secondary text-secondary-foreground flex items-center justify-between text-xs select-none px-3 flex-shrink-0 border-t border-border">
48
+ <div class="flex items-center gap-3">
49
+ <span class="flex items-center gap-1.5 font-medium ${this.getToneClass()}">${this.message}</span>
50
+ ${this.actions ?? nothing}
51
+ </div>
52
+ <div class="flex items-center gap-2 text-muted-foreground">${metaContent ?? nothing}</div>
53
+ </footer>
54
+ `;
55
+ }
56
+ };
57
+ __decorate([
58
+ property({ type: String })
59
+ ], AppShellStatusbar.prototype, "message", null);
60
+ __decorate([
61
+ property({ type: String })
62
+ ], AppShellStatusbar.prototype, "tone", null);
63
+ __decorate([
64
+ property({ attribute: false })
65
+ ], AppShellStatusbar.prototype, "meta", null);
66
+ __decorate([
67
+ property({ attribute: false })
68
+ ], AppShellStatusbar.prototype, "actions", null);
69
+ AppShellStatusbar = __decorate([
70
+ customElement('uik-shell-statusbar')
71
+ ], AppShellStatusbar);
72
+ export { AppShellStatusbar };
73
+ //# sourceMappingURL=Statusbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Statusbar.js","sourceRoot":"","sources":["../Statusbar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,KAAK,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAE1D,OAAO,sCAAsC,CAAC;AAKvC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU;IACZ,4BAAU,OAAO,CAAC;IAAlB,IAAA,OAAO,6CAAW;IAAlB,IAAA,OAAO,mDAAW;IAClB,yBAAmB,MAAM,CAAC;IAA1B,IAAA,IAAI,0CAAsB;IAA1B,IAAA,IAAI,gDAAsB;IACtB,yBAAgB,IAAI,CAAC;IAArB,IAAA,IAAI,0CAAiB;IAArB,IAAA,IAAI,gDAAiB;IACrB,4BAAmB,IAAI,CAAC;IAAxB,IAAA,OAAO,6CAAiB;IAAxB,IAAA,OAAO,mDAAiB;IAEtD,gBAAgB;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,YAAY;QAClB,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,KAAK,MAAM;gBACT,OAAO,iBAAiB,CAAC;YAC3B,KAAK,SAAS;gBACZ,OAAO,gBAAgB,CAAC;YAC1B,KAAK,OAAO;gBACV,OAAO,cAAc,CAAC;YACxB,KAAK,OAAO;gBACV,OAAO,uBAAuB,CAAC;YACjC,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,WAAW,GAAU,IAAI,CAAC,IAAI,CAAC;gBACrC,OAAO,WAAW,CAAC;YACrB,CAAC;QACH,CAAC;IACH,CAAC;IAEQ,MAAM;QACb,MAAM,WAAW,GACf,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA,gCAAgC,IAAI,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAE1G,OAAO,IAAI,CAAA;;;;;+DAKgD,IAAI,CAAC,YAAY,EAAE,KAAK,IAAI,CAAC,OAAO;YACvF,IAAI,CAAC,OAAO,IAAI,OAAO;;qEAEkC,WAAW,IAAI,OAAO;;KAEtF,CAAC;IACJ,CAAC;CACF,CAAA;AA1CoC;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;gDAA4B;AAClB;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;6CAAoC;AACtB;IAAtC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;6CAA+B;AACrB;IAAtC,QAAQ,CAAC,EAAC,SAAS,EAAE,KAAK,EAAC,CAAC;gDAAkC;AAJpD,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CA2C7B"}
@@ -0,0 +1,7 @@
1
+ export * from './AppShellLayout';
2
+ export * from './ActivityBar';
3
+ export * from './Sidebar';
4
+ export * from './SecondarySidebar';
5
+ export * from './Statusbar';
6
+ export * from './router';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ export * from './AppShellLayout';
2
+ export * from './ActivityBar';
3
+ export * from './Sidebar';
4
+ export * from './SecondarySidebar';
5
+ export * from './Statusbar';
6
+ export * from './router';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,6 @@
1
+ import './AppShellLayout';
2
+ import './ActivityBar';
3
+ import './Sidebar';
4
+ import './SecondarySidebar';
5
+ import './Statusbar';
6
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../register.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,WAAW,CAAC;AACnB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC"}
@@ -0,0 +1,6 @@
1
+ import './AppShellLayout';
2
+ import './ActivityBar';
3
+ import './Sidebar';
4
+ import './SecondarySidebar';
5
+ import './Statusbar';
6
+ //# sourceMappingURL=register.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../register.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,eAAe,CAAC;AACvB,OAAO,WAAW,CAAC;AACnB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC"}
@@ -0,0 +1,36 @@
1
+ export declare const APP_SHELL_NAV_EVENT = "app-shell:navigate";
2
+ export interface AppShellRoute {
3
+ id: string;
4
+ label?: string;
5
+ subviews?: string[];
6
+ defaultSubview?: string;
7
+ }
8
+ export interface AppShellLocation {
9
+ view: string;
10
+ subview?: string | undefined;
11
+ }
12
+ export interface AppShellNavigationDetail {
13
+ from: AppShellLocation;
14
+ to: AppShellLocation;
15
+ route: AppShellRoute;
16
+ }
17
+ export interface AppShellRouterConfig {
18
+ routes: AppShellRoute[];
19
+ initialView?: string;
20
+ initialSubview?: string;
21
+ }
22
+ export type AppShellNavigationListener = (location: AppShellLocation) => void;
23
+ export declare class AppShellRouter extends EventTarget {
24
+ private readonly routes;
25
+ private readonly lastSubviews;
26
+ private location;
27
+ constructor(config: AppShellRouterConfig);
28
+ get current(): AppShellLocation;
29
+ get routeList(): AppShellRoute[];
30
+ subscribe(listener: AppShellNavigationListener): () => void;
31
+ navigate(view: string, subview?: string): void;
32
+ private resolveInitialView;
33
+ private resolveSubview;
34
+ }
35
+ export declare const createAppShellRouter: (config: AppShellRouterConfig) => AppShellRouter;
36
+ //# sourceMappingURL=router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../router.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,gBAAgB,CAAC;IACvB,EAAE,EAAE,gBAAgB,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,0BAA0B,GAAG,CAAC,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAE9E,qBAAa,cAAe,SAAQ,WAAW;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAC3D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAyC;IACtE,OAAO,CAAC,QAAQ,CAAmB;gBAEvB,MAAM,EAAE,oBAAoB;IAWxC,IAAI,OAAO,IAAI,gBAAgB,CAE9B;IAED,IAAI,SAAS,IAAI,aAAa,EAAE,CAE/B;IAED,SAAS,CAAC,QAAQ,EAAE,0BAA0B,GAAG,MAAM,IAAI;IAc3D,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;IAuBvC,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,cAAc;CAgBvB;AAED,eAAO,MAAM,oBAAoB,GAAI,QAAQ,oBAAoB,mBAA+B,CAAC"}
package/dist/router.js ADDED
@@ -0,0 +1,72 @@
1
+ export const APP_SHELL_NAV_EVENT = 'app-shell:navigate';
2
+ export class AppShellRouter extends EventTarget {
3
+ routes = new Map();
4
+ lastSubviews = new Map();
5
+ location;
6
+ constructor(config) {
7
+ super();
8
+ if (!config.routes.length)
9
+ throw new Error('AppShellRouter requires at least one route.');
10
+ config.routes.forEach(route => this.routes.set(route.id, route));
11
+ const view = this.resolveInitialView(config.initialView);
12
+ const subview = this.resolveSubview(view, config.initialSubview);
13
+ this.location = { view, subview };
14
+ }
15
+ get current() {
16
+ return { ...this.location };
17
+ }
18
+ get routeList() {
19
+ return Array.from(this.routes.values());
20
+ }
21
+ subscribe(listener) {
22
+ const handler = (event) => {
23
+ const detail = event.detail;
24
+ listener(detail.to);
25
+ };
26
+ this.addEventListener(APP_SHELL_NAV_EVENT, handler);
27
+ listener(this.current);
28
+ return () => {
29
+ this.removeEventListener(APP_SHELL_NAV_EVENT, handler);
30
+ };
31
+ }
32
+ navigate(view, subview) {
33
+ const route = this.routes.get(view);
34
+ if (!route)
35
+ throw new Error(`Unknown route "${view}".`);
36
+ const resolvedSubview = this.resolveSubview(view, subview);
37
+ const next = { view, subview: resolvedSubview };
38
+ if (next.view === this.location.view && next.subview === this.location.subview)
39
+ return;
40
+ const previous = this.location;
41
+ this.location = next;
42
+ this.dispatchEvent(new CustomEvent(APP_SHELL_NAV_EVENT, { detail: { from: previous, to: next, route } }));
43
+ if (typeof window !== 'undefined') {
44
+ window.dispatchEvent(new CustomEvent(APP_SHELL_NAV_EVENT, { detail: { from: previous, to: next, route } }));
45
+ }
46
+ }
47
+ resolveInitialView(initialView) {
48
+ if (initialView && this.routes.has(initialView))
49
+ return initialView;
50
+ const first = this.routes.values().next().value;
51
+ if (!first)
52
+ throw new Error('AppShellRouter requires at least one route.');
53
+ return first.id;
54
+ }
55
+ resolveSubview(view, requested) {
56
+ const route = this.routes.get(view);
57
+ if (!route?.subviews?.length)
58
+ return undefined;
59
+ if (requested && route.subviews.includes(requested)) {
60
+ this.lastSubviews.set(view, requested);
61
+ return requested;
62
+ }
63
+ const remembered = this.lastSubviews.get(view);
64
+ if (remembered && route.subviews.includes(remembered))
65
+ return remembered;
66
+ const fallback = route.defaultSubview ?? route.subviews[0];
67
+ this.lastSubviews.set(view, fallback);
68
+ return fallback;
69
+ }
70
+ }
71
+ export const createAppShellRouter = (config) => new AppShellRouter(config);
72
+ //# sourceMappingURL=router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.js","sourceRoot":"","sources":["../router.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC;AA4BxD,MA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i/ui-shell",
3
+ "version": "0.1.0",
4
+ "description": "Light DOM shell components for Tailwind-friendly layouts built with Lit.",
5
+ "author": "Ismail El Korchi",
6
+ "license": "Apache-2.0",
7
+ "type": "module",
8
+ "keywords": ["lit", "web-components", "layout", "shell", "tailwind", "ui"],
9
+ "engines": {"node": ">=20.11"},
10
+ "main": "./dist/index.js",
11
+ "module": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "./index": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.js",
22
+ "default": "./dist/index.js"
23
+ },
24
+ "./register": {
25
+ "types": "./dist/register.d.ts",
26
+ "import": "./dist/register.js",
27
+ "default": "./dist/register.js"
28
+ },
29
+ "./layout": {
30
+ "types": "./dist/AppShellLayout.d.ts",
31
+ "import": "./dist/AppShellLayout.js",
32
+ "default": "./dist/AppShellLayout.js"
33
+ },
34
+ "./activity-bar": {
35
+ "types": "./dist/ActivityBar.d.ts",
36
+ "import": "./dist/ActivityBar.js",
37
+ "default": "./dist/ActivityBar.js"
38
+ },
39
+ "./sidebar": {
40
+ "types": "./dist/Sidebar.d.ts",
41
+ "import": "./dist/Sidebar.js",
42
+ "default": "./dist/Sidebar.js"
43
+ },
44
+ "./secondary-sidebar": {
45
+ "types": "./dist/SecondarySidebar.d.ts",
46
+ "import": "./dist/SecondarySidebar.js",
47
+ "default": "./dist/SecondarySidebar.js"
48
+ },
49
+ "./statusbar": {
50
+ "types": "./dist/Statusbar.d.ts",
51
+ "import": "./dist/Statusbar.js",
52
+ "default": "./dist/Statusbar.js"
53
+ },
54
+ "./router": {
55
+ "types": "./dist/router.d.ts",
56
+ "import": "./dist/router.js",
57
+ "default": "./dist/router.js"
58
+ },
59
+ "./tailwind-source.css": "./dist/tailwind-source.css"
60
+ },
61
+ "sideEffects": [
62
+ "./dist/**/*.js",
63
+ "./dist/**/*.css"
64
+ ],
65
+ "files": [
66
+ "dist",
67
+ "README.md"
68
+ ],
69
+ "scripts": {
70
+ "build": "npm run clean && tsc -p tsconfig.build.json && node -e \"const fs = require('fs'); fs.mkdirSync('dist', {recursive: true}); fs.copyFileSync('tailwind-source.css', 'dist/tailwind-source.css');\"",
71
+ "clean": "node -e \"const fs = require('fs'); fs.rmSync('dist', {recursive: true, force: true}); fs.rmSync('.tsbuildinfo', {force: true});\"",
72
+ "typecheck": "tsc -p tsconfig.build.json --noEmit",
73
+ "prepack": "npm run build"
74
+ },
75
+ "repository": {
76
+ "type": "git",
77
+ "url": "git+https://github.com/Ismail-elkorchi/ui-kit.git",
78
+ "directory": "packages/ui-shell"
79
+ },
80
+ "bugs": {
81
+ "url": "https://github.com/Ismail-elkorchi/ui-kit/issues"
82
+ },
83
+ "homepage": "https://github.com/Ismail-elkorchi/ui-kit",
84
+ "dependencies": {
85
+ "@ismail-elkorchi/ui-primitives": "^0.1.0",
86
+ "lit": "^3.1.0"
87
+ },
88
+ "publishConfig": {
89
+ "access": "public"
90
+ }
91
+ }