@custardui/custardui 2.1.0 → 2.1.2-beta.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/dist/custardui.js +675 -441
- package/dist/custardui.js.map +1 -1
- package/dist/custardui.min.js +2 -2
- package/dist/custardui.min.js.map +1 -1
- package/dist/types/src/browser.d.ts.map +1 -1
- package/dist/types/src/lib/features/adaptation/types.d.ts +6 -1
- package/dist/types/src/lib/features/adaptation/types.d.ts.map +1 -1
- package/dist/types/src/lib/features/focus/services/focus-service.svelte.d.ts.map +1 -1
- package/dist/types/src/lib/features/highlight/services/highlight-service.svelte.d.ts +0 -1
- package/dist/types/src/lib/features/highlight/services/highlight-service.svelte.d.ts.map +1 -1
- package/dist/types/src/lib/features/labels/label-manager.d.ts +19 -0
- package/dist/types/src/lib/features/labels/label-manager.d.ts.map +1 -0
- package/dist/types/src/lib/features/labels/label-registry-store.svelte.d.ts +27 -0
- package/dist/types/src/lib/features/labels/label-registry-store.svelte.d.ts.map +1 -0
- package/dist/types/src/lib/features/labels/label-utils.d.ts +12 -0
- package/dist/types/src/lib/features/labels/label-utils.d.ts.map +1 -0
- package/dist/types/src/lib/features/labels/types.d.ts +12 -0
- package/dist/types/src/lib/features/labels/types.d.ts.map +1 -0
- package/dist/types/src/lib/features/placeholder/placeholder-manager.d.ts +1 -1
- package/dist/types/src/lib/features/placeholder/types.d.ts +2 -2
- package/dist/types/src/lib/features/placeholder/types.d.ts.map +1 -1
- package/dist/types/src/lib/features/settings/intro-manager.svelte.d.ts +2 -2
- package/dist/types/src/lib/features/settings/intro-manager.svelte.d.ts.map +1 -1
- package/dist/types/src/lib/features/toggles/types.d.ts +5 -0
- package/dist/types/src/lib/features/toggles/types.d.ts.map +1 -1
- package/dist/types/src/lib/features/url/url-constants.d.ts +13 -0
- package/dist/types/src/lib/features/url/url-constants.d.ts.map +1 -0
- package/dist/types/src/lib/features/url/url-encoding-utils.d.ts +35 -0
- package/dist/types/src/lib/features/url/url-encoding-utils.d.ts.map +1 -0
- package/dist/types/src/lib/features/url/url-state-generator.d.ts +17 -0
- package/dist/types/src/lib/features/url/url-state-generator.d.ts.map +1 -0
- package/dist/types/src/lib/features/url/url-state-manager.d.ts +10 -26
- package/dist/types/src/lib/features/url/url-state-manager.d.ts.map +1 -1
- package/dist/types/src/lib/features/url/url-state-parser.d.ts +17 -0
- package/dist/types/src/lib/features/url/url-state-parser.d.ts.map +1 -0
- package/dist/types/src/lib/features/url/url-state-shaper.d.ts +49 -0
- package/dist/types/src/lib/features/url/url-state-shaper.d.ts.map +1 -0
- package/dist/types/src/lib/registry.d.ts +1 -0
- package/dist/types/src/lib/registry.d.ts.map +1 -1
- package/dist/types/src/lib/runtime.svelte.d.ts +1 -3
- package/dist/types/src/lib/runtime.svelte.d.ts.map +1 -1
- package/dist/types/src/lib/stores/active-state-store.svelte.d.ts +8 -3
- package/dist/types/src/lib/stores/active-state-store.svelte.d.ts.map +1 -1
- package/dist/types/src/lib/stores/color-scheme-store.svelte.d.ts +13 -0
- package/dist/types/src/lib/stores/color-scheme-store.svelte.d.ts.map +1 -0
- package/dist/types/src/lib/stores/derived-store.svelte.d.ts +2 -6
- package/dist/types/src/lib/stores/derived-store.svelte.d.ts.map +1 -1
- package/dist/types/src/lib/stores/element-store.svelte.d.ts +2 -2
- package/dist/types/src/lib/stores/element-store.svelte.d.ts.map +1 -1
- package/dist/types/src/lib/types/config.d.ts +5 -4
- package/dist/types/src/lib/types/config.d.ts.map +1 -1
- package/dist/types/src/lib/types/index.d.ts +1 -1
- package/dist/types/src/lib/types/index.d.ts.map +1 -1
- package/dist/types/tests/lib/features/labels/label-manager.test.d.ts +2 -0
- package/dist/types/tests/lib/features/labels/label-manager.test.d.ts.map +1 -0
- package/dist/types/tests/lib/features/labels/label-registry-store.test.d.ts +2 -0
- package/dist/types/tests/lib/features/labels/label-registry-store.test.d.ts.map +1 -0
- package/dist/types/tests/lib/features/labels/label-utils.test.d.ts +2 -0
- package/dist/types/tests/lib/features/labels/label-utils.test.d.ts.map +1 -0
- package/dist/types/tests/lib/stores/color-scheme-store.test.d.ts +2 -0
- package/dist/types/tests/lib/stores/color-scheme-store.test.d.ts.map +1 -0
- package/dist/types/tests/lib/stores/derived-store.test.d.ts +2 -0
- package/dist/types/tests/lib/stores/derived-store.test.d.ts.map +1 -0
- package/package.json +5 -5
- package/dist/types/src/lib/features/render/assets.d.ts +0 -12
- package/dist/types/src/lib/features/render/assets.d.ts.map +0 -1
- package/dist/types/src/lib/features/render/render.d.ts +0 -3
- package/dist/types/src/lib/features/render/render.d.ts.map +0 -1
- package/dist/types/src/lib/features/render/types.d.ts +0 -19
- package/dist/types/src/lib/features/render/types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/browser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/browser.ts"],"names":[],"mappings":"AAIA,OAAO,eAAe,CAAC;AAKvB;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAoD3C"}
|
|
@@ -5,9 +5,14 @@ export interface AdaptationConfig {
|
|
|
5
5
|
cssVariables?: Record<string, string>;
|
|
6
6
|
cssFile?: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
preset?: {
|
|
9
9
|
toggles?: Record<string, 'show' | 'hide' | 'peek'>;
|
|
10
|
+
tabs?: Record<string, string>;
|
|
10
11
|
placeholders?: Record<string, string>;
|
|
12
|
+
labels?: Record<string, {
|
|
13
|
+
value?: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
}>;
|
|
11
16
|
};
|
|
12
17
|
}
|
|
13
18
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +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,
|
|
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,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC7D,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus-service.svelte.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/focus/services/focus-service.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"focus-service.svelte.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/focus/services/focus-service.svelte.ts"],"names":[],"mappings":"AAiBA,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;IAgDzB;;;OAGG;IACI,aAAa,CAAC,kBAAkB,EAAE,MAAM,EAAE,WAAW,GAAE,WAAW,EAAO,GAAG,IAAI;IAyChF,aAAa,CAAC,kBAAkB,EAAE,MAAM,EAAE,cAAc,GAAE,WAAW,EAAO,GAAG,IAAI;IA0CnF,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight-service.svelte.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/highlight/services/highlight-service.svelte.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"highlight-service.svelte.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/features/highlight/services/highlight-service.svelte.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AAGxD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIlD,qBAAa,cAAc;IACzB,KAAK,aAA0B;CAChC;AAED,qBAAa,gBAAgB;IASf,OAAO,CAAC,MAAM;IAR1B,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,KAAK,CAAwB;IACrC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,YAAY,CAAkD;IACtE,OAAO,CAAC,iBAAiB,CAA2E;IACpG,OAAO,CAAC,cAAc,CAAgC;gBAElC,MAAM,EAAE,WAAW;IAMhC,cAAc,CAAC,kBAAkB,EAAE,MAAM,GAAG,WAAW,EAAE;IAWzD,sBAAsB,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI;IA0DxD,IAAI,IAAI,IAAI;IAkBnB,OAAO,CAAC,sBAAsB;YAwBhB,cAAc;IAiC5B,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,eAAe;CAqBxB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Config } from '$lib/types/index';
|
|
2
|
+
/**
|
|
3
|
+
* Manages registration and adaptation overrides for label definitions.
|
|
4
|
+
*/
|
|
5
|
+
export declare const labelManager: {
|
|
6
|
+
/**
|
|
7
|
+
* Registers all labels from the config into the label registry store.
|
|
8
|
+
*/
|
|
9
|
+
registerConfigLabels(config: Config): void;
|
|
10
|
+
/**
|
|
11
|
+
* Applies adaptation preset overrides to registered labels.
|
|
12
|
+
* Unknown label names produce a warning and are skipped.
|
|
13
|
+
*/
|
|
14
|
+
applyAdaptationOverrides(overrides: Record<string, {
|
|
15
|
+
value?: string;
|
|
16
|
+
color?: string;
|
|
17
|
+
}>): void;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=label-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-manager.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/labels/label-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG/C;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB;;OAEG;iCAC0B,MAAM,GAAG,IAAI;IAM1C;;;OAGG;wCACiC,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,IAAI;CAK9F,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { LabelConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Registry store for label definitions.
|
|
4
|
+
* Tracks config-defined labels and adaptation overrides.
|
|
5
|
+
* Labels are config-level (not user state) — no persistence or URL encoding.
|
|
6
|
+
*/
|
|
7
|
+
export declare class LabelRegistryStore {
|
|
8
|
+
private _labels;
|
|
9
|
+
/**
|
|
10
|
+
* Registers a label definition. Overwrites any existing entry with the same name.
|
|
11
|
+
*/
|
|
12
|
+
register(def: LabelConfig): void;
|
|
13
|
+
/**
|
|
14
|
+
* Merges overrides onto an existing label entry.
|
|
15
|
+
* Warns and skips if the label name is not registered.
|
|
16
|
+
*/
|
|
17
|
+
override(name: string, overrides: {
|
|
18
|
+
value?: string;
|
|
19
|
+
color?: string;
|
|
20
|
+
}): void;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the label definition for the given name, or undefined if not registered.
|
|
23
|
+
*/
|
|
24
|
+
get(name: string): LabelConfig | undefined;
|
|
25
|
+
}
|
|
26
|
+
export declare const labelRegistryStore: LabelRegistryStore;
|
|
27
|
+
//# sourceMappingURL=label-registry-store.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-registry-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/labels/label-registry-store.svelte.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;GAIG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,OAAO,CAAwC;IAEvD;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI;IAIhC;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAS3E;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;CAG3C;AAED,eAAO,MAAM,kBAAkB,oBAA2B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves a color value, expanding single-letter shorthands to hex.
|
|
3
|
+
* Pass `isDark=true` to get the dark-theme variant of a shorthand.
|
|
4
|
+
* Non-shorthand values are returned unchanged.
|
|
5
|
+
*/
|
|
6
|
+
export declare function resolveColor(color: string, isDark: boolean): string;
|
|
7
|
+
/**
|
|
8
|
+
* Computes a contrasting text color (black or white) for a given background color.
|
|
9
|
+
* Supports #rrggbb and #rgb hex strings. Falls back to white for non-hex inputs.
|
|
10
|
+
*/
|
|
11
|
+
export declare function computeTextColor(bgColor: string): string;
|
|
12
|
+
//# sourceMappingURL=label-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/labels/label-utils.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAKnE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAmBxD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for a single label (inline decorative pill badge).
|
|
3
|
+
*/
|
|
4
|
+
export interface LabelConfig {
|
|
5
|
+
/** Unique identifier used in `<cv-label name="...">` */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Display text — any string, including unicode/emoji (e.g. "OPTIONAL", "★ KEY"). If omitted, the element's inner content is used. */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** CSS background color (hex or named). Text color is auto-computed for contrast. Defaults to #6b7280. */
|
|
10
|
+
color?: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/labels/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,sIAAsI;IACtI,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0GAA0G;IAC1G,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -34,7 +34,7 @@ export declare class PlaceholderManager {
|
|
|
34
34
|
filterValidPlaceholders(placeholders?: Record<string, string>): Record<string, string>;
|
|
35
35
|
/**
|
|
36
36
|
* Filters a record of incoming placeholders to only those that can be set by users.
|
|
37
|
-
* Extends filterValidPlaceholders() by also excluding
|
|
37
|
+
* Extends filterValidPlaceholders() by also excluding siteManaged placeholders.
|
|
38
38
|
* Use this for persistence loads and URL delta application.
|
|
39
39
|
*/
|
|
40
40
|
filterUserSettablePlaceholders(placeholders?: Record<string, string>): Record<string, string>;
|
|
@@ -11,11 +11,11 @@ export interface PlaceholderDefinition {
|
|
|
11
11
|
/** If true, this placeholder is only shown in settings if detected on the page */
|
|
12
12
|
isLocal?: boolean | undefined;
|
|
13
13
|
/**
|
|
14
|
-
* If true, this placeholder can only be set by adaptations or the config defaultValue.
|
|
14
|
+
* If true, this placeholder can only be set by the site (via adaptations or the config defaultValue).
|
|
15
15
|
* It is hidden from settings and immune to user persistence / URL overrides.
|
|
16
16
|
* Implies hiddenFromSettings: true.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
siteManaged?: boolean | undefined;
|
|
19
19
|
/** Internal tracking of where this definition came from to detect conflicts */
|
|
20
20
|
source?: 'config' | 'tabgroup' | undefined;
|
|
21
21
|
/** The ID of the component (e.g. TabGroup groupId) that registered this placeholder */
|
|
@@ -1 +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;;;;OAIG;IACH,
|
|
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;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,+EAA+E;IAC/E,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,uFAAuF;IACvF,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC"}
|
|
@@ -18,9 +18,9 @@ export declare class IntroManager {
|
|
|
18
18
|
constructor(persistence: PersistenceManager, options: UIManagerOptions['callout'] | (() => UIManagerOptions['callout']));
|
|
19
19
|
/**
|
|
20
20
|
* Initializes the manager. Should be called when the component is ready
|
|
21
|
-
* and we know there are elements on the page.
|
|
21
|
+
* and we know there are elements on the current page (toggles, tab groups, or placeholders).
|
|
22
22
|
*/
|
|
23
|
-
init(
|
|
23
|
+
init(hasElementsOnCurrentPage: boolean, settingsEnabled: boolean): void;
|
|
24
24
|
private checkAndShow;
|
|
25
25
|
dismiss(): void;
|
|
26
26
|
}
|
|
@@ -1 +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,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;;;;;;;;GAQG;AACH,qBAAa,YAAY;IAEvB,WAAW,UAAiB;IAC5B,SAAS,UAAiB;IAE1B,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,UAAU,CAAS;gBAGzB,WAAW,EAAE,kBAAkB,EAC/B,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAS5E;;;OAGG;IACI,IAAI,CAAC,
|
|
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,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE;;;;;;;;GAQG;AACH,qBAAa,YAAY;IAEvB,WAAW,UAAiB;IAC5B,SAAS,UAAiB;IAE1B,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,UAAU,CAAoC;IACtD,OAAO,CAAC,UAAU,CAAS;gBAGzB,WAAW,EAAE,kBAAkB,EAC/B,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAS5E;;;OAGG;IACI,IAAI,CAAC,wBAAwB,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO;IAUvE,OAAO,CAAC,YAAY;IASb,OAAO;CAKf"}
|
|
@@ -12,5 +12,10 @@ export interface ToggleConfig {
|
|
|
12
12
|
description?: string;
|
|
13
13
|
/** Default state for this toggle: 'show', 'hide', or 'peek' */
|
|
14
14
|
default?: 'show' | 'hide' | 'peek';
|
|
15
|
+
/**
|
|
16
|
+
* If true, this toggle's state is controlled by the site (via adaptations or config defaults).
|
|
17
|
+
* It will be hidden from the settings UI, excluded from shareable URLs, and immune to user persistence.
|
|
18
|
+
*/
|
|
19
|
+
siteManaged?: boolean;
|
|
15
20
|
}
|
|
16
21
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/toggles/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/toggles/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACnC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const PARAM_SHOW_TOGGLE = "t-show";
|
|
2
|
+
export declare const PARAM_PEEK_TOGGLE = "t-peek";
|
|
3
|
+
export declare const PARAM_HIDE_TOGGLE = "t-hide";
|
|
4
|
+
export declare const PARAM_TABS = "tabs";
|
|
5
|
+
export declare const PARAM_PH = "ph";
|
|
6
|
+
export declare const PARAM_CV_SHOW = "cv-show";
|
|
7
|
+
export declare const PARAM_CV_HIDE = "cv-hide";
|
|
8
|
+
export declare const PARAM_CV_HIGHLIGHT = "cv-highlight";
|
|
9
|
+
/** Parameters owned by FocusService — never touched by URLStateManager */
|
|
10
|
+
export declare const FOCUS_PARAMS: string[];
|
|
11
|
+
/** Parameters owned by URLStateManager */
|
|
12
|
+
export declare const MANAGED_PARAMS: string[];
|
|
13
|
+
//# sourceMappingURL=url-constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-constants.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/url/url-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,QAAQ,OAAO,CAAC;AAE7B,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD,0EAA0E;AAC1E,eAAO,MAAM,YAAY,UAAqD,CAAC;AAC/E,0CAA0C;AAC1C,eAAO,MAAM,cAAc,UAAkF,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encodes a list of IDs into a comma-separated query-safe string.
|
|
3
|
+
*
|
|
4
|
+
* Each ID is individually encoded with `encodeURIComponent` so that any commas
|
|
5
|
+
* or special characters *within* an ID are escaped (e.g. `%2C`).
|
|
6
|
+
*/
|
|
7
|
+
export declare function encodeList(items: string[]): string;
|
|
8
|
+
/**
|
|
9
|
+
* Encodes key:value pairs into a comma-separated query-safe string.
|
|
10
|
+
*
|
|
11
|
+
* Keys and values are individually encoded so that the structural separators
|
|
12
|
+
* (`:` between key/value, `,` between pairs) remain unambiguous.
|
|
13
|
+
*/
|
|
14
|
+
export declare function encodePairs(obj: Record<string, string>): string;
|
|
15
|
+
/**
|
|
16
|
+
* Extracts the raw (un-decoded) value of a query parameter from a search string.
|
|
17
|
+
*
|
|
18
|
+
* We avoid `URLSearchParams.get()` here because it decodes the entire value,
|
|
19
|
+
* converting our content-level `%2C` back into literal commas and making them
|
|
20
|
+
* indistinguishable from the structural commas that separate list items.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getRawParam(search: string, paramName: string): string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Splits a raw query parameter value by structural commas and decodes each item.
|
|
25
|
+
*
|
|
26
|
+
* Because values were encoded with `encodeURIComponent` before joining with `,`,
|
|
27
|
+
* splitting on literal commas is safe — any commas inside values appear as `%2C`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function splitAndDecode(search: string, paramName: string): string[];
|
|
30
|
+
/**
|
|
31
|
+
* Parses `key:value` pairs from a raw comma-delimited list into a Record.
|
|
32
|
+
* Entries without a colon, or with empty keys, are silently dropped.
|
|
33
|
+
*/
|
|
34
|
+
export declare function decodePairs(search: string, paramName: string): Record<string, string>;
|
|
35
|
+
//# sourceMappingURL=url-encoding-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-encoding-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/url/url-encoding-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAElD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAI/D;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI5E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAgB1E;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAYrF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { State } from '$lib/types/index';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the query string fragment for the managed URL parameters from a state object.
|
|
4
|
+
*
|
|
5
|
+
* We construct this string manually (instead of using `URLSearchParams.set()`)
|
|
6
|
+
* to avoid double-encoding. `URLSearchParams.set()` would encode our already-encoded
|
|
7
|
+
* values a second time (e.g. `%2C` → `%252C`), requiring a hacky decode step.
|
|
8
|
+
*
|
|
9
|
+
* By building the string directly, each value is encoded exactly once,
|
|
10
|
+
* and structural separators (`,` `:`) remain as literal characters in the URL.
|
|
11
|
+
*/
|
|
12
|
+
export declare function generateManagedQuery(state: State): string;
|
|
13
|
+
/**
|
|
14
|
+
* Builds a full absolute URL string from the base URL and managed params.
|
|
15
|
+
*/
|
|
16
|
+
export declare function buildFullUrl(url: URL, managedQuery: string): string;
|
|
17
|
+
//# sourceMappingURL=url-state-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-state-generator.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/url/url-state-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAI9C;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAoBzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAInE"}
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
import type { State } from '$lib/types/index';
|
|
2
|
-
|
|
3
|
-
declare const FOCUS_PARAMS: string[];
|
|
4
|
-
declare const MANAGED_PARAMS: string[];
|
|
5
|
-
/**
|
|
6
|
-
* Elements currently present and tracked on the page.
|
|
7
|
-
*/
|
|
8
|
-
export interface PageElements {
|
|
9
|
-
toggles: Iterable<string>;
|
|
10
|
-
tabGroups: Iterable<string>;
|
|
11
|
-
placeholders: Iterable<string>;
|
|
12
|
-
}
|
|
1
|
+
import type { Config, State } from '$lib/types/index';
|
|
2
|
+
import { type ElementsOnCurrentPage } from './url-state-shaper';
|
|
13
3
|
/**
|
|
14
4
|
* URL State Manager for CustardUI.
|
|
15
5
|
* Handles encoding/decoding of view states as human-readable URL parameters.
|
|
16
6
|
*
|
|
17
|
-
* URL Schema:
|
|
7
|
+
* URL Schema (defined in url-constants.ts):
|
|
18
8
|
* ?t-show=A,B — toggle IDs to explicitly show
|
|
19
9
|
* ?t-peek=C — toggle IDs to explicitly peek
|
|
20
10
|
* ?t-hide=D — toggle IDs to explicitly hide
|
|
@@ -41,21 +31,13 @@ export declare class URLStateManager {
|
|
|
41
31
|
*/
|
|
42
32
|
static parseURL(): State | null;
|
|
43
33
|
/**
|
|
44
|
-
* Generates a shareable URL that encodes the
|
|
45
|
-
*
|
|
46
|
-
* Encodes every toggle on the page explicitly (shown, peeked, or hidden)
|
|
47
|
-
* so the recipient sees the exact same view regardless of their local settings.
|
|
48
|
-
*
|
|
49
|
-
* Tab-group-derived placeholders are omitted from the URL — they are implied
|
|
50
|
-
* by the `?tabs=` parameter and will be re-derived by the recipient's store.
|
|
51
|
-
*
|
|
52
|
-
* Toggles, tabs, and placeholders NOT present on the current page are omitted,
|
|
53
|
-
* preventing cross-page state pollution.
|
|
34
|
+
* Generates a shareable URL that encodes the current state based on Config and State.
|
|
54
35
|
*
|
|
55
36
|
* @param currentState The full application state to encode.
|
|
56
|
-
* @param
|
|
37
|
+
* @param config The application configuration.
|
|
38
|
+
* @param elementsOnCurrentPage The active elements detected on the current page.
|
|
57
39
|
*/
|
|
58
|
-
static generateShareableURL(currentState: State | null | undefined,
|
|
40
|
+
static generateShareableURL(currentState: State | null | undefined, config: Config, elementsOnCurrentPage?: ElementsOnCurrentPage): string;
|
|
59
41
|
/**
|
|
60
42
|
* Clears all managed parameters from the current browser URL.
|
|
61
43
|
* This is called after parsing so that shared configurations don't stick around in
|
|
@@ -63,5 +45,7 @@ export declare class URLStateManager {
|
|
|
63
45
|
*/
|
|
64
46
|
static clearURL(): void;
|
|
65
47
|
}
|
|
66
|
-
export { FOCUS_PARAMS
|
|
48
|
+
export { FOCUS_PARAMS } from './url-constants';
|
|
49
|
+
export { MANAGED_PARAMS } from './url-constants';
|
|
50
|
+
export type { ElementsOnCurrentPage } from './url-state-shaper';
|
|
67
51
|
//# sourceMappingURL=url-state-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url-state-manager.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/url/url-state-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"url-state-manager.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/url/url-state-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGtD,OAAO,EAAgC,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG9F;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,eAAe;IAC1B;;;;OAIG;WACW,QAAQ,IAAI,KAAK,GAAG,IAAI;IAetC;;;;;;OAMG;WACW,oBAAoB,CAChC,YAAY,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,EACtC,MAAM,EAAE,MAAM,EACd,qBAAqB,GAAE,qBAAwE,GAC9F,MAAM;IAgBT;;;;OAIG;WACW,QAAQ,IAAI,IAAI;CAiB/B;AAGD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { State } from '$lib/types/index';
|
|
2
|
+
/**
|
|
3
|
+
* Parses toggle visibility state from the current URL search string.
|
|
4
|
+
* Returns partial state containing only the toggle fields that are present.
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseTogglesFromURL(search: string): Pick<State, 'shownToggles' | 'peekToggles' | 'hiddenToggles'>;
|
|
7
|
+
/**
|
|
8
|
+
* Parses tab group selections from the current URL search string.
|
|
9
|
+
* Returns partial state containing the `tabs` record, or empty object if absent.
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseTabsFromURL(search: string): Pick<State, 'tabs'>;
|
|
12
|
+
/**
|
|
13
|
+
* Parses placeholder values from the current URL search string.
|
|
14
|
+
* Returns partial state containing the `placeholders` record, or empty object if absent.
|
|
15
|
+
*/
|
|
16
|
+
export declare function parsePlaceholdersFromURL(search: string): Pick<State, 'placeholders'>;
|
|
17
|
+
//# sourceMappingURL=url-state-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-state-parser.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/url/url-state-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAI9C;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,aAAa,GAAG,eAAe,CAAC,CAajH;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAGpE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,CAGpF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Config, State } from '$lib/types/index';
|
|
2
|
+
/**
|
|
3
|
+
* Elements currently present and tracked on the page.
|
|
4
|
+
*/
|
|
5
|
+
export interface ElementsOnCurrentPage {
|
|
6
|
+
toggles: Iterable<string>;
|
|
7
|
+
tabGroups: Iterable<string>;
|
|
8
|
+
placeholders: Iterable<string>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Strips placeholder entries that should not appear in shareable URLs:
|
|
12
|
+
* - Tab-group-derived placeholders (source: 'tabgroup') — implied by ?tabs=
|
|
13
|
+
* - Site-managed placeholders (siteManaged: true) — site-controlled, not shareable
|
|
14
|
+
*/
|
|
15
|
+
export declare function stripNonShareablePlaceholders(placeholders: Record<string, string>, config: Config): Record<string, string>;
|
|
16
|
+
/**
|
|
17
|
+
* Filters the current toggle state (shown, peeked) and derives the explicit
|
|
18
|
+
* hidden list for the shareable URL.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getShareableToggles(currentState: State, pageTogglesSet: Set<string>, config: Config): Pick<State, 'shownToggles' | 'peekToggles' | 'hiddenToggles'>;
|
|
21
|
+
/**
|
|
22
|
+
* Filters the active tab selections for the shareable URL.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getShareableTabs(currentState: State, pageTabGroupsSet: Set<string>, config: Config): Pick<State, 'tabs'>;
|
|
25
|
+
/**
|
|
26
|
+
* Filters the custom placeholder values for the shareable URL.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getShareablePlaceholders(currentState: State, pagePlaceholdersSet: Set<string>, config: Config): Pick<State, 'placeholders'>;
|
|
29
|
+
/**
|
|
30
|
+
* Computes a shareable state object from the current state.
|
|
31
|
+
*
|
|
32
|
+
* Toggles, tabs, and placeholders marked as `isLocal: true` are only included
|
|
33
|
+
* if they are present on the current page.
|
|
34
|
+
*
|
|
35
|
+
* Global elements (not `isLocal`) are always included regardless of whether
|
|
36
|
+
* they are detected on the current page.
|
|
37
|
+
*
|
|
38
|
+
* Every toggle known to the page (or global) is explicitly encoded as shown,
|
|
39
|
+
* peeked, or hidden, so the recipient's view exactly matches the sender's
|
|
40
|
+
* regardless of their local settings.
|
|
41
|
+
*
|
|
42
|
+
* Tab-group-derived placeholders are omitted — the `?tabs=` param is their source of truth.
|
|
43
|
+
*
|
|
44
|
+
* @param currentState The current application state.
|
|
45
|
+
* @param elementsOnCurrentPage The active elements detected on the current page.
|
|
46
|
+
* @param config The application configuration.
|
|
47
|
+
*/
|
|
48
|
+
export declare function computeShareableSettingState(currentState: State, elementsOnCurrentPage: ElementsOnCurrentPage, config: Config): State;
|
|
49
|
+
//# sourceMappingURL=url-state-shaper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-state-shaper.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/features/url/url-state-shaper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5B,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAe1H;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,aAAa,GAAG,eAAe,CAAC,CAoDnK;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAyBxH;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,KAAK,EAAE,mBAAmB,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,CA0B3I;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,KAAK,EACnB,qBAAqB,EAAE,qBAAqB,EAC5C,MAAM,EAAE,MAAM,GACb,KAAK,CAUP"}
|
|
@@ -5,4 +5,5 @@ import '$features/tabs/components/TabHeader.svelte';
|
|
|
5
5
|
import '$features/tabs/components/TabBody.svelte';
|
|
6
6
|
import '$features/placeholder/Placeholder.svelte';
|
|
7
7
|
import '$features/placeholder/PlaceholderInput.svelte';
|
|
8
|
+
import '$features/labels/components/Label.svelte';
|
|
8
9
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/lib/registry.ts"],"names":[],"mappings":"AAAA,OAAO,4CAA4C,CAAC;AACpD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,2CAA2C,CAAC;AACnD,OAAO,4CAA4C,CAAC;AACpD,OAAO,0CAA0C,CAAC;AAElD,OAAO,0CAA0C,CAAC;AAClD,OAAO,+CAA+C,CAAC"}
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/lib/registry.ts"],"names":[],"mappings":"AAAA,OAAO,4CAA4C,CAAC;AACpD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,2CAA2C,CAAC;AACnD,OAAO,4CAA4C,CAAC;AACpD,OAAO,0CAA0C,CAAC;AAElD,OAAO,0CAA0C,CAAC;AAClD,OAAO,+CAA+C,CAAC;AAEvD,OAAO,0CAA0C,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { ConfigFile } from '$lib/types/index';
|
|
2
|
-
import type { AssetsManager } from '$features/render/assets';
|
|
3
2
|
import type { AdaptationConfig } from '$features/adaptation/types';
|
|
4
3
|
import { PersistenceManager } from './utils/persistence';
|
|
5
4
|
import { IconSettingsStore } from '$features/settings/stores/icon-settings-store.svelte';
|
|
6
5
|
export interface RuntimeOptions {
|
|
7
|
-
assetsManager: AssetsManager;
|
|
8
6
|
configFile: ConfigFile;
|
|
9
7
|
rootEl?: HTMLElement | undefined;
|
|
10
8
|
storageKey?: string | undefined;
|
|
@@ -33,7 +31,7 @@ export declare class AppRuntime {
|
|
|
33
31
|
* Resolves the starting application state by layering sources:
|
|
34
32
|
*
|
|
35
33
|
* 1. **Baseline**: `ActiveStateStore` initializes with defaults from the config file.
|
|
36
|
-
* 2. **Adaptation
|
|
34
|
+
* 2. **Adaptation Preset**: If an adaptation is active, its preset is applied
|
|
37
35
|
* on top of the config defaults (before persisted state, so user choices can win).
|
|
38
36
|
* 3. **Persistence**: If local storage has a saved state, it replaces the baseline (`applyState`).
|
|
39
37
|
* 4. **URL Overrides**: If the URL contains parameters (`?t-show=X`), these are applied
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAS,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime.svelte.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAS,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AAwCzF,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC5C;AAED;;;;GAIG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAc;IACrB,kBAAkB,EAAE,kBAAkB,CAAC;IAC9C,OAAO,CAAC,YAAY,CAAe;IAC5B,iBAAiB,EAAE,iBAAiB,CAAC;IAE5C,OAAO,CAAC,QAAQ,CAAC,CAAmB;IACpC,OAAO,CAAC,iBAAiB,CAAC,CAAa;IACvC,OAAO,CAAC,YAAY,CAAC,CAAa;gBAEtB,GAAG,EAAE,cAAc;IAqB/B;;;OAGG;IACH,OAAO,CAAC,UAAU;IA8BlB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,mBAAmB;IA6B3B;;;;;OAKG;IACI,KAAK;IAQZ;;OAEG;IACH,OAAO,CAAC,OAAO;IAMf;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA0B7B;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAY9B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA6BtB,cAAc;IAWd,OAAO;CASf"}
|
|
@@ -81,12 +81,12 @@ export declare class ActiveStateStore {
|
|
|
81
81
|
*/
|
|
82
82
|
applyDifferenceInState(deltaState: State): void;
|
|
83
83
|
/**
|
|
84
|
-
* Applies adaptation
|
|
84
|
+
* Applies adaptation preset on top of the config defaults, before persisted state.
|
|
85
85
|
* User choices applied later via applyState() will override these.
|
|
86
86
|
*
|
|
87
|
-
* @param
|
|
87
|
+
* @param preset The preset section from the adaptation config
|
|
88
88
|
*/
|
|
89
|
-
applyAdaptationDefaults(
|
|
89
|
+
applyAdaptationDefaults(preset: AdaptationConfig['preset']): void;
|
|
90
90
|
/**
|
|
91
91
|
* Resets the application state to the computed defaults.
|
|
92
92
|
*/
|
|
@@ -123,6 +123,11 @@ export declare class ActiveStateStore {
|
|
|
123
123
|
* Explicit placeholder values override any tab-derived value (winning over syncPlaceholdersFromTabs).
|
|
124
124
|
*/
|
|
125
125
|
private applyPlaceholdersDelta;
|
|
126
|
+
/**
|
|
127
|
+
* Removes toggle IDs belonging to siteManaged toggles.
|
|
128
|
+
* Used to prevent user-supplied state (URL, localStorage) from overriding site-controlled toggles.
|
|
129
|
+
*/
|
|
130
|
+
private filterNonSiteManagedToggleIds;
|
|
126
131
|
/**
|
|
127
132
|
* Validates an incoming tab record against the configuration.
|
|
128
133
|
* Drops any groupId that doesn't exist in `config.tabGroups`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active-state-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../src/lib/stores/active-state-store.svelte.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAoB,KAAK,EAAgB,MAAM,kBAAkB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;GAMG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IACH,MAAM,SAAsB;IAE5B;;OAEG;IACH,kBAAkB,+CAAkC;IAEpD;;;OAGG;IACH,KAAK,QAKF;gBAES,aAAa,GAAE,MAAW;IAQtC;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM;IAiBnB;;;;;OAKG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAU3C;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IAK1C;;;;;OAKG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;IAanE;;;;OAIG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAOzC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,QAAQ,EAAE,KAAK;IAqB1B;;;;;;;;;;;;;OAaG;IACH,sBAAsB,CAAC,UAAU,EAAE,KAAK;IAMxC;;;;;OAKG;IACH,uBAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"active-state-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../src/lib/stores/active-state-store.svelte.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAoB,KAAK,EAAgB,MAAM,kBAAkB,CAAC;AAEtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;GAMG;AACH,qBAAa,gBAAgB;IAC3B;;OAEG;IACH,MAAM,SAAsB;IAE5B;;OAEG;IACH,kBAAkB,+CAAkC;IAEpD;;;OAGG;IACH,KAAK,QAKF;gBAES,aAAa,GAAE,MAAW;IAQtC;;OAEG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM;IAiBnB;;;;;OAKG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAU3C;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IAK1C;;;;;OAKG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM;IAanE;;;;OAIG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAOzC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,QAAQ,EAAE,KAAK;IAqB1B;;;;;;;;;;;;;OAaG;IACH,sBAAsB,CAAC,UAAU,EAAE,KAAK;IAMxC;;;;;OAKG;IACH,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,IAAI;IAoBjE;;OAEG;IACH,KAAK;IAKE,mBAAmB,IAAI,KAAK;IAuDnC;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAIjC;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAwBtB;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAqBxB;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAWtB;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAO9B;;;OAGG;IACH,OAAO,CAAC,6BAA6B;IAOrC;;;;;;;OAOG;IACH,OAAO,CAAC,eAAe;IAsBvB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAsB1B;;;;;;;;;OASG;IACH,OAAO,CAAC,wBAAwB;CAwBjC;AAED,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App-wide store for color scheme preference.
|
|
3
|
+
* Drives light/dark variant resolution for shorthand label colors and any other
|
|
4
|
+
* components that need to react to the site's color scheme setting.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ColorSchemeStore {
|
|
7
|
+
#private;
|
|
8
|
+
isDark: boolean;
|
|
9
|
+
init(scheme?: 'light' | 'dark' | 'auto'): void;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const colorSchemeStore: ColorSchemeStore;
|
|
13
|
+
//# sourceMappingURL=color-scheme-store.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-scheme-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../src/lib/stores/color-scheme-store.svelte.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,gBAAgB;;IAC3B,MAAM,UAAiB;IAavB,IAAI,CAAC,MAAM,GAAE,OAAO,GAAG,MAAM,GAAG,MAAgB,GAAG,IAAI;IAyBvD,OAAO,IAAI,IAAI;CAGhB;AAED,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import type { AssetsManager } from '$features/render/assets';
|
|
2
1
|
/**
|
|
3
2
|
* Cross-cutting derived state that combines data from multiple sub-stores.
|
|
4
|
-
* Holds only computed/derived values
|
|
3
|
+
* Holds only computed/derived values — no mutable application state.
|
|
5
4
|
*/
|
|
6
|
-
declare class DerivedStateStore {
|
|
7
|
-
assetsManager: AssetsManager | undefined;
|
|
5
|
+
export declare class DerivedStateStore {
|
|
8
6
|
menuToggles: import("../types").ToggleConfig[];
|
|
9
7
|
menuTabGroups: import("../types").TabGroupConfig[];
|
|
10
8
|
hiddenToggleIds: string[];
|
|
11
9
|
hasVisiblePlaceholders: boolean;
|
|
12
10
|
hasMenuOptions: boolean;
|
|
13
|
-
setAssetsManager(manager: AssetsManager): void;
|
|
14
11
|
}
|
|
15
12
|
export declare const derivedStore: DerivedStateStore;
|
|
16
|
-
export {};
|
|
17
13
|
//# sourceMappingURL=derived-store.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derived-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../src/lib/stores/derived-store.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"derived-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../src/lib/stores/derived-store.svelte.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,qBAAa,iBAAiB;IAG5B,WAAW,oCAKR;IAEH,aAAa,sCAKV;IAEH,eAAe,WAMZ;IAEH,sBAAsB,UAQnB;IAEH,cAAc,UAIZ;CAEH;AAED,eAAO,MAAM,YAAY,mBAA0B,CAAC"}
|
|
@@ -20,9 +20,9 @@ export declare class ElementStore {
|
|
|
20
20
|
*/
|
|
21
21
|
detectedPlaceholders: SvelteSet<string>;
|
|
22
22
|
/**
|
|
23
|
-
* Returns true if there are any active components (toggles
|
|
23
|
+
* Returns true if there are any active components (toggles, tab groups, or placeholders) actually present in the DOM.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
hasElementsOnCurrentPage: boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Registers a toggle as active on the current page.
|
|
28
28
|
* @param id The ID of the toggle found in the DOM.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../src/lib/stores/element-store.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;GAGG;AACH,qBAAa,YAAY;IACvB;;;OAGG;IACH,eAAe,oBAA8C;IAE7D;;;OAGG;IACH,iBAAiB,oBAA8C;IAE/D;;;OAGG;IACH,oBAAoB,oBAA8C;IAElE;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"element-store.svelte.d.ts","sourceRoot":"","sources":["../../../../../src/lib/stores/element-store.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;GAGG;AACH,qBAAa,YAAY;IACvB;;;OAGG;IACH,eAAe,oBAA8C;IAE7D;;;OAGG;IACH,iBAAiB,oBAA8C;IAE/D;;;OAGG;IACH,oBAAoB,oBAA8C;IAElE;;OAEG;IACH,wBAAwB,UAItB;IAIF;;;OAGG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM;IAIzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM;IAI3B;;;OAGG;IACH,mBAAmB,CAAC,IAAI,EAAE,MAAM;IAIhC;;;OAGG;IACH,aAAa;IAMb,yBAAyB;CAG1B;AAED,eAAO,MAAM,YAAY,cAAqB,CAAC"}
|