@custardui/custardui 2.1.1 → 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 +674 -440
- 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,6 +1,7 @@
|
|
|
1
1
|
import type { PlaceholderDefinition } from '../features/placeholder/types';
|
|
2
2
|
import type { TabGroupConfig } from '../features/tabs/types';
|
|
3
3
|
import type { ToggleConfig } from '../features/toggles/types';
|
|
4
|
+
import type { LabelConfig } from '../features/labels/types';
|
|
4
5
|
import type { ShareExclusions } from '../features/share/types';
|
|
5
6
|
import type { WidgetSettings } from '../features/settings/types';
|
|
6
7
|
declare const CONFIG_SECTION_KEYS: readonly ["toggles", "tabGroups", "placeholders"];
|
|
@@ -18,6 +19,8 @@ export interface Config {
|
|
|
18
19
|
shareExclusions?: ShareExclusions;
|
|
19
20
|
/** Global placeholder definitions */
|
|
20
21
|
placeholders?: PlaceholderDefinition[];
|
|
22
|
+
/** Inline decorative label (badge) definitions */
|
|
23
|
+
labels?: LabelConfig[];
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
* Represents the configuration file structure for CustardUI auto-initialization.
|
|
@@ -25,14 +28,12 @@ export interface Config {
|
|
|
25
28
|
export interface ConfigFile {
|
|
26
29
|
/** Core configuration object with toggles and defaultState */
|
|
27
30
|
config?: Config;
|
|
28
|
-
/** Path to the assets JSON file */
|
|
29
|
-
assetsJsonPath?: string;
|
|
30
|
-
/** Base URL for all paths */
|
|
31
|
-
baseUrl?: string;
|
|
32
31
|
/** Optional key to namespace localStorage items for isolation */
|
|
33
32
|
storageKey?: string;
|
|
34
33
|
/** Widget configuration options */
|
|
35
34
|
settings?: WidgetSettings;
|
|
35
|
+
/** Color scheme used to resolve shorthand label colors. Defaults to 'light'. */
|
|
36
|
+
colorScheme?: 'light' | 'dark' | 'auto';
|
|
36
37
|
}
|
|
37
38
|
export {};
|
|
38
39
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEjE,QAAA,MAAM,mBAAmB,mDAAoD,CAAC;AAE9E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,gBAAgB,CAEzE;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,sCAAsC;IACtC,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,wCAAwC;IACxC,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,kDAAkD;IAClD,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,qCAAqC;IACrC,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/config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'./config';
|
|
3
|
-
export * from '../features/render/types';
|
|
4
3
|
export * from '../features/tabs/types';
|
|
5
4
|
export * from '../features/toggles/types';
|
|
6
5
|
export * from '../features/share/types';
|
|
7
6
|
export * from '../features/placeholder/types';
|
|
7
|
+
export * from '../features/labels/types';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-manager.test.d.ts","sourceRoot":"","sources":["../../../../../../tests/lib/features/labels/label-manager.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-registry-store.test.d.ts","sourceRoot":"","sources":["../../../../../../tests/lib/features/labels/label-registry-store.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-utils.test.d.ts","sourceRoot":"","sources":["../../../../../../tests/lib/features/labels/label-utils.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-scheme-store.test.d.ts","sourceRoot":"","sources":["../../../../../tests/lib/stores/color-scheme-store.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derived-store.test.d.ts","sourceRoot":"","sources":["../../../../../tests/lib/stores/derived-store.test.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@custardui/custardui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2-beta.0",
|
|
4
4
|
"description": "A JavaScript dynamic custom views Library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/custardui.min.js",
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
18
|
"clean": "rimraf dist",
|
|
19
|
+
"build": "npm run clean && npm run build:types && npm run build:js",
|
|
19
20
|
"build:types": "tsc --project tsconfig.json",
|
|
20
21
|
"build:js": "rollup -c",
|
|
21
|
-
"build": "npm run clean && npm run build:types && npm run build:js",
|
|
22
|
-
"release": "npm run release:beta",
|
|
23
22
|
"release:beta": "npm run build && npm publish --access public --tag beta && git push --tags",
|
|
24
23
|
"release:prod": "npm run build && npm publish --access public --tag latest && git push --tags",
|
|
25
24
|
"bump:beta": "npm version prerelease --preid=beta",
|
|
26
25
|
"bump:patch": "npm version patch",
|
|
27
26
|
"bump:minor": "npm version minor",
|
|
28
27
|
"bump:major": "npm version major",
|
|
29
|
-
"deploydocs:prod": "cd docs && markbind deploy -s prod
|
|
30
|
-
"deploydocs": "cd docs && markbind deploy -s site.json",
|
|
28
|
+
"deploydocs:prod": "cd docs && markbind deploy --ci -s site-prod.json",
|
|
29
|
+
"deploydocs:beta": "cd docs && markbind deploy --ci -s site-beta.json",
|
|
30
|
+
"deploydocs:dev": "npm run build && cd docs && markbind deploy --ci -s site.json",
|
|
31
31
|
"dev": "rollup -c -w",
|
|
32
32
|
"watch": "rollup -c -w",
|
|
33
33
|
"lint": "eslint .",
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|