@rokkit/core 1.0.0-next.112 → 1.0.0-next.114

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.
Files changed (162) hide show
  1. package/dist/packages/actions/src/delegate.svelte.d.ts +13 -0
  2. package/dist/packages/actions/src/dismissable.svelte.d.ts +7 -0
  3. package/dist/packages/actions/src/fillable.svelte.d.ts +8 -0
  4. package/dist/packages/actions/src/index.d.ts +11 -0
  5. package/dist/packages/actions/src/kbd.d.ts +44 -0
  6. package/dist/packages/actions/src/keyboard.svelte.d.ts +7 -0
  7. package/dist/packages/actions/src/lib/event-manager.d.ts +8 -0
  8. package/dist/packages/actions/src/lib/index.d.ts +2 -0
  9. package/dist/packages/actions/src/lib/internal.d.ts +19 -0
  10. package/dist/packages/actions/src/navigable.svelte.d.ts +8 -0
  11. package/dist/packages/actions/src/navigator.svelte.d.ts +20 -0
  12. package/dist/packages/actions/src/pannable.svelte.d.ts +6 -0
  13. package/dist/packages/actions/src/skinnable.svelte.d.ts +8 -0
  14. package/dist/packages/actions/src/swipeable.svelte.d.ts +14 -0
  15. package/dist/packages/actions/src/themable.svelte.d.ts +7 -0
  16. package/dist/packages/actions/src/types.d.ts +72 -0
  17. package/dist/packages/actions/src/utils.d.ts +18 -0
  18. package/dist/packages/bits-ui/src/index.d.ts +2 -0
  19. package/dist/packages/bits-ui/src/reference.d.ts +22 -0
  20. package/dist/packages/bits-ui/src/tree/constants.d.ts +13 -0
  21. package/dist/packages/bits-ui/src/tree/index.d.ts +7 -0
  22. package/dist/packages/bits-ui/src/tree/types.d.ts +71 -0
  23. package/dist/packages/core/src/calendar.d.ts +10 -0
  24. package/dist/packages/core/src/colors/index.d.ts +333 -0
  25. package/dist/packages/core/src/connector.d.ts +8 -0
  26. package/dist/packages/core/src/constants.d.ts +39 -0
  27. package/dist/packages/core/src/events.d.ts +12 -0
  28. package/dist/packages/core/src/field-mapper.d.ts +63 -0
  29. package/dist/packages/core/src/index.d.ts +13 -0
  30. package/dist/packages/core/src/key-event-map.d.ts +18 -0
  31. package/dist/packages/core/src/mapped-items.d.ts +14 -0
  32. package/dist/packages/core/src/mapping.d.ts +75 -0
  33. package/dist/packages/core/src/nested.d.ts +18 -0
  34. package/dist/packages/core/src/string.d.ts +59 -0
  35. package/dist/packages/core/src/theme.d.ts +52 -0
  36. package/dist/packages/core/src/ticks.d.ts +10 -0
  37. package/dist/packages/core/src/types.d.ts +245 -0
  38. package/dist/packages/core/src/utils.d.ts +70 -0
  39. package/dist/packages/data/src/aggregators.d.ts +2 -0
  40. package/dist/packages/data/src/constants.d.ts +46 -0
  41. package/dist/packages/data/src/convert.d.ts +10 -0
  42. package/dist/packages/data/src/dataset.d.ts +43 -0
  43. package/dist/packages/data/src/filter.d.ts +26 -0
  44. package/dist/packages/data/src/formatter.d.ts +10 -0
  45. package/dist/packages/data/src/hierarchy.d.ts +36 -0
  46. package/dist/packages/data/src/index.d.ts +7 -0
  47. package/dist/packages/data/src/infer.d.ts +80 -0
  48. package/dist/packages/data/src/join.d.ts +95 -0
  49. package/dist/packages/data/src/list.d.ts +121 -0
  50. package/dist/packages/data/src/metadata.d.ts +32 -0
  51. package/dist/packages/data/src/model.d.ts +29 -0
  52. package/dist/packages/data/src/parser.d.ts +31 -0
  53. package/dist/packages/data/src/renamer.d.ts +37 -0
  54. package/dist/packages/data/src/rollup.d.ts +51 -0
  55. package/dist/packages/data/src/types.d.ts +346 -0
  56. package/dist/packages/data/src/utils.d.ts +6 -0
  57. package/dist/packages/data/src/view.d.ts +35 -0
  58. package/dist/packages/helpers/src/components/index.d.ts +2 -0
  59. package/dist/packages/helpers/src/index.d.ts +1 -0
  60. package/dist/packages/helpers/src/matchers/action.d.ts +27 -0
  61. package/dist/packages/helpers/src/matchers/array.d.ts +10 -0
  62. package/dist/packages/helpers/src/matchers/dataset.d.ts +10 -0
  63. package/dist/packages/helpers/src/matchers/event.d.ts +10 -0
  64. package/dist/packages/helpers/src/matchers/index.d.ts +4 -0
  65. package/dist/packages/helpers/src/matchers/internal.d.ts +1 -0
  66. package/dist/packages/helpers/src/mocks/animate.d.ts +1 -0
  67. package/dist/packages/helpers/src/mocks/element.d.ts +60 -0
  68. package/dist/packages/helpers/src/mocks/index.d.ts +2 -0
  69. package/dist/packages/helpers/src/mocks/match-media.d.ts +30 -0
  70. package/dist/packages/helpers/src/mocks/resize-observer.d.ts +9 -0
  71. package/dist/packages/helpers/src/simulators/index.d.ts +1 -0
  72. package/dist/packages/helpers/src/simulators/touch.d.ts +40 -0
  73. package/dist/packages/icons/src/convert.d.ts +22 -0
  74. package/dist/packages/icons/src/index.d.ts +2 -0
  75. package/dist/packages/input/src/index.d.ts +18 -0
  76. package/dist/packages/states/src/constants.d.ts +27 -0
  77. package/dist/packages/states/src/derive.svelte.d.ts +22 -0
  78. package/dist/packages/states/src/hierarchy.d.ts +34 -0
  79. package/dist/packages/states/src/index.d.ts +5 -0
  80. package/dist/packages/states/src/list-controller.svelte.d.ts +70 -0
  81. package/dist/packages/states/src/nested-controller.svelte.d.ts +32 -0
  82. package/dist/packages/states/src/proxy.svelte.d.ts +43 -0
  83. package/dist/packages/states/src/tabular.svelte.d.ts +5 -0
  84. package/dist/packages/states/src/traversal.svelte.d.ts +69 -0
  85. package/dist/packages/states/src/vibe.svelte.d.ts +622 -0
  86. package/dist/packages/themes/src/constants.d.ts +6 -0
  87. package/dist/packages/themes/src/index.d.ts +2 -0
  88. package/dist/packages/tutorial/src/assimilate.d.ts +25 -0
  89. package/dist/packages/tutorial/src/collector.d.ts +46 -0
  90. package/dist/packages/tutorial/src/files.d.ts +8 -0
  91. package/dist/packages/tutorial/src/index.d.ts +2 -0
  92. package/dist/packages/tutorial/src/metadata/base.d.ts +19 -0
  93. package/dist/packages/tutorial/src/metadata/factory.d.ts +19 -0
  94. package/dist/packages/tutorial/src/metadata/index.d.ts +2 -0
  95. package/dist/packages/tutorial/src/metadata/javascript.d.ts +7 -0
  96. package/dist/packages/tutorial/src/metadata/json.d.ts +7 -0
  97. package/dist/packages/tutorial/src/metadata/markdown.d.ts +7 -0
  98. package/dist/packages/tutorial/src/metadata/registry.d.ts +26 -0
  99. package/dist/packages/tutorial/src/metamodel.d.ts +45 -0
  100. package/dist/packages/tutorial/src/tutorial.d.ts +21 -0
  101. package/dist/packages/tutorial/src/types.d.ts +172 -0
  102. package/dist/packages/tutorial/src/utils.d.ts +13 -0
  103. package/dist/packages/ui/src/constants.d.ts +2 -0
  104. package/dist/packages/ui/src/index.d.ts +42 -0
  105. package/dist/packages/ui/src/input/types.d.ts +9 -0
  106. package/dist/packages/ui/src/lib/fields.d.ts +16 -0
  107. package/dist/packages/ui/src/lib/form.d.ts +95 -0
  108. package/dist/packages/ui/src/lib/index.d.ts +6 -0
  109. package/dist/packages/ui/src/lib/layout.d.ts +7 -0
  110. package/dist/packages/ui/src/lib/nested.d.ts +48 -0
  111. package/dist/packages/ui/src/lib/schema.d.ts +7 -0
  112. package/dist/packages/ui/src/lib/select.d.ts +8 -0
  113. package/dist/packages/ui/src/lib/tree.d.ts +9 -0
  114. package/dist/packages/ui/src/types.d.ts +5 -0
  115. package/dist/packages/ui/src/wrappers/index.d.ts +3 -0
  116. package/dist/sites/learn/src/hooks.d.ts +1 -0
  117. package/dist/sites/learn/src/hooks.server.d.ts +2 -0
  118. package/dist/sites/learn/src/lib/index.d.ts +7 -0
  119. package/dist/sites/learn/src/lib/media.d.ts +13 -0
  120. package/dist/sites/learn/src/lib/paraglide/messages/en.d.ts +3 -0
  121. package/dist/sites/learn/src/lib/paraglide/messages/fr.d.ts +3 -0
  122. package/dist/sites/learn/src/lib/paraglide/messages/hi.d.ts +3 -0
  123. package/dist/sites/learn/src/lib/paraglide/messages.d.ts +5 -0
  124. package/dist/sites/learn/src/lib/paraglide/runtime.d.ts +52 -0
  125. package/dist/sites/learn/src/lib/stories/02-elements/01-list/03-mapping/src/data.d.ts +5 -0
  126. package/dist/sites/learn/src/lib/stories/02-elements/01-list/04-mixed/src/data.d.ts +13 -0
  127. package/dist/sites/learn/src/lib/stories/02-elements/02-tabs/04-fields/src/data.d.ts +5 -0
  128. package/dist/sites/learn/src/lib/stories/02-elements/02-tabs/05-using/src/data.d.ts +6 -0
  129. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/01-intro/src/data.d.ts +4 -0
  130. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/02-fields/src/data.d.ts +9 -0
  131. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/03-using/src/data.d.ts +19 -0
  132. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/04-mixed/src/data.d.ts +30 -0
  133. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/props.d.ts +15 -0
  134. package/dist/sites/learn/src/lib/stories/02-elements/04-tree/01-intro/src/data.d.ts +12 -0
  135. package/dist/sites/learn/src/lib/stories/02-elements/06-select/02-fields/src/data.d.ts +5 -0
  136. package/dist/sites/learn/src/lib/stories/02-elements/07-multi-select/02-fields/src/data.d.ts +5 -0
  137. package/dist/sites/learn/src/lib/stories/02-elements/08-drop-down/02-fields/src/data.d.ts +5 -0
  138. package/dist/sites/learn/src/lib/stories/05-templates/01-form/02-schema/src/schema.d.ts +22 -0
  139. package/dist/sites/learn/src/lib/stories/05-templates/01-form/03-layout/src/layout.d.ts +19 -0
  140. package/dist/sites/learn/src/lib/stories/05-templates/01-form/03-layout/src/schema.d.ts +36 -0
  141. package/dist/sites/learn/src/lib/stories/05-templates/01-form/05-validation/src/schema.d.ts +34 -0
  142. package/dist/sites/learn/src/lib/stories/05-templates/02-editor/01-introduction/src/data.d.ts +39 -0
  143. package/dist/sites/learn/src/lib/stories/05-templates/02-editor/01-introduction/src/schema.d.ts +187 -0
  144. package/dist/sites/learn/src/lib/stories/06-layout/03-stepper/01-intro/src/data.d.ts +37 -0
  145. package/dist/sites/learn/src/lib/stories/06-layout/03-stepper/02-play/src/data.d.ts +37 -0
  146. package/dist/sites/learn/src/lib/stories/index.d.ts +1 -0
  147. package/dist/sites/learn/src/lib/theme.svelte.d.ts +70 -0
  148. package/dist/sites/learn/src/routes/(learn)/+layout.d.ts +12 -0
  149. package/dist/sites/learn/src/routes/(learn)/[segment]/[...slug]/+page.d.ts +8 -0
  150. package/dist/sites/learn/src/routes/+layout.d.ts +18 -0
  151. package/dist/sites/quick-start/src/hooks.d.ts +1 -0
  152. package/dist/sites/quick-start/src/hooks.server.d.ts +2 -0
  153. package/dist/sites/quick-start/src/lib/index.d.ts +1 -0
  154. package/dist/sites/quick-start/src/lib/paraglide/messages/en.d.ts +3 -0
  155. package/dist/sites/quick-start/src/lib/paraglide/messages/fr.d.ts +3 -0
  156. package/dist/sites/quick-start/src/lib/paraglide/messages/hi.d.ts +3 -0
  157. package/dist/sites/quick-start/src/lib/paraglide/messages.d.ts +5 -0
  158. package/dist/sites/quick-start/src/lib/paraglide/runtime.d.ts +52 -0
  159. package/dist/sites/quick-start/src/routes/+layout.d.ts +9 -0
  160. package/package.json +2 -2
  161. package/src/constants.js +5 -4
  162. package/src/utils.js +2 -2
