hubg-app-shell 0.1.2 → 0.1.4

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.
Files changed (36) hide show
  1. package/dist/components/AppShell.d.ts +18 -4
  2. package/dist/components/AppShell.d.ts.map +1 -1
  3. package/dist/components/Header.d.ts +20 -1
  4. package/dist/components/Header.d.ts.map +1 -1
  5. package/dist/components/ModuleHost.d.ts +5 -2
  6. package/dist/components/ModuleHost.d.ts.map +1 -1
  7. package/dist/components/ShellErrorBoundary.d.ts +6 -6
  8. package/dist/components/ShellErrorBoundary.d.ts.map +1 -1
  9. package/dist/components/SideNavigation.d.ts +0 -2
  10. package/dist/components/SideNavigation.d.ts.map +1 -1
  11. package/dist/components/ui/accordion.d.ts.map +1 -1
  12. package/dist/components/ui/button.d.ts.map +1 -1
  13. package/dist/context/ShellContext.d.ts +3 -6
  14. package/dist/context/ShellContext.d.ts.map +1 -1
  15. package/dist/events/EventBus.d.ts +9 -4
  16. package/dist/events/EventBus.d.ts.map +1 -1
  17. package/dist/index.cjs.js +1659 -1168
  18. package/dist/index.cjs.js.map +23 -15
  19. package/dist/index.d.ts +12 -0
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.es.js +1775 -1280
  22. package/dist/index.es.js.map +23 -15
  23. package/dist/platform/createPlatformAPI.d.ts +9 -4
  24. package/dist/platform/createPlatformAPI.d.ts.map +1 -1
  25. package/dist/registry/ModuleRegistry.d.ts +8 -3
  26. package/dist/registry/ModuleRegistry.d.ts.map +1 -1
  27. package/dist/styles.css +1 -1
  28. package/dist/types/context.d.ts +7 -3
  29. package/dist/types/context.d.ts.map +1 -1
  30. package/dist/types/module.d.ts +9 -7
  31. package/dist/types/module.d.ts.map +1 -1
  32. package/dist/types/navigation.d.ts +13 -21
  33. package/dist/types/navigation.d.ts.map +1 -1
  34. package/dist/utils/getInitials.d.ts +3 -0
  35. package/dist/utils/getInitials.d.ts.map +1 -0
  36. package/package.json +1 -1
@@ -7,14 +7,19 @@ export interface PlatformAPIOptions {
7
7
  navigate: (path: string) => void;
8
8
  eventBus: EventBus;
9
9
  /**
10
- * Optional fetch override (e.g. an axios-backed shim). Defaults to the
11
- * global `fetch` with credentials included.
10
+ * Optional fetch override (e.g. an axios-backed shim or a test double).
11
+ * Defaults to the global `fetch` with same-origin credentials.
12
12
  */
13
13
  fetchFn?: (url: string, init: RequestInit) => Promise<Response>;
14
+ /**
15
+ * Request timeout in milliseconds. Defaults to 30 000 ms.
16
+ * Pass 0 to disable.
17
+ */
18
+ timeoutMs?: number;
14
19
  }
15
20
  /**
16
- * Creates a scoped PlatformAPI instance for a single module.
17
- * The module receives this object at mount time and uses it as its sole
21
+ * Creates a scoped PlatformAPI for a single module.
22
+ * The module receives this at mount time and uses it as its sole
18
23
  * integration surface with the shell.
19
24
  */
20
25
  export declare function createPlatformAPI(options: PlatformAPIOptions): PlatformAPI;
