juxscript 1.1.239 → 1.1.243
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/index.js +7 -137
- package/lib/components/dataframe.ts +0 -569
- package/lib/components/tag.ts +68 -0
- package/lib/styles/shadcn.css +20 -7
- package/lib/utils/idgen.ts +6 -0
- package/package.json +5 -6
- package/index.d.ts +0 -239
- package/index.d.ts.map +0 -1
- package/lib/components/alert.d.ts +0 -36
- package/lib/components/alert.d.ts.map +0 -1
- package/lib/components/alert.js +0 -172
- package/lib/components/alert.ts +0 -219
- package/lib/components/app.d.ts +0 -89
- package/lib/components/app.d.ts.map +0 -1
- package/lib/components/app.js +0 -175
- package/lib/components/app.ts +0 -247
- package/lib/components/badge.d.ts +0 -26
- package/lib/components/badge.d.ts.map +0 -1
- package/lib/components/badge.js +0 -91
- package/lib/components/badge.ts +0 -118
- package/lib/components/base/Animations.d.ts +0 -36
- package/lib/components/base/Animations.d.ts.map +0 -1
- package/lib/components/base/Animations.js +0 -70
- package/lib/components/base/Animations.ts +0 -112
- package/lib/components/base/BaseComponent.d.ts +0 -294
- package/lib/components/base/BaseComponent.d.ts.map +0 -1
- package/lib/components/base/BaseComponent.js +0 -735
- package/lib/components/base/BaseComponent.ts +0 -884
- package/lib/components/base/FormInput.d.ts +0 -77
- package/lib/components/base/FormInput.d.ts.map +0 -1
- package/lib/components/base/FormInput.js +0 -171
- package/lib/components/base/FormInput.ts +0 -237
- package/lib/components/blueprint.d.ts +0 -40
- package/lib/components/blueprint.d.ts.map +0 -1
- package/lib/components/blueprint.js +0 -327
- package/lib/components/button.d.ts +0 -70
- package/lib/components/button.d.ts.map +0 -1
- package/lib/components/button.js +0 -177
- package/lib/components/button.ts +0 -237
- package/lib/components/card.d.ts +0 -35
- package/lib/components/card.d.ts.map +0 -1
- package/lib/components/card.js +0 -130
- package/lib/components/card.ts +0 -177
- package/lib/components/chart.d.ts +0 -49
- package/lib/components/chart.d.ts.map +0 -1
- package/lib/components/chart.js +0 -205
- package/lib/components/chart.ts +0 -254
- package/lib/components/checkbox.d.ts +0 -33
- package/lib/components/checkbox.d.ts.map +0 -1
- package/lib/components/checkbox.js +0 -202
- package/lib/components/checkbox.ts +0 -260
- package/lib/components/code.d.ts +0 -52
- package/lib/components/code.d.ts.map +0 -1
- package/lib/components/code.js +0 -201
- package/lib/components/code.ts +0 -260
- package/lib/components/container.d.ts +0 -60
- package/lib/components/container.d.ts.map +0 -1
- package/lib/components/container.js +0 -195
- package/lib/components/container.ts +0 -259
- package/lib/components/data.d.ts +0 -36
- package/lib/components/data.d.ts.map +0 -1
- package/lib/components/data.js +0 -110
- package/lib/components/data.ts +0 -135
- package/lib/components/dataframe/DataFrameSource.d.ts +0 -118
- package/lib/components/dataframe/DataFrameSource.d.ts.map +0 -1
- package/lib/components/dataframe/DataFrameSource.js +0 -421
- package/lib/components/dataframe/DataFrameSource.ts +0 -532
- package/lib/components/dataframe/ImportSettingsModal.d.ts +0 -60
- package/lib/components/dataframe/ImportSettingsModal.d.ts.map +0 -1
- package/lib/components/dataframe/ImportSettingsModal.js +0 -442
- package/lib/components/dataframe/ImportSettingsModal.ts +0 -531
- package/lib/components/dataframe.d.ts +0 -110
- package/lib/components/dataframe.d.ts.map +0 -1
- package/lib/components/dataframe.js +0 -470
- package/lib/components/datepicker.d.ts +0 -40
- package/lib/components/datepicker.d.ts.map +0 -1
- package/lib/components/datepicker.js +0 -193
- package/lib/components/datepicker.ts +0 -251
- package/lib/components/dialog.d.ts +0 -39
- package/lib/components/dialog.d.ts.map +0 -1
- package/lib/components/dialog.js +0 -131
- package/lib/components/dialog.ts +0 -178
- package/lib/components/divider.d.ts +0 -31
- package/lib/components/divider.d.ts.map +0 -1
- package/lib/components/divider.js +0 -72
- package/lib/components/divider.ts +0 -104
- package/lib/components/dropdown-menu.d.ts +0 -42
- package/lib/components/dropdown-menu.d.ts.map +0 -1
- package/lib/components/dropdown-menu.js +0 -177
- package/lib/components/dropdown-menu.ts +0 -214
- package/lib/components/dropdown.d.ts +0 -41
- package/lib/components/dropdown.d.ts.map +0 -1
- package/lib/components/dropdown.js +0 -136
- package/lib/components/dropdown.ts +0 -188
- package/lib/components/element.d.ts +0 -51
- package/lib/components/element.d.ts.map +0 -1
- package/lib/components/element.js +0 -209
- package/lib/components/element.ts +0 -271
- package/lib/components/event-chain.d.ts +0 -9
- package/lib/components/event-chain.d.ts.map +0 -1
- package/lib/components/event-chain.js +0 -33
- package/lib/components/fileupload.d.ts +0 -98
- package/lib/components/fileupload.d.ts.map +0 -1
- package/lib/components/fileupload.js +0 -351
- package/lib/components/fileupload.ts +0 -449
- package/lib/components/grid.d.ts +0 -88
- package/lib/components/grid.d.ts.map +0 -1
- package/lib/components/grid.js +0 -208
- package/lib/components/grid.ts +0 -295
- package/lib/components/heading.d.ts +0 -25
- package/lib/components/heading.d.ts.map +0 -1
- package/lib/components/heading.js +0 -83
- package/lib/components/heading.ts +0 -113
- package/lib/components/helpers.d.ts +0 -9
- package/lib/components/helpers.d.ts.map +0 -1
- package/lib/components/helpers.js +0 -30
- package/lib/components/helpers.ts +0 -41
- package/lib/components/hero.d.ts +0 -60
- package/lib/components/hero.d.ts.map +0 -1
- package/lib/components/hero.js +0 -239
- package/lib/components/hero.ts +0 -302
- package/lib/components/history/StateHistory.d.ts +0 -91
- package/lib/components/history/StateHistory.d.ts.map +0 -1
- package/lib/components/history/StateHistory.js +0 -154
- package/lib/components/history/StateHistory.ts +0 -200
- package/lib/components/icon.d.ts +0 -36
- package/lib/components/icon.d.ts.map +0 -1
- package/lib/components/icon.js +0 -135
- package/lib/components/icon.ts +0 -182
- package/lib/components/icons.d.ts +0 -25
- package/lib/components/icons.d.ts.map +0 -1
- package/lib/components/icons.js +0 -440
- package/lib/components/icons.ts +0 -464
- package/lib/components/image.d.ts +0 -42
- package/lib/components/image.d.ts.map +0 -1
- package/lib/components/image.js +0 -204
- package/lib/components/image.ts +0 -260
- package/lib/components/include.d.ts +0 -86
- package/lib/components/include.d.ts.map +0 -1
- package/lib/components/include.js +0 -238
- package/lib/components/include.ts +0 -281
- package/lib/components/input.d.ts +0 -85
- package/lib/components/input.d.ts.map +0 -1
- package/lib/components/input.js +0 -362
- package/lib/components/input.ts +0 -473
- package/lib/components/layer.d.ts +0 -72
- package/lib/components/layer.d.ts.map +0 -1
- package/lib/components/layer.js +0 -219
- package/lib/components/layer.ts +0 -304
- package/lib/components/link.d.ts +0 -41
- package/lib/components/link.d.ts.map +0 -1
- package/lib/components/link.js +0 -216
- package/lib/components/link.ts +0 -268
- package/lib/components/list.d.ts +0 -83
- package/lib/components/list.d.ts.map +0 -1
- package/lib/components/list.js +0 -314
- package/lib/components/list.ts +0 -423
- package/lib/components/loading.d.ts +0 -25
- package/lib/components/loading.d.ts.map +0 -1
- package/lib/components/loading.js +0 -76
- package/lib/components/loading.ts +0 -104
- package/lib/components/menu.d.ts +0 -38
- package/lib/components/menu.d.ts.map +0 -1
- package/lib/components/menu.js +0 -205
- package/lib/components/menu.ts +0 -279
- package/lib/components/modal.d.ts +0 -97
- package/lib/components/modal.d.ts.map +0 -1
- package/lib/components/modal.js +0 -463
- package/lib/components/modal.ts +0 -576
- package/lib/components/nav.d.ts +0 -46
- package/lib/components/nav.d.ts.map +0 -1
- package/lib/components/nav.js +0 -193
- package/lib/components/nav.ts +0 -261
- package/lib/components/paragraph.d.ts +0 -30
- package/lib/components/paragraph.d.ts.map +0 -1
- package/lib/components/paragraph.js +0 -93
- package/lib/components/paragraph.ts +0 -123
- package/lib/components/pen.d.ts +0 -125
- package/lib/components/pen.d.ts.map +0 -1
- package/lib/components/pen.js +0 -443
- package/lib/components/pen.ts +0 -567
- package/lib/components/progress.d.ts +0 -40
- package/lib/components/progress.d.ts.map +0 -1
- package/lib/components/progress.js +0 -116
- package/lib/components/progress.ts +0 -163
- package/lib/components/radio.d.ts +0 -43
- package/lib/components/radio.d.ts.map +0 -1
- package/lib/components/radio.js +0 -226
- package/lib/components/radio.ts +0 -303
- package/lib/components/registry.d.ts +0 -34
- package/lib/components/registry.d.ts.map +0 -1
- package/lib/components/registry.js +0 -163
- package/lib/components/registry.ts +0 -193
- package/lib/components/req.d.ts +0 -155
- package/lib/components/req.d.ts.map +0 -1
- package/lib/components/req.js +0 -253
- package/lib/components/req.ts +0 -303
- package/lib/components/script.d.ts +0 -14
- package/lib/components/script.d.ts.map +0 -1
- package/lib/components/script.js +0 -33
- package/lib/components/script.ts +0 -41
- package/lib/components/select.d.ts +0 -42
- package/lib/components/select.d.ts.map +0 -1
- package/lib/components/select.js +0 -209
- package/lib/components/select.ts +0 -281
- package/lib/components/sidebar.d.ts +0 -59
- package/lib/components/sidebar.d.ts.map +0 -1
- package/lib/components/sidebar.js +0 -298
- package/lib/components/sidebar.ts +0 -395
- package/lib/components/stack/BaseStack.d.ts +0 -65
- package/lib/components/stack/BaseStack.d.ts.map +0 -1
- package/lib/components/stack/BaseStack.js +0 -274
- package/lib/components/stack/BaseStack.ts +0 -328
- package/lib/components/stack/HStack.d.ts +0 -18
- package/lib/components/stack/HStack.d.ts.map +0 -1
- package/lib/components/stack/HStack.js +0 -22
- package/lib/components/stack/HStack.ts +0 -25
- package/lib/components/stack/VStack.d.ts +0 -19
- package/lib/components/stack/VStack.d.ts.map +0 -1
- package/lib/components/stack/VStack.js +0 -23
- package/lib/components/stack/VStack.ts +0 -26
- package/lib/components/stack/ZStack.d.ts +0 -18
- package/lib/components/stack/ZStack.d.ts.map +0 -1
- package/lib/components/stack/ZStack.js +0 -22
- package/lib/components/stack/ZStack.ts +0 -25
- package/lib/components/style.d.ts +0 -14
- package/lib/components/style.d.ts.map +0 -1
- package/lib/components/style.js +0 -33
- package/lib/components/style.ts +0 -41
- package/lib/components/switch.d.ts +0 -34
- package/lib/components/switch.d.ts.map +0 -1
- package/lib/components/switch.js +0 -209
- package/lib/components/switch.ts +0 -272
- package/lib/components/table.d.ts +0 -137
- package/lib/components/table.d.ts.map +0 -1
- package/lib/components/table.js +0 -1019
- package/lib/components/table.ts +0 -1225
- package/lib/components/tabs.d.ts +0 -53
- package/lib/components/tabs.d.ts.map +0 -1
- package/lib/components/tabs.js +0 -275
- package/lib/components/tabs.ts +0 -349
- package/lib/components/theme-toggle.d.ts +0 -45
- package/lib/components/theme-toggle.d.ts.map +0 -1
- package/lib/components/theme-toggle.js +0 -218
- package/lib/components/theme-toggle.ts +0 -297
- package/lib/components/tooltip.d.ts +0 -31
- package/lib/components/tooltip.d.ts.map +0 -1
- package/lib/components/tooltip.js +0 -112
- package/lib/components/tooltip.ts +0 -148
- package/lib/components/watcher.d.ts +0 -195
- package/lib/components/watcher.d.ts.map +0 -1
- package/lib/components/watcher.js +0 -241
- package/lib/components/watcher.ts +0 -261
- package/lib/components/write.d.ts +0 -107
- package/lib/components/write.d.ts.map +0 -1
- package/lib/components/write.js +0 -222
- package/lib/components/write.ts +0 -272
- package/lib/data/DataPipeline.d.ts +0 -113
- package/lib/data/DataPipeline.d.ts.map +0 -1
- package/lib/data/DataPipeline.js +0 -359
- package/lib/data/DataPipeline.ts +0 -452
- package/lib/facades/dataframe.jux +0 -0
- package/lib/globals.d.ts +0 -21
- package/lib/reactivity/state.d.ts +0 -36
- package/lib/reactivity/state.d.ts.map +0 -1
- package/lib/reactivity/state.js +0 -67
- package/lib/reactivity/state.ts +0 -78
- package/lib/storage/DataFrame.d.ts +0 -284
- package/lib/storage/DataFrame.d.ts.map +0 -1
- package/lib/storage/DataFrame.js +0 -1022
- package/lib/storage/DataFrame.ts +0 -1195
- package/lib/storage/DataFrameSource.d.ts +0 -158
- package/lib/storage/DataFrameSource.d.ts.map +0 -1
- package/lib/storage/DataFrameSource.js +0 -409
- package/lib/storage/DataFrameSource.ts +0 -556
- package/lib/storage/FileStorage.d.ts +0 -53
- package/lib/storage/FileStorage.d.ts.map +0 -1
- package/lib/storage/FileStorage.js +0 -80
- package/lib/storage/FileStorage.ts +0 -95
- package/lib/storage/IndexedDBDriver.d.ts +0 -75
- package/lib/storage/IndexedDBDriver.d.ts.map +0 -1
- package/lib/storage/IndexedDBDriver.js +0 -177
- package/lib/storage/IndexedDBDriver.ts +0 -226
- package/lib/storage/TabularDriver.d.ts +0 -118
- package/lib/storage/TabularDriver.d.ts.map +0 -1
- package/lib/storage/TabularDriver.js +0 -731
- package/lib/storage/TabularDriver.ts +0 -874
- package/lib/utils/codeparser.d.ts +0 -29
- package/lib/utils/codeparser.d.ts.map +0 -1
- package/lib/utils/codeparser.js +0 -409
- package/lib/utils/fetch.d.ts +0 -176
- package/lib/utils/fetch.d.ts.map +0 -1
- package/lib/utils/fetch.js +0 -427
- package/lib/utils/formatId.d.ts +0 -16
- package/lib/utils/formatId.d.ts.map +0 -1
- package/lib/utils/formatId.js +0 -27
- package/lib/utils/path-resolver.js +0 -23
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { BaseComponent } from './base/BaseComponent.js';
|
|
2
|
-
export interface Theme {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
icon?: string;
|
|
6
|
-
iconCollection?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ThemeToggleOptions {
|
|
9
|
-
themes?: Theme[];
|
|
10
|
-
defaultTheme?: string;
|
|
11
|
-
storageKey?: string;
|
|
12
|
-
showLabel?: boolean;
|
|
13
|
-
variant?: 'button' | 'dropdown' | 'cycle';
|
|
14
|
-
style?: string;
|
|
15
|
-
class?: string;
|
|
16
|
-
}
|
|
17
|
-
type ThemeToggleState = {
|
|
18
|
-
themes: Theme[];
|
|
19
|
-
currentTheme: string;
|
|
20
|
-
storageKey: string;
|
|
21
|
-
showLabel: boolean;
|
|
22
|
-
variant: string;
|
|
23
|
-
style: string;
|
|
24
|
-
class: string;
|
|
25
|
-
};
|
|
26
|
-
export declare class ThemeToggle extends BaseComponent<ThemeToggleState> {
|
|
27
|
-
constructor(id: string, options?: ThemeToggleOptions);
|
|
28
|
-
protected getTriggerEvents(): readonly string[];
|
|
29
|
-
protected getCallbackEvents(): readonly string[];
|
|
30
|
-
private static detectTheme;
|
|
31
|
-
themes(value: Theme[]): this;
|
|
32
|
-
variant(value: 'button' | 'dropdown' | 'cycle'): this;
|
|
33
|
-
showLabel(value: boolean): this;
|
|
34
|
-
setTheme(themeId: string): this;
|
|
35
|
-
getTheme(): string;
|
|
36
|
-
addTheme(theme: Theme): this;
|
|
37
|
-
private applyTheme;
|
|
38
|
-
private cycleTheme;
|
|
39
|
-
private _updateDOM;
|
|
40
|
-
render(targetId?: string | HTMLElement | BaseComponent<any>): this;
|
|
41
|
-
update(prop: string, value: any): void;
|
|
42
|
-
}
|
|
43
|
-
export declare function themeToggle(id: string, options?: ThemeToggleOptions): ThemeToggle;
|
|
44
|
-
export {};
|
|
45
|
-
//# sourceMappingURL=theme-toggle.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme-toggle.d.ts","sourceRoot":"","sources":["theme-toggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAOxD,MAAM,WAAW,KAAK;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IAC/B,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,gBAAgB,GAAG;IACpB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qBAAa,WAAY,SAAQ,aAAa,CAAC,gBAAgB,CAAC;gBAChD,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB;IAoBxD,SAAS,CAAC,gBAAgB,IAAI,SAAS,MAAM,EAAE;IAI/C,SAAS,CAAC,iBAAiB,IAAI,SAAS,MAAM,EAAE;IAQhD,OAAO,CAAC,MAAM,CAAC,WAAW;IAsB1B,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI;IAK5B,OAAO,CAAC,KAAK,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,IAAI;IAKrD,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAK/B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAe/B,QAAQ,IAAI,MAAM;IAIlB,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAW5B,OAAO,CAAC,UAAU;IAqBlB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,UAAU;IA0ClB,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI;IAoFlE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;CAGzC;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,WAAW,CAErF"}
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
import { BaseComponent } from './base/BaseComponent.js';
|
|
2
|
-
import { renderIcon } from './icons.js';
|
|
3
|
-
// Event definitions
|
|
4
|
-
const TRIGGER_EVENTS = [];
|
|
5
|
-
const CALLBACK_EVENTS = ['themeChange'];
|
|
6
|
-
export class ThemeToggle extends BaseComponent {
|
|
7
|
-
constructor(id, options = {}) {
|
|
8
|
-
const defaultThemes = [
|
|
9
|
-
{ id: 'light', label: 'Light', icon: '☀️' },
|
|
10
|
-
{ id: 'dark', label: 'Dark', icon: '🌙' }
|
|
11
|
-
];
|
|
12
|
-
super(id, {
|
|
13
|
-
themes: options.themes ?? defaultThemes,
|
|
14
|
-
currentTheme: options.defaultTheme ?? ThemeToggle.detectTheme(options.storageKey),
|
|
15
|
-
storageKey: options.storageKey ?? 'jux-theme',
|
|
16
|
-
showLabel: options.showLabel ?? false,
|
|
17
|
-
variant: options.variant ?? 'button',
|
|
18
|
-
style: options.style ?? '',
|
|
19
|
-
class: options.class ?? ''
|
|
20
|
-
});
|
|
21
|
-
// Apply theme on initialization
|
|
22
|
-
this.applyTheme(this.state.currentTheme);
|
|
23
|
-
}
|
|
24
|
-
getTriggerEvents() {
|
|
25
|
-
return TRIGGER_EVENTS;
|
|
26
|
-
}
|
|
27
|
-
getCallbackEvents() {
|
|
28
|
-
return CALLBACK_EVENTS;
|
|
29
|
-
}
|
|
30
|
-
/* ═════════════════════════════════════════════════════════════════
|
|
31
|
-
* STATIC METHODS
|
|
32
|
-
* ═════════════════════════════════════════════════════════════════ */
|
|
33
|
-
static detectTheme(storageKey = 'jux-theme') {
|
|
34
|
-
if (typeof window === 'undefined')
|
|
35
|
-
return 'light';
|
|
36
|
-
const stored = localStorage.getItem(storageKey);
|
|
37
|
-
if (stored)
|
|
38
|
-
return stored;
|
|
39
|
-
const current = document.body.getAttribute('data-theme');
|
|
40
|
-
if (current)
|
|
41
|
-
return current;
|
|
42
|
-
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
43
|
-
return 'dark';
|
|
44
|
-
}
|
|
45
|
-
return 'light';
|
|
46
|
-
}
|
|
47
|
-
/* ═════════════════════════════════════════════════════════════════
|
|
48
|
-
* FLUENT API
|
|
49
|
-
* ═════════════════════════════════════════════════════════════════ */
|
|
50
|
-
// ✅ Inherited from BaseComponent
|
|
51
|
-
themes(value) {
|
|
52
|
-
this.state.themes = value;
|
|
53
|
-
return this;
|
|
54
|
-
}
|
|
55
|
-
variant(value) {
|
|
56
|
-
this.state.variant = value;
|
|
57
|
-
return this;
|
|
58
|
-
}
|
|
59
|
-
showLabel(value) {
|
|
60
|
-
this.state.showLabel = value;
|
|
61
|
-
return this;
|
|
62
|
-
}
|
|
63
|
-
setTheme(themeId) {
|
|
64
|
-
const theme = this.state.themes.find(t => t.id === themeId);
|
|
65
|
-
if (!theme) {
|
|
66
|
-
console.warn(`Theme "${themeId}" not found in available themes`);
|
|
67
|
-
return this;
|
|
68
|
-
}
|
|
69
|
-
this.state.currentTheme = themeId;
|
|
70
|
-
this.applyTheme(themeId);
|
|
71
|
-
this._updateDOM();
|
|
72
|
-
return this;
|
|
73
|
-
}
|
|
74
|
-
getTheme() {
|
|
75
|
-
return this.state.currentTheme;
|
|
76
|
-
}
|
|
77
|
-
addTheme(theme) {
|
|
78
|
-
if (!this.state.themes.find(t => t.id === theme.id)) {
|
|
79
|
-
this.state.themes.push(theme);
|
|
80
|
-
}
|
|
81
|
-
return this;
|
|
82
|
-
}
|
|
83
|
-
/* ═════════════════════════════════════════════════════════════════
|
|
84
|
-
* PRIVATE METHODS
|
|
85
|
-
* ═════════════════════════════════════════════════════════════════ */
|
|
86
|
-
applyTheme(themeId) {
|
|
87
|
-
if (typeof document === 'undefined')
|
|
88
|
-
return;
|
|
89
|
-
try {
|
|
90
|
-
document.body.setAttribute('data-theme', themeId);
|
|
91
|
-
document.documentElement.setAttribute('data-theme', themeId);
|
|
92
|
-
localStorage.setItem(this.state.storageKey, themeId);
|
|
93
|
-
window.dispatchEvent(new CustomEvent('themechange', {
|
|
94
|
-
detail: { theme: themeId }
|
|
95
|
-
}));
|
|
96
|
-
// 🎯 Fire the themeChange callback event
|
|
97
|
-
this._triggerCallback('themeChange', themeId);
|
|
98
|
-
console.log(`🎨 Theme applied: ${themeId}`);
|
|
99
|
-
}
|
|
100
|
-
catch (error) {
|
|
101
|
-
throw new Error(`Failed to apply theme "${themeId}": ${error.message}`);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
cycleTheme() {
|
|
105
|
-
const currentIndex = this.state.themes.findIndex(t => t.id === this.state.currentTheme);
|
|
106
|
-
const nextIndex = (currentIndex + 1) % this.state.themes.length;
|
|
107
|
-
const nextTheme = this.state.themes[nextIndex];
|
|
108
|
-
this.setTheme(nextTheme.id);
|
|
109
|
-
}
|
|
110
|
-
_updateDOM() {
|
|
111
|
-
if (!this.container)
|
|
112
|
-
return;
|
|
113
|
-
const toggle = this.container.querySelector(`#${this._id}`);
|
|
114
|
-
if (!toggle)
|
|
115
|
-
return;
|
|
116
|
-
const currentTheme = this.state.themes.find(t => t.id === this.state.currentTheme);
|
|
117
|
-
if (!currentTheme)
|
|
118
|
-
return;
|
|
119
|
-
if (this.state.variant === 'button' || this.state.variant === 'cycle') {
|
|
120
|
-
const button = toggle.querySelector('button');
|
|
121
|
-
if (button && currentTheme.icon) {
|
|
122
|
-
button.innerHTML = '';
|
|
123
|
-
const iconElement = renderIcon(currentTheme.icon, currentTheme.iconCollection);
|
|
124
|
-
button.appendChild(iconElement);
|
|
125
|
-
if (this.state.showLabel) {
|
|
126
|
-
const labelSpan = document.createElement('span');
|
|
127
|
-
labelSpan.textContent = ` ${currentTheme.label}`;
|
|
128
|
-
button.appendChild(labelSpan);
|
|
129
|
-
}
|
|
130
|
-
requestAnimationFrame(() => {
|
|
131
|
-
if (window.Iconify) {
|
|
132
|
-
window.Iconify.scan();
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
if (this.state.variant === 'dropdown') {
|
|
138
|
-
const select = toggle.querySelector('select');
|
|
139
|
-
if (select) {
|
|
140
|
-
select.value = this.state.currentTheme;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
/* ═════════════════════════════════════════════════════════════════
|
|
145
|
-
* RENDER
|
|
146
|
-
* ═════════════════════════════════════════════════════════════════ */
|
|
147
|
-
render(targetId) {
|
|
148
|
-
const container = this._setupContainer(targetId);
|
|
149
|
-
const { themes, currentTheme, showLabel, variant, style, class: className } = this.state;
|
|
150
|
-
const wrapper = document.createElement('div');
|
|
151
|
-
wrapper.className = `jux-theme-toggle`;
|
|
152
|
-
wrapper.id = this._id;
|
|
153
|
-
if (className) {
|
|
154
|
-
wrapper.className += ` ${className}`;
|
|
155
|
-
}
|
|
156
|
-
if (style) {
|
|
157
|
-
wrapper.setAttribute('style', style);
|
|
158
|
-
}
|
|
159
|
-
const theme = themes.find(t => t.id === currentTheme);
|
|
160
|
-
if (variant === 'button' || variant === 'cycle') {
|
|
161
|
-
const button = document.createElement('button');
|
|
162
|
-
button.className = 'jux-theme-toggle-button';
|
|
163
|
-
button.type = 'button';
|
|
164
|
-
button.setAttribute('aria-label', 'Toggle theme');
|
|
165
|
-
if (theme?.icon) {
|
|
166
|
-
const iconElement = renderIcon(theme.icon, theme.iconCollection);
|
|
167
|
-
button.appendChild(iconElement);
|
|
168
|
-
}
|
|
169
|
-
if (showLabel) {
|
|
170
|
-
const labelSpan = document.createElement('span');
|
|
171
|
-
labelSpan.textContent = ` ${theme?.label || currentTheme}`;
|
|
172
|
-
button.appendChild(labelSpan);
|
|
173
|
-
}
|
|
174
|
-
else if (!theme?.icon) {
|
|
175
|
-
button.textContent = theme?.label || currentTheme;
|
|
176
|
-
}
|
|
177
|
-
button.addEventListener('click', () => {
|
|
178
|
-
this.cycleTheme();
|
|
179
|
-
});
|
|
180
|
-
wrapper.appendChild(button);
|
|
181
|
-
}
|
|
182
|
-
else if (variant === 'dropdown') {
|
|
183
|
-
const select = document.createElement('select');
|
|
184
|
-
select.className = 'jux-theme-toggle-select';
|
|
185
|
-
select.setAttribute('aria-label', 'Select theme');
|
|
186
|
-
themes.forEach(t => {
|
|
187
|
-
const option = document.createElement('option');
|
|
188
|
-
option.value = t.id;
|
|
189
|
-
option.textContent = showLabel
|
|
190
|
-
? `${t.icon || ''} ${t.label}`.trim()
|
|
191
|
-
: t.icon || t.label;
|
|
192
|
-
if (t.id === currentTheme) {
|
|
193
|
-
option.selected = true;
|
|
194
|
-
}
|
|
195
|
-
select.appendChild(option);
|
|
196
|
-
});
|
|
197
|
-
select.addEventListener('change', (e) => {
|
|
198
|
-
const target = e.target;
|
|
199
|
-
this.setTheme(target.value);
|
|
200
|
-
});
|
|
201
|
-
wrapper.appendChild(select);
|
|
202
|
-
}
|
|
203
|
-
this._wireStandardEvents(wrapper);
|
|
204
|
-
container.appendChild(wrapper);
|
|
205
|
-
requestAnimationFrame(() => {
|
|
206
|
-
if (window.Iconify) {
|
|
207
|
-
window.Iconify.scan();
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
return this;
|
|
211
|
-
}
|
|
212
|
-
update(prop, value) {
|
|
213
|
-
// No reactive updates needed - uses manual _updateDOM()
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
export function themeToggle(id, options = {}) {
|
|
217
|
-
return new ThemeToggle(id, options);
|
|
218
|
-
}
|
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
import { BaseComponent } from './base/BaseComponent.js';
|
|
2
|
-
import { renderIcon } from './icons.js';
|
|
3
|
-
|
|
4
|
-
// Event definitions
|
|
5
|
-
const TRIGGER_EVENTS = [] as const;
|
|
6
|
-
const CALLBACK_EVENTS = ['themeChange'] as const;
|
|
7
|
-
|
|
8
|
-
export interface Theme {
|
|
9
|
-
id: string;
|
|
10
|
-
label: string;
|
|
11
|
-
icon?: string;
|
|
12
|
-
iconCollection?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface ThemeToggleOptions {
|
|
16
|
-
themes?: Theme[];
|
|
17
|
-
defaultTheme?: string;
|
|
18
|
-
storageKey?: string;
|
|
19
|
-
showLabel?: boolean;
|
|
20
|
-
variant?: 'button' | 'dropdown' | 'cycle';
|
|
21
|
-
style?: string;
|
|
22
|
-
class?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type ThemeToggleState = {
|
|
26
|
-
themes: Theme[];
|
|
27
|
-
currentTheme: string;
|
|
28
|
-
storageKey: string;
|
|
29
|
-
showLabel: boolean;
|
|
30
|
-
variant: string;
|
|
31
|
-
style: string;
|
|
32
|
-
class: string;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export class ThemeToggle extends BaseComponent<ThemeToggleState> {
|
|
36
|
-
constructor(id: string, options: ThemeToggleOptions = {}) {
|
|
37
|
-
const defaultThemes: Theme[] = [
|
|
38
|
-
{ id: 'light', label: 'Light', icon: '☀️' },
|
|
39
|
-
{ id: 'dark', label: 'Dark', icon: '🌙' }
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
super(id, {
|
|
43
|
-
themes: options.themes ?? defaultThemes,
|
|
44
|
-
currentTheme: options.defaultTheme ?? ThemeToggle.detectTheme(options.storageKey),
|
|
45
|
-
storageKey: options.storageKey ?? 'jux-theme',
|
|
46
|
-
showLabel: options.showLabel ?? false,
|
|
47
|
-
variant: options.variant ?? 'button',
|
|
48
|
-
style: options.style ?? '',
|
|
49
|
-
class: options.class ?? ''
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// Apply theme on initialization
|
|
53
|
-
this.applyTheme(this.state.currentTheme);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
protected getTriggerEvents(): readonly string[] {
|
|
57
|
-
return TRIGGER_EVENTS;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
protected getCallbackEvents(): readonly string[] {
|
|
61
|
-
return CALLBACK_EVENTS;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* ═════════════════════════════════════════════════════════════════
|
|
65
|
-
* STATIC METHODS
|
|
66
|
-
* ═════════════════════════════════════════════════════════════════ */
|
|
67
|
-
|
|
68
|
-
private static detectTheme(storageKey = 'jux-theme'): string {
|
|
69
|
-
if (typeof window === 'undefined') return 'light';
|
|
70
|
-
|
|
71
|
-
const stored = localStorage.getItem(storageKey);
|
|
72
|
-
if (stored) return stored;
|
|
73
|
-
|
|
74
|
-
const current = document.body.getAttribute('data-theme');
|
|
75
|
-
if (current) return current;
|
|
76
|
-
|
|
77
|
-
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
78
|
-
return 'dark';
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
return 'light';
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* ═════════════════════════════════════════════════════════════════
|
|
85
|
-
* FLUENT API
|
|
86
|
-
* ═════════════════════════════════════════════════════════════════ */
|
|
87
|
-
|
|
88
|
-
// ✅ Inherited from BaseComponent
|
|
89
|
-
|
|
90
|
-
themes(value: Theme[]): this {
|
|
91
|
-
this.state.themes = value;
|
|
92
|
-
return this;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
variant(value: 'button' | 'dropdown' | 'cycle'): this {
|
|
96
|
-
this.state.variant = value;
|
|
97
|
-
return this;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
showLabel(value: boolean): this {
|
|
101
|
-
this.state.showLabel = value;
|
|
102
|
-
return this;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
setTheme(themeId: string): this {
|
|
106
|
-
const theme = this.state.themes.find(t => t.id === themeId);
|
|
107
|
-
|
|
108
|
-
if (!theme) {
|
|
109
|
-
console.warn(`Theme "${themeId}" not found in available themes`);
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
this.state.currentTheme = themeId;
|
|
114
|
-
this.applyTheme(themeId);
|
|
115
|
-
this._updateDOM();
|
|
116
|
-
|
|
117
|
-
return this;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
getTheme(): string {
|
|
121
|
-
return this.state.currentTheme;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
addTheme(theme: Theme): this {
|
|
125
|
-
if (!this.state.themes.find(t => t.id === theme.id)) {
|
|
126
|
-
this.state.themes.push(theme);
|
|
127
|
-
}
|
|
128
|
-
return this;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/* ═════════════════════════════════════════════════════════════════
|
|
132
|
-
* PRIVATE METHODS
|
|
133
|
-
* ═════════════════════════════════════════════════════════════════ */
|
|
134
|
-
|
|
135
|
-
private applyTheme(themeId: string): void {
|
|
136
|
-
if (typeof document === 'undefined') return;
|
|
137
|
-
|
|
138
|
-
try {
|
|
139
|
-
document.body.setAttribute('data-theme', themeId);
|
|
140
|
-
document.documentElement.setAttribute('data-theme', themeId);
|
|
141
|
-
localStorage.setItem(this.state.storageKey, themeId);
|
|
142
|
-
|
|
143
|
-
window.dispatchEvent(new CustomEvent('themechange', {
|
|
144
|
-
detail: { theme: themeId }
|
|
145
|
-
}));
|
|
146
|
-
|
|
147
|
-
// 🎯 Fire the themeChange callback event
|
|
148
|
-
this._triggerCallback('themeChange', themeId);
|
|
149
|
-
|
|
150
|
-
console.log(`🎨 Theme applied: ${themeId}`);
|
|
151
|
-
} catch (error: any) {
|
|
152
|
-
throw new Error(`Failed to apply theme "${themeId}": ${error.message}`);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
private cycleTheme(): void {
|
|
157
|
-
const currentIndex = this.state.themes.findIndex(t => t.id === this.state.currentTheme);
|
|
158
|
-
const nextIndex = (currentIndex + 1) % this.state.themes.length;
|
|
159
|
-
const nextTheme = this.state.themes[nextIndex];
|
|
160
|
-
|
|
161
|
-
this.setTheme(nextTheme.id);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
private _updateDOM(): void {
|
|
165
|
-
if (!this.container) return;
|
|
166
|
-
|
|
167
|
-
const toggle = this.container.querySelector(`#${this._id}`);
|
|
168
|
-
if (!toggle) return;
|
|
169
|
-
|
|
170
|
-
const currentTheme = this.state.themes.find(t => t.id === this.state.currentTheme);
|
|
171
|
-
if (!currentTheme) return;
|
|
172
|
-
|
|
173
|
-
if (this.state.variant === 'button' || this.state.variant === 'cycle') {
|
|
174
|
-
const button = toggle.querySelector('button');
|
|
175
|
-
if (button && currentTheme.icon) {
|
|
176
|
-
button.innerHTML = '';
|
|
177
|
-
const iconElement = renderIcon(currentTheme.icon, currentTheme.iconCollection);
|
|
178
|
-
button.appendChild(iconElement);
|
|
179
|
-
|
|
180
|
-
if (this.state.showLabel) {
|
|
181
|
-
const labelSpan = document.createElement('span');
|
|
182
|
-
labelSpan.textContent = ` ${currentTheme.label}`;
|
|
183
|
-
button.appendChild(labelSpan);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
requestAnimationFrame(() => {
|
|
187
|
-
if ((window as any).Iconify) {
|
|
188
|
-
(window as any).Iconify.scan();
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
if (this.state.variant === 'dropdown') {
|
|
195
|
-
const select = toggle.querySelector('select') as HTMLSelectElement;
|
|
196
|
-
if (select) {
|
|
197
|
-
select.value = this.state.currentTheme;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/* ═════════════════════════════════════════════════════════════════
|
|
203
|
-
* RENDER
|
|
204
|
-
* ═════════════════════════════════════════════════════════════════ */
|
|
205
|
-
|
|
206
|
-
render(targetId?: string | HTMLElement | BaseComponent<any>): this {
|
|
207
|
-
const container = this._setupContainer(targetId);
|
|
208
|
-
|
|
209
|
-
const { themes, currentTheme, showLabel, variant, style, class: className } = this.state;
|
|
210
|
-
|
|
211
|
-
const wrapper = document.createElement('div');
|
|
212
|
-
wrapper.className = `jux-theme-toggle`;
|
|
213
|
-
wrapper.id = this._id;
|
|
214
|
-
|
|
215
|
-
if (className) {
|
|
216
|
-
wrapper.className += ` ${className}`;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
if (style) {
|
|
220
|
-
wrapper.setAttribute('style', style);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
const theme = themes.find(t => t.id === currentTheme);
|
|
224
|
-
|
|
225
|
-
if (variant === 'button' || variant === 'cycle') {
|
|
226
|
-
const button = document.createElement('button');
|
|
227
|
-
button.className = 'jux-theme-toggle-button';
|
|
228
|
-
button.type = 'button';
|
|
229
|
-
button.setAttribute('aria-label', 'Toggle theme');
|
|
230
|
-
|
|
231
|
-
if (theme?.icon) {
|
|
232
|
-
const iconElement = renderIcon(theme.icon, theme.iconCollection);
|
|
233
|
-
button.appendChild(iconElement);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
if (showLabel) {
|
|
237
|
-
const labelSpan = document.createElement('span');
|
|
238
|
-
labelSpan.textContent = ` ${theme?.label || currentTheme}`;
|
|
239
|
-
button.appendChild(labelSpan);
|
|
240
|
-
} else if (!theme?.icon) {
|
|
241
|
-
button.textContent = theme?.label || currentTheme;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
button.addEventListener('click', () => {
|
|
245
|
-
this.cycleTheme();
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
wrapper.appendChild(button);
|
|
249
|
-
|
|
250
|
-
} else if (variant === 'dropdown') {
|
|
251
|
-
const select = document.createElement('select');
|
|
252
|
-
select.className = 'jux-theme-toggle-select';
|
|
253
|
-
select.setAttribute('aria-label', 'Select theme');
|
|
254
|
-
|
|
255
|
-
themes.forEach(t => {
|
|
256
|
-
const option = document.createElement('option');
|
|
257
|
-
option.value = t.id;
|
|
258
|
-
option.textContent = showLabel
|
|
259
|
-
? `${t.icon || ''} ${t.label}`.trim()
|
|
260
|
-
: t.icon || t.label;
|
|
261
|
-
|
|
262
|
-
if (t.id === currentTheme) {
|
|
263
|
-
option.selected = true;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
select.appendChild(option);
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
select.addEventListener('change', (e) => {
|
|
270
|
-
const target = e.target as HTMLSelectElement;
|
|
271
|
-
this.setTheme(target.value);
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
wrapper.appendChild(select);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
this._wireStandardEvents(wrapper);
|
|
278
|
-
|
|
279
|
-
container.appendChild(wrapper);
|
|
280
|
-
|
|
281
|
-
requestAnimationFrame(() => {
|
|
282
|
-
if ((window as any).Iconify) {
|
|
283
|
-
(window as any).Iconify.scan();
|
|
284
|
-
}
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
return this;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
update(prop: string, value: any): void {
|
|
291
|
-
// No reactive updates needed - uses manual _updateDOM()
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
export function themeToggle(id: string, options: ThemeToggleOptions = {}): ThemeToggle {
|
|
296
|
-
return new ThemeToggle(id, options);
|
|
297
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { BaseComponent } from './base/BaseComponent.js';
|
|
2
|
-
export interface TooltipOptions {
|
|
3
|
-
text?: string;
|
|
4
|
-
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
-
style?: string;
|
|
6
|
-
class?: string;
|
|
7
|
-
}
|
|
8
|
-
type TooltipState = {
|
|
9
|
-
text: string;
|
|
10
|
-
position: string;
|
|
11
|
-
style: string;
|
|
12
|
-
class: string;
|
|
13
|
-
};
|
|
14
|
-
export declare class Tooltip extends BaseComponent<TooltipState> {
|
|
15
|
-
private _tooltip;
|
|
16
|
-
private _target;
|
|
17
|
-
constructor(id: string, options?: TooltipOptions);
|
|
18
|
-
protected getTriggerEvents(): readonly string[];
|
|
19
|
-
protected getCallbackEvents(): readonly string[];
|
|
20
|
-
text(value: string): this;
|
|
21
|
-
position(value: 'top' | 'bottom' | 'left' | 'right'): this;
|
|
22
|
-
attachTo(target: HTMLElement | null): this;
|
|
23
|
-
private _setupTooltip;
|
|
24
|
-
private _show;
|
|
25
|
-
private _hide;
|
|
26
|
-
render(targetId?: string | HTMLElement | BaseComponent<any>): this;
|
|
27
|
-
update(prop: string, value: any): void;
|
|
28
|
-
}
|
|
29
|
-
export declare function tooltip(id: string, options?: TooltipOptions): Tooltip;
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAMxD,MAAM,WAAW,cAAc;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,KAAK,YAAY,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qBAAa,OAAQ,SAAQ,aAAa,CAAC,YAAY,CAAC;IACpD,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,OAAO,CAA4B;gBAE/B,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB;IASpD,SAAS,CAAC,gBAAgB,IAAI,SAAS,MAAM,EAAE;IAI/C,SAAS,CAAC,iBAAiB,IAAI,SAAS,MAAM,EAAE;IAQhD,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKzB,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI;IAK1D,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI;IAY1C,OAAO,CAAC,aAAa;IA4BrB,OAAO,CAAC,KAAK;IAiCb,OAAO,CAAC,KAAK;IAMb,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI;IAMlE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;CAGzC;AAED,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAEzE"}
|