@@ -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,7 @@
1
+ /**
2
+ * A svelte action function that captures clicks outside the element or escape keypress
3
+ * emits a `dismiss` event. This is useful for closing a modal or dropdown.
4
+ *
5
+ * @param {HTMLElement} node
6
+ */
7
+ export function dismissable(node: HTMLElement): void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Action for filling a <del>?</del> element in html block.
3
+ *
4
+ * @param {HTMLElement} node
5
+ * @param {import('./types').FillOptions} options
6
+ * @returns
7
+ */
8
+ export function fillable(node: HTMLElement, data: any): void;
@@ -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";
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Gets keyboard action handlers based on orientation and direction
3
+ * @param {Object} options - Configuration options
4
+ * @param {Object} handlers - Event handler functions
5
+ * @returns {Object} Object mapping key presses to handler functions
6
+ */
7
+ export function getKeyboardActions(options: Object, handlers: Object): Object;
8
+ /**
9
+ * Creates a keyboard action mapping based on navigation options
10
+ *
11
+ * @param {Object} options - Navigation options
12
+ * @param {string} options.orientation - Whether navigation is horizontal or vertical
13
+ * @param {string} options.dir - Text direction ('ltr' or 'rtl')
14
+ * @param {boolean} options.nested - Whether navigation is nested
15
+ * @returns {Object} Mapping of keys to actions
16
+ */
17
+ export function createKeyboardActionMap(options: {
18
+ orientation: string;
19
+ dir: string;
20
+ nested: boolean;
21
+ }): Object;
22
+ /**
23
+ * Creates a keyboard action mapping for modifier keys based on navigation options
24
+ *
25
+ * @param {Object} options - Navigation options
26
+ * @param {string} options.orientation - Whether navigation is horizontal or vertical
27
+ * @returns {Object} Mapping of keys to actions
28
+ */
29
+ export function createModifierKeyboardActionMap(options: {
30
+ orientation: string;
31
+ }): Object;
32
+ /**
33
+ * Gets the keyboard action for a key event
34
+ * @param {KeyboardEvent} event - The keyboard event
35
+ * @param {Object} options - Configuration options
36
+ * @returns {string|null} The action to perform, or null if no action is defined
37
+ */
38
+ export function getKeyboardAction(event: KeyboardEvent, options?: Object): string | null;
39
+ export namespace defaultNavigationOptions {
40
+ let orientation: string;
41
+ let dir: string;
42
+ let nested: boolean;
43
+ let enabled: boolean;
44
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Handle keyboard events
3
+ *
4
+ * @param {HTMLElement} root
5
+ * @param {import('./types.js').KeyboardConfig} options - Custom key mappings
6
+ */
7
+ export function keyboard(root: HTMLElement, options?: import("./types.js").KeyboardConfig): void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * EventManager class to manage event listeners on an element.
3
+ *
4
+ * @param {HTMLElement} element - The element to listen for events on.
5
+ * @param {Object} handlers - An object with event names as keys and event handlers as values.
6
+ * @returns {Object} - An object with methods to activate, reset, and update the event listeners.
7
+ */
8
+ export function EventManager(element: HTMLElement, handlers?: Object, enabled?: boolean): Object;
@@ -0,0 +1,2 @@
1
+ export * from "./internal";
2
+ export { EventManager } from "./event-manager";
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Sets up event handlers based on the given options.
3
+ * Returns whether or not the event handlers are listening.
4
+ *
5
+ * @param {HTMLElement} element
6
+ * @param {import('../types').EventHandlers} listeners
7
+ * @param {import('../types').TraversableOptions} options
8
+ * @returns {void}
9
+ */
10
+ export function setupListeners(element: HTMLElement, listeners: import("../types").EventHandlers, options: import("../types").TraversableOptions): void;
11
+ /**
12
+ * Removes event handlers based on the given options.
13
+ * Returns whether or not the event handlers are listening.
14
+ *
15
+ * @param {HTMLElement} element
16
+ * @param {import('../types').EventHandlers} listeners
17
+ * @returns {void}
18
+ */
19
+ export function removeListeners(element: HTMLElement, listeners: import("../types").EventHandlers): void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A svelte action function that captures keyboard evvents and emits event for corresponding movements.
3
+ *
4
+ * @param {HTMLElement} node
5
+ * @param {import('./types').NavigableOptions} options
6
+ * @returns {import('./types').SvelteActionReturn}
7
+ */
8
+ export function navigable(node: HTMLElement, options: import("./types").NavigableOptions): import("./types").SvelteActionReturn;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The last only indicates that if there is an array only the last event is fired.
3
+ * This is crucial because a click event needs to fire both move and select,
4
+ * however the keyboard should only fire the select event because we are already
5
+ * on the current item
6
+ *
7
+ * @param {HTMLElement} root
8
+ * @param {*} controller
9
+ * @param {*} name
10
+ */
11
+ export function emitAction(root: HTMLElement, controller: any, name: any, lastOnly?: boolean): void;
12
+ export function handleAction(event: any, handler: any, path: any): any;
13
+ /**
14
+ * A svelte action function that captures keyboard evvents and emits event for corresponding movements.
15
+ *
16
+ * @param {HTMLElement} node
17
+ * @param {import('./types').NavigableOptions} options
18
+ * @returns {import('./types').SvelteActionReturn}
19
+ */
20
+ export function navigator(node: HTMLElement, options: import("./types").NavigableOptions): import("./types").SvelteActionReturn;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Makes an element pannable with mouse or touch events.
3
+ *
4
+ * @param {HTMLElement} node The DOM element to apply the panning action.
5
+ */
6
+ export function pannable(node: HTMLElement): void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Applies theme variables to an element
3
+ * @param {HTMLElement} node - Element to apply variables to
4
+ * @param {Object.<string, string>} variables - CSS variables and their values
5
+ */
6
+ export function skinnable(node: HTMLElement, variables: {
7
+ [x: string]: string;
8
+ }): void;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A svelte action function that captures swipe actions and emits event for corresponding movements.
3
+ *
4
+ * @param {HTMLElement} node
5
+ * @param {import(./types).SwipeableOptions} options
6
+ * @returns {import('./types').SvelteActionReturn}
7
+ */
8
+ export function swipeable(node: HTMLElement, options?: {
9
+ horizontal: boolean;
10
+ vertical: boolean;
11
+ threshold: number;
12
+ enabled: boolean;
13
+ minSpeed: number;
14
+ }): import("./types").SvelteActionReturn;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Update the theme attributes when the state changes.
3
+ *
4
+ * @param {HTMLElement} root
5
+ * @param {import('./types.js').ThemableConfig} options - Custom key mappings
6
+ */
7
+ export function themable(root: HTMLElement, options: import("./types.js").ThemableConfig): void;
@@ -0,0 +1,72 @@
1
+ export type EventMapping = {
2
+ /**
3
+ * - The event name
4
+ */
5
+ event: string;
6
+ /**
7
+ * - The keys that trigger the event
8
+ */
9
+ keys?: string[] | undefined;
10
+ /**
11
+ * - The pattern that triggers the event
12
+ */
13
+ pattern?: RegExp | undefined;
14
+ };
15
+ export type KeyboardConfig = {
16
+ [x: string]: RegExp | string[];
17
+ };
18
+ export type Direction = "vertical" | "horizontal";
19
+ export type NavigatorOptions = {
20
+ /**
21
+ * - Whether the navigator is enabled
22
+ */
23
+ enabled: boolean;
24
+ /**
25
+ * - Whether the navigator is vertical or horizontal
26
+ */
27
+ direction: Direction;
28
+ /**
29
+ * - Whether the navigator supports multiple selections
30
+ */
31
+ multiselect: boolean;
32
+ };
33
+ export type DataWrapper = {
34
+ moveNext: Function;
35
+ movePrev: Function;
36
+ moveFirst: Function;
37
+ moveLast: Function;
38
+ expand: Function;
39
+ collapse: Function;
40
+ select: Function;
41
+ toggleExpansion: Function;
42
+ };
43
+ export type NavigatorActions = {
44
+ next: Function;
45
+ prev: Function;
46
+ first: Function;
47
+ last: Function;
48
+ expand: Function;
49
+ collapse: Function;
50
+ select: Function;
51
+ };
52
+ export type NavigatorConfig = {
53
+ /**
54
+ * - Whether the navigator is enabled
55
+ */
56
+ wrapper: Navigator;
57
+ /**
58
+ * - Whether the navigator is vertical or horizontal
59
+ */
60
+ options: NavigatorOptions;
61
+ };
62
+ export type Controller = {
63
+ moveNext: Function;
64
+ movePrev: Function;
65
+ moveFirst: Function;
66
+ moveLast: Function;
67
+ expand?: Function | undefined;
68
+ collapse?: Function | undefined;
69
+ select: Function;
70
+ extendSelection: Function;
71
+ toggleExpansion?: Function | undefined;
72
+ };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Finds the closest ancestor of the given element that has the given attribute.
3
+ *
4
+ * @param {HTMLElement} element
5
+ * @param {string} attribute
6
+ * @returns {HTMLElement|null}
7
+ */
8
+ export function getClosestAncestorWithAttribute(element: HTMLElement, attribute: string): HTMLElement | null;
9
+ export function handleAction(actions: any, event: any): void;
10
+ /**
11
+ * Finds and returns an index path based on data-path attribute
12
+ *
13
+ * @param {MouseEvent} event
14
+ * @returns {number[]|null} null or index path array
15
+ */
16
+ export function getPathFromEvent(event: MouseEvent): number[] | null;
17
+ export function getEventForKey(keyMapping: import("./types.js").KeyboardConfig, key: string): string | null;
18
+ export function getClickAction(event: MouseEvent): string;
@@ -0,0 +1,2 @@
1
+ export { default as List } from "./List.svelte";
2
+ export { default as GroupedList } from "./GroupedList.svelte";
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Gets the documentation path for a specific component
3
+ * @param {string} component - The component name
4
+ * @returns {string} The path to the documentation
5
+ */
6
+ export function getDocPath(component: string): string;
7
+ /**
8
+ * Gets the documentation URL for a specific component
9
+ * @param {string} component - The component name
10
+ * @returns {string} The URL to the documentation
11
+ */
12
+ export function getDocUrl(component: string): string;
13
+ export namespace DOCS {
14
+ let main: string;
15
+ let list: string;
16
+ namespace urls {
17
+ let main_1: string;
18
+ export { main_1 as main };
19
+ let list_1: string;
20
+ export { list_1 as list };
21
+ }
22
+ }
@@ -0,0 +1,13 @@
1
+ export const TREE_ROOT_ATTR: "data-tree-root";
2
+ export const TREE_LOADING_ATTR: "data-tree-loading";
3
+ export const TREE_EMPTY_ATTR: "data-tree-empty";
4
+ export const TREE_VIEWPORT_ATTR: "data-tree-viewport";
5
+ export const TREE_LIST_ATTR: "data-tree-list";
6
+ export const TREE_ITEM_ATTR: "data-tree-item";
7
+ export const TREE_VALUE_ATTR: "data-value";
8
+ export const TREE_LINE_ATTR: "data-tree-line";
9
+ export const TREE_LINE_TYPE_ATTR: "data-tree-line-type";
10
+ export const TREE_PATH_ATTR: "data-path";
11
+ export const TREE_CTX: unique symbol;
12
+ export const TREE_LINE_TYPES: string[];
13
+ export const TREE_LINE_EMPTY: "empty";
@@ -0,0 +1,7 @@
1
+ export { default as Root } from "./Root.svelte";
2
+ export { default as Viewport } from "./Viewport.svelte";
3
+ export { default as Node } from "./Node.svelte";
4
+ export { default as NodeList } from "./NodeList.svelte";
5
+ export { default as Line } from "./Line.svelte";
6
+ export { default as Empty } from "./Empty.svelte";
7
+ export { default as Loading } from "./Loading.svelte";
@@ -0,0 +1,71 @@
1
+ export type TreeLineType = "empty" | "last" | "child" | "sibling";
2
+ export type NodeStateIcons = {
3
+ /**
4
+ * - Icon for expanded state
5
+ */
6
+ expanded?: import("svelte").ComponentType<import("svelte").SvelteComponent<Record<string, any>, any, any>> | undefined;
7
+ /**
8
+ * - Icon for collapsed state
9
+ */
10
+ collapsed?: import("svelte").ComponentType<import("svelte").SvelteComponent<Record<string, any>, any, any>> | undefined;
11
+ /**
12
+ * - Icon for selected state
13
+ */
14
+ selected?: import("svelte").ComponentType<import("svelte").SvelteComponent<Record<string, any>, any, any>> | undefined;
15
+ /**
16
+ * - Icon for loading state
17
+ */
18
+ loading?: import("svelte").ComponentType<import("svelte").SvelteComponent<Record<string, any>, any, any>> | undefined;
19
+ };
20
+ export type TreeContext = {
21
+ /**
22
+ * - Tree controller
23
+ */
24
+ controller: import("@rokkit/states").NestedController;
25
+ /**
26
+ * - Tree items
27
+ */
28
+ items: Array<any>;
29
+ /**
30
+ * - Selected value
31
+ */
32
+ value: any;
33
+ /**
34
+ * - Field mappings
35
+ */
36
+ fields: import("@rokkit/core").FieldMapping;
37
+ /**
38
+ * - Icons for different node states
39
+ */
40
+ icons: NodeStateIcons;
41
+ };
42
+ export type TreeNodeEvent = {
43
+ /**
44
+ * - The node item
45
+ */
46
+ item: any;
47
+ /**
48
+ * - The node value
49
+ */
50
+ value: any;
51
+ };
52
+ export type TreeToggleEvent = {
53
+ /**
54
+ * - The node item
55
+ */
56
+ item: any;
57
+ /**
58
+ * - Whether the node is expanded
59
+ */
60
+ expanded: boolean;
61
+ };
62
+ export type TreeMoveEvent = {
63
+ /**
64
+ * - The node item
65
+ */
66
+ item: any;
67
+ /**
68
+ * - Move direction
69
+ */
70
+ direction: string;
71
+ };
@@ -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[];