@@ -1 +1 @@
1
- {"version":3,"file":"createPlatformAPI.d.ts","sourceRoot":"","sources":["../../src/platform/createPlatformAPI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAA4B,WAAW,EAAiB,MAAM,sBAAsB,CAAC;AACjG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,aAAa,CAAC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,QAAQ,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;CACjE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,WAAW,CAuC1E"}
1
+ {"version":3,"file":"createPlatformAPI.d.ts","sourceRoot":"","sources":["../../src/platform/createPlatformAPI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAA4B,WAAW,EAAiB,MAAM,sBAAsB,CAAC;AACjG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKtD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,aAAa,CAAC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,EAAE,QAAQ,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChE;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,WAAW,CA8D1E"}
@@ -4,14 +4,19 @@ export interface ModuleDefinition {
4
4
  load: ModuleLoader;
5
5
  }
6
6
  /**
7
- * Central registry that maps a module ID to its loader function.
8
- * The registry is framework-agnostic — it does not know whether the module
9
- * is implemented in React, Vue, Angular, or as a Web Component.
7
+ * Central registry mapping module IDs to their loader functions.
8
+ * Framework-agnostic — React, Vue, Angular, or Web Component loaders
9
+ * all satisfy the same `ModuleLoader` contract.
10
+ *
11
+ * Loader results are cached after the first successful resolution so
12
+ * repeated calls to `load()` return the same module instance.
10
13
  */
11
14
  export declare class ModuleRegistry {
12
15
  private readonly registry;
16
+ private readonly cache;
13
17
  register(definition: ModuleDefinition): this;
14
18
  registerMany(definitions: ModuleDefinition[]): this;
19
+ unregister(moduleId: string): this;
15
20
  resolve(moduleId: string): ModuleDefinition | undefined;
16
21
  load(moduleId: string): Promise<ApplicationModule>;
17
22
  isRegistered(moduleId: string): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleRegistry.d.ts","sourceRoot":"","sources":["../../src/registry/ModuleRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE1E,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;;;GAIG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuC;IAEhE,QAAQ,CAAC,UAAU,EAAE,gBAAgB,GAAG,IAAI;IAQ5C,YAAY,CAAC,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI;IAKnD,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAIjD,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAQxD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIvC,IAAI,aAAa,IAAI,MAAM,EAAE,CAE5B;CACF"}
1
+ {"version":3,"file":"ModuleRegistry.d.ts","sourceRoot":"","sources":["../../src/registry/ModuleRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAE1E,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuC;IAChE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiD;IAEvE,QAAQ,CAAC,UAAU,EAAE,gBAAgB,GAAG,IAAI;IAY5C,YAAY,CAAC,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI;IAKnD,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMlC,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAIjD,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA0BxD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIvC,IAAI,aAAa,IAAI,MAAM,EAAE,CAE5B;CACF"}
package/dist/styles.css CHANGED
@@ -1,3 +1,3 @@
1
1
  *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }
2
2
 
3
- /*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-right-3{right:-.75rem}.left-0{left:0}.left-2{left:.5rem}.top-1\/2{top:50%}.top-\[72px\]{top:72px}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.ml-auto{margin-left:auto}.mt-2{margin-top:.5rem}.flex{display:flex}.inline-flex{display:inline-flex}.aspect-square{aspect-ratio:1/1}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.w-0\.5{width:.125rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-\[18px\]{width:18px}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\[8rem\]{min-width:8rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.125rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem*var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-md{border-radius:.375rem}.rounded-radius-100{border-radius:var(--radius-100)}.rounded-radius-200{border-radius:var(--radius-200)}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-action-primary{background-color:var(--color-action-primary-default)}.bg-black\/5{background-color:rgba(0,0,0,.05)}.bg-status-danger-bold{background-color:var(--color-status-danger-bold)}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pt-0\.5{padding-top:.125rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.tracking-widest{letter-spacing:.1em}.text-action-primary{color:var(--color-action-primary-default)}.text-content-inverse{color:var(--color-content-inverse)}.text-content-subtle{color:var(--color-content-subtle)}.text-status-danger-bold{color:var(--color-status-danger-bold)}.text-status-success-bold{color:var(--color-status-success-bold)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.shadow-elevation-1{--tw-shadow:var(--elevation-1);--tw-shadow-colored:var(--elevation-1)}.shadow-elevation-1,.shadow-elevation-2{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-elevation-2{--tw-shadow:var(--elevation-2);--tw-shadow-colored:var(--elevation-2)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-transform{transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.app-shell,.app-shell *{box-sizing:border-box}.app-shell{font-family:var(--font-family-body,system-ui,sans-serif);font-size:var(--font-size-body-default,14px);line-height:var(--font-line-height-body-default,1.5);-webkit-font-smoothing:antialiased}@keyframes shell-spin{to{transform:rotate(1turn)}}.animate-spin{animation:shell-spin .75s linear infinite}.first\:mt-0:first-child{margin-top:0}.hover\:bg-action-primary-hover:hover{background-color:var(--color-action-primary-hover)}.hover\:bg-black\/5:hover{background-color:rgba(0,0,0,.05)}.hover\:bg-surface-overlay:hover{background-color:var(--color-surface-overlay)}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.focus\:bg-surface-overlay:focus{background-color:var(--color-surface-overlay)}.focus\:text-status-danger-bold:focus{color:var(--color-status-danger-bold)}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset:inset}.focus-visible\:ring-action-primary:focus-visible{--tw-ring-color:var(--color-action-primary-default)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[highlighted\]\:bg-surface-overlay[data-highlighted]{background-color:var(--color-surface-overlay)}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.\[\&\[data-state\=open\]\>svg\.accordion-chevron\]\:rotate-180[data-state=open]>svg.accordion-chevron{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}
3
+ /*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-right-3{right:-.75rem}.left-2{left:.5rem}.top-\[60px\]{top:60px}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[9999\]{z-index:9999}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-3\.5{margin-left:.875rem;margin-right:.875rem}.my-1{margin-top:.25rem}.mb-1,.my-1{margin-bottom:.25rem}.ml-auto{margin-left:auto}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.aspect-square{aspect-ratio:1/1}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.w-12{width:3rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0}.min-w-\[8rem\]{min-width:8rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.-translate-x-px{--tw-translate-x:-1px}.-translate-x-px,.translate-x-px{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-px{--tw-translate-x:1px}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden,.truncate{overflow:hidden}.truncate{text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-radius-100{border-radius:var(--radius-100)}.rounded-radius-200{border-radius:var(--radius-200)}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-sidebar-border{border-color:hsl(var(--sidebar-border))}.border-sidebar-border\/60{border-color:hsl(var(--sidebar-border)/.6)}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-action-primary{background-color:var(--color-action-primary-default)}.bg-sidebar{background-color:hsl(var(--sidebar))}.bg-sidebar-accent{background-color:hsl(var(--sidebar-accent))}.bg-status-danger-bold{background-color:var(--color-status-danger-bold)}.fill-current{fill:currentColor}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pt-0\.5{padding-top:.125rem}.pt-3{padding-top:.75rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-action-primary{color:var(--color-action-primary-default)}.text-content-inverse{color:var(--color-content-inverse)}.text-content-subtle{color:var(--color-content-subtle)}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/60{color:hsl(var(--muted-foreground)/.6)}.text-sidebar-accent-foreground{color:hsl(var(--sidebar-accent-foreground))}.text-sidebar-foreground{color:hsl(var(--sidebar-foreground))}.text-sidebar-foreground\/60{color:hsl(var(--sidebar-foreground)/.6)}.text-status-danger-bold{color:var(--color-status-danger-bold)}.text-status-success-bold{color:var(--color-status-success-bold)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.shadow-elevation-1{--tw-shadow:var(--elevation-1);--tw-shadow-colored:var(--elevation-1)}.shadow-elevation-1,.shadow-elevation-2{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-elevation-2{--tw-shadow:var(--elevation-2);--tw-shadow-colored:var(--elevation-2)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-transform{transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-linear{transition-timing-function:linear}:root{--background:0 0% 99%;--foreground:210 22% 12%;--card:0 0% 100%;--card-foreground:210 22% 12%;--popover:0 0% 100%;--popover-foreground:210 22% 12%;--primary:213 97% 46%;--primary-foreground:0 0% 100%;--secondary:208 24% 97%;--secondary-foreground:210 22% 12%;--muted:208 24% 97%;--muted-foreground:211 13% 43%;--accent:208 24% 97%;--accent-foreground:210 22% 12%;--destructive:5 72% 51%;--border:213 12% 85%;--input:213 12% 85%;--ring:214 84% 66%;--radius:0.625rem;--sidebar:208 24% 97%;--sidebar-foreground:210 22% 12%;--sidebar-primary:213 97% 46%;--sidebar-primary-foreground:0 0% 100%;--sidebar-accent:213 2% 90%;--sidebar-accent-foreground:210 22% 12%;--sidebar-border:213 12% 85%;--sidebar-ring:214 84% 66%}.dark{--background:0 0% 14.5%;--foreground:0 0% 98.5%;--card:0 0% 20.5%;--card-foreground:0 0% 98.5%;--popover:0 0% 20.5%;--popover-foreground:0 0% 98.5%;--primary:0 0% 92.2%;--primary-foreground:0 0% 20.5%;--secondary:0 0% 26.9%;--secondary-foreground:0 0% 98.5%;--muted:0 0% 26.9%;--muted-foreground:0 0% 70.8%;--accent:0 0% 26.9%;--accent-foreground:0 0% 98.5%;--destructive:15 72% 55%;--border:0 0% 100%;--input:0 0% 100%;--ring:0 0% 55.6%;--sidebar:0 0% 20.5%;--sidebar-foreground:0 0% 98.5%;--sidebar-primary:213 97% 49%;--sidebar-primary-foreground:0 0% 98.5%;--sidebar-accent:0 0% 26.9%;--sidebar-accent-foreground:0 0% 98.5%;--sidebar-border:0 0% 100%;--sidebar-ring:0 0% 55.6%}.app-shell,.app-shell *{box-sizing:border-box}.app-shell{font-family:var(--font-family-body,system-ui,sans-serif);font-size:var(--font-size-body-default,14px);line-height:var(--font-line-height-body-default,1.5);-webkit-font-smoothing:antialiased}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.animate-accordion-down{animation:accordion-down .15s ease-out}.animate-accordion-up{animation:accordion-up .15s ease-out}@keyframes shell-spin{to{transform:rotate(1turn)}}.app-shell .animate-spin{animation:shell-spin .75s linear infinite}@media (prefers-reduced-motion:reduce){.animate-accordion-down,.animate-accordion-up,.app-shell .animate-spin{animation:none}}.first\:pt-1:first-child{padding-top:.25rem}.hover\:scale-110:hover{--tw-scale-x:1.1;--tw-scale-y:1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-action-primary-hover:hover{background-color:var(--color-action-primary-hover)}.hover\:bg-sidebar-accent:hover{background-color:hsl(var(--sidebar-accent))}.hover\:bg-surface-overlay:hover{background-color:var(--color-surface-overlay)}.hover\:text-sidebar-accent-foreground:hover{color:hsl(var(--sidebar-accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-100:hover{opacity:1}.focus\:text-status-danger-bold:focus{color:var(--color-status-danger-bold)}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-action-primary:focus-visible{--tw-ring-color:var(--color-action-primary-default)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.active\:scale-95:active{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[highlighted\]\:bg-surface-overlay[data-highlighted]{background-color:var(--color-surface-overlay)}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.\[\&\[data-state\=open\]\>svg\.accordion-chevron\]\:rotate-90[data-state=open]>svg.accordion-chevron{--tw-rotate:90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}
@@ -3,17 +3,21 @@ export interface UserContext {
3
3
  name: string;
4
4
  email: string;
5
5
  role: string;
6
- avatar: string;
6
+ /** URL to the user's avatar image. Optional — show initials when absent. */
7
+ avatar?: string;
7
8
  }
8
9
  export interface TenantContext {
9
10
  id: string;
10
11
  name: string;
11
12
  communityUrl: string;
12
13
  controlUrl: string;
14
+ /** Optional logo URL displayed in the sidebar brand tile. */
15
+ logo?: string;
13
16
  }
14
17
  export interface ThemeContext {
15
- mode: "light" | "dark" | "legacy";
16
- /** CSS custom property overrides applied at the shell root */
18
+ /** "light" | "dark" maps to the `.dark` CSS class on the shell root. */
19
+ mode: "light" | "dark";
20
+ /** CSS custom property overrides applied at the shell root element. */
17
21
  overrides?: Record<string, string>;
18
22
  }
19
23
  export interface ModuleContext {
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/types/context.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,YAAY,CAAC;CACrB"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/types/context.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,0EAA0E;IAC1E,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,YAAY,CAAC;CACrB"}
@@ -1,22 +1,24 @@
1
1
  import type { ModuleContext } from "./context.js";
2
2
  import type { PlatformAPI } from "./platform.js";
3
- export type ModuleLifecycleState = "loading" | "loaded" | "mounted" | "active" | "unmounted" | "failed";
3
+ export type ModuleLifecycleState = "loading" | "loaded" | "active" | "failed";
4
4
  export interface ModuleInstance {
5
- /** Called by the shell when navigating away from this module. */
6
- unmount(): void;
5
+ /** Release DOM nodes, event listeners, and timers. Optional for simple modules. */
6
+ unmount?(): void;
7
7
  }
8
8
  /**
9
- * The contract every module must implement, regardless of its internal
10
- * framework (React, Vue, Angular, Web Component, etc.).
9
+ * Framework-agnostic contract every module must implement.
10
+ * React, Vue, Angular, or Web Component — all expose this shape.
11
11
  */
12
12
  export interface ApplicationModule {
13
13
  readonly id: string;
14
14
  /**
15
- * Mount the module into `container`. The module owns everything inside
15
+ * Attach the module into `container`. The module owns everything inside
16
16
  * that element for as long as it is active.
17
+ *
18
+ * @returns A `ModuleInstance` with an optional `unmount` teardown.
17
19
  */
18
20
  mount(container: HTMLElement, context: ModuleContext, platform: PlatformAPI): ModuleInstance;
19
21
  }
20
- /** Factory shape expected in the module registry. */
22
+ /** Factory signature expected by the module registry. */
21
23
  export type ModuleLoader = () => Promise<ApplicationModule>;
22
24
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/types/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,WAAW,GACX,QAAQ,CAAC;AAEb,MAAM,WAAW,cAAc;IAC7B,iEAAiE;IACjE,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,KAAK,CACH,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,WAAW,GACpB,cAAc,CAAC;CACnB;AAED,qDAAqD;AACrD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../src/types/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,WAAW,cAAc;IAC7B,mFAAmF;IACnF,OAAO,CAAC,IAAI,IAAI,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,KAAK,CACH,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,WAAW,GACpB,cAAc,CAAC;CACnB;AAED,yDAAyD;AACzD,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
@@ -1,49 +1,41 @@
1
1
  import type * as React from "react";
2
- /** One entry in the "Create" collapsible inside the sidebar. */
3
- export interface CreateOption {
4
- label: string;
5
- /** Lucide-compatible icon component. */
6
- icon?: React.ComponentType<{
7
- className?: string;
8
- }>;
9
- route: string;
10
- }
11
2
  /**
12
- * A named group of children rendered inside an expandable nav item.
13
- * Used when children need section labels (e.g. "MODERATION", "CONTENT TYPES").
3
+ * A named group of child items rendered inside an expandable nav entry.
4
+ * Use when children need section labels (e.g. "MODERATION", "CONTENT TYPES").
14
5
  */
15
6
  export interface NavChildGroup {
16
7
  id: string;
17
- /** Uppercase section label shown above the group's items. */
8
+ /** Section label shown above this group's items. */
18
9
  label: string;
19
10
  items: NavItem[];
20
11
  }
21
12
  export interface NavItem {
22
- /** Unique identifier, also used to look up the module in the registry. */
13
+ /** Unique identifier also used to look up the module in the registry. */
23
14
  id: string;
24
15
  label: string;
25
- /** Top-level route owned by this nav item (e.g. "/customers"). */
16
+ /** Top-level route owned by this item (e.g. "/customers"). Must start with "/". */
26
17
  route: string;
27
- /** Module ID resolved via the ModuleRegistry. */
28
- moduleId: string;
29
- /** Lucide-compatible icon component receives a `className` prop. */
18
+ /** Module resolved via ModuleRegistry. Optional for link-only items. */
19
+ moduleId?: string;
20
+ /** Lucide-compatible icon component that accepts a `className` prop. */
30
21
  icon?: React.ComponentType<{
31
22
  className?: string;
32
23
  }>;
33
- /** Hides the item from the nav without unregistering the module. */
24
+ /** Hide the item without unregistering the module. */
34
25
  enabled: boolean;
35
26
  /**
36
- * All listed permissions must be present in the module context for this
37
- * item to be visible. Frontend-only gate — backend APIs are authoritative.
27
+ * All listed permissions must be present for this item to be visible.
28
+ * Frontend-only gate — backend APIs are the authoritative enforcement point.
38
29
  */
39
30
  permissions?: string[];
40
31
  /** Flat second-level items (no group labels). */
41
32
  children?: NavItem[];
42
- /** Grouped second-level items with section labels (takes precedence over children). */
33
+ /** Grouped second-level items with labels. Takes precedence over `children`. */
43
34
  childGroups?: NavChildGroup[];
44
35
  }
45
36
  export interface NavigationGroup {
46
37
  id: string;
38
+ /** Section label rendered above the group (hidden when sidebar is collapsed). */
47
39
  label?: string;
48
40
  items: NavItem[];
49
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,gEAAgE;AAChE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACtB,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,oEAAoE;IACpE,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,uFAAuF;IACvF,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,OAAO;IACtB,2EAA2E;IAC3E,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnD,sDAAsD;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IACrB,gFAAgF;IAChF,WAAW,CAAC,EAAE,aAAa,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B"}
@@ -0,0 +1,3 @@
1
+ /** Returns up to two uppercase initials from a display name. */
2
+ export declare function getInitials(name: string): string;
3
+ //# sourceMappingURL=getInitials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInitials.d.ts","sourceRoot":"","sources":["../../src/utils/getInitials.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOhD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hubg-app-shell",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Application Shell — layout, module registry, platform API, and framework-agnostic module contract for the Gainsight Community Hub.",
5
5
  "type": "module",
6
6
  "sideEffects": ["dist/styles.css"],