@rokkit/core 1.0.0-next.12 → 1.0.0-next.121
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/calendar.d.ts +10 -0
- package/dist/colors/index.d.ts +333 -0
- package/dist/connector.d.ts +8 -0
- package/dist/constants.d.ts +40 -0
- package/dist/events.d.ts +12 -0
- package/dist/field-mapper.d.ts +63 -0
- package/dist/index.d.ts +13 -0
- package/dist/key-event-map.d.ts +18 -0
- package/dist/mapped-items.d.ts +14 -0
- package/dist/mapping.d.ts +75 -0
- package/dist/nested.d.ts +18 -0
- package/dist/packages/actions/src/delegate.svelte.d.ts +13 -0
- package/dist/packages/actions/src/dismissable.svelte.d.ts +7 -0
- package/dist/packages/actions/src/fillable.svelte.d.ts +8 -0
- package/dist/packages/actions/src/index.d.ts +11 -0
- package/dist/packages/actions/src/kbd.d.ts +44 -0
- package/dist/packages/actions/src/keyboard.svelte.d.ts +7 -0
- package/dist/packages/actions/src/lib/event-manager.d.ts +8 -0
- package/dist/packages/actions/src/lib/index.d.ts +2 -0
- package/dist/packages/actions/src/lib/internal.d.ts +19 -0
- package/dist/packages/actions/src/navigable.svelte.d.ts +8 -0
- package/dist/packages/actions/src/navigator.svelte.d.ts +20 -0
- package/dist/packages/actions/src/pannable.svelte.d.ts +6 -0
- package/dist/packages/actions/src/skinnable.svelte.d.ts +8 -0
- package/dist/packages/actions/src/swipeable.svelte.d.ts +14 -0
- package/dist/packages/actions/src/themable.svelte.d.ts +7 -0
- package/dist/packages/actions/src/types.d.ts +72 -0
- package/dist/packages/actions/src/utils.d.ts +18 -0
- package/dist/packages/bits-ui/src/index.d.ts +2 -0
- package/dist/packages/bits-ui/src/reference.d.ts +22 -0
- package/dist/packages/bits-ui/src/tree/constants.d.ts +13 -0
- package/dist/packages/bits-ui/src/tree/index.d.ts +7 -0
- package/dist/packages/bits-ui/src/tree/types.d.ts +71 -0
- package/dist/packages/core/src/calendar.d.ts +10 -0
- package/dist/packages/core/src/colors/index.d.ts +333 -0
- package/dist/packages/core/src/connector.d.ts +8 -0
- package/dist/packages/core/src/constants.d.ts +39 -0
- package/dist/packages/core/src/events.d.ts +12 -0
- package/dist/packages/core/src/field-mapper.d.ts +63 -0
- package/dist/packages/core/src/index.d.ts +13 -0
- package/dist/packages/core/src/key-event-map.d.ts +18 -0
- package/dist/packages/core/src/mapped-items.d.ts +14 -0
- package/dist/packages/core/src/mapping.d.ts +75 -0
- package/dist/packages/core/src/nested.d.ts +18 -0
- package/dist/packages/core/src/string.d.ts +59 -0
- package/dist/packages/core/src/theme.d.ts +52 -0
- package/dist/packages/core/src/ticks.d.ts +10 -0
- package/dist/packages/core/src/types.d.ts +245 -0
- package/dist/packages/core/src/utils.d.ts +70 -0
- package/dist/packages/data/src/aggregators.d.ts +2 -0
- package/dist/packages/data/src/constants.d.ts +46 -0
- package/dist/packages/data/src/convert.d.ts +10 -0
- package/dist/packages/data/src/dataset.d.ts +43 -0
- package/dist/packages/data/src/filter.d.ts +26 -0
- package/dist/packages/data/src/formatter.d.ts +10 -0
- package/dist/packages/data/src/hierarchy.d.ts +36 -0
- package/dist/packages/data/src/index.d.ts +7 -0
- package/dist/packages/data/src/infer.d.ts +80 -0
- package/dist/packages/data/src/join.d.ts +95 -0
- package/dist/packages/data/src/list.d.ts +121 -0
- package/dist/packages/data/src/metadata.d.ts +32 -0
- package/dist/packages/data/src/model.d.ts +29 -0
- package/dist/packages/data/src/parser.d.ts +31 -0
- package/dist/packages/data/src/renamer.d.ts +37 -0
- package/dist/packages/data/src/rollup.d.ts +51 -0
- package/dist/packages/data/src/types.d.ts +346 -0
- package/dist/packages/data/src/utils.d.ts +6 -0
- package/dist/packages/data/src/view.d.ts +35 -0
- package/dist/packages/helpers/src/components/index.d.ts +2 -0
- package/dist/packages/helpers/src/index.d.ts +1 -0
- package/dist/packages/helpers/src/matchers/action.d.ts +27 -0
- package/dist/packages/helpers/src/matchers/array.d.ts +10 -0
- package/dist/packages/helpers/src/matchers/dataset.d.ts +10 -0
- package/dist/packages/helpers/src/matchers/event.d.ts +10 -0
- package/dist/packages/helpers/src/matchers/index.d.ts +4 -0
- package/dist/packages/helpers/src/matchers/internal.d.ts +1 -0
- package/dist/packages/helpers/src/mocks/animate.d.ts +1 -0
- package/dist/packages/helpers/src/mocks/element.d.ts +60 -0
- package/dist/packages/helpers/src/mocks/index.d.ts +2 -0
- package/dist/packages/helpers/src/mocks/match-media.d.ts +30 -0
- package/dist/packages/helpers/src/mocks/resize-observer.d.ts +9 -0
- package/dist/packages/helpers/src/simulators/index.d.ts +1 -0
- package/dist/packages/helpers/src/simulators/touch.d.ts +40 -0
- package/dist/packages/icons/src/convert.d.ts +22 -0
- package/dist/packages/icons/src/index.d.ts +2 -0
- package/dist/packages/input/src/index.d.ts +18 -0
- package/dist/packages/states/src/constants.d.ts +27 -0
- package/dist/packages/states/src/derive.svelte.d.ts +22 -0
- package/dist/packages/states/src/hierarchy.d.ts +34 -0
- package/dist/packages/states/src/index.d.ts +5 -0
- package/dist/packages/states/src/list-controller.svelte.d.ts +70 -0
- package/dist/packages/states/src/nested-controller.svelte.d.ts +32 -0
- package/dist/packages/states/src/proxy.svelte.d.ts +43 -0
- package/dist/packages/states/src/tabular.svelte.d.ts +5 -0
- package/dist/packages/states/src/traversal.svelte.d.ts +69 -0
- package/dist/packages/states/src/vibe.svelte.d.ts +622 -0
- package/dist/packages/themes/src/constants.d.ts +6 -0
- package/dist/packages/themes/src/index.d.ts +2 -0
- package/dist/packages/tutorial/src/assimilate.d.ts +25 -0
- package/dist/packages/tutorial/src/collector.d.ts +46 -0
- package/dist/packages/tutorial/src/files.d.ts +8 -0
- package/dist/packages/tutorial/src/index.d.ts +2 -0
- package/dist/packages/tutorial/src/metadata/base.d.ts +19 -0
- package/dist/packages/tutorial/src/metadata/factory.d.ts +19 -0
- package/dist/packages/tutorial/src/metadata/index.d.ts +2 -0
- package/dist/packages/tutorial/src/metadata/javascript.d.ts +7 -0
- package/dist/packages/tutorial/src/metadata/json.d.ts +7 -0
- package/dist/packages/tutorial/src/metadata/markdown.d.ts +7 -0
- package/dist/packages/tutorial/src/metadata/registry.d.ts +26 -0
- package/dist/packages/tutorial/src/metamodel.d.ts +45 -0
- package/dist/packages/tutorial/src/tutorial.d.ts +21 -0
- package/dist/packages/tutorial/src/types.d.ts +172 -0
- package/dist/packages/tutorial/src/utils.d.ts +13 -0
- package/dist/packages/ui/src/constants.d.ts +2 -0
- package/dist/packages/ui/src/index.d.ts +42 -0
- package/dist/packages/ui/src/input/types.d.ts +9 -0
- package/dist/packages/ui/src/lib/fields.d.ts +16 -0
- package/dist/packages/ui/src/lib/form.d.ts +95 -0
- package/dist/packages/ui/src/lib/index.d.ts +6 -0
- package/dist/packages/ui/src/lib/layout.d.ts +7 -0
- package/dist/packages/ui/src/lib/nested.d.ts +48 -0
- package/dist/packages/ui/src/lib/schema.d.ts +7 -0
- package/dist/packages/ui/src/lib/select.d.ts +8 -0
- package/dist/packages/ui/src/lib/tree.d.ts +9 -0
- package/dist/packages/ui/src/types.d.ts +5 -0
- package/dist/packages/ui/src/wrappers/index.d.ts +3 -0
- package/dist/sites/learn/src/hooks.d.ts +1 -0
- package/dist/sites/learn/src/hooks.server.d.ts +2 -0
- package/dist/sites/learn/src/lib/index.d.ts +7 -0
- package/dist/sites/learn/src/lib/media.d.ts +13 -0
- package/dist/sites/learn/src/lib/paraglide/messages/en.d.ts +3 -0
- package/dist/sites/learn/src/lib/paraglide/messages/fr.d.ts +3 -0
- package/dist/sites/learn/src/lib/paraglide/messages/hi.d.ts +3 -0
- package/dist/sites/learn/src/lib/paraglide/messages.d.ts +5 -0
- package/dist/sites/learn/src/lib/paraglide/runtime.d.ts +52 -0
- package/dist/sites/learn/src/lib/stories/02-elements/01-list/03-mapping/src/data.d.ts +5 -0
- package/dist/sites/learn/src/lib/stories/02-elements/01-list/04-mixed/src/data.d.ts +13 -0
- package/dist/sites/learn/src/lib/stories/02-elements/02-tabs/04-fields/src/data.d.ts +5 -0
- package/dist/sites/learn/src/lib/stories/02-elements/02-tabs/05-using/src/data.d.ts +6 -0
- package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/01-intro/src/data.d.ts +4 -0
- package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/02-fields/src/data.d.ts +9 -0
- package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/03-using/src/data.d.ts +19 -0
- package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/04-mixed/src/data.d.ts +30 -0
- package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/props.d.ts +15 -0
- package/dist/sites/learn/src/lib/stories/02-elements/04-tree/01-intro/src/data.d.ts +12 -0
- package/dist/sites/learn/src/lib/stories/02-elements/06-select/02-fields/src/data.d.ts +5 -0
- package/dist/sites/learn/src/lib/stories/02-elements/07-multi-select/02-fields/src/data.d.ts +5 -0
- package/dist/sites/learn/src/lib/stories/02-elements/08-drop-down/02-fields/src/data.d.ts +5 -0
- package/dist/sites/learn/src/lib/stories/05-templates/01-form/02-schema/src/schema.d.ts +22 -0
- package/dist/sites/learn/src/lib/stories/05-templates/01-form/03-layout/src/layout.d.ts +19 -0
- package/dist/sites/learn/src/lib/stories/05-templates/01-form/03-layout/src/schema.d.ts +36 -0
- package/dist/sites/learn/src/lib/stories/05-templates/01-form/05-validation/src/schema.d.ts +34 -0
- package/dist/sites/learn/src/lib/stories/05-templates/02-editor/01-introduction/src/data.d.ts +39 -0
- package/dist/sites/learn/src/lib/stories/05-templates/02-editor/01-introduction/src/schema.d.ts +187 -0
- package/dist/sites/learn/src/lib/stories/06-layout/03-stepper/01-intro/src/data.d.ts +37 -0
- package/dist/sites/learn/src/lib/stories/06-layout/03-stepper/02-play/src/data.d.ts +37 -0
- package/dist/sites/learn/src/lib/stories/index.d.ts +1 -0
- package/dist/sites/learn/src/lib/theme.svelte.d.ts +70 -0
- package/dist/sites/learn/src/routes/(learn)/+layout.d.ts +12 -0
- package/dist/sites/learn/src/routes/(learn)/[segment]/[...slug]/+page.d.ts +8 -0
- package/dist/sites/learn/src/routes/+layout.d.ts +18 -0
- package/dist/sites/quick-start/src/hooks.d.ts +1 -0
- package/dist/sites/quick-start/src/hooks.server.d.ts +2 -0
- package/dist/sites/quick-start/src/lib/index.d.ts +1 -0
- package/dist/sites/quick-start/src/lib/paraglide/messages/en.d.ts +3 -0
- package/dist/sites/quick-start/src/lib/paraglide/messages/fr.d.ts +3 -0
- package/dist/sites/quick-start/src/lib/paraglide/messages/hi.d.ts +3 -0
- package/dist/sites/quick-start/src/lib/paraglide/messages.d.ts +5 -0
- package/dist/sites/quick-start/src/lib/paraglide/runtime.d.ts +52 -0
- package/dist/sites/quick-start/src/routes/+layout.d.ts +9 -0
- package/dist/string.d.ts +59 -0
- package/dist/theme.d.ts +52 -0
- package/dist/ticks.d.ts +10 -0
- package/dist/types.d.ts +245 -0
- package/dist/utils.d.ts +83 -0
- package/package.json +16 -39
- package/src/calendar.js +44 -0
- package/src/colors/index.js +19 -0
- package/src/colors/syntax.json +42 -0
- package/src/colors/tailwind.json +289 -0
- package/src/connector.js +34 -0
- package/src/constants.js +68 -94
- package/src/events.js +32 -0
- package/src/field-mapper.js +148 -0
- package/src/index.js +19 -27
- package/src/key-event-map.js +36 -0
- package/src/mapped-items.js +22 -0
- package/src/mapping.js +134 -0
- package/src/nested.js +56 -0
- package/src/string.js +97 -0
- package/src/theme.js +205 -0
- package/src/ticks.js +26 -0
- package/src/types.js +124 -0
- package/src/utils.js +191 -0
- package/LICENSE +0 -21
- package/README.md +0 -1
- package/src/Accordion.svelte +0 -80
- package/src/Alerts.svelte +0 -39
- package/src/DropDown.svelte +0 -79
- package/src/DropSearch.svelte +0 -67
- package/src/Icon.svelte +0 -15
- package/src/List-Discard.svelte +0 -48
- package/src/List.svelte +0 -65
- package/src/ListActions.svelte +0 -35
- package/src/NavTabs.svelte +0 -0
- package/src/NestedList.svelte +0 -77
- package/src/Overlay.svelte +0 -4
- package/src/PageNavigator.svelte +0 -94
- package/src/ResponsiveGrid.svelte +0 -73
- package/src/Scrollable.svelte +0 -8
- package/src/Searchable.svelte +0 -19
- package/src/Sidebar.svelte +0 -5
- package/src/Slider.svelte +0 -17
- package/src/SpinList.svelte +0 -48
- package/src/SplitPane.svelte +0 -109
- package/src/SplitView.svelte +0 -44
- package/src/Splitter.svelte +0 -95
- package/src/TabItem.svelte +0 -27
- package/src/TabItems.svelte +0 -34
- package/src/Tabs.svelte +0 -31
- package/src/Tree.svelte +0 -45
- package/src/actions/dismissable.js +0 -24
- package/src/actions/fillable.js +0 -114
- package/src/actions/hierarchy.js +0 -189
- package/src/actions/index.js +0 -7
- package/src/actions/navigable.js +0 -42
- package/src/actions/navigator.js +0 -179
- package/src/actions/pannable.js +0 -50
- package/src/actions/swipeable.js +0 -56
- package/src/actions/themeable.js +0 -23
- package/src/items/Collapsible.svelte +0 -51
- package/src/items/Connector.svelte +0 -26
- package/src/items/Link.svelte +0 -17
- package/src/items/Node.svelte +0 -52
- package/src/items/Pill.svelte +0 -19
- package/src/items/Separator.svelte +0 -1
- package/src/items/Summary.svelte +0 -27
- package/src/items/Text.svelte +0 -21
- package/src/items/index.js +0 -8
- package/src/list.js +0 -14
- package/src/mocks/Custom.svelte +0 -7
- package/src/mocks/index.js +0 -10
- package/src/stores/alerts.js +0 -3
- package/src/stores/index.js +0 -6
- package/src/stores/persist.js +0 -63
- package/src/stores/theme.js +0 -34
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the days in the month.
|
|
3
|
+
*
|
|
4
|
+
* @param {Date} value
|
|
5
|
+
* @param {Array} holidays
|
|
6
|
+
* @param {boolean} fixed
|
|
7
|
+
* @returns {import('./types').CalendarDay[]}
|
|
8
|
+
*/
|
|
9
|
+
export function getCalendarDays(value: Date, holidays?: any[], fixed?: boolean): import("./types").CalendarDay[];
|
|
10
|
+
export const weekdays: string[];
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
export const shades: number[];
|
|
2
|
+
export const defaultPalette: string[];
|
|
3
|
+
export const syntaxColors: {
|
|
4
|
+
"one-dark": {
|
|
5
|
+
dark: {
|
|
6
|
+
"--tab-size": string;
|
|
7
|
+
"--code-fill": string;
|
|
8
|
+
"--code-normal": string;
|
|
9
|
+
"--code-string": string;
|
|
10
|
+
"--code-number": string;
|
|
11
|
+
"--code-atrule": string;
|
|
12
|
+
"--code-keyword": string;
|
|
13
|
+
"--code-comment": string;
|
|
14
|
+
"--code-property": string;
|
|
15
|
+
"--code-selector": string;
|
|
16
|
+
"--code-operator": string;
|
|
17
|
+
"--code-function": string;
|
|
18
|
+
"--code-gutter-marker": string;
|
|
19
|
+
"--code-gutter-subtle": string;
|
|
20
|
+
"--code-cursor": string;
|
|
21
|
+
"--code-cursor-block": string;
|
|
22
|
+
"--code-linenumbers": string;
|
|
23
|
+
};
|
|
24
|
+
light: {
|
|
25
|
+
"--tab-size": string;
|
|
26
|
+
"--code-fill": string;
|
|
27
|
+
"--code-normal": string;
|
|
28
|
+
"--code-string": string;
|
|
29
|
+
"--code-number": string;
|
|
30
|
+
"--code-atrule": string;
|
|
31
|
+
"--code-keyword": string;
|
|
32
|
+
"--code-comment": string;
|
|
33
|
+
"--code-property": string;
|
|
34
|
+
"--code-selector": string;
|
|
35
|
+
"--code-operator": string;
|
|
36
|
+
"--code-function": string;
|
|
37
|
+
"--code-gutter-marker": string;
|
|
38
|
+
"--code-gutter-subtle": string;
|
|
39
|
+
"--code-cursor": string;
|
|
40
|
+
"--code-cursor-block": string;
|
|
41
|
+
"--code-linenumbers": string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export const defaultColors: {
|
|
46
|
+
amber: {
|
|
47
|
+
"50": string;
|
|
48
|
+
"100": string;
|
|
49
|
+
"200": string;
|
|
50
|
+
"300": string;
|
|
51
|
+
"400": string;
|
|
52
|
+
"500": string;
|
|
53
|
+
"600": string;
|
|
54
|
+
"700": string;
|
|
55
|
+
"800": string;
|
|
56
|
+
"900": string;
|
|
57
|
+
"950": string;
|
|
58
|
+
};
|
|
59
|
+
blue: {
|
|
60
|
+
"50": string;
|
|
61
|
+
"100": string;
|
|
62
|
+
"200": string;
|
|
63
|
+
"300": string;
|
|
64
|
+
"400": string;
|
|
65
|
+
"500": string;
|
|
66
|
+
"600": string;
|
|
67
|
+
"700": string;
|
|
68
|
+
"800": string;
|
|
69
|
+
"900": string;
|
|
70
|
+
"950": string;
|
|
71
|
+
};
|
|
72
|
+
cyan: {
|
|
73
|
+
"50": string;
|
|
74
|
+
"100": string;
|
|
75
|
+
"200": string;
|
|
76
|
+
"300": string;
|
|
77
|
+
"400": string;
|
|
78
|
+
"500": string;
|
|
79
|
+
"600": string;
|
|
80
|
+
"700": string;
|
|
81
|
+
"800": string;
|
|
82
|
+
"900": string;
|
|
83
|
+
"950": string;
|
|
84
|
+
};
|
|
85
|
+
emerald: {
|
|
86
|
+
"50": string;
|
|
87
|
+
"100": string;
|
|
88
|
+
"200": string;
|
|
89
|
+
"300": string;
|
|
90
|
+
"400": string;
|
|
91
|
+
"500": string;
|
|
92
|
+
"600": string;
|
|
93
|
+
"700": string;
|
|
94
|
+
"800": string;
|
|
95
|
+
"900": string;
|
|
96
|
+
"950": string;
|
|
97
|
+
};
|
|
98
|
+
fuscia: {
|
|
99
|
+
"50": string;
|
|
100
|
+
"100": string;
|
|
101
|
+
"200": string;
|
|
102
|
+
"300": string;
|
|
103
|
+
"400": string;
|
|
104
|
+
"500": string;
|
|
105
|
+
"600": string;
|
|
106
|
+
"700": string;
|
|
107
|
+
"800": string;
|
|
108
|
+
"900": string;
|
|
109
|
+
"950": string;
|
|
110
|
+
};
|
|
111
|
+
gray: {
|
|
112
|
+
"50": string;
|
|
113
|
+
"100": string;
|
|
114
|
+
"200": string;
|
|
115
|
+
"300": string;
|
|
116
|
+
"400": string;
|
|
117
|
+
"500": string;
|
|
118
|
+
"600": string;
|
|
119
|
+
"700": string;
|
|
120
|
+
"800": string;
|
|
121
|
+
"900": string;
|
|
122
|
+
"950": string;
|
|
123
|
+
};
|
|
124
|
+
green: {
|
|
125
|
+
"50": string;
|
|
126
|
+
"100": string;
|
|
127
|
+
"200": string;
|
|
128
|
+
"300": string;
|
|
129
|
+
"400": string;
|
|
130
|
+
"500": string;
|
|
131
|
+
"600": string;
|
|
132
|
+
"700": string;
|
|
133
|
+
"800": string;
|
|
134
|
+
"900": string;
|
|
135
|
+
"950": string;
|
|
136
|
+
};
|
|
137
|
+
indigo: {
|
|
138
|
+
"50": string;
|
|
139
|
+
"100": string;
|
|
140
|
+
"200": string;
|
|
141
|
+
"300": string;
|
|
142
|
+
"400": string;
|
|
143
|
+
"500": string;
|
|
144
|
+
"600": string;
|
|
145
|
+
"700": string;
|
|
146
|
+
"800": string;
|
|
147
|
+
"900": string;
|
|
148
|
+
"950": string;
|
|
149
|
+
};
|
|
150
|
+
lime: {
|
|
151
|
+
"50": string;
|
|
152
|
+
"100": string;
|
|
153
|
+
"200": string;
|
|
154
|
+
"300": string;
|
|
155
|
+
"400": string;
|
|
156
|
+
"500": string;
|
|
157
|
+
"600": string;
|
|
158
|
+
"700": string;
|
|
159
|
+
"800": string;
|
|
160
|
+
"900": string;
|
|
161
|
+
"950": string;
|
|
162
|
+
};
|
|
163
|
+
orange: {
|
|
164
|
+
"50": string;
|
|
165
|
+
"100": string;
|
|
166
|
+
"200": string;
|
|
167
|
+
"300": string;
|
|
168
|
+
"400": string;
|
|
169
|
+
"500": string;
|
|
170
|
+
"600": string;
|
|
171
|
+
"700": string;
|
|
172
|
+
"800": string;
|
|
173
|
+
"900": string;
|
|
174
|
+
"950": string;
|
|
175
|
+
};
|
|
176
|
+
pink: {
|
|
177
|
+
"50": string;
|
|
178
|
+
"100": string;
|
|
179
|
+
"200": string;
|
|
180
|
+
"300": string;
|
|
181
|
+
"400": string;
|
|
182
|
+
"500": string;
|
|
183
|
+
"600": string;
|
|
184
|
+
"700": string;
|
|
185
|
+
"800": string;
|
|
186
|
+
"900": string;
|
|
187
|
+
"950": string;
|
|
188
|
+
};
|
|
189
|
+
purple: {
|
|
190
|
+
"50": string;
|
|
191
|
+
"100": string;
|
|
192
|
+
"200": string;
|
|
193
|
+
"300": string;
|
|
194
|
+
"400": string;
|
|
195
|
+
"500": string;
|
|
196
|
+
"600": string;
|
|
197
|
+
"700": string;
|
|
198
|
+
"800": string;
|
|
199
|
+
"900": string;
|
|
200
|
+
"950": string;
|
|
201
|
+
};
|
|
202
|
+
red: {
|
|
203
|
+
"50": string;
|
|
204
|
+
"100": string;
|
|
205
|
+
"200": string;
|
|
206
|
+
"300": string;
|
|
207
|
+
"400": string;
|
|
208
|
+
"500": string;
|
|
209
|
+
"600": string;
|
|
210
|
+
"700": string;
|
|
211
|
+
"800": string;
|
|
212
|
+
"900": string;
|
|
213
|
+
"950": string;
|
|
214
|
+
};
|
|
215
|
+
rose: {
|
|
216
|
+
"50": string;
|
|
217
|
+
"100": string;
|
|
218
|
+
"200": string;
|
|
219
|
+
"300": string;
|
|
220
|
+
"400": string;
|
|
221
|
+
"500": string;
|
|
222
|
+
"600": string;
|
|
223
|
+
"700": string;
|
|
224
|
+
"800": string;
|
|
225
|
+
"900": string;
|
|
226
|
+
"950": string;
|
|
227
|
+
};
|
|
228
|
+
sky: {
|
|
229
|
+
"50": string;
|
|
230
|
+
"100": string;
|
|
231
|
+
"200": string;
|
|
232
|
+
"300": string;
|
|
233
|
+
"400": string;
|
|
234
|
+
"500": string;
|
|
235
|
+
"600": string;
|
|
236
|
+
"700": string;
|
|
237
|
+
"800": string;
|
|
238
|
+
"900": string;
|
|
239
|
+
"950": string;
|
|
240
|
+
};
|
|
241
|
+
slate: {
|
|
242
|
+
"50": string;
|
|
243
|
+
"100": string;
|
|
244
|
+
"200": string;
|
|
245
|
+
"300": string;
|
|
246
|
+
"400": string;
|
|
247
|
+
"500": string;
|
|
248
|
+
"600": string;
|
|
249
|
+
"700": string;
|
|
250
|
+
"800": string;
|
|
251
|
+
"900": string;
|
|
252
|
+
"950": string;
|
|
253
|
+
};
|
|
254
|
+
stone: {
|
|
255
|
+
"50": string;
|
|
256
|
+
"100": string;
|
|
257
|
+
"200": string;
|
|
258
|
+
"300": string;
|
|
259
|
+
"400": string;
|
|
260
|
+
"500": string;
|
|
261
|
+
"600": string;
|
|
262
|
+
"700": string;
|
|
263
|
+
"800": string;
|
|
264
|
+
"900": string;
|
|
265
|
+
"950": string;
|
|
266
|
+
};
|
|
267
|
+
teal: {
|
|
268
|
+
"50": string;
|
|
269
|
+
"100": string;
|
|
270
|
+
"200": string;
|
|
271
|
+
"300": string;
|
|
272
|
+
"400": string;
|
|
273
|
+
"500": string;
|
|
274
|
+
"600": string;
|
|
275
|
+
"700": string;
|
|
276
|
+
"800": string;
|
|
277
|
+
"900": string;
|
|
278
|
+
"950": string;
|
|
279
|
+
};
|
|
280
|
+
violet: {
|
|
281
|
+
"50": string;
|
|
282
|
+
"100": string;
|
|
283
|
+
"200": string;
|
|
284
|
+
"300": string;
|
|
285
|
+
"400": string;
|
|
286
|
+
"500": string;
|
|
287
|
+
"600": string;
|
|
288
|
+
"700": string;
|
|
289
|
+
"800": string;
|
|
290
|
+
"900": string;
|
|
291
|
+
"950": string;
|
|
292
|
+
};
|
|
293
|
+
yellow: {
|
|
294
|
+
"50": string;
|
|
295
|
+
"100": string;
|
|
296
|
+
"200": string;
|
|
297
|
+
"300": string;
|
|
298
|
+
"400": string;
|
|
299
|
+
"500": string;
|
|
300
|
+
"600": string;
|
|
301
|
+
"700": string;
|
|
302
|
+
"800": string;
|
|
303
|
+
"900": string;
|
|
304
|
+
"950": string;
|
|
305
|
+
};
|
|
306
|
+
zinc: {
|
|
307
|
+
"50": string;
|
|
308
|
+
"100": string;
|
|
309
|
+
"200": string;
|
|
310
|
+
"300": string;
|
|
311
|
+
"400": string;
|
|
312
|
+
"500": string;
|
|
313
|
+
"600": string;
|
|
314
|
+
"700": string;
|
|
315
|
+
"800": string;
|
|
316
|
+
"900": string;
|
|
317
|
+
"950": string;
|
|
318
|
+
};
|
|
319
|
+
shark: {
|
|
320
|
+
DEFAULT: string;
|
|
321
|
+
"50": string;
|
|
322
|
+
"100": string;
|
|
323
|
+
"200": string;
|
|
324
|
+
"300": string;
|
|
325
|
+
"400": string;
|
|
326
|
+
"500": string;
|
|
327
|
+
"600": string;
|
|
328
|
+
"700": string;
|
|
329
|
+
"800": string;
|
|
330
|
+
"900": string;
|
|
331
|
+
"950": string;
|
|
332
|
+
};
|
|
333
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constructs an array of line types for tree visualization
|
|
3
|
+
* @param {boolean} hasChildren - Whether the node has children
|
|
4
|
+
* @param {import('./types').LineType[]} parentTypes - Types from parent nodes
|
|
5
|
+
* @param {import('./types').LineType} position - Current position type
|
|
6
|
+
* @returns {import('./types').LineType[]} Array of line types
|
|
7
|
+
*/
|
|
8
|
+
export function getLineTypes(hasChildren?: boolean, parentTypes?: import("./types").LineType[], position?: import("./types").LineType): import("./types").LineType[];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a state icon mapping from a list of icon names
|
|
3
|
+
*
|
|
4
|
+
* @param {string[]} icons
|
|
5
|
+
* @returns {import('./types').StateIcons}
|
|
6
|
+
*/
|
|
7
|
+
export function stateIconsFromNames(icons: string[]): import("./types").StateIcons;
|
|
8
|
+
export const DATA_IMAGE_REGEX: RegExp;
|
|
9
|
+
/**
|
|
10
|
+
* @type {import('./types).FieldMapping} Fields
|
|
11
|
+
*/
|
|
12
|
+
export const defaultFields: any;
|
|
13
|
+
export const defaultIcons: string[];
|
|
14
|
+
export namespace defaultOptions {
|
|
15
|
+
let id: string;
|
|
16
|
+
let label: string;
|
|
17
|
+
let value: string;
|
|
18
|
+
let checked: string;
|
|
19
|
+
}
|
|
20
|
+
export namespace defaultKeyMap {
|
|
21
|
+
let ArrowRight: string;
|
|
22
|
+
let ArrowLeft: string;
|
|
23
|
+
let ArrowDown: string;
|
|
24
|
+
let ArrowUp: string;
|
|
25
|
+
let Enter: string;
|
|
26
|
+
let Escape: string;
|
|
27
|
+
}
|
|
28
|
+
export namespace defaultThemeMapping {
|
|
29
|
+
let neutral: string;
|
|
30
|
+
let primary: string;
|
|
31
|
+
let secondary: string;
|
|
32
|
+
let accent: string;
|
|
33
|
+
let success: string;
|
|
34
|
+
let warning: string;
|
|
35
|
+
let danger: string;
|
|
36
|
+
let error: string;
|
|
37
|
+
let info: string;
|
|
38
|
+
}
|
|
39
|
+
export const defaultStateIcons: any;
|
|
40
|
+
export { defaultColors, syntaxColors, shades, defaultPalette } from "./colors/index.js";
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an emitter object from the given properties.
|
|
3
|
+
*
|
|
4
|
+
* - Filters attributes that start with 'on' and are functions,
|
|
5
|
+
* - Returns an object with keys that are the event names (without the 'on' prefix)
|
|
6
|
+
* - If a default event is not present in the props, it will be set to a no-op function.
|
|
7
|
+
*
|
|
8
|
+
* @param {Object} props - The properties object to filter.
|
|
9
|
+
* @param {Array<string>} defaults - An array of default events.
|
|
10
|
+
* @returns {import('./types.js').EventHandlers} The emitter object.
|
|
11
|
+
*/
|
|
12
|
+
export function createEmitter(props: Object, defaults?: Array<string>): import("./types.js").EventHandlers;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export class FieldMapper {
|
|
2
|
+
constructor(fields?: any);
|
|
3
|
+
hasIcon: ((obj: unknown) => obj is {
|
|
4
|
+
[x: string]: unknown;
|
|
5
|
+
}) | undefined;
|
|
6
|
+
hasImage: ((obj: unknown) => obj is {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
}) | undefined;
|
|
9
|
+
hasText: ((obj: unknown) => obj is {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
}) | undefined;
|
|
12
|
+
hasValue: ((obj: unknown) => obj is {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
}) | undefined;
|
|
15
|
+
hasLabel: ((obj: unknown) => obj is {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
}) | undefined;
|
|
18
|
+
hasComponent: ((obj: unknown) => obj is {
|
|
19
|
+
[x: string]: unknown;
|
|
20
|
+
}) | undefined;
|
|
21
|
+
hasCurrency: ((obj: unknown) => obj is {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
}) | undefined;
|
|
24
|
+
withPrefix: ((x: any) => string) | undefined;
|
|
25
|
+
excludeFlags: (<U extends Partial<Record<any, any>>>(obj: any extends keyof U ? U : never) => any extends keyof U ? Omit<U, any> : never) | undefined;
|
|
26
|
+
getChildMapper(): null;
|
|
27
|
+
/**
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
private prop;
|
|
31
|
+
/**
|
|
32
|
+
* Gets a mapped attribute from the original item
|
|
33
|
+
*
|
|
34
|
+
* @param {string} fieldName - Name of the field to get
|
|
35
|
+
* @returns {any|null} - The attribute value or null if not found
|
|
36
|
+
*/
|
|
37
|
+
get(fieldName: string, value: any, defaultValue?: null): any | null;
|
|
38
|
+
set fields(fields: any);
|
|
39
|
+
get fields(): any;
|
|
40
|
+
getIcon(value: any): string | null;
|
|
41
|
+
getValue(value: any): any;
|
|
42
|
+
getFormattedText(value: any, formatter: any): any;
|
|
43
|
+
hasChildren(item: any): item is never;
|
|
44
|
+
isNested(items: any): boolean;
|
|
45
|
+
getChildren(item: any): never[];
|
|
46
|
+
/**
|
|
47
|
+
* Finds children by an index path
|
|
48
|
+
*
|
|
49
|
+
* @param {Array<Object>} items
|
|
50
|
+
* @param {Array<number>} path
|
|
51
|
+
* @returns {Array<Object>}
|
|
52
|
+
*/
|
|
53
|
+
getChildrenByPath(items: Array<Object>, path?: Array<number>): Array<Object>;
|
|
54
|
+
/**
|
|
55
|
+
* Finds an item by an index path
|
|
56
|
+
*
|
|
57
|
+
* @param {Array<Object>} items
|
|
58
|
+
* @param {Array<number>} path
|
|
59
|
+
* @returns {Object|null}
|
|
60
|
+
*/
|
|
61
|
+
getItemByPath(items: Array<Object>, path?: Array<number>): Object | null;
|
|
62
|
+
#private;
|
|
63
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export * from "./constants.js";
|
|
3
|
+
export * from "./utils.js";
|
|
4
|
+
export * from "./nested.js";
|
|
5
|
+
export * from "./string.js";
|
|
6
|
+
export * from "./theme.js";
|
|
7
|
+
export { FieldMapper } from "./field-mapper.js";
|
|
8
|
+
export { createEmitter } from "./events.js";
|
|
9
|
+
export { getLineTypes } from "./connector.js";
|
|
10
|
+
export { generateTicks } from "./ticks.js";
|
|
11
|
+
export { getItemAtIndex, getIndexForItem } from "./mapped-items.js";
|
|
12
|
+
export { weekdays, getCalendarDays } from "./calendar.js";
|
|
13
|
+
export { getValue, getNestedFields, hasChildren, isExpanded } from "./mapping.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class to manage key event mappings.
|
|
3
|
+
*/
|
|
4
|
+
export class KeyEventMap {
|
|
5
|
+
mapping: {};
|
|
6
|
+
/**
|
|
7
|
+
* Add a new key mapping.
|
|
8
|
+
* @param {string} eventName - The event name.
|
|
9
|
+
* @param {Array<string>|RegExp} keys - The keys to match.
|
|
10
|
+
*/
|
|
11
|
+
add(eventName: string, keys: Array<string> | RegExp): void;
|
|
12
|
+
/**
|
|
13
|
+
* Get the event name for a given key.
|
|
14
|
+
* @param {string} key - The key to match.
|
|
15
|
+
* @returns {string|null} - The event name or null if no match is found.
|
|
16
|
+
*/
|
|
17
|
+
getEventForKey(key: string): string | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get an item at a specific index
|
|
3
|
+
* @param {Array<any>} items
|
|
4
|
+
* @param {any} index
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export function getItemAtIndex(items: Array<any>, index: any): any;
|
|
8
|
+
/**
|
|
9
|
+
* Get the index for an item in an array
|
|
10
|
+
* @param {Array<any} items
|
|
11
|
+
* @param {any} item
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export function getIndexForItem(items: Array<any>, item: any): number;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the component to be used to render the item.
|
|
3
|
+
* If the component is null or undefined, it will return the default component.
|
|
4
|
+
*
|
|
5
|
+
* @param {object|string} value
|
|
6
|
+
* @param {import('./types.js').FieldMapping} fields
|
|
7
|
+
* @param {import('./types.js').ComponentMap} using
|
|
8
|
+
*/
|
|
9
|
+
export function getComponent(value: object | string, fields: import("./types.js").FieldMapping, using: import("./types.js").ComponentMap): import("svelte").SvelteComponent<Record<string, any>, any, any>;
|
|
10
|
+
/**
|
|
11
|
+
* Get the icon for the item. If the icon is an object, it will use the state to determine which icon to use.
|
|
12
|
+
*
|
|
13
|
+
* @param {object|string} value
|
|
14
|
+
* @param {import('./types.js').FieldMapping} fields
|
|
15
|
+
* @returns {string}
|
|
16
|
+
*/
|
|
17
|
+
export function getIcon(value: object | string, fields?: import("./types.js").FieldMapping): string;
|
|
18
|
+
/**
|
|
19
|
+
* Get the value for the item. If the value is an object,
|
|
20
|
+
* it will use the field mapping to determine which attribute to get.
|
|
21
|
+
*
|
|
22
|
+
* @param {*} node
|
|
23
|
+
* @param {import('./types').FieldMapping} fields
|
|
24
|
+
* @returns {*}
|
|
25
|
+
*/
|
|
26
|
+
export function getValue(node: any, fields?: import("./types").FieldMapping): any;
|
|
27
|
+
/**
|
|
28
|
+
* Get the text for the item. If the text is an object,
|
|
29
|
+
* it will use the field mapping to determine which attribute to get.
|
|
30
|
+
*
|
|
31
|
+
* @param {*} node
|
|
32
|
+
* @param {import('./types').FieldMapping} fields
|
|
33
|
+
* @returns {string}
|
|
34
|
+
*/
|
|
35
|
+
export function getText(node: any, fields?: import("./types").FieldMapping): string;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the attribute from the node
|
|
38
|
+
* @param {*} node
|
|
39
|
+
* @param {string} attr
|
|
40
|
+
* @returns {*}
|
|
41
|
+
*/
|
|
42
|
+
export function getAttribute(node: any, attr: string): any;
|
|
43
|
+
/**
|
|
44
|
+
* Get the formatted text for the item. If the text is an object, use the field mapping to determine
|
|
45
|
+
* which attribute to get currency. Use the formatter or identity function to format the text.
|
|
46
|
+
*
|
|
47
|
+
* @param {*} node
|
|
48
|
+
* @param {import('./types').FieldMapping} fields
|
|
49
|
+
* @param {Function} formatter
|
|
50
|
+
* @returns {Function}
|
|
51
|
+
*/
|
|
52
|
+
export function getFormattedText(node: any, fields?: import("./types").FieldMapping, formatter?: Function): Function;
|
|
53
|
+
/**
|
|
54
|
+
* Check if the current item is a parent
|
|
55
|
+
*
|
|
56
|
+
* @param {*} item
|
|
57
|
+
* @param {import('./types').FieldMapping} fields
|
|
58
|
+
* @returns {boolean}
|
|
59
|
+
*/
|
|
60
|
+
export function hasChildren(item: any, fields: import("./types").FieldMapping): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Check if the current item is a parent and is expanded
|
|
63
|
+
*
|
|
64
|
+
* @param {*} item
|
|
65
|
+
* @param {import('./types').FieldMapping} fields
|
|
66
|
+
* @returns {boolean}
|
|
67
|
+
*/
|
|
68
|
+
export function isExpanded(item: any, fields: import("./types").FieldMapping): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Fetches the fieldmapping for a child node
|
|
71
|
+
*
|
|
72
|
+
* @param {import('./types').FieldMapping} fields
|
|
73
|
+
* @returns {import('./types').FieldMapping}
|
|
74
|
+
*/
|
|
75
|
+
export function getNestedFields(fields: import("./types").FieldMapping): import("./types").FieldMapping;
|
package/dist/nested.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flattens a nested list of items
|
|
3
|
+
*
|
|
4
|
+
* @param {Array} items
|
|
5
|
+
* @param {import('./types).FieldMapping} fields
|
|
6
|
+
* @param {number} level
|
|
7
|
+
* @returns {Array}
|
|
8
|
+
*/
|
|
9
|
+
export function flattenNestedList(items: any[], fields?: any, level?: number): any[];
|
|
10
|
+
/**
|
|
11
|
+
* Matches a path slug to a value in the menu
|
|
12
|
+
*
|
|
13
|
+
* @param {string} slug
|
|
14
|
+
* @param {Array} data
|
|
15
|
+
* @param {import('./types').FieldMapping} fields
|
|
16
|
+
* @returns {any}
|
|
17
|
+
*/
|
|
18
|
+
export function findValueFromPath(slug: string, data: any[], fields: import("./types").FieldMapping): any;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Svelte action function for forwarding keyboard events from a parent element to a child.
|
|
3
|
+
* The child is selected using a CSS selector passed in the options object.
|
|
4
|
+
* Optionally, you can specify which keyboard events you want to forward: "keydown", "keyup", and/or "keypress".
|
|
5
|
+
* By default, all three events are forwarded.
|
|
6
|
+
*
|
|
7
|
+
* @param {HTMLElement} element - The parent element from which keyboard events will be forwarded.
|
|
8
|
+
* @param {import('./types').PushDownOptions} options - The options object.
|
|
9
|
+
* @returns {{destroy: Function}}
|
|
10
|
+
*/
|
|
11
|
+
export function delegateKeyboardEvents(element: HTMLElement, { selector, events }: import("./types").PushDownOptions): {
|
|
12
|
+
destroy: Function;
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export { keyboard } from "./keyboard.svelte.js";
|
|
3
|
+
export { pannable } from "./pannable.svelte.js";
|
|
4
|
+
export { swipeable } from "./swipeable.svelte.js";
|
|
5
|
+
export { navigator } from "./navigator.svelte.js";
|
|
6
|
+
export { themable } from "./themable.svelte.js";
|
|
7
|
+
export { skinnable } from "./skinnable.svelte.js";
|
|
8
|
+
export { dismissable } from "./dismissable.svelte.js";
|
|
9
|
+
export { navigable } from "./navigable.svelte.js";
|
|
10
|
+
export { fillable } from "./fillable.svelte.js";
|
|
11
|
+
export { delegateKeyboardEvents } from "./delegate.svelte.js";
|