@custardui/custardui 1.0.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.
Files changed (142) hide show
  1. package/README.md +31 -0
  2. package/dist/custardui.js +16552 -0
  3. package/dist/custardui.js.map +1 -0
  4. package/dist/custardui.min.js +7 -0
  5. package/dist/custardui.min.js.map +1 -0
  6. package/dist/types/src/browser.d.ts +7 -0
  7. package/dist/types/src/browser.d.ts.map +1 -0
  8. package/dist/types/src/lib/app/ui-manager.d.ts +55 -0
  9. package/dist/types/src/lib/app/ui-manager.d.ts.map +1 -0
  10. package/dist/types/src/lib/features/adaptation/adaptation-manager.d.ts +54 -0
  11. package/dist/types/src/lib/features/adaptation/adaptation-manager.d.ts.map +1 -0
  12. package/dist/types/src/lib/features/adaptation/stores/adaptation-store.svelte.d.ts +11 -0
  13. package/dist/types/src/lib/features/adaptation/stores/adaptation-store.svelte.d.ts.map +1 -0
  14. package/dist/types/src/lib/features/adaptation/types.d.ts +13 -0
  15. package/dist/types/src/lib/features/adaptation/types.d.ts.map +1 -0
  16. package/dist/types/src/lib/features/focus/focus-logic.d.ts +31 -0
  17. package/dist/types/src/lib/features/focus/focus-logic.d.ts.map +1 -0
  18. package/dist/types/src/lib/features/focus/services/focus-service.svelte.d.ts +37 -0
  19. package/dist/types/src/lib/features/focus/services/focus-service.svelte.d.ts.map +1 -0
  20. package/dist/types/src/lib/features/focus/stores/focus-store.svelte.d.ts +14 -0
  21. package/dist/types/src/lib/features/focus/stores/focus-store.svelte.d.ts.map +1 -0
  22. package/dist/types/src/lib/features/highlight/highlight-logic.d.ts +29 -0
  23. package/dist/types/src/lib/features/highlight/highlight-logic.d.ts.map +1 -0
  24. package/dist/types/src/lib/features/highlight/services/highlight-service.svelte.d.ts +20 -0
  25. package/dist/types/src/lib/features/highlight/services/highlight-service.svelte.d.ts.map +1 -0
  26. package/dist/types/src/lib/features/highlight/services/highlight-types.d.ts +10 -0
  27. package/dist/types/src/lib/features/highlight/services/highlight-types.d.ts.map +1 -0
  28. package/dist/types/src/lib/features/notifications/stores/toast-store.svelte.d.ts +15 -0
  29. package/dist/types/src/lib/features/notifications/stores/toast-store.svelte.d.ts.map +1 -0
  30. package/dist/types/src/lib/features/placeholder/placeholder-binder.d.ts +64 -0
  31. package/dist/types/src/lib/features/placeholder/placeholder-binder.d.ts.map +1 -0
  32. package/dist/types/src/lib/features/placeholder/placeholder-manager.d.ts +38 -0
  33. package/dist/types/src/lib/features/placeholder/placeholder-manager.d.ts.map +1 -0
  34. package/dist/types/src/lib/features/placeholder/stores/placeholder-registry-store.svelte.d.ts +17 -0
  35. package/dist/types/src/lib/features/placeholder/stores/placeholder-registry-store.svelte.d.ts.map +1 -0
  36. package/dist/types/src/lib/features/placeholder/types.d.ts +18 -0
  37. package/dist/types/src/lib/features/placeholder/types.d.ts.map +1 -0
  38. package/dist/types/src/lib/features/render/assets.d.ts +12 -0
  39. package/dist/types/src/lib/features/render/assets.d.ts.map +1 -0
  40. package/dist/types/src/lib/features/render/render.d.ts +3 -0
  41. package/dist/types/src/lib/features/render/render.d.ts.map +1 -0
  42. package/dist/types/src/lib/features/render/types.d.ts +19 -0
  43. package/dist/types/src/lib/features/render/types.d.ts.map +1 -0
  44. package/dist/types/src/lib/features/settings/intro-manager.svelte.d.ts +30 -0
  45. package/dist/types/src/lib/features/settings/intro-manager.svelte.d.ts.map +1 -0
  46. package/dist/types/src/lib/features/settings/types.d.ts +61 -0
  47. package/dist/types/src/lib/features/settings/types.d.ts.map +1 -0
  48. package/dist/types/src/lib/features/share/constants.d.ts +4 -0
  49. package/dist/types/src/lib/features/share/constants.d.ts.map +1 -0
  50. package/dist/types/src/lib/features/share/share-logic.d.ts +36 -0
  51. package/dist/types/src/lib/features/share/share-logic.d.ts.map +1 -0
  52. package/dist/types/src/lib/features/share/stores/share-store.svelte.d.ts +24 -0
  53. package/dist/types/src/lib/features/share/stores/share-store.svelte.d.ts.map +1 -0
  54. package/dist/types/src/lib/features/share/types.d.ts +8 -0
  55. package/dist/types/src/lib/features/share/types.d.ts.map +1 -0
  56. package/dist/types/src/lib/features/tabs/types.d.ts +31 -0
  57. package/dist/types/src/lib/features/tabs/types.d.ts.map +1 -0
  58. package/dist/types/src/lib/features/toggles/types.d.ts +16 -0
  59. package/dist/types/src/lib/features/toggles/types.d.ts.map +1 -0
  60. package/dist/types/src/lib/features/url/url-action-handler.d.ts +22 -0
  61. package/dist/types/src/lib/features/url/url-action-handler.d.ts.map +1 -0
  62. package/dist/types/src/lib/features/url/url-action-router.svelte.d.ts +26 -0
  63. package/dist/types/src/lib/features/url/url-action-router.svelte.d.ts.map +1 -0
  64. package/dist/types/src/lib/features/url/url-state-manager.d.ts +67 -0
  65. package/dist/types/src/lib/features/url/url-state-manager.d.ts.map +1 -0
  66. package/dist/types/src/lib/registry.d.ts +8 -0
  67. package/dist/types/src/lib/registry.d.ts.map +1 -0
  68. package/dist/types/src/lib/runtime.svelte.d.ts +73 -0
  69. package/dist/types/src/lib/runtime.svelte.d.ts.map +1 -0
  70. package/dist/types/src/lib/stores/active-state-store.svelte.d.ts +144 -0
  71. package/dist/types/src/lib/stores/active-state-store.svelte.d.ts.map +1 -0
  72. package/dist/types/src/lib/stores/derived-store.svelte.d.ts +16 -0
  73. package/dist/types/src/lib/stores/derived-store.svelte.d.ts.map +1 -0
  74. package/dist/types/src/lib/stores/element-store.svelte.d.ts +49 -0
  75. package/dist/types/src/lib/stores/element-store.svelte.d.ts.map +1 -0
  76. package/dist/types/src/lib/stores/ui-store.svelte.d.ts +29 -0
  77. package/dist/types/src/lib/stores/ui-store.svelte.d.ts.map +1 -0
  78. package/dist/types/src/lib/types/config.d.ts +38 -0
  79. package/dist/types/src/lib/types/config.d.ts.map +1 -0
  80. package/dist/types/src/lib/types/index.d.ts +8 -0
  81. package/dist/types/src/lib/types/index.d.ts.map +1 -0
  82. package/dist/types/src/lib/types/state.d.ts +16 -0
  83. package/dist/types/src/lib/types/state.d.ts.map +1 -0
  84. package/dist/types/src/lib/utils/clipboard-utils.d.ts +7 -0
  85. package/dist/types/src/lib/utils/clipboard-utils.d.ts.map +1 -0
  86. package/dist/types/src/lib/utils/dom-element-locator.d.ts +30 -0
  87. package/dist/types/src/lib/utils/dom-element-locator.d.ts.map +1 -0
  88. package/dist/types/src/lib/utils/init-utils.d.ts +18 -0
  89. package/dist/types/src/lib/utils/init-utils.d.ts.map +1 -0
  90. package/dist/types/src/lib/utils/persistence.d.ts +34 -0
  91. package/dist/types/src/lib/utils/persistence.d.ts.map +1 -0
  92. package/dist/types/src/lib/utils/scroll-utils.d.ts +27 -0
  93. package/dist/types/src/lib/utils/scroll-utils.d.ts.map +1 -0
  94. package/dist/types/src/lib/utils/url-utils.d.ts +8 -0
  95. package/dist/types/src/lib/utils/url-utils.d.ts.map +1 -0
  96. package/dist/types/tests/functional/fingerprint-compatibility.test.d.ts +2 -0
  97. package/dist/types/tests/functional/fingerprint-compatibility.test.d.ts.map +1 -0
  98. package/dist/types/tests/lib/features/adaptation/adaptation-manager.test.d.ts +2 -0
  99. package/dist/types/tests/lib/features/adaptation/adaptation-manager.test.d.ts.map +1 -0
  100. package/dist/types/tests/lib/features/adaptation/stores/adaptation-store.test.d.ts +2 -0
  101. package/dist/types/tests/lib/features/adaptation/stores/adaptation-store.test.d.ts.map +1 -0
  102. package/dist/types/tests/lib/features/focus/focus-logic.test.d.ts +2 -0
  103. package/dist/types/tests/lib/features/focus/focus-logic.test.d.ts.map +1 -0
  104. package/dist/types/tests/lib/features/focus/focus-store.test.d.ts +2 -0
  105. package/dist/types/tests/lib/features/focus/focus-store.test.d.ts.map +1 -0
  106. package/dist/types/tests/lib/features/highlight/highlight-logic.test.d.ts +2 -0
  107. package/dist/types/tests/lib/features/highlight/highlight-logic.test.d.ts.map +1 -0
  108. package/dist/types/tests/lib/features/notifications/stores/toast-store.test.d.ts +2 -0
  109. package/dist/types/tests/lib/features/notifications/stores/toast-store.test.d.ts.map +1 -0
  110. package/dist/types/tests/lib/features/placeholder/placeholder-binder.test.d.ts +2 -0
  111. package/dist/types/tests/lib/features/placeholder/placeholder-binder.test.d.ts.map +1 -0
  112. package/dist/types/tests/lib/features/placeholder/placeholder-manager.test.d.ts +2 -0
  113. package/dist/types/tests/lib/features/placeholder/placeholder-manager.test.d.ts.map +1 -0
  114. package/dist/types/tests/lib/features/settings/intro-manager.test.d.ts +2 -0
  115. package/dist/types/tests/lib/features/settings/intro-manager.test.d.ts.map +1 -0
  116. package/dist/types/tests/lib/features/share/share-logic.test.d.ts +2 -0
  117. package/dist/types/tests/lib/features/share/share-logic.test.d.ts.map +1 -0
  118. package/dist/types/tests/lib/features/share/share-store.test.d.ts +2 -0
  119. package/dist/types/tests/lib/features/share/share-store.test.d.ts.map +1 -0
  120. package/dist/types/tests/lib/features/url/url-action-handler.test.d.ts +2 -0
  121. package/dist/types/tests/lib/features/url/url-action-handler.test.d.ts.map +1 -0
  122. package/dist/types/tests/lib/features/url/url-state-manager.test.d.ts +2 -0
  123. package/dist/types/tests/lib/features/url/url-state-manager.test.d.ts.map +1 -0
  124. package/dist/types/tests/lib/services/url-action-router.test.d.ts +2 -0
  125. package/dist/types/tests/lib/services/url-action-router.test.d.ts.map +1 -0
  126. package/dist/types/tests/lib/stores/active-state-store.test.d.ts +2 -0
  127. package/dist/types/tests/lib/stores/active-state-store.test.d.ts.map +1 -0
  128. package/dist/types/tests/lib/stores/element-store.test.d.ts +2 -0
  129. package/dist/types/tests/lib/stores/element-store.test.d.ts.map +1 -0
  130. package/dist/types/tests/lib/stores/ui-store.test.d.ts +2 -0
  131. package/dist/types/tests/lib/stores/ui-store.test.d.ts.map +1 -0
  132. package/dist/types/tests/lib/utils/dom-element-locator.test.d.ts +2 -0
  133. package/dist/types/tests/lib/utils/dom-element-locator.test.d.ts.map +1 -0
  134. package/dist/types/tests/lib/utils/persistence.test.d.ts +2 -0
  135. package/dist/types/tests/lib/utils/persistence.test.d.ts.map +1 -0
  136. package/dist/types/tests/lib/utils/scroll-utils.test.d.ts +2 -0
  137. package/dist/types/tests/lib/utils/scroll-utils.test.d.ts.map +1 -0
  138. package/dist/types/tests/lib/utils/url-utils.test.d.ts +2 -0
  139. package/dist/types/tests/lib/utils/url-utils.test.d.ts.map +1 -0
  140. package/dist/types/tests/setup.d.ts +2 -0
  141. package/dist/types/tests/setup.d.ts.map +1 -0
  142. package/package.json +80 -0
