@customviews-js/customviews 1.4.1-beta.1 → 1.4.1-beta.2
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/custom-views.cjs.js +12180 -0
- package/dist/custom-views.cjs.js.map +1 -0
- package/dist/custom-views.esm.js +11703 -4925
- package/dist/custom-views.esm.js.map +1 -1
- package/dist/custom-views.min.js +3 -3
- package/dist/custom-views.min.js.map +1 -1
- package/dist/types/{lib/custom-views.d.ts → CustomViews.d.ts} +4 -3
- package/dist/types/CustomViews.d.ts.map +1 -0
- package/dist/types/browser.d.ts +21 -0
- package/dist/types/browser.d.ts.map +1 -0
- package/dist/types/core/{config.d.ts → constants.d.ts} +1 -1
- package/dist/types/core/constants.d.ts.map +1 -0
- package/dist/types/core/core.svelte.d.ts +40 -0
- package/dist/types/core/core.svelte.d.ts.map +1 -0
- package/dist/types/core/{assets-manager.d.ts → managers/assets-manager.d.ts} +1 -1
- package/dist/types/core/managers/assets-manager.d.ts.map +1 -0
- package/dist/types/core/render.d.ts +1 -1
- package/dist/types/core/render.d.ts.map +1 -1
- package/dist/types/core/services/focus-service.d.ts +33 -0
- package/dist/types/core/services/focus-service.d.ts.map +1 -0
- package/dist/types/core/{persistence.d.ts → state/persistence.d.ts} +1 -1
- package/dist/types/core/state/persistence.d.ts.map +1 -0
- package/dist/types/core/{url-state-manager.d.ts → state/url-state-manager.d.ts} +1 -1
- package/dist/types/core/state/url-state-manager.d.ts.map +1 -0
- package/dist/types/core/stores/focus-store.d.ts +10 -0
- package/dist/types/core/stores/focus-store.d.ts.map +1 -0
- package/dist/types/core/stores/main-store.svelte.d.ts +93 -0
- package/dist/types/core/stores/main-store.svelte.d.ts.map +1 -0
- package/dist/types/core/stores/share-store.d.ts +21 -0
- package/dist/types/core/stores/share-store.d.ts.map +1 -0
- package/dist/types/core/stores/toast-store.d.ts +13 -0
- package/dist/types/core/stores/toast-store.d.ts.map +1 -0
- package/dist/types/core/utils/dom-element-locator.d.ts +27 -0
- package/dist/types/core/utils/dom-element-locator.d.ts.map +1 -0
- package/dist/types/core/widget.d.ts +5 -72
- package/dist/types/core/widget.d.ts.map +1 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/registry.d.ts +6 -0
- package/dist/types/registry.d.ts.map +1 -0
- package/dist/types/types/assets.d.ts +19 -0
- package/dist/types/types/assets.d.ts.map +1 -0
- package/dist/types/types/config.d.ts +94 -0
- package/dist/types/types/config.d.ts.map +1 -0
- package/dist/types/types/elements.d.ts +12 -0
- package/dist/types/types/elements.d.ts.map +1 -0
- package/dist/types/types/global.d.ts +17 -0
- package/dist/types/types/global.d.ts.map +1 -0
- package/dist/types/types/state.d.ts +16 -0
- package/dist/types/types/state.d.ts.map +1 -0
- package/dist/types/types/types.d.ts +5 -129
- package/dist/types/types/types.d.ts.map +1 -1
- package/dist/types/utils/init-utils.d.ts +24 -0
- package/dist/types/utils/init-utils.d.ts.map +1 -0
- package/dist/types/utils/scroll-utils.d.ts +26 -0
- package/dist/types/utils/scroll-utils.d.ts.map +1 -0
- package/package.json +10 -5
- package/dist/custom-views.core.cjs.js +0 -5402
- package/dist/custom-views.core.cjs.js.map +0 -1
- package/dist/custom-views.core.esm.js +0 -5395
- package/dist/custom-views.core.esm.js.map +0 -1
- package/dist/custom-views.js +0 -5408
- package/dist/custom-views.js.map +0 -1
- package/dist/types/core/anchor-engine.d.ts +0 -55
- package/dist/types/core/anchor-engine.d.ts.map +0 -1
- package/dist/types/core/assets-manager.d.ts.map +0 -1
- package/dist/types/core/config.d.ts.map +0 -1
- package/dist/types/core/core.d.ts +0 -122
- package/dist/types/core/core.d.ts.map +0 -1
- package/dist/types/core/custom-elements.d.ts +0 -8
- package/dist/types/core/custom-elements.d.ts.map +0 -1
- package/dist/types/core/focus-manager.d.ts +0 -38
- package/dist/types/core/focus-manager.d.ts.map +0 -1
- package/dist/types/core/persistence.d.ts.map +0 -1
- package/dist/types/core/share-manager.d.ts +0 -70
- package/dist/types/core/share-manager.d.ts.map +0 -1
- package/dist/types/core/tab-manager.d.ts +0 -73
- package/dist/types/core/tab-manager.d.ts.map +0 -1
- package/dist/types/core/toast-manager.d.ts +0 -12
- package/dist/types/core/toast-manager.d.ts.map +0 -1
- package/dist/types/core/toggle-manager.d.ts +0 -43
- package/dist/types/core/toggle-manager.d.ts.map +0 -1
- package/dist/types/core/url-state-manager.d.ts.map +0 -1
- package/dist/types/core/visibility-manager.d.ts +0 -28
- package/dist/types/core/visibility-manager.d.ts.map +0 -1
- package/dist/types/entry/browser-entry.d.ts +0 -13
- package/dist/types/entry/browser-entry.d.ts.map +0 -1
- package/dist/types/lib/custom-views.d.ts.map +0 -1
- package/dist/types/styles/focus-mode-styles.d.ts +0 -8
- package/dist/types/styles/focus-mode-styles.d.ts.map +0 -1
- package/dist/types/styles/share-mode-styles.d.ts +0 -10
- package/dist/types/styles/share-mode-styles.d.ts.map +0 -1
- package/dist/types/styles/styles.d.ts +0 -7
- package/dist/types/styles/styles.d.ts.map +0 -1
- package/dist/types/styles/tab-styles.d.ts +0 -5
- package/dist/types/styles/tab-styles.d.ts.map +0 -1
- package/dist/types/styles/toast-styles.d.ts +0 -4
- package/dist/types/styles/toast-styles.d.ts.map +0 -1
- package/dist/types/styles/toggle-styles.d.ts +0 -5
- package/dist/types/styles/toggle-styles.d.ts.map +0 -1
- package/dist/types/styles/widget-styles.d.ts +0 -13
- package/dist/types/styles/widget-styles.d.ts.map +0 -1
- package/dist/types/utils/scroll-manager.d.ts +0 -26
- package/dist/types/utils/scroll-manager.d.ts.map +0 -1
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Descriptor for an anchor that represents a DOM element.
|
|
3
|
-
*/
|
|
4
|
-
interface AnchorDescriptor {
|
|
5
|
-
tag: string;
|
|
6
|
-
index: number;
|
|
7
|
-
parentId?: string;
|
|
8
|
-
textSnippet: string;
|
|
9
|
-
textHash: number;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Engine for generating and resolving robust anchors.
|
|
13
|
-
*
|
|
14
|
-
* It implements a simple anchor generation and resolution algorithm that uses a combination of
|
|
15
|
-
* structural, contextual, and content-based hints to generate a unique anchor for a given DOM element.
|
|
16
|
-
*
|
|
17
|
-
* The anchor is generated by first creating an AnchorDescriptor for the element, which contains
|
|
18
|
-
* information about the element's tag, index, parent ID, and text content. This descriptor is then
|
|
19
|
-
* serialized into a URL-safe string using a minification algorithm.
|
|
20
|
-
*
|
|
21
|
-
* The anchor is then resolved by searching for the element in the DOM using the serialized string.
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
export declare class AnchorEngine {
|
|
25
|
-
/**
|
|
26
|
-
* Generates a simple hash code for a string.
|
|
27
|
-
*
|
|
28
|
-
* It takes each character's Unicode code point and uses it to update the hash value.
|
|
29
|
-
*/
|
|
30
|
-
private static hashCode;
|
|
31
|
-
/**
|
|
32
|
-
* Normalizes text content by removing excessive whitespace.
|
|
33
|
-
*
|
|
34
|
-
* It trims leading and trailing whitespace and replaces multiple spaces with a single space.
|
|
35
|
-
*/
|
|
36
|
-
private static normalizeText;
|
|
37
|
-
/**
|
|
38
|
-
* Creates an AnchorDescriptor for a given DOM element.
|
|
39
|
-
*/
|
|
40
|
-
static createDescriptor(el: HTMLElement): AnchorDescriptor;
|
|
41
|
-
/**
|
|
42
|
-
* Serializes a list of AnchorDescriptors into a URL-safe string.
|
|
43
|
-
*/
|
|
44
|
-
static serialize(descriptors: AnchorDescriptor[]): string;
|
|
45
|
-
/**
|
|
46
|
-
* Deserializes a URL-safe string back into a list of AnchorDescriptors.
|
|
47
|
-
*/
|
|
48
|
-
static deserialize(encoded: string): AnchorDescriptor[];
|
|
49
|
-
/**
|
|
50
|
-
* Finds the best DOM element match for a descriptor.
|
|
51
|
-
*/
|
|
52
|
-
static resolve(root: HTMLElement, descriptor: AnchorDescriptor): HTMLElement | null;
|
|
53
|
-
}
|
|
54
|
-
export {};
|
|
55
|
-
//# sourceMappingURL=anchor-engine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"anchor-engine.d.ts","sourceRoot":"","sources":["../../../src/core/anchor-engine.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,UAAU,gBAAgB;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,YAAY;IAErB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ;IAWvB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE,WAAW,GAAG,gBAAgB;IAoC1D;;OAEG;IACH,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,gBAAgB,EAAE,GAAG,MAAM;IAczD;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE;IAiBvD;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,GAAG,WAAW,GAAG,IAAI;CA0DtF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assets-manager.d.ts","sourceRoot":"","sources":["../../../src/core/assets-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,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;CAIvE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,UAAiD,CAAC;AACpF,eAAO,MAAM,oBAAoB,UAAyE,CAAC"}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import type { State, TabGroupConfig, Config } from "../types/types";
|
|
2
|
-
import type { AssetsManager } from "./assets-manager";
|
|
3
|
-
import { ShareManager } from "./share-manager";
|
|
4
|
-
export interface CustomViewsOptions {
|
|
5
|
-
assetsManager: AssetsManager;
|
|
6
|
-
config: Config;
|
|
7
|
-
rootEl?: HTMLElement | undefined;
|
|
8
|
-
showUrl?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare class CustomViewsCore {
|
|
11
|
-
private rootEl;
|
|
12
|
-
private assetsManager;
|
|
13
|
-
private persistenceManager;
|
|
14
|
-
private visibilityManager;
|
|
15
|
-
private observer;
|
|
16
|
-
private shareManager;
|
|
17
|
-
private focusManager;
|
|
18
|
-
private componentRegistry;
|
|
19
|
-
private config;
|
|
20
|
-
private stateChangeListeners;
|
|
21
|
-
private showUrlEnabled;
|
|
22
|
-
private lastAppliedState;
|
|
23
|
-
constructor(opt: CustomViewsOptions);
|
|
24
|
-
getShareManager(): ShareManager;
|
|
25
|
-
/**
|
|
26
|
-
* Toggles the share mode on or off.
|
|
27
|
-
*/
|
|
28
|
-
toggleShareMode(): void;
|
|
29
|
-
/**
|
|
30
|
-
* Scan the given element for toggles and tab groups, register them
|
|
31
|
-
* Returns true if new components were found
|
|
32
|
-
*/
|
|
33
|
-
private scan;
|
|
34
|
-
/**
|
|
35
|
-
* Unscan the given element for toggles and tab groups, de-register them from registry
|
|
36
|
-
*/
|
|
37
|
-
private unscan;
|
|
38
|
-
/**
|
|
39
|
-
* Check if there are any active components in the registry
|
|
40
|
-
*/
|
|
41
|
-
hasActiveComponents(): boolean;
|
|
42
|
-
getConfig(): Config;
|
|
43
|
-
/**
|
|
44
|
-
* Get tab groups from config
|
|
45
|
-
*/
|
|
46
|
-
getTabGroups(): TabGroupConfig[] | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* Generate a computed default state:
|
|
49
|
-
* - If config.defaultState is defined, use it (even if empty)
|
|
50
|
-
* - Otherwise, compute a default: enable all toggles and set all tab groups to their first tab
|
|
51
|
-
*/
|
|
52
|
-
private getComputedDefaultState;
|
|
53
|
-
/**
|
|
54
|
-
* Get currently active tabs (from URL > persisted (localStorage) > defaults)
|
|
55
|
-
*/
|
|
56
|
-
getCurrentActiveTabs(): Record<string, string>;
|
|
57
|
-
/**
|
|
58
|
-
* Set active tab for a group and apply state
|
|
59
|
-
*/
|
|
60
|
-
setActiveTab(groupId: string, tabId: string, groupEl?: HTMLElement): void;
|
|
61
|
-
init(): Promise<void>;
|
|
62
|
-
private initializeNewComponents;
|
|
63
|
-
private initObserver;
|
|
64
|
-
private loadAndCallApplyState;
|
|
65
|
-
/**
|
|
66
|
-
* Apply a custom state, saves to localStorage and updates the URL
|
|
67
|
-
* 'source' in options indicates the origin of the state change
|
|
68
|
-
* (e.g., 'widget' to trigger scroll behavior)
|
|
69
|
-
* 'scrollAnchor' in options indicates the element to maintain scroll position of
|
|
70
|
-
* 'persist' (default true) to control whether to save to localStorage
|
|
71
|
-
*/
|
|
72
|
-
applyState(state: State, options?: {
|
|
73
|
-
source?: string;
|
|
74
|
-
scrollAnchor?: {
|
|
75
|
-
element: HTMLElement;
|
|
76
|
-
top: number;
|
|
77
|
-
};
|
|
78
|
-
persist?: boolean;
|
|
79
|
-
}): void;
|
|
80
|
-
/**
|
|
81
|
-
* Renders state on components in ComponentRegistry
|
|
82
|
-
* Applies the given state.
|
|
83
|
-
* Disconnects the mutation observer during rendering to prevent loops
|
|
84
|
-
**/
|
|
85
|
-
private renderState;
|
|
86
|
-
/**
|
|
87
|
-
* Reset to default state
|
|
88
|
-
*/
|
|
89
|
-
resetToDefault(): void;
|
|
90
|
-
/**
|
|
91
|
-
* Get the full current state including active toggles, peek toggles, and tabs
|
|
92
|
-
*/
|
|
93
|
-
getCurrentState(): State;
|
|
94
|
-
/**
|
|
95
|
-
* Clear all persistence and reset to default
|
|
96
|
-
*/
|
|
97
|
-
clearPersistence(): void;
|
|
98
|
-
setOption(flag: string, value: unknown): void;
|
|
99
|
-
/**
|
|
100
|
-
* Add a listener that will be called whenever the state changes
|
|
101
|
-
*/
|
|
102
|
-
addStateChangeListener(listener: () => void): void;
|
|
103
|
-
/**
|
|
104
|
-
* Remove a state change listener
|
|
105
|
-
*/
|
|
106
|
-
removeStateChangeListener(listener: () => void): void;
|
|
107
|
-
/**
|
|
108
|
-
* Notify all state change listeners
|
|
109
|
-
*/
|
|
110
|
-
private notifyStateChangeListeners;
|
|
111
|
-
/**
|
|
112
|
-
* Persist tab nav visibility preference
|
|
113
|
-
*/
|
|
114
|
-
persistTabNavVisibility(visible: boolean): void;
|
|
115
|
-
/**
|
|
116
|
-
* Get persisted tab nav visibility preference
|
|
117
|
-
*/
|
|
118
|
-
getPersistedTabNavVisibility(): boolean | null;
|
|
119
|
-
private cloneState;
|
|
120
|
-
private getTrackedStateSnapshot;
|
|
121
|
-
}
|
|
122
|
-
//# sourceMappingURL=core.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/core/core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAStD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAY/C,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,aAAa,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,kBAAkB,CAAqB;IAC/C,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,QAAQ,CAAiC;IACjD,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,YAAY,CAAe;IAEnC,OAAO,CAAC,iBAAiB,CAGvB;IAEF,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,oBAAoB,CAAyB;IACrD,OAAO,CAAC,cAAc,CAAU;IAChC,OAAO,CAAC,gBAAgB,CAAsB;gBAElC,GAAG,EAAE,kBAAkB;IAkB5B,eAAe,IAAI,YAAY;IAItC;;OAEG;IACI,eAAe,IAAI,IAAI;IAI9B;;;OAGG;IACH,OAAO,CAAC,IAAI;IA8BZ;;OAEG;IACH,OAAO,CAAC,MAAM;IAoBd;;OAEG;IACI,mBAAmB,IAAI,OAAO;IAI9B,SAAS,IAAI,MAAM;IAI1B;;OAEG;IACI,YAAY,IAAI,cAAc,EAAE,GAAG,SAAS;IAInD;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IA+B/B;;OAEG;IACI,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAarD;;OAEG;IACI,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI;IAmBnE,IAAI;IAwBjB,OAAO,CAAC,uBAAuB;IAoC/B,OAAO,CAAC,YAAY;YA+CN,qBAAqB;IAoBnC;;;;;;MAME;IACK,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE;YAAE,OAAO,EAAE,WAAW,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;SAAE,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAC;KAAE;IAoCxI;;;;QAII;IACJ,OAAO,CAAC,WAAW;IA+BnB;;OAEG;IACI,cAAc;IAiBrB;;OAEG;IACI,eAAe,IAAI,KAAK;IAY/B;;OAEG;IACI,gBAAgB;IAWhB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAuBpD;;OAEG;IACI,sBAAsB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAIzD;;OAEG;IACI,yBAAyB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAO5D;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;OAEG;IACI,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAItD;;OAEG;IACI,4BAA4B,IAAI,OAAO,GAAG,IAAI;IAIrD,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,uBAAuB;CAYhC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-elements.d.ts","sourceRoot":"","sources":["../../../src/core/custom-elements.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0DH;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAqB7C"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export interface FocusManagerOptions {
|
|
2
|
-
excludedTags: string[];
|
|
3
|
-
excludedIds: string[];
|
|
4
|
-
}
|
|
5
|
-
export declare class FocusManager {
|
|
6
|
-
private rootEl;
|
|
7
|
-
private hiddenElements;
|
|
8
|
-
private dividers;
|
|
9
|
-
private exitBanner;
|
|
10
|
-
private excludedTags;
|
|
11
|
-
private excludedIds;
|
|
12
|
-
constructor(rootEl: HTMLElement, options: FocusManagerOptions);
|
|
13
|
-
/**
|
|
14
|
-
* Initializes the Focus Manager. Checks URL for focus parameter.
|
|
15
|
-
*/
|
|
16
|
-
init(): void;
|
|
17
|
-
handleUrlChange(): void;
|
|
18
|
-
/**
|
|
19
|
-
* Applies Focus Mode based on encoded descriptors.
|
|
20
|
-
*/
|
|
21
|
-
applyFocusMode(encodedDescriptors: string): void;
|
|
22
|
-
private injectStyles;
|
|
23
|
-
/**
|
|
24
|
-
* Hides irrelevant content and adds dividers.
|
|
25
|
-
*/
|
|
26
|
-
private renderFocusedView;
|
|
27
|
-
private hideElement;
|
|
28
|
-
private insertDividersForContainer;
|
|
29
|
-
private createDivider;
|
|
30
|
-
private expandContext;
|
|
31
|
-
private removeExitBanner;
|
|
32
|
-
/**
|
|
33
|
-
* Override of renderFocusedView with robust logic
|
|
34
|
-
*/
|
|
35
|
-
private showExitBanner;
|
|
36
|
-
exitFocusMode(): void;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=focus-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focus-manager.d.ts","sourceRoot":"","sources":["../../../src/core/focus-manager.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,mBAAmB;IAChC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,qBAAa,YAAY;IAQT,OAAO,CAAC,MAAM;IAN1B,OAAO,CAAC,cAAc,CAA0B;IAChD,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,UAAU,CAA4B;IAC9C,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,WAAW,CAAc;gBAEb,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,mBAAmB;IAKrE;;OAEG;IACI,IAAI,IAAI,IAAI;IAIZ,eAAe,IAAI,IAAI;IAc9B;;OAEG;IACI,cAAc,CAAC,kBAAkB,EAAE,MAAM,GAAG,IAAI;IA4BvD,OAAO,CAAC,YAAY;IAQpB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAyEzB,OAAO,CAAC,WAAW;IAqBnB,OAAO,CAAC,0BAA0B;IAyBlC,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,aAAa;IA6BrB,OAAO,CAAC,gBAAgB;IAOxB;;OAEG;IAGH,OAAO,CAAC,cAAc;IAef,aAAa,IAAI,IAAI;CAyB/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../../../src/core/persistence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;GAEG;AACH,qBAAa,kBAAkB;IAE7B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAGzB;IAEX;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAKnB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAWhC,iBAAiB,IAAI,KAAK,GAAG,IAAI;IAYxC;;OAEG;IACI,QAAQ,IAAI,IAAI;IAOvB;;OAEG;IACI,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAUtD;;OAEG;IACI,4BAA4B,IAAI,OAAO,GAAG,IAAI;IAWrD;;OAEG;IACI,gBAAgB,IAAI,OAAO;CAOnC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
export interface ShareManagerOptions {
|
|
2
|
-
excludedTags: string[];
|
|
3
|
-
excludedIds: string[];
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Manages the "Share Mode" for creating custom focus links.
|
|
7
|
-
* Implementing Robust Granular Sharing with "Innermost Wins" and "Level Up" UI.
|
|
8
|
-
*/
|
|
9
|
-
export declare class ShareManager {
|
|
10
|
-
private isActive;
|
|
11
|
-
private selectedElements;
|
|
12
|
-
private floatingBarEl;
|
|
13
|
-
private helperEl;
|
|
14
|
-
private currentHoverTarget;
|
|
15
|
-
private excludedTags;
|
|
16
|
-
private excludedIds;
|
|
17
|
-
private boundHandleHover;
|
|
18
|
-
private boundHandleClick;
|
|
19
|
-
private boundHandleKeydown;
|
|
20
|
-
constructor(options: ShareManagerOptions);
|
|
21
|
-
private listeners;
|
|
22
|
-
addStateChangeListener(listener: (isActive: boolean) => void): void;
|
|
23
|
-
removeStateChangeListener(listener: (isActive: boolean) => void): void;
|
|
24
|
-
private notifyListeners;
|
|
25
|
-
toggleShareMode(): void;
|
|
26
|
-
/**
|
|
27
|
-
* Activates the share mode.
|
|
28
|
-
* Injects styles, creates floating bar, and helper element.
|
|
29
|
-
* Adds event listeners for hover and click.
|
|
30
|
-
*/
|
|
31
|
-
private activate;
|
|
32
|
-
private injectStyles;
|
|
33
|
-
/**
|
|
34
|
-
* Creates the hover helper element that shows up when hovering over a shareable element.
|
|
35
|
-
*/
|
|
36
|
-
private createHelperPopover;
|
|
37
|
-
/**
|
|
38
|
-
* Handles mouse hover events.
|
|
39
|
-
*
|
|
40
|
-
* This function is called when the user hovers over an element.
|
|
41
|
-
* It checks if the element is shareable and highlights it.
|
|
42
|
-
* If a parent element is already selected, it highlights the parent instead,
|
|
43
|
-
* allowing the helper to remain visible for the selected parent.
|
|
44
|
-
*
|
|
45
|
-
* @param e The mouse event triggered by the hover.
|
|
46
|
-
*/
|
|
47
|
-
private handleHover;
|
|
48
|
-
private setNewHoverTarget;
|
|
49
|
-
private positionHelper;
|
|
50
|
-
private handleSelectParent;
|
|
51
|
-
private handleClick;
|
|
52
|
-
private handleKeydown;
|
|
53
|
-
/**
|
|
54
|
-
* Toggles the selection state of a given HTML element.
|
|
55
|
-
* Implements selection logic:
|
|
56
|
-
* - If an ancestor of the element is already selected, the click is ignored.
|
|
57
|
-
* - If the element being selected is a parent of already selected elements, those children are deselected.
|
|
58
|
-
* @param el The HTMLElement to toggle selection for.
|
|
59
|
-
*/
|
|
60
|
-
private toggleSelection;
|
|
61
|
-
private createFloatingBar;
|
|
62
|
-
private updateFloatingBarCount;
|
|
63
|
-
private clearAll;
|
|
64
|
-
private getShareUrl;
|
|
65
|
-
private generateLink;
|
|
66
|
-
private previewLink;
|
|
67
|
-
private clearHover;
|
|
68
|
-
cleanup(): void;
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=share-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"share-manager.d.ts","sourceRoot":"","sources":["../../../src/core/share-manager.ts"],"names":[],"mappings":"AAoBA,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,gBAAgB,CAA0B;IAClD,OAAO,CAAC,aAAa,CAA4B;IACjD,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,kBAAkB,CAA4B;IACtD,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,gBAAgB,CAA0B;IAClD,OAAO,CAAC,gBAAgB,CAA0B;IAClD,OAAO,CAAC,kBAAkB,CAA6B;gBAE3C,OAAO,EAAE,mBAAmB;IAQxC,OAAO,CAAC,SAAS,CAA0C;IAEpD,sBAAsB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;IAInE,yBAAyB,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;IAI7E,OAAO,CAAC,eAAe;IAIhB,eAAe,IAAI,IAAI;IAU9B;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAWhB,OAAO,CAAC,YAAY;IAOpB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA6B3B;;;;;;;;;OASG;IACH,OAAO,CAAC,WAAW;IAkEnB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,cAAc;IA6CtB,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,aAAa;IAUrB;;;;;;OAMG;IACH,OAAO,CAAC,eAAe;IA0CvB,OAAO,CAAC,iBAAiB;IAmBzB,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,WAAW;YAaL,YAAY;IAgB1B,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,UAAU;IAUX,OAAO,IAAI,IAAI;CA4BvB"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { TabGroupConfig } from "../types/types";
|
|
2
|
-
export declare class TabManager {
|
|
3
|
-
/**
|
|
4
|
-
* Split a tab ID into multiple IDs if it contains spaces or |
|
|
5
|
-
*/
|
|
6
|
-
private static splitTabIds;
|
|
7
|
-
/**
|
|
8
|
-
* Apply tab selections to a given list of tab group elements
|
|
9
|
-
*/
|
|
10
|
-
static applyTabSelections(tabGroups: HTMLElement[], tabs: Record<string, string>, cfgGroups?: TabGroupConfig[]): void;
|
|
11
|
-
/**
|
|
12
|
-
* Resolve the active tab for a group based on state, config, and DOM
|
|
13
|
-
*
|
|
14
|
-
* Pass in the current tabs state, config groups, and the group element
|
|
15
|
-
*/
|
|
16
|
-
private static resolveActiveTabForGroup;
|
|
17
|
-
/**
|
|
18
|
-
* Apply visibility classes to a tab element
|
|
19
|
-
*/
|
|
20
|
-
private static applyTabVisibility;
|
|
21
|
-
/**
|
|
22
|
-
* Extract header and body content from header component syntax: <cv-tab-header> and <cv-tab-body>
|
|
23
|
-
* Returns null if using old attribute-based syntax.
|
|
24
|
-
*
|
|
25
|
-
* @param tabEl The <cv-tab> element to inspect
|
|
26
|
-
* @returns Object with extracted content, or null if new syntax not used
|
|
27
|
-
*/
|
|
28
|
-
private static extractTabContent;
|
|
29
|
-
/**
|
|
30
|
-
* Build navigation for tab groups (one-time setup)
|
|
31
|
-
*/
|
|
32
|
-
static buildNavs(tabGroups: HTMLElement[], cfgGroups?: TabGroupConfig[], onTabClick?: (groupId: string, tabId: string, groupEl: HTMLElement) => void, onTabDoubleClick?: (groupId: string, tabId: string, groupEl: HTMLElement) => void): void;
|
|
33
|
-
/**
|
|
34
|
-
* Toggle nav visibility for all tab groups (viewer-controlled)
|
|
35
|
-
*/
|
|
36
|
-
static setNavsVisibility(rootEl: HTMLElement, visible: boolean): void;
|
|
37
|
-
/**
|
|
38
|
-
* Read current nav visibility (viewer preference)
|
|
39
|
-
*/
|
|
40
|
-
static areNavsVisible(rootEl: HTMLElement): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Get tab label from config
|
|
43
|
-
*/
|
|
44
|
-
private static getTabLabel;
|
|
45
|
-
/**
|
|
46
|
-
* Update active state in navs for a specific tabgroup element only
|
|
47
|
-
*/
|
|
48
|
-
static updateNavActiveState(groupEl: HTMLElement, activeTabId: string): void;
|
|
49
|
-
/**
|
|
50
|
-
* Update active states for all tab groups based on current state
|
|
51
|
-
*/
|
|
52
|
-
static updateAllNavActiveStates(tabGroups: HTMLElement[], tabs: Record<string, string>, cfgGroups?: TabGroupConfig[]): void;
|
|
53
|
-
/**
|
|
54
|
-
* Apply tab selection to a specific tabgroup element only (not globally).
|
|
55
|
-
* Used for single-click behavior to update only the clicked tabgroup.
|
|
56
|
-
*/
|
|
57
|
-
static applyTabLocalOnly(groupEl: HTMLElement, activeTabId: string): void;
|
|
58
|
-
/**
|
|
59
|
-
* Check if a tabgroup element contains a specific tab ID (respects split IDs).
|
|
60
|
-
* Accepts groupEl to avoid repeated DOM queries.
|
|
61
|
-
*/
|
|
62
|
-
static groupHasTab(groupEl: HTMLElement, tabId: string): boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Returns array of group elements to be synced (excluding source).
|
|
65
|
-
*/
|
|
66
|
-
static getTabgroupsWithId(rootEl: HTMLElement, sourceGroupId: string, tabId: string): HTMLElement[];
|
|
67
|
-
/**
|
|
68
|
-
* Update pin icon visibility for all tab groups based on current state.
|
|
69
|
-
* Shows pin icon for tabs that are in the persisted state (i.e., have been double-clicked).
|
|
70
|
-
*/
|
|
71
|
-
static updatePinIcons(tabGroups: HTMLElement[], tabs: Record<string, string>): void;
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=tab-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tab-manager.d.ts","sourceRoot":"","sources":["../../../src/core/tab-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAYrD,qBAAa,UAAU;IACrB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAM1B;;OAEG;WACW,kBAAkB,CAC9B,SAAS,EAAE,WAAW,EAAE,EACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,SAAS,CAAC,EAAE,cAAc,EAAE,GAC3B,IAAI;IAwCP;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAqCvC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAUjC;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAwBhC;;OAEG;WACW,SAAS,CACrB,SAAS,EAAE,WAAW,EAAE,EACxB,SAAS,CAAC,EAAE,cAAc,EAAE,EAC5B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,KAAK,IAAI,EAC3E,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,KAAK,IAAI,GAChF,IAAI;IAiKP;;OAEG;WACW,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IA6B5E;;OAEG;WACW,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO;IAI1D;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAc1B;;OAEG;WACW,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAmBnF;;OAEG;WACW,wBAAwB,CACpC,SAAS,EAAE,WAAW,EAAE,EACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,SAAS,CAAC,EAAE,cAAc,EAAE,GAC3B,IAAI;IA6BP;;;OAGG;WACW,iBAAiB,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAgBhF;;;OAGG;WACW,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAavE;;OAEG;WACW,kBAAkB,CAC9B,MAAM,EAAE,WAAW,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,GACZ,WAAW,EAAE;IAchB;;;QAGI;WACU,cAAc,CACxB,SAAS,EAAE,WAAW,EAAE,EACxB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,IAAI;CA2BV"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Manages toast notifications for the application.
|
|
3
|
-
*/
|
|
4
|
-
export declare class ToastManager {
|
|
5
|
-
private static isStyleInjected;
|
|
6
|
-
private static toastEl;
|
|
7
|
-
private static navTimeout;
|
|
8
|
-
private static fadeTimeout;
|
|
9
|
-
static show(message: string, duration?: number): void;
|
|
10
|
-
private static injectStyles;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=toast-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toast-manager.d.ts","sourceRoot":"","sources":["../../../src/core/toast-manager.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,qBAAa,YAAY;IACrB,OAAO,CAAC,MAAM,CAAC,eAAe,CAAS;IACvC,OAAO,CAAC,MAAM,CAAC,OAAO,CAA4B;IAClD,OAAO,CAAC,MAAM,CAAC,UAAU,CAAa;IACtC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAa;WAEzB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAa,GAAG,IAAI;IAkClE,OAAO,CAAC,MAAM,CAAC,YAAY;CAa9B"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { ToggleId } from "../types/types";
|
|
2
|
-
import { AssetsManager } from "./assets-manager";
|
|
3
|
-
/**
|
|
4
|
-
* ToggleManager handles discovery, visibility, and asset rendering for toggle elements
|
|
5
|
-
*/
|
|
6
|
-
export declare class ToggleManager {
|
|
7
|
-
/**
|
|
8
|
-
* Track locally expanded elements (that were in peek mode but user expanded them)
|
|
9
|
-
*/
|
|
10
|
-
private static expandedPeekElements;
|
|
11
|
-
/**
|
|
12
|
-
* Apply toggle visibility to a given list of toggle elements
|
|
13
|
-
*/
|
|
14
|
-
static applyTogglesVisibility(allToggleElements: HTMLElement[], activeToggles: ToggleId[], peekToggles?: ToggleId[]): void;
|
|
15
|
-
/**
|
|
16
|
-
* Render assets into a given list of toggle elements that are currently visible
|
|
17
|
-
* Toggles that have a toggleId and are currently visible will have their assets rendered (if any)
|
|
18
|
-
*/
|
|
19
|
-
static renderToggleAssets(elements: HTMLElement[], activeToggles: ToggleId[], assetsManager: AssetsManager): void;
|
|
20
|
-
/**
|
|
21
|
-
* Get toggle categories from an element (supports both data attributes and cv-toggle elements)
|
|
22
|
-
* Note: a toggle can have multiple categories.
|
|
23
|
-
*/
|
|
24
|
-
private static getToggleCategories;
|
|
25
|
-
/**
|
|
26
|
-
* Get toggle ID from an element
|
|
27
|
-
*/
|
|
28
|
-
private static getToggleId;
|
|
29
|
-
/**
|
|
30
|
-
* Apply simple class-based visibility to a toggle element
|
|
31
|
-
*/
|
|
32
|
-
private static applyToggleVisibility;
|
|
33
|
-
/**
|
|
34
|
-
* Manage the presence of the inline Expand/Collapse button using a wrapper approach
|
|
35
|
-
*/
|
|
36
|
-
private static manageExpandButton;
|
|
37
|
-
/**
|
|
38
|
-
* Scans a given DOM subtree for toggle elements and initializes them.
|
|
39
|
-
* This includes applying visibility and rendering assets.
|
|
40
|
-
*/
|
|
41
|
-
static initializeToggles(root: HTMLElement, activeToggles: ToggleId[], assetsManager: AssetsManager): void;
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=toggle-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-manager.d.ts","sourceRoot":"","sources":["../../../src/core/toggle-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD;;GAEG;AACH,qBAAa,aAAa;IACxB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAA8B;IAEjE;;OAEG;WACW,sBAAsB,CAAC,iBAAiB,EAAE,WAAW,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,WAAW,GAAE,QAAQ,EAAO,GAAG,IAAI;IAgBrI;;;OAGG;WACW,kBAAkB,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,aAAa,EAAE,aAAa,GAAG,IAAI;IAgBxH;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAUlC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAI1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAuBpC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IA4EjC;;;OAGG;WACW,iBAAiB,CAC7B,IAAI,EAAE,WAAW,EACjB,aAAa,EAAE,QAAQ,EAAE,EACzB,aAAa,EAAE,aAAa,GAC3B,IAAI;CAYR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"url-state-manager.d.ts","sourceRoot":"","sources":["../../../src/core/url-state-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAG5C,qBAAa,eAAe;IAC1B;;OAEG;WACW,QAAQ,IAAI,KAAK,GAAG,IAAI;IAiBtC;;OAEG;WACW,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;IAqB9D;;OAEG;WACW,QAAQ,IAAI,IAAI;IAI9B;;OAEG;WACW,oBAAoB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IAiB3E;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IA6C1B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;CAyD3B"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ToggleId } from "../types/types";
|
|
2
|
-
/**
|
|
3
|
-
* Keeps track of which toggles are hidden and which are visible in memory.
|
|
4
|
-
*
|
|
5
|
-
* This class keeps track of hidden toggles without reading the DOM or URL.
|
|
6
|
-
*/
|
|
7
|
-
export declare class VisibilityManager {
|
|
8
|
-
private hiddenToggles;
|
|
9
|
-
/** Marks a toggle as visible or hidden.
|
|
10
|
-
* Returns true if changed.
|
|
11
|
-
* Also updates internal set of hidden toggles.
|
|
12
|
-
*/
|
|
13
|
-
setToggleVisibility(toggleId: ToggleId, visible: boolean): boolean;
|
|
14
|
-
/** Hide all toggles in the provided set. */
|
|
15
|
-
hideAll(allToggleIds: ToggleId[]): void;
|
|
16
|
-
/** Show all toggles in the provided set. */
|
|
17
|
-
showAll(allToggleIds: ToggleId[]): void;
|
|
18
|
-
/** Get the globally hidden toggle ids (explicitly hidden via API). */
|
|
19
|
-
getHiddenToggles(): ToggleId[];
|
|
20
|
-
/** Filter a list of toggles to only those visible per the hidden set. */
|
|
21
|
-
filterVisibleToggles(toggleIds: ToggleId[]): ToggleId[];
|
|
22
|
-
/**
|
|
23
|
-
* Apply simple class-based visibility to a toggle element.
|
|
24
|
-
* The element is assumed to have data-cv-toggle or data-customviews-toggle.
|
|
25
|
-
*/
|
|
26
|
-
applyElementVisibility(el: HTMLElement, visible: boolean): void;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=visibility-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"visibility-manager.d.ts","sourceRoot":"","sources":["../../../src/core/visibility-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,aAAa,CAA4B;IAEjD;;;OAGG;IACI,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO;IAczE,4CAA4C;IACrC,OAAO,CAAC,YAAY,EAAE,QAAQ,EAAE,GAAG,IAAI;IAM9C,4CAA4C;IACrC,OAAO,CAAC,YAAY,EAAE,QAAQ,EAAE,GAAG,IAAI;IAM9C,sEAAsE;IAC/D,gBAAgB,IAAI,QAAQ,EAAE;IAIrC,yEAAyE;IAClE,oBAAoB,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE;IAI9D;;;OAGG;IACI,sBAAsB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;CASvE"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Initialize CustomViews from script tag attributes and config file
|
|
3
|
-
* This function handles the automatic initialization of CustomViews when included via script tag
|
|
4
|
-
*
|
|
5
|
-
* Data attributes supported:
|
|
6
|
-
* - data-base-url: Base URL for the site (e.g., "/customviews" for subdirectory deployments)
|
|
7
|
-
* - data-config-path: Path to config file (default: "/customviews.config.json")
|
|
8
|
-
*
|
|
9
|
-
* The function fetches the config file and uses it directly to initialize CustomViews.
|
|
10
|
-
* Widget visibility is controlled via the config file (widget.enabled property).
|
|
11
|
-
*/
|
|
12
|
-
export default function initializeFromScript(): void;
|
|
13
|
-
//# sourceMappingURL=browser-entry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-entry.d.ts","sourceRoot":"","sources":["../../../src/entry/browser-entry.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,oBAAoB,IAAI,IAAI,CAkInD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"custom-views.d.ts","sourceRoot":"","sources":["../../../src/lib/custom-views.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAA2B,MAAM,cAAc,CAAC;AAExE,OAAO,KAAK,EAAmB,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI9D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,mCAAmC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yCAAyC;IACzC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAA;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB;;;;OAIG;WACU,IAAI,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;CA0CtE"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const FOCUS_MODE_STYLE_ID = "cv-focus-mode-styles";
|
|
2
|
-
export declare const BODY_FOCUS_CLASS = "cv-focus-mode";
|
|
3
|
-
export declare const HIDDEN_CLASS = "cv-focus-hidden";
|
|
4
|
-
export declare const FOCUSED_CLASS = "cv-focused-element";
|
|
5
|
-
export declare const DIVIDER_CLASS = "cv-context-divider";
|
|
6
|
-
export declare const EXIT_BANNER_ID = "cv-exit-focus-banner";
|
|
7
|
-
export declare const FOCUS_MODE_STYLES = "\n body.cv-focus-mode {\n /* e.g. potentially hide scrollbars or adjust layout */\n }\n\n .cv-focus-hidden {\n display: none !important;\n }\n\n .cv-focused-element {\n /* No visual style for focused elements, just logic class for now. Can add borders for debugging*/\n }\n\n .cv-context-divider {\n padding: 12px;\n margin: 16px 0;\n background-color: #f8f8f8;\n border-top: 1px dashed #ccc;\n border-bottom: 1px dashed #ccc;\n color: #555;\n text-align: center;\n cursor: pointer;\n font-family: system-ui, sans-serif;\n font-size: 13px;\n transition: background-color 0.2s;\n }\n .cv-context-divider:hover {\n background-color: #e8e8e8;\n color: #333;\n }\n\n #cv-exit-focus-banner {\n position: sticky;\n top: 0;\n left: 0;\n right: 0;\n background-color: #0078D4;\n color: white;\n padding: 10px 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n z-index: 100000;\n font-family: system-ui, sans-serif;\n box-shadow: 0 2px 8px rgba(0,0,0,0.2);\n }\n\n #cv-exit-focus-banner button {\n background: white;\n color: #0078D4;\n border: none;\n padding: 4px 12px;\n border-radius: 4px;\n cursor: pointer;\n font-weight: 600;\n }\n #cv-exit-focus-banner button:hover {\n background: #f0f0f0;\n }\n";
|
|
8
|
-
//# sourceMappingURL=focus-mode-styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"focus-mode-styles.d.ts","sourceRoot":"","sources":["../../../src/styles/focus-mode-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAC1D,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAChD,eAAO,MAAM,YAAY,oBAAoB,CAAC;AAC9C,eAAO,MAAM,aAAa,uBAAuB,CAAC;AAClD,eAAO,MAAM,aAAa,uBAAuB,CAAC;AAClD,eAAO,MAAM,cAAc,yBAAyB,CAAC;AAgErD,eAAO,MAAM,iBAAiB,w1CAAS,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const SHARE_MODE_STYLE_ID = "cv-share-mode-styles";
|
|
2
|
-
export declare const FLOATING_ACTION_BAR_ID = "cv-floating-action-bar";
|
|
3
|
-
export declare const HOVER_HELPER_ID = "cv-hover-helper";
|
|
4
|
-
export declare const HIGHLIGHT_TARGET_CLASS = "cv-highlight-target";
|
|
5
|
-
export declare const SELECTED_CLASS = "cv-share-selected";
|
|
6
|
-
/**
|
|
7
|
-
* CSS styles to be injected during Share Mode.
|
|
8
|
-
*/
|
|
9
|
-
export declare const SHARE_MODE_STYLES = "\n body.cv-share-mode {\n cursor: default;\n }\n\n /* Highlight outlines */\n .cv-highlight-target {\n outline: 2px dashed #0078D4 !important;\n outline-offset: 2px;\n cursor: crosshair;\n }\n\n .cv-share-selected {\n outline: 3px solid #005a9e !important;\n outline-offset: 2px;\n background-color: rgba(0, 120, 212, 0.05);\n }\n\n /* Floating Action Bar */\n #cv-floating-action-bar {\n position: fixed;\n bottom: 20px;\n left: 50%;\n transform: translateX(-50%);\n background-color: #2c2c2c;\n color: #f1f1f1;\n border-radius: 8px;\n padding: 12px 20px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);\n display: flex;\n align-items: center;\n gap: 16px;\n z-index: 99999;\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 14px;\n border: 1px solid #4a4a4a;\n }\n\n #cv-floating-action-bar .cv-action-button {\n background-color: #0078D4;\n color: white;\n border: none;\n padding: 8px 14px;\n border-radius: 5px;\n cursor: pointer;\n font-weight: 500;\n transition: background-color 0.2s;\n }\n \n #cv-floating-action-bar .cv-action-button:hover {\n background-color: #005a9e;\n }\n\n #cv-floating-action-bar .cv-action-button.clear {\n background-color: #5a5a5a;\n }\n #cv-floating-action-bar .cv-action-button.clear:hover {\n background-color: #4a4a4a;\n }\n #cv-floating-action-bar .cv-action-button.clear:hover {\n background-color: #4a4a4a;\n }\n\n #cv-floating-action-bar .cv-action-button.preview {\n background-color: #106ebe;\n }\n #cv-floating-action-bar .cv-action-button.preview:hover {\n background-color: #005a9e;\n }\n #cv-floating-action-bar .cv-action-button.exit {\n background-color: #d13438;\n }\n #cv-floating-action-bar .cv-action-button.exit:hover {\n background-color: #a42628;\n }\n\n /* Hover Helper (Smart Label & Level Up) */\n #cv-hover-helper {\n position: fixed;\n z-index: 99999;\n background-color: #333;\n color: white;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 12px;\n font-family: monospace;\n display: none;\n pointer-events: auto; /* Allow clicking buttons inside */\n align-items: center;\n gap: 8px;\n box-shadow: 0 2px 5px rgba(0,0,0,0.2);\n }\n\n #cv-hover-helper button {\n background: #555;\n border: none;\n color: white;\n border-radius: 3px;\n cursor: pointer;\n padding: 2px 6px;\n font-size: 14px;\n line-height: 1;\n }\n #cv-hover-helper button:hover {\n background: #777;\n }\n\n";
|
|
10
|
-
//# sourceMappingURL=share-mode-styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"share-mode-styles.d.ts","sourceRoot":"","sources":["../../../src/styles/share-mode-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAC1D,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,eAAO,MAAM,sBAAsB,wBAAwB,CAAC;AAC5D,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,iBAAiB,whFA2G7B,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Add styles for hiding and showing toggles animations and transitions to the document head
|
|
3
|
-
*/
|
|
4
|
-
export declare function injectCoreStyles(): void;
|
|
5
|
-
export { TOGGLE_STYLES } from './toggle-styles';
|
|
6
|
-
export { TAB_STYLES } from './tab-styles';
|
|
7
|
-
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/styles/styles.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAOvC;AAGD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Styles for tab groups and tab navigation
|
|
3
|
-
*/
|
|
4
|
-
export declare const TAB_STYLES = "\n/* Tab navigation styles - Bootstrap-style tabs matching MarkBind */\n.cv-tabs-nav {\n display: flex;\n flex-wrap: wrap;\n padding-left: 0;\n margin-top: 0.5rem;\n margin-bottom: 1rem;\n list-style: none;\n border-bottom: 1px solid #dee2e6;\n\n align-items: stretch;\n}\n\n.cv-tabs-nav .nav-item {\n margin-bottom: -1px;\n list-style: none;\n display: flex; /* was inline-block \u2192 make flex to stretch height */\n align-items: stretch; /* stretch link to full height */\n}\n\n.cv-tabs-nav .nav-link {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0.5rem 1rem;\n color: #495057;\n text-decoration: none;\n background-color: transparent;\n border: 1px solid transparent;\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem;\n transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;\n cursor: pointer;\n min-height: 2.5rem;\n box-sizing: border-box;\n}\n\n.cv-tabs-nav .nav-link p {\n margin: 0; /* remove default margins */\n display: inline; /* or inline-block */\n}\n\n/* Tab header container with pin icon */\n.cv-tab-header-container {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.cv-tab-header-text {\n flex: 1;\n}\n\n.cv-tab-pin-icon {\n display: inline-block;\n line-height: 0;\n flex-shrink: 0;\n}\n\n.cv-tab-pin-icon svg {\n vertical-align: middle;\n width: 14px;\n height: 14px;\n}\n\n.cv-tabs-nav .nav-link:hover,\n.cv-tabs-nav .nav-link:focus {\n border-color: #e9ecef #e9ecef #dee2e6;\n isolation: isolate;\n}\n\n.cv-tabs-nav .nav-link.active {\n color: #495057;\n background-color: #fff;\n border-color: #dee2e6 #dee2e6 #fff;\n}\n\n.cv-tabs-nav .nav-link:focus {\n outline: 0;\n box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);\n}\n\n/* Legacy button-based nav (deprecated, kept for compatibility) */\n.cv-tabs-nav-item {\n background: none;\n border: none;\n border-bottom: 2px solid transparent;\n padding: 0.5rem 1rem;\n cursor: pointer;\n font-size: 1rem;\n color: #6c757d;\n transition: color 150ms ease, border-color 150ms ease;\n}\n\n.cv-tabs-nav-item:hover {\n color: #495057;\n border-bottom-color: #dee2e6;\n}\n\n.cv-tabs-nav-item.active {\n color: #007bff;\n border-bottom-color: #007bff;\n font-weight: 500;\n}\n\n.cv-tabs-nav-item:focus {\n outline: 2px solid #007bff;\n outline-offset: 2px;\n}\n\n/* Tab panel base styles */\ncv-tab {\n display: block;\n}\n\n/* Hide cv-tab-header source element; content is extracted to nav link */\ncv-tab-header {\n display: none !important;\n}\n\n/* Allow cv-tab-body to flow naturally */\ncv-tab-body {\n display: block;\n}\n\n/* Override visibility for tab panels - use display instead of collapse animation */\ncv-tab.cv-hidden {\n display: none !important;\n}\n\ncv-tab.cv-visible {\n display: block !important;\n}\n\ncv-tabgroup {\n display: block;\n margin-bottom: 1.5rem;\n}\n\n/* Bottom border line for tab groups */\n.cv-tabgroup-bottom-border {\n border-bottom: 1px solid #dee2e6;\n margin-top: 1rem;\n}\n\n/* Tab content wrapper */\n.cv-tab-content {\n padding: 1rem 0;\n}\n\n/* Viewer-controlled nav visibility: hide nav containers when requested */\n.cv-tabs-nav-hidden {\n display: none !important;\n}\n\n/* Print-friendly: hide tab navigation when printing to reduce clutter */\n@media print {\n .cv-tabs-nav {\n display: none !important;\n }\n}\n";
|
|
5
|
-
//# sourceMappingURL=tab-styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tab-styles.d.ts","sourceRoot":"","sources":["../../../src/styles/tab-styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,UAAU,03GAkKtB,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const TOAST_STYLE_ID = "cv-toast-styles";
|
|
2
|
-
export declare const TOAST_CLASS = "cv-toast-notification";
|
|
3
|
-
export declare const TOAST_STYLES = "\n .cv-toast-notification {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n background-color: #323232;\n color: white;\n padding: 12px 24px;\n border-radius: 4px;\n z-index: 100000;\n box-shadow: 0 4px 12px rgba(0,0,0,0.15);\n opacity: 0;\n transition: opacity 0.3s ease;\n pointer-events: none; /* Let clicks pass through if needed, though usually it blocks */\n font-family: system-ui, -apple-system, sans-serif;\n font-size: 14px;\n }\n";
|
|
4
|
-
//# sourceMappingURL=toast-styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toast-styles.d.ts","sourceRoot":"","sources":["../../../src/styles/toast-styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,WAAW,0BAA0B,CAAC;AAEnD,eAAO,MAAM,YAAY,ygBAkBxB,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Styles for toggle visibility and animations
|
|
3
|
-
*/
|
|
4
|
-
export declare const TOGGLE_STYLES = "\n/* Core toggle visibility transitions */\n[data-cv-toggle], [data-customviews-toggle], cv-toggle {\n display: block;\n overflow: hidden;\n /* Removed transitions for instant toggling */\n}\n\n/* Open State */\n.cv-visible {\n opacity: 1 !important;\n transform: translateY(0) !important;\n max-height: none !important;\n}\n\n.cv-hidden {\n opacity: 0 !important;\n transform: translateY(-4px) !important;\n pointer-events: none !important;\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n border-top-width: 0 !important;\n border-bottom-width: 0 !important;\n max-height: 0 !important;\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n overflow: hidden !important;\n}\n\n/* Close/Peek State */\n.cv-peek {\n display: block !important;\n max-height: 70px !important;\n overflow: hidden !important;\n opacity: 1 !important;\n transform: translateY(0) !important;\n mask-image: linear-gradient(to bottom, black 50%, transparent 100%);\n -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);\n}\n\n.cv-wrapper {\n position: relative;\n width: 100%;\n display: block;\n margin-bottom: 24px; /* Space for the button */\n}\n\n.cv-expand-btn {\n position: absolute;\n bottom: -28px; /* Mostly outside, slight overlap */\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n background: transparent;\n border: none;\n border-radius: 50%;\n padding: 4px;\n width: 32px;\n height: 32px;\n cursor: pointer;\n z-index: 100;\n align-items: center;\n justify-content: center;\n color: #888;\n transition: all 0.2s ease;\n box-shadow: none;\n}\n\n.cv-expand-btn:hover {\n background: rgba(0, 0, 0, 0.05);\n color: #000;\n transform: translateX(-50%) scale(1.1);\n}\n\n.cv-expand-btn svg {\n display: block;\n opacity: 0.6;\n}\n\n.cv-expand-btn:hover svg {\n opacity: 1;\n}\n\n";
|
|
5
|
-
//# sourceMappingURL=toggle-styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-styles.d.ts","sourceRoot":"","sources":["../../../src/styles/toggle-styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,aAAa,o1DAmFzB,CAAC"}
|