@@ -0,0 +1,7 @@
1
+ import '$lib/registry';
2
+ /**
3
+ * Initialize CustardUI from script tag attributes and config file
4
+ * This runs automatically when the script is loaded.
5
+ */
6
+ export declare function initializeFromScript(): void;
7
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/browser.ts"],"names":[],"mappings":"AAOA,OAAO,eAAe,CAAC;AAKvB;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAsE3C"}
@@ -0,0 +1,55 @@
1
+ import type { AppRuntime } from '../runtime.svelte';
2
+ import type { ConfigFile } from '$lib/types/index';
3
+ import type { WidgetSettings, WidgetCalloutConfig, WidgetIconConfig } from '$features/settings/types';
4
+ /**
5
+ * Callbacks that the UI layer needs from the runtime.
6
+ * This keeps the UI decoupled from the AppRuntime class.
7
+ */
8
+ export interface RuntimeCallbacks {
9
+ resetToDefault: () => void;
10
+ getIconPosition: () => number | null;
11
+ saveIconPosition: (offset: number) => void;
12
+ clearIconPosition: () => void;
13
+ isIntroSeen: () => boolean;
14
+ markIntroSeen: () => void;
15
+ }
16
+ export interface UIManagerOptions extends Omit<WidgetSettings, 'enabled'> {
17
+ /** Callbacks from the runtime for persistence and reset */
18
+ callbacks: RuntimeCallbacks;
19
+ /** Container element where the settings widget should be rendered */
20
+ container?: HTMLElement;
21
+ /** Whether the settings feature (icon/modal) is enabled */
22
+ settingsEnabled?: boolean;
23
+ }
24
+ export type ResolvedUIManagerOptions = Omit<UIManagerOptions, 'container' | 'panel' | 'callout' | 'icon'> & {
25
+ container: HTMLElement;
26
+ settingsEnabled: boolean;
27
+ theme: 'light' | 'dark';
28
+ callout: Required<Pick<WidgetCalloutConfig, 'show' | 'message' | 'enablePulse'>> & {
29
+ backgroundColor?: string | undefined;
30
+ textColor?: string | undefined;
31
+ };
32
+ icon: Required<Pick<WidgetIconConfig, 'position' | 'scale' | 'show'>> & {
33
+ color?: string | undefined;
34
+ backgroundColor?: string | undefined;
35
+ opacity?: number | undefined;
36
+ };
37
+ };
38
+ export declare class CustardUIManager {
39
+ private app;
40
+ private options;
41
+ constructor(options: UIManagerOptions);
42
+ /**
43
+ * Render the settings widget
44
+ */
45
+ render(): void;
46
+ /**
47
+ * Remove the settings widget from DOM
48
+ */
49
+ destroy(): void;
50
+ }
51
+ /**
52
+ * Initializes the UI manager (settings and share UI) using the provided config.
53
+ */
54
+ export declare function initUIManager(runtime: AppRuntime, config: ConfigFile): CustardUIManager | undefined;
55
+ //# sourceMappingURL=ui-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-manager.d.ts","sourceRoot":"","sources":["../../../../../src/lib/app/ui-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEtG;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACrC,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC;IACvE,2DAA2D;IAC3D,SAAS,EAAE,gBAAgB,CAAC;IAE5B,qEAAqE;IACrE,SAAS,CAAC,EAAE,WAAW,CAAC;IAExB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,gBAAgB,EAChB,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAC3C,GAAG;IACF,SAAS,EAAE,WAAW,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa,CAAC,CAAC,GAAG;QACjF,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACrC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAChC,CAAC;IACF,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC,GAAG;QACtE,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC3B,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACrC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC9B,CAAC;CACH,CAAC;AAEF,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,GAAG,CAAyC;IACpD,OAAO,CAAC,OAAO,CAA2B;gBAE9B,OAAO,EAAE,gBAAgB;IAyBrC;;OAEG;IACI,MAAM,IAAI,IAAI;IAerB;;OAEG;IACI,OAAO,IAAI,IAAI;CAMvB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,UAAU,GACjB,gBAAgB,GAAG,SAAS,CAmB9B"}
@@ -0,0 +1,54 @@
1
+ import type { AdaptationConfig } from './types';
2
+ /**
3
+ * Manages the lifecycle of site adaptations (multi-tenancy variants).
4
+ * Handles fetching, persisting, and applying adaptation configs.
5
+ */
6
+ export declare class AdaptationManager {
7
+ private static readonly QUERY_PARAM;
8
+ private static readonly HASH_PREFIX;
9
+ /**
10
+ * Initializes adaptation from the URL parameter or localStorage.
11
+ * Must be called before AppRuntime is instantiated so that:
12
+ * - Theme CSS is injected early (FOUC prevention)
13
+ * - ?adapt= param is cleaned before URLStateManager.parseURL() runs
14
+ *
15
+ * Adaptation JSON files are resolved relative to the site's baseUrl:
16
+ * `{baseUrl}/{id}/{id}.json`
17
+ * e.g. baseUrl="/customviews", id="ntu" → "/customviews/ntu/ntu.json"
18
+ *
19
+ * @param baseUrl The site's base URL (from data-base-url, default: '')
20
+ * @param storageKey The project's unique storageKey prefix to use for saving preferences
21
+ * @returns The loaded AdaptationConfig, or null if no adaptation is active
22
+ */
23
+ static init(baseUrl?: string, storageKey?: string): Promise<AdaptationConfig | null>;
24
+ /**
25
+ * Adds a visual indicator to the URL bar showing the active adaptation.
26
+ *
27
+ * - Hash free → append `#/{id}` (clean, no query-string noise)
28
+ * - Hash occupied → set `?adapt={id}` so the indicator survives refreshes;
29
+ * init() re-reads and re-applies it each load, and
30
+ * rewriteUrlIndicator re-adds it, keeping it stable.
31
+ *
32
+ * Uses replaceState so history is not polluted.
33
+ *
34
+ * @param adaptationId The adaptation namespace/id
35
+ */
36
+ static rewriteUrlIndicator(adaptationId: string): void;
37
+ /**
38
+ * Injects CSS variables and/or a stylesheet link for the adaptation theme.
39
+ * Idempotent: will not add a second <link> tag for the same adaptation.
40
+ */
41
+ private static applyTheme;
42
+ private static clearStoredId;
43
+ private static hasHashAdaptationId;
44
+ private static getHashAdaptationId;
45
+ private static getHashUrlIndicator;
46
+ /**
47
+ * Meta tag is in the form <meta name="cv-adapt" content="{id}">
48
+ */
49
+ private static getMetaAdaptationId;
50
+ private static stripQueryParamFromUrl;
51
+ private static stripHashFromUrl;
52
+ private static loadAdaptationConfig;
53
+ }
54
+ //# sourceMappingURL=adaptation-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adaptation-manager.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/adaptation/adaptation-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAKhD;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAW;IAC9C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAQ;IAE3C;;;;;;;;;;;;;OAaG;WACU,IAAI,CAAC,OAAO,SAAK,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IA2DtF;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;IAiBtD;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IA0BzB,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAIlC,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAUlC,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAIlC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAIlC,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAKrC,OAAO,CAAC,MAAM,CAAC,gBAAgB;mBAKV,oBAAoB;CA4C1C"}
@@ -0,0 +1,11 @@
1
+ import type { AdaptationConfig } from '../types';
2
+ declare class AdaptationStore {
3
+ activeConfig: AdaptationConfig | null;
4
+ /**
5
+ * Called from AppRuntime constructor after stores are initialized.
6
+ */
7
+ init(config: AdaptationConfig | null): void;
8
+ }
9
+ export declare const adaptationStore: AdaptationStore;
10
+ export {};
11
+ //# sourceMappingURL=adaptation-store.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adaptation-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/adaptation/stores/adaptation-store.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,cAAM,eAAe;IACnB,YAAY,0BAAyC;IAErD;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI;CAG5C;AAED,eAAO,MAAM,eAAe,iBAAwB,CAAC"}
@@ -0,0 +1,13 @@
1
+ export interface AdaptationConfig {
2
+ id: string;
3
+ name?: string;
4
+ theme?: {
5
+ cssVariables?: Record<string, string>;
6
+ cssFile?: string;
7
+ };
8
+ defaults?: {
9
+ toggles?: Record<string, 'show' | 'hide' | 'peek'>;
10
+ placeholders?: Record<string, string>;
11
+ };
12
+ }
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/adaptation/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QACN,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;QACnD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACvC,CAAC;CACH"}
@@ -0,0 +1,31 @@
1
+ import { SvelteSet } from 'svelte/reactivity';
2
+ /**
3
+ * Determines which siblings of the target path elements should be hidden.
4
+ *
5
+ * @param targets The list of elements that are focused (and their ancestors up to root).
6
+ * @param root The root element where focus mode applies (usually document.body or a main wrapper).
7
+ * @param isExcluded Callback to determine if an element should be excluded from hiding (e.g. fixed position elements, overlays).
8
+ */
9
+ export declare function determineHiddenElements(targets: HTMLElement[], root: HTMLElement, isExcluded: (el: HTMLElement) => boolean): SvelteSet<HTMLElement>;
10
+ export interface ExclusionOptions {
11
+ hiddenElements: Set<HTMLElement>;
12
+ excludedTags: Set<string>;
13
+ excludedIds: Set<string>;
14
+ }
15
+ /**
16
+ * Checks if an element should be excluded from hiding logic.
17
+ *
18
+ * TODO: Check how to commonize this between focus and share
19
+ */
20
+ export declare function isElementExcluded(el: HTMLElement, options: ExclusionOptions): boolean;
21
+ export interface DividerGroup {
22
+ insertBefore: HTMLElement | null;
23
+ startNode: HTMLElement;
24
+ count: number;
25
+ }
26
+ /**
27
+ * Scans a list of children and groups consecutive hidden elements.
28
+ * Returns a list of groups where dividers should be inserted.
29
+ */
30
+ export declare function calculateDividerGroups(children: HTMLElement[], isHidden: (el: HTMLElement) => boolean): DividerGroup[];
31
+ //# sourceMappingURL=focus-logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-logic.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/focus/focus-logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,WAAW,EAAE,EACtB,IAAI,EAAE,WAAW,EACjB,UAAU,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,OAAO,GACvC,SAAS,CAAC,WAAW,CAAC,CAwDxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;IACjC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAiBrF;AAED,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,SAAS,EAAE,WAAW,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,WAAW,EAAE,EACvB,QAAQ,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,OAAO,GACrC,YAAY,EAAE,CAkChB"}
@@ -0,0 +1,37 @@
1
+ import type { ShareExclusions } from '$features/share/types';
2
+ export interface FocusServiceOptions {
3
+ shareExclusions?: ShareExclusions;
4
+ }
5
+ export declare class FocusService {
6
+ private rootEl;
7
+ private hiddenElements;
8
+ private dividers;
9
+ private excludedTags;
10
+ private excludedIds;
11
+ private unsubscribe;
12
+ private highlightService;
13
+ constructor(rootEl: HTMLElement, options: FocusServiceOptions);
14
+ /**
15
+ * Re-evaluate the URL when the browser's history changes
16
+ */
17
+ private handlePopState;
18
+ /**
19
+ * Reads the current URL and applies the appropriate focus/highlight mode
20
+ */
21
+ private applyModesFromUrl;
22
+ /**
23
+ * Applies focus mode to the specified descriptors.
24
+ * @param encodedDescriptors - The encoded descriptors to apply.
25
+ */
26
+ applyShowMode(encodedDescriptors: string): void;
27
+ applyHideMode(encodedDescriptors: string): void;
28
+ applyHighlightMode(encodedDescriptors: string): void;
29
+ private renderHiddenView;
30
+ private renderShowView;
31
+ private insertDividersForContainer;
32
+ private createDivider;
33
+ private expandContext;
34
+ exitShowMode(updateUrl?: boolean): void;
35
+ destroy(): void;
36
+ }
37
+ //# sourceMappingURL=focus-service.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-service.svelte.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/focus/services/focus-service.svelte.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,qBAAa,YAAY;IAUrB,OAAO,CAAC,MAAM;IAThB,OAAO,CAAC,cAAc,CAAgC;IACtD,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,WAAW,CAAc;IAEjC,OAAO,CAAC,WAAW,CAAa;IAChC,OAAO,CAAC,gBAAgB,CAAmB;gBAGjC,MAAM,EAAE,WAAW,EAC3B,OAAO,EAAE,mBAAmB;IAiC9B;;OAEG;IACH,OAAO,CAAC,cAAc,CAEpB;IAEF;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAuBzB;;;OAGG;IACI,aAAa,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI;IAwC/C,aAAa,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI;IAoC/C,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI;IAU3D,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,cAAc;IA0CtB,OAAO,CAAC,0BAA0B;IAYlC,OAAO,CAAC,aAAa;IAkBrB,OAAO,CAAC,aAAa;IAwBd,YAAY,CAAC,SAAS,UAAO,GAAG,IAAI;IA6CpC,OAAO;CAKf"}
@@ -0,0 +1,14 @@
1
+ export declare class FocusStore {
2
+ isActive: boolean;
3
+ /**
4
+ * Sets the active state of the focus mode.
5
+ */
6
+ setIsActive(isActive: boolean): void;
7
+ /**
8
+ * Signals intent to exit focus mode.
9
+ * Logic is handled by the service observing this state.
10
+ */
11
+ exit(): void;
12
+ }
13
+ export declare const focusStore: FocusStore;
14
+ //# sourceMappingURL=focus-store.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/focus/stores/focus-store.svelte.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;IACrB,QAAQ,UAAiB;IAEzB;;OAEG;IACH,WAAW,CAAC,QAAQ,EAAE,OAAO;IAI7B;;;OAGG;IACH,IAAI;CAGL;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { SvelteMap } from 'svelte/reactivity';
2
+ import { type RectData } from './services/highlight-types';
3
+ /**
4
+ * Groups elements by their parent.
5
+ * Returns a Map where keys are parent elements and values are lists of child elements.
6
+ */
7
+ export declare function groupSiblings(elements: HTMLElement[]): SvelteMap<HTMLElement, HTMLElement[]>;
8
+ /**
9
+ * Interface representing basic rectangle properties needed for calculation.
10
+ */
11
+ export interface SimpleRect {
12
+ top: number;
13
+ left: number;
14
+ width: number;
15
+ height: number;
16
+ }
17
+ /**
18
+ * Calculates merged rectangles for highlighting from groups of sibling elements.
19
+ *
20
+ * @param groups Map of parent elements to their child elements that need highlighting.
21
+ * @param getRect Callback to retrieve the bounding client rect of an element.
22
+ * Abstracted to allow testing without real DOM/layout.
23
+ * @param getScroll Callback to retrieve current scroll position {scrollTop, scrollLeft}.
24
+ */
25
+ export declare function calculateMergedRects(groups: SvelteMap<HTMLElement, HTMLElement[]>, getRect: (el: HTMLElement) => SimpleRect, getScroll: () => {
26
+ scrollTop: number;
27
+ scrollLeft: number;
28
+ }): RectData[];
29
+ //# sourceMappingURL=highlight-logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlight-logic.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/highlight/highlight-logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D;;;GAGG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC,CAY5F;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC,EAC7C,OAAO,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,UAAU,EACxC,SAAS,EAAE,MAAM;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACzD,QAAQ,EAAE,CAwCZ"}
@@ -0,0 +1,20 @@
1
+ export declare const HIGHLIGHT_PARAM = "cv-highlight";
2
+ export declare const BODY_HIGHLIGHT_CLASS = "cv-highlight-mode";
3
+ import { type RectData } from './highlight-types';
4
+ export declare class HighlightState {
5
+ rects: RectData[];
6
+ }
7
+ export declare class HighlightService {
8
+ private rootEl;
9
+ private overlayApp;
10
+ private state;
11
+ private resizeObserver;
12
+ private activeTargets;
13
+ private onWindowResize;
14
+ constructor(rootEl: HTMLElement);
15
+ apply(encodedDescriptors: string): void;
16
+ exit(): void;
17
+ private renderHighlightOverlay;
18
+ private updatePositions;
19
+ }
20
+ //# sourceMappingURL=highlight-service.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlight-service.svelte.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/highlight/services/highlight-service.svelte.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,iBAAiB,CAAC;AAE9C,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AAGxD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,qBAAa,cAAc;IACzB,KAAK,aAA0B;CAChC;AAED,qBAAa,gBAAgB;IAOf,OAAO,CAAC,MAAM;IAN1B,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,cAAc,CAAgC;gBAElC,MAAM,EAAE,WAAW;IAMhC,KAAK,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI;IAgDvC,IAAI,IAAI,IAAI;IAgBnB,OAAO,CAAC,sBAAsB;IAwB9B,OAAO,CAAC,eAAe;CAmBxB"}
@@ -0,0 +1,10 @@
1
+ export type RectData = {
2
+ top: number;
3
+ left: number;
4
+ width: number;
5
+ height: number;
6
+ right: number;
7
+ bottom: number;
8
+ element: HTMLElement;
9
+ };
10
+ //# sourceMappingURL=highlight-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"highlight-types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/highlight/services/highlight-types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare const TOAST_CLASS = "cv-toast-notification";
2
+ export interface ToastConfig {
3
+ message: string;
4
+ duration?: number;
5
+ id?: number;
6
+ }
7
+ export declare class ToastStore {
8
+ items: ToastConfig[];
9
+ nextId: number;
10
+ show(message: string, duration?: number): void;
11
+ dismiss(id: number): void;
12
+ }
13
+ export declare const toast: ToastStore;
14
+ export declare function showToast(message: string, duration?: number): void;
15
+ //# sourceMappingURL=toast-store.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/notifications/stores/toast-store.svelte.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,0BAA0B,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,UAAU;IACrB,KAAK,gBAA6B;IAClC,MAAM,SAAK;IAEX,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAO;IAYrC,OAAO,CAAC,EAAE,EAAE,MAAM;CAGnB;AAED,eAAO,MAAM,KAAK,YAAmB,CAAC;AAEtC,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,QAE3D"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * DOM Scanner for Variable Interpolation
3
+ *
4
+ * Scans the DOM for [[ variable_name ]] patterns and replaces them with
5
+ * reactive spans that update when the variable store changes.
6
+ */
7
+ export declare const VAR_REGEX: RegExp;
8
+ export declare class PlaceholderBinder {
9
+ /**
10
+ * Scans the root element for text nodes containing variable placeholders.
11
+ * Also scans for elements with .cv-bind or [data-cv-bind] to setup attribute bindings.
12
+ */
13
+ static scanAndHydrate(root: HTMLElement): void;
14
+ /**
15
+ * Updates attribute bindings for all elements participating in placeholder binding.
16
+ * Specifically updates attributes on elements with [data-cv-attr-templates].
17
+ * Text content is updated separately via <cv-placeholder> component reactivity.
18
+ */
19
+ static updateAll(values: Record<string, string>): void;
20
+ private static scanTextNodes;
21
+ private static scanAttributeBindings;
22
+ private static processTextNode;
23
+ private static processElementAttributes;
24
+ private static updateAttributeBindings;
25
+ /**
26
+ * Checks if a value is a full URL with protocol
27
+ * (e.g., http://, https://, ftp://, data:, mailto:)
28
+ */
29
+ private static isFullUrl;
30
+ /**
31
+ * Checks if a value is a relative URL path (e.g., /, ./, ../)
32
+ */
33
+ private static isRelativeUrl;
34
+ /**
35
+ * Resolves value for a placeholder by checking and using sources in order of:
36
+ * 1. user-set value, 2. registry default value, 3. inline fallback value
37
+ *
38
+ * Empty strings are treated as "not set" and will fall through to the next priority level.
39
+ *
40
+ * @param name - The placeholder name to resolve
41
+ * @param fallback - Optional inline fallback value from the usage syntax (e.g., `[[ name : fallback ]]`)
42
+ * @param values - Record of user-set placeholder values
43
+ * @returns The resolved value, or undefined if no value is available from any source
44
+ */
45
+ private static resolveValue;
46
+ /**
47
+ * Interpolates placeholder patterns in a template string with their resolved values.
48
+ *
49
+ * Replaces all `[[ name ]]` or `[[ name : fallback ]]` patterns with their resolved values.
50
+ * Escaped patterns (e.g., `\[[ name ]]`) are preserved as literal text.
51
+ *
52
+ * For `href` and `src` attributes, applies context-aware URL encoding:
53
+ * - Full URLs (http://, https://, mailto:, data:, etc.) are preserved as-is
54
+ * - Relative URLs (/, ./, ../) are preserved as-is
55
+ * - URL components (query parameters, path segments) are encoded with encodeURIComponent
56
+ *
57
+ * @param template - The template string containing placeholder patterns
58
+ * @param values - Record of user-set placeholder values
59
+ * @param attrName - Optional attribute name (enables URL encoding for 'href' and 'src')
60
+ * @returns The interpolated string with all placeholders replaced
61
+ */
62
+ private static interpolateString;
63
+ }
64
+ //# sourceMappingURL=placeholder-binder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholder-binder.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/placeholder/placeholder-binder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,eAAO,MAAM,SAAS,QAA0D,CAAC;AAOjF,qBAAa,iBAAiB;IAC5B;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW;IAKvC;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAQ/C,OAAO,CAAC,MAAM,CAAC,aAAa;IA4B5B,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAUpC,OAAO,CAAC,MAAM,CAAC,eAAe;IAiD9B,OAAO,CAAC,MAAM,CAAC,wBAAwB;IA2CvC,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAqBtC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAMxB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAqB3B;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;CAsBjC"}
@@ -0,0 +1,38 @@
1
+ import type { Config } from '$lib/types/index';
2
+ export declare class PlaceholderManager {
3
+ /**
4
+ * Registers global placeholders defined in the configuration.
5
+ * Source is marked as 'config'.
6
+ */
7
+ registerConfigPlaceholders(config: Config): void;
8
+ /**
9
+ * Registers placeholders defined implicitly via Tab Groups.
10
+ * Source is marked as 'tabgroup'.
11
+ *
12
+ * Should be called AFTER registerConfigPlaceholders to ensure config precedence.
13
+ */
14
+ registerTabGroupPlaceholders(config: Config): void;
15
+ /**
16
+ * Calculates the placeholder value based on the active tab selection in a group.
17
+ *
18
+ * @param tabgroupId The ID of the tab group
19
+ * @param tabId The ID of the currently active tab
20
+ * @param config The full application configuration
21
+ * @returns An object containing the placeholder key and value, or null if nothing to update.
22
+ */
23
+ calculatePlaceholderFromTabSelected(tabgroupId: string, tabId: string, config: Config): {
24
+ key: string;
25
+ value: string;
26
+ } | null;
27
+ /**
28
+ * Filters a record of incoming placeholders to only those registered in the registry.
29
+ * Warns and skips unregistered keys to prevent arbitrary key injection.
30
+ *
31
+ * @param placeholders Raw key-value record to validate (e.g. from a URL delta or persistence).
32
+ * @returns A filtered record containing only registered placeholder keys.
33
+ */
34
+ filterValidPlaceholders(placeholders?: Record<string, string>): Record<string, string>;
35
+ private registerPlaceholderFromTabGroup;
36
+ }
37
+ export declare const placeholderManager: PlaceholderManager;
38
+ //# sourceMappingURL=placeholder-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholder-manager.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/placeholder/placeholder-manager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAkB,MAAM,kBAAkB,CAAC;AAE/D,qBAAa,kBAAkB;IAC7B;;;OAGG;IACH,0BAA0B,CAAC,MAAM,EAAE,MAAM;IAWzC;;;;;OAKG;IACH,4BAA4B,CAAC,MAAM,EAAE,MAAM;IAQ3C;;;;;;;OAOG;IACH,mCAAmC,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAe7H;;;;;;OAMG;IACH,uBAAuB,CAAC,YAAY,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAe1F,OAAO,CAAC,+BAA+B;CAqCxC;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { PlaceholderDefinition } from '../types';
2
+ /**
3
+ * Registry store tracks existence and properties of placeholders,
4
+ * but not the values of the placeholders.
5
+ */
6
+ export declare class PlaceholderRegistryStore {
7
+ private _definitions;
8
+ get definitions(): PlaceholderDefinition[];
9
+ register(def: PlaceholderDefinition): void;
10
+ get(name: string): PlaceholderDefinition | undefined;
11
+ has(name: string): boolean;
12
+ private updateExisting;
13
+ private addNew;
14
+ private hasChanged;
15
+ }
16
+ export declare const placeholderRegistryStore: PlaceholderRegistryStore;
17
+ //# sourceMappingURL=placeholder-registry-store.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"placeholder-registry-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/placeholder/stores/placeholder-registry-store.svelte.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD;;;GAGG;AACH,qBAAa,wBAAwB;IAEnC,OAAO,CAAC,YAAY,CAAkD;IAGtE,IAAI,WAAW,IAAI,qBAAqB,EAAE,CAEzC;IAED,QAAQ,CAAC,GAAG,EAAE,qBAAqB;IAQnC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS;IAIpD,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,UAAU;CASnB;AAED,eAAO,MAAM,wBAAwB,0BAAiC,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Definition for a placeholder variable.
3
+ * Placeholders allow dynamic value substitution in the UI/Logic.
4
+ */
5
+ export interface PlaceholderDefinition {
6
+ name: string;
7
+ settingsLabel?: string | undefined;
8
+ settingsHint?: string | undefined;
9
+ defaultValue?: string | undefined;
10
+ hiddenFromSettings?: boolean | undefined;
11
+ /** If true, this placeholder is only shown in settings if detected on the page */
12
+ isLocal?: boolean | undefined;
13
+ /** Internal tracking of where this definition came from to detect conflicts */
14
+ source?: 'config' | 'tabgroup' | undefined;
15
+ /** The ID of the component (e.g. TabGroup groupId) that registered this placeholder */
16
+ ownerTabGroupId?: string | undefined;
17
+ }
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/placeholder/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACzC,kFAAkF;IAClF,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,+EAA+E;IAC/E,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,uFAAuF;IACvF,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC"}
@@ -0,0 +1,12 @@
1
+ import type { CustomViewAsset } from './types';
2
+ export declare class AssetsManager {
3
+ assets: Record<string, CustomViewAsset>;
4
+ private baseURL;
5
+ constructor(assets: Record<string, CustomViewAsset>, baseURL?: string);
6
+ validate(): boolean;
7
+ get(assetId: string): CustomViewAsset | undefined;
8
+ private prependBaseURL;
9
+ loadFromJSON(json: Record<string, CustomViewAsset>): void;
10
+ loadAdditionalAssets(additionalAssets: Record<string, CustomViewAsset>): void;
11
+ }
12
+ //# sourceMappingURL=assets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/render/assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,qBAAa,aAAa;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACxC,OAAO,CAAC,OAAO,CAAS;gBAEZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO,GAAE,MAAW;IASzE,QAAQ,IAAI,OAAO;IAInB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAgBjD,OAAO,CAAC,cAAc;IAatB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;IAIlD,oBAAoB,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;CAGvE"}
@@ -0,0 +1,3 @@
1
+ import type { AssetsManager } from './assets';
2
+ export declare function renderAssetInto(el: HTMLElement, assetId: string, assetsManager: AssetsManager): void;
3
+ //# sourceMappingURL=render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/render/render.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAoE9C,wBAAgB,eAAe,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,QAoB7F"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Represents an individual asset that can be rendered in a custom view.
3
+ */
4
+ export interface CustomViewAsset {
5
+ /** Optional type. If not provided, auto-detected from src/content. */
6
+ type?: 'image' | 'text' | 'html' | string;
7
+ /** Image source URL */
8
+ src?: string;
9
+ /** Alt text for images */
10
+ alt?: string;
11
+ /** Text or HTML content */
12
+ content?: string;
13
+ /** CSS class name(s) to apply */
14
+ className?: string;
15
+ /** Inline CSS styles to apply */
16
+ style?: string;
17
+ [key: string]: any;
18
+ }
19
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/render/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC1C,uBAAuB;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
@@ -0,0 +1,30 @@
1
+ import type { UIManagerOptions } from '$lib/app/ui-manager';
2
+ export interface IntroPersistence {
3
+ isIntroSeen: () => boolean;
4
+ markIntroSeen: () => void;
5
+ }
6
+ /**
7
+ * IntroManager
8
+ *
9
+ * Responsibilities:
10
+ * - Manages the visibility state of the introductory callout component.
11
+ * - Handles the logic for when to show the callout (delay, checks if already shown).
12
+ * - Manages the "pulse" effect state on the settings icon.
13
+ * - Persists the "shown" state to localStorage to prevent showing it repeatedly.
14
+ */
15
+ export declare class IntroManager {
16
+ showCallout: boolean;
17
+ showPulse: boolean;
18
+ private persistence;
19
+ private getOptions;
20
+ private hasChecked;
21
+ constructor(persistence: IntroPersistence, options: UIManagerOptions['callout'] | (() => UIManagerOptions['callout']));
22
+ /**
23
+ * Initializes the manager. Should be called when the component is ready
24
+ * and we know there are elements on the page.
25
+ */
26
+ init(hasPageElements: boolean, settingsEnabled: boolean): void;
27
+ private checkAndShow;
28
+ dismiss(): void;
29
+ }
30
+ //# sourceMappingURL=intro-manager.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intro-manager.svelte.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/settings/intro-manager.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,qBAAa,YAAY;IAEvB,WAAW,UAAiB;IAC5B,SAAS,UAAiB;IAE1B,OAAO,CAAC,WAAW,CAAmB;IACtC,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,UAAU,CAAS;gBAGzB,WAAW,EAAE,gBAAgB,EAC7B,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAS5E;;;OAGG;IACI,IAAI,CAAC,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO;IAU9D,OAAO,CAAC,YAAY;IASb,OAAO;CAKf"}