@rokkit/core 1.0.0-next.121 → 1.0.0-next.122

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 (169) hide show
  1. package/dist/colors/index.d.ts +326 -252
  2. package/dist/constants.d.ts +12 -0
  3. package/dist/theme.d.ts +1141 -35
  4. package/package.json +1 -1
  5. package/src/colors/extra.json +16 -0
  6. package/src/colors/index.js +5 -2
  7. package/src/colors/tailwind.json +0 -14
  8. package/src/constants.js +50 -10
  9. package/src/theme.js +105 -150
  10. package/src/utils.js +19 -12
  11. package/dist/packages/actions/src/delegate.svelte.d.ts +0 -13
  12. package/dist/packages/actions/src/dismissable.svelte.d.ts +0 -7
  13. package/dist/packages/actions/src/fillable.svelte.d.ts +0 -8
  14. package/dist/packages/actions/src/index.d.ts +0 -11
  15. package/dist/packages/actions/src/kbd.d.ts +0 -44
  16. package/dist/packages/actions/src/keyboard.svelte.d.ts +0 -7
  17. package/dist/packages/actions/src/lib/event-manager.d.ts +0 -8
  18. package/dist/packages/actions/src/lib/index.d.ts +0 -2
  19. package/dist/packages/actions/src/lib/internal.d.ts +0 -19
  20. package/dist/packages/actions/src/navigable.svelte.d.ts +0 -8
  21. package/dist/packages/actions/src/navigator.svelte.d.ts +0 -20
  22. package/dist/packages/actions/src/pannable.svelte.d.ts +0 -6
  23. package/dist/packages/actions/src/skinnable.svelte.d.ts +0 -8
  24. package/dist/packages/actions/src/swipeable.svelte.d.ts +0 -14
  25. package/dist/packages/actions/src/themable.svelte.d.ts +0 -7
  26. package/dist/packages/actions/src/types.d.ts +0 -72
  27. package/dist/packages/actions/src/utils.d.ts +0 -18
  28. package/dist/packages/bits-ui/src/index.d.ts +0 -2
  29. package/dist/packages/bits-ui/src/reference.d.ts +0 -22
  30. package/dist/packages/bits-ui/src/tree/constants.d.ts +0 -13
  31. package/dist/packages/bits-ui/src/tree/index.d.ts +0 -7
  32. package/dist/packages/bits-ui/src/tree/types.d.ts +0 -71
  33. package/dist/packages/core/src/calendar.d.ts +0 -10
  34. package/dist/packages/core/src/colors/index.d.ts +0 -333
  35. package/dist/packages/core/src/connector.d.ts +0 -8
  36. package/dist/packages/core/src/constants.d.ts +0 -39
  37. package/dist/packages/core/src/events.d.ts +0 -12
  38. package/dist/packages/core/src/field-mapper.d.ts +0 -63
  39. package/dist/packages/core/src/index.d.ts +0 -13
  40. package/dist/packages/core/src/key-event-map.d.ts +0 -18
  41. package/dist/packages/core/src/mapped-items.d.ts +0 -14
  42. package/dist/packages/core/src/mapping.d.ts +0 -75
  43. package/dist/packages/core/src/nested.d.ts +0 -18
  44. package/dist/packages/core/src/string.d.ts +0 -59
  45. package/dist/packages/core/src/theme.d.ts +0 -52
  46. package/dist/packages/core/src/ticks.d.ts +0 -10
  47. package/dist/packages/core/src/types.d.ts +0 -245
  48. package/dist/packages/core/src/utils.d.ts +0 -70
  49. package/dist/packages/data/src/aggregators.d.ts +0 -2
  50. package/dist/packages/data/src/constants.d.ts +0 -46
  51. package/dist/packages/data/src/convert.d.ts +0 -10
  52. package/dist/packages/data/src/dataset.d.ts +0 -43
  53. package/dist/packages/data/src/filter.d.ts +0 -26
  54. package/dist/packages/data/src/formatter.d.ts +0 -10
  55. package/dist/packages/data/src/hierarchy.d.ts +0 -36
  56. package/dist/packages/data/src/index.d.ts +0 -7
  57. package/dist/packages/data/src/infer.d.ts +0 -80
  58. package/dist/packages/data/src/join.d.ts +0 -95
  59. package/dist/packages/data/src/list.d.ts +0 -121
  60. package/dist/packages/data/src/metadata.d.ts +0 -32
  61. package/dist/packages/data/src/model.d.ts +0 -29
  62. package/dist/packages/data/src/parser.d.ts +0 -31
  63. package/dist/packages/data/src/renamer.d.ts +0 -37
  64. package/dist/packages/data/src/rollup.d.ts +0 -51
  65. package/dist/packages/data/src/types.d.ts +0 -346
  66. package/dist/packages/data/src/utils.d.ts +0 -6
  67. package/dist/packages/data/src/view.d.ts +0 -35
  68. package/dist/packages/helpers/src/components/index.d.ts +0 -2
  69. package/dist/packages/helpers/src/index.d.ts +0 -1
  70. package/dist/packages/helpers/src/matchers/action.d.ts +0 -27
  71. package/dist/packages/helpers/src/matchers/array.d.ts +0 -10
  72. package/dist/packages/helpers/src/matchers/dataset.d.ts +0 -10
  73. package/dist/packages/helpers/src/matchers/event.d.ts +0 -10
  74. package/dist/packages/helpers/src/matchers/index.d.ts +0 -4
  75. package/dist/packages/helpers/src/matchers/internal.d.ts +0 -1
  76. package/dist/packages/helpers/src/mocks/animate.d.ts +0 -1
  77. package/dist/packages/helpers/src/mocks/element.d.ts +0 -60
  78. package/dist/packages/helpers/src/mocks/index.d.ts +0 -2
  79. package/dist/packages/helpers/src/mocks/match-media.d.ts +0 -30
  80. package/dist/packages/helpers/src/mocks/resize-observer.d.ts +0 -9
  81. package/dist/packages/helpers/src/simulators/index.d.ts +0 -1
  82. package/dist/packages/helpers/src/simulators/touch.d.ts +0 -40
  83. package/dist/packages/icons/src/convert.d.ts +0 -22
  84. package/dist/packages/icons/src/index.d.ts +0 -2
  85. package/dist/packages/input/src/index.d.ts +0 -18
  86. package/dist/packages/states/src/constants.d.ts +0 -27
  87. package/dist/packages/states/src/derive.svelte.d.ts +0 -22
  88. package/dist/packages/states/src/hierarchy.d.ts +0 -34
  89. package/dist/packages/states/src/index.d.ts +0 -5
  90. package/dist/packages/states/src/list-controller.svelte.d.ts +0 -70
  91. package/dist/packages/states/src/nested-controller.svelte.d.ts +0 -32
  92. package/dist/packages/states/src/proxy.svelte.d.ts +0 -43
  93. package/dist/packages/states/src/tabular.svelte.d.ts +0 -5
  94. package/dist/packages/states/src/traversal.svelte.d.ts +0 -69
  95. package/dist/packages/states/src/vibe.svelte.d.ts +0 -622
  96. package/dist/packages/themes/src/constants.d.ts +0 -6
  97. package/dist/packages/themes/src/index.d.ts +0 -2
  98. package/dist/packages/tutorial/src/assimilate.d.ts +0 -25
  99. package/dist/packages/tutorial/src/collector.d.ts +0 -46
  100. package/dist/packages/tutorial/src/files.d.ts +0 -8
  101. package/dist/packages/tutorial/src/index.d.ts +0 -2
  102. package/dist/packages/tutorial/src/metadata/base.d.ts +0 -19
  103. package/dist/packages/tutorial/src/metadata/factory.d.ts +0 -19
  104. package/dist/packages/tutorial/src/metadata/index.d.ts +0 -2
  105. package/dist/packages/tutorial/src/metadata/javascript.d.ts +0 -7
  106. package/dist/packages/tutorial/src/metadata/json.d.ts +0 -7
  107. package/dist/packages/tutorial/src/metadata/markdown.d.ts +0 -7
  108. package/dist/packages/tutorial/src/metadata/registry.d.ts +0 -26
  109. package/dist/packages/tutorial/src/metamodel.d.ts +0 -45
  110. package/dist/packages/tutorial/src/tutorial.d.ts +0 -21
  111. package/dist/packages/tutorial/src/types.d.ts +0 -172
  112. package/dist/packages/tutorial/src/utils.d.ts +0 -13
  113. package/dist/packages/ui/src/constants.d.ts +0 -2
  114. package/dist/packages/ui/src/index.d.ts +0 -42
  115. package/dist/packages/ui/src/input/types.d.ts +0 -9
  116. package/dist/packages/ui/src/lib/fields.d.ts +0 -16
  117. package/dist/packages/ui/src/lib/form.d.ts +0 -95
  118. package/dist/packages/ui/src/lib/index.d.ts +0 -6
  119. package/dist/packages/ui/src/lib/layout.d.ts +0 -7
  120. package/dist/packages/ui/src/lib/nested.d.ts +0 -48
  121. package/dist/packages/ui/src/lib/schema.d.ts +0 -7
  122. package/dist/packages/ui/src/lib/select.d.ts +0 -8
  123. package/dist/packages/ui/src/lib/tree.d.ts +0 -9
  124. package/dist/packages/ui/src/types.d.ts +0 -5
  125. package/dist/packages/ui/src/wrappers/index.d.ts +0 -3
  126. package/dist/sites/learn/src/hooks.d.ts +0 -1
  127. package/dist/sites/learn/src/hooks.server.d.ts +0 -2
  128. package/dist/sites/learn/src/lib/index.d.ts +0 -7
  129. package/dist/sites/learn/src/lib/media.d.ts +0 -13
  130. package/dist/sites/learn/src/lib/paraglide/messages/en.d.ts +0 -3
  131. package/dist/sites/learn/src/lib/paraglide/messages/fr.d.ts +0 -3
  132. package/dist/sites/learn/src/lib/paraglide/messages/hi.d.ts +0 -3
  133. package/dist/sites/learn/src/lib/paraglide/messages.d.ts +0 -5
  134. package/dist/sites/learn/src/lib/paraglide/runtime.d.ts +0 -52
  135. package/dist/sites/learn/src/lib/stories/02-elements/01-list/03-mapping/src/data.d.ts +0 -5
  136. package/dist/sites/learn/src/lib/stories/02-elements/01-list/04-mixed/src/data.d.ts +0 -13
  137. package/dist/sites/learn/src/lib/stories/02-elements/02-tabs/04-fields/src/data.d.ts +0 -5
  138. package/dist/sites/learn/src/lib/stories/02-elements/02-tabs/05-using/src/data.d.ts +0 -6
  139. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/01-intro/src/data.d.ts +0 -4
  140. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/02-fields/src/data.d.ts +0 -9
  141. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/03-using/src/data.d.ts +0 -19
  142. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/04-mixed/src/data.d.ts +0 -30
  143. package/dist/sites/learn/src/lib/stories/02-elements/03-accordion/props.d.ts +0 -15
  144. package/dist/sites/learn/src/lib/stories/02-elements/04-tree/01-intro/src/data.d.ts +0 -12
  145. package/dist/sites/learn/src/lib/stories/02-elements/06-select/02-fields/src/data.d.ts +0 -5
  146. package/dist/sites/learn/src/lib/stories/02-elements/07-multi-select/02-fields/src/data.d.ts +0 -5
  147. package/dist/sites/learn/src/lib/stories/02-elements/08-drop-down/02-fields/src/data.d.ts +0 -5
  148. package/dist/sites/learn/src/lib/stories/05-templates/01-form/02-schema/src/schema.d.ts +0 -22
  149. package/dist/sites/learn/src/lib/stories/05-templates/01-form/03-layout/src/layout.d.ts +0 -19
  150. package/dist/sites/learn/src/lib/stories/05-templates/01-form/03-layout/src/schema.d.ts +0 -36
  151. package/dist/sites/learn/src/lib/stories/05-templates/01-form/05-validation/src/schema.d.ts +0 -34
  152. package/dist/sites/learn/src/lib/stories/05-templates/02-editor/01-introduction/src/data.d.ts +0 -39
  153. package/dist/sites/learn/src/lib/stories/05-templates/02-editor/01-introduction/src/schema.d.ts +0 -187
  154. package/dist/sites/learn/src/lib/stories/06-layout/03-stepper/01-intro/src/data.d.ts +0 -37
  155. package/dist/sites/learn/src/lib/stories/06-layout/03-stepper/02-play/src/data.d.ts +0 -37
  156. package/dist/sites/learn/src/lib/stories/index.d.ts +0 -1
  157. package/dist/sites/learn/src/lib/theme.svelte.d.ts +0 -70
  158. package/dist/sites/learn/src/routes/(learn)/+layout.d.ts +0 -12
  159. package/dist/sites/learn/src/routes/(learn)/[segment]/[...slug]/+page.d.ts +0 -8
  160. package/dist/sites/learn/src/routes/+layout.d.ts +0 -18
  161. package/dist/sites/quick-start/src/hooks.d.ts +0 -1
  162. package/dist/sites/quick-start/src/hooks.server.d.ts +0 -2
  163. package/dist/sites/quick-start/src/lib/index.d.ts +0 -1
  164. package/dist/sites/quick-start/src/lib/paraglide/messages/en.d.ts +0 -3
  165. package/dist/sites/quick-start/src/lib/paraglide/messages/fr.d.ts +0 -3
  166. package/dist/sites/quick-start/src/lib/paraglide/messages/hi.d.ts +0 -3
  167. package/dist/sites/quick-start/src/lib/paraglide/messages.d.ts +0 -5
  168. package/dist/sites/quick-start/src/lib/paraglide/runtime.d.ts +0 -52
  169. package/dist/sites/quick-start/src/routes/+layout.d.ts +0 -9
@@ -1,63 +0,0 @@
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
- }
@@ -1,13 +0,0 @@
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";
@@ -1,18 +0,0 @@
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
- }
@@ -1,14 +0,0 @@
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;
@@ -1,75 +0,0 @@
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;
@@ -1,18 +0,0 @@
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;
@@ -1,59 +0,0 @@
1
- /**
2
- * Capitalizes the first letter of input string
3
- *
4
- * @param {String} str
5
- * @returns {String}
6
- */
7
- export function toInitCapCase(text: any): string;
8
- /**
9
- * Convert a hyphen separated string to PascalCase
10
- *
11
- * @param {String} text
12
- * @returns
13
- */
14
- export function toPascalCase(text: string): string;
15
- /**
16
- * Convert a PascalCase string to snake case with separator as hyphen
17
- *
18
- * @param {string} text
19
- * @returns {string}
20
- */
21
- export function toHyphenCase(text: string): string;
22
- /**
23
- * Simple comparison for two strings
24
- *
25
- * @param {String} a
26
- * @param {String} b
27
- * @returns
28
- */
29
- export function compareStrings(a: string, b: string): 1 | 0 | -1;
30
- /**
31
- * Sort by splitting hyphen separated strings while keeping strings with same number of parts together
32
- *
33
- * @param {String} a hyphen separates string
34
- * @param {String} b hyphen separates string
35
- * @param {string} separator - separator to split the string
36
- * @returns {Number} -1, 0, 1 based on comparison
37
- */
38
- export function sortByParts(a: string, b: string, separator?: string): number;
39
- /**
40
- * Generates a unique id from current timestamp
41
- *
42
- * @returns {String} timestamp based unique id
43
- */
44
- export function uniqueId(prefix?: string, separator?: string): string;
45
- /**
46
- * Removes undefined and null values from the input object.
47
- *
48
- * @param {Object} obj
49
- * @returns {Object}
50
- */
51
- export function compact(obj: Object): Object;
52
- /**
53
- * Converts an input number into it's hexadecimal representation, with optional left padded zeroes based on the `size`
54
- *
55
- * @param {number} value
56
- * @param {number} size
57
- * @returns
58
- */
59
- export function toHexString(value: number, size?: number): string;
@@ -1,52 +0,0 @@
1
- /**
2
- * Generate shades for a color using css varuable
3
- *
4
- * @param {string} name
5
- * @param {string} modifier
6
- * @returns
7
- */
8
- export function shadesOf(name: string, modifier?: string): {
9
- DEFAULT: any;
10
- base: any;
11
- inset: any;
12
- subtle: any;
13
- muted: any;
14
- raised: any;
15
- elevated: any;
16
- floating: any;
17
- contrast: any;
18
- overlay: any;
19
- };
20
- /**
21
- * Generate shades for a color using css varuable
22
- *
23
- * @param {string} name
24
- * @param {string} modifier
25
- * @returns {object}
26
- */
27
- export function stateColors(name: string, modifier?: string): object;
28
- /**
29
- *
30
- * @param {string} modifier
31
- * @returns
32
- */
33
- export function themeColors(modifier?: string): {};
34
- /**
35
- * Generates contrast colors for light and dark modes based on a given palette. Each color variant in the
36
- * palette is mapped to either a light or dark contrast color depending on the shade's value.
37
- *
38
- * @param {string} [light='#ffffff'] - The default light color used when the shade is >= 500 in light mode or <= 500 in dark mode.
39
- * @param {string} [dark='#000000'] - The default dark color used when the shade is < 500 in light mode or > 500 in dark mode.
40
- * @param {Array<string>} [palette=defaultPalette] - An array of color variant names to generate contrast colors for.
41
- * @returns {Array<Object>} An array containing contrast color rules organized by light and dark modes for each variant in the palette.
42
- */
43
- export function contrastColors(light?: string, dark?: string, palette?: Array<string>): Array<Object>;
44
- /**
45
- * Constructs and returns the light and dark theme variants based on provided color mapping and color definitions.
46
- *
47
- * @param {string} name - The base name for the theme, defaults to 'rokkit' if not provided.
48
- * @param {Object} [mapping=defaultThemeMapping] - An object mapping variant names to color property names.
49
- * @param {Object} [colors=defaultColors] - The object containing default color definitions.
50
- * @returns {Array<Array>} An array containing two arrays, one for the light theme variant and another for the dark theme.
51
- */
52
- export function themeRules(name?: string, mapping?: Object, colors?: Object): Array<any[]>;
@@ -1,10 +0,0 @@
1
- /**
2
- * Generates an array of tick marks for a range of values.
3
- *
4
- * @param {number} lowerBound - The lower bound of the range.
5
- * @param {number} upperBound - The upper bound of the range.
6
- * @param {number} [minorTickStep=upperBound-lowerBound] - The step size for minor ticks.
7
- * @param {number} [majorTickStep=1] - The step size for major ticks.
8
- * @returns {import('./types').TickMark[]>} An array of tick mark objects.
9
- */
10
- export function generateTicks(lowerBound: number, upperBound: number, minorTickStep?: number, majorTickStep?: number): import("./types").TickMark[];
@@ -1,245 +0,0 @@
1
- declare const _default: {};
2
- export default _default;
3
- export type LineType = "child" | "last" | "sibling" | "empty" | "icon";
4
- /**
5
- * An object where keys are event names and values are event handler functions.
6
- */
7
- export type EventHandlers = {
8
- [x: string]: Function;
9
- };
10
- /**
11
- * Component map to be used to render the item.
12
- */
13
- export type ComponentMap = {
14
- [x: string]: import("svelte").SvelteComponent<Record<string, any>, any, any>;
15
- };
16
- /**
17
- * Options for the sort order of the column.
18
- */
19
- export type SortOptions = "ascending" | "descending" | "none";
20
- export type SelectionState = "checked" | "unchecked" | "indeterminate";
21
- /**
22
- * Options for the horizontal alignment of the column content.
23
- */
24
- export type HorizontalAlignOptions = "left" | "middle" | "right";
25
- /**
26
- * Options for the action type of the column.
27
- */
28
- export type ActionTypes = "select" | "edit" | "delete";
29
- /**
30
- * Structure to map custom fields for rendering. This is used to identofy the attributes for various purposes.
31
- */
32
- export type FieldMapping = {
33
- /**
34
- * Unique id for the item
35
- */
36
- id?: string | undefined;
37
- /**
38
- * the text to render
39
- */
40
- text?: string | undefined;
41
- /**
42
- * the value associated with the item
43
- */
44
- value?: string | undefined;
45
- /**
46
- * a URL
47
- */
48
- url?: string | undefined;
49
- /**
50
- * icon to render
51
- */
52
- icon?: string | undefined;
53
- /**
54
- * the image to render
55
- */
56
- image?: string | undefined;
57
- /**
58
- * children of the item
59
- */
60
- children?: string | undefined;
61
- /**
62
- * summary of the item
63
- */
64
- summary?: string | undefined;
65
- /**
66
- * notes for the item
67
- */
68
- notes?: string | undefined;
69
- /**
70
- * additional properties
71
- */
72
- props?: string | undefined;
73
- /**
74
- * item is open or closed
75
- */
76
- isOpen?: string | undefined;
77
- /**
78
- * level of item
79
- */
80
- level?: string | undefined;
81
- /**
82
- * item is a parent
83
- */
84
- parent?: string | undefined;
85
- /**
86
- * {string} [isDeleted='_deleted'] item is deleted
87
- */
88
- currency?: string | undefined;
89
- /**
90
- * Field mapping to be used on children in the next level
91
- */
92
- fields?: FieldMapping | undefined;
93
- };
94
- /**
95
- * Column metadata for the table.
96
- */
97
- export type ColumnMetadata = {
98
- /**
99
- * - The name of the column.
100
- */
101
- name: string;
102
- /**
103
- * - The data type of the column (e.g., "string", "number", "date").
104
- */
105
- dataType: string;
106
- /**
107
- * - Additional attributes for the column.
108
- */
109
- fields?: FieldMapping | undefined;
110
- /**
111
- * - The number of digits for numeric values (defaults to 0).
112
- */
113
- digits?: number | undefined;
114
- /**
115
- * - A function to format the column value.
116
- */
117
- formatter: Function;
118
- /**
119
- * - Indicates if the column is virtual (true/false).
120
- */
121
- virtual?: boolean | undefined;
122
- /**
123
- * - Indicates if the column is sortable (true/false).
124
- */
125
- sortable?: boolean | undefined;
126
- /**
127
- * - The sort order of the column.
128
- */
129
- sortOrder?: SortOptions | undefined;
130
- /**
131
- * - The alignment of the column content.
132
- */
133
- align?: HorizontalAlignOptions | undefined;
134
- /**
135
- * - Action attribute for action columns.
136
- */
137
- action?: ActionTypes | undefined;
138
- };
139
- /**
140
- * Track the state of a row in the table.
141
- */
142
- export type RowState = {
143
- /**
144
- * - The index of the node in the flat list.
145
- */
146
- index: number;
147
- /**
148
- * - The depth of the node in the hierarchy.
149
- */
150
- depth: number;
151
- /**
152
- * - The value of the hierarchy node.
153
- */
154
- value?: string | undefined;
155
- /**
156
- * - Indicates whether the node is visible (true/false).
157
- */
158
- isHidden?: boolean | undefined;
159
- /**
160
- * - Indicates if this node is a parent (true/false).
161
- */
162
- isParent?: boolean | undefined;
163
- /**
164
- * - Indicates whether the node is expanded (true/false).
165
- */
166
- isExpanded?: boolean | undefined;
167
- /**
168
- * - The index of the parent node in the flat list.
169
- */
170
- parentIndex?: number | undefined;
171
- /**
172
- * - Indicates whether the node is selected (true/false/indeterminate).
173
- */
174
- selected?: SelectionState | undefined;
175
- /**
176
- * - The indices of the children in the flat list.
177
- */
178
- childred: Array<number>;
179
- };
180
- /**
181
- * Track the state of all rows in the table.
182
- */
183
- export type RowStateMap = {
184
- /**
185
- * - Flat list of hierarchy nodes.
186
- */
187
- rows: RowState[];
188
- };
189
- /**
190
- * Shade mapping for color variables
191
- */
192
- export type ShadeMapping = {
193
- /**
194
- * - the variable name to be used
195
- */
196
- key: string;
197
- /**
198
- * - the value to be used
199
- */
200
- value: string;
201
- /**
202
- * - light or dark mode
203
- */
204
- mode: string;
205
- };
206
- export type TickMark = {
207
- /**
208
- * - The value of the tick mark.
209
- */
210
- value: number;
211
- /**
212
- * - The label for the tick mark.
213
- */
214
- label: string;
215
- /**
216
- * - Indicates if the tick mark is a major tick.
217
- */
218
- major: boolean;
219
- };
220
- export type CalendarDay = {
221
- /**
222
- * - The day of the month.
223
- */
224
- day: number;
225
- /**
226
- * - indicates the offset for positioning
227
- */
228
- offset: number;
229
- /**
230
- * - Datevalue for the day.
231
- */
232
- date: date;
233
- /**
234
- * - formatted text for the day.
235
- */
236
- text: string;
237
- /**
238
- * - Indicates if the day is a holiday.
239
- */
240
- holiday: boolean;
241
- /**
242
- * - Indicates if the day is on the weekend.
243
- */
244
- weekend: boolean;
245
- };
@@ -1,70 +0,0 @@
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
- /**
10
- * A function that performs no operations.
11
- */
12
- export function noop(): void;
13
- /**
14
- * Generates a random id
15
- *
16
- * @returns {string} A random id
17
- */
18
- export function id(): string;
19
- /**
20
- * Check if a value is a json object
21
- *
22
- * @param {*} val
23
- * @returns {boolean}
24
- */
25
- export function isObject(val: any): boolean;
26
- /**
27
- * Converts the value to a string. If the value is an object, it will convert it to a JSON string.
28
- *
29
- * @param {*} value
30
- * @returns {string}
31
- */
32
- export function toString(value: any): string;
33
- /**
34
- * Generates icon shortcuts for a collection of icons
35
- *
36
- * @param {string[]} icons
37
- * @param {string} collection
38
- * @param {string} variants
39
- * @returns {Object}
40
- */
41
- export function iconShortcuts(icons: string[], collection: string, variants: string): Object;
42
- /**
43
- * Scales the path by the size
44
- *
45
- * @param {number} size
46
- * @param {string|number} x
47
- * @returns {string|number}
48
- */
49
- export function scaledPath(size: number, x: string | number): string | number;
50
- /**
51
- * Gets a key string from path
52
- * @param {string[]} path
53
- * @returns {string}
54
- */
55
- export function getKeyFromPath(path: string[]): string;
56
- /**
57
- * Gets a path array from key string
58
- * @param {string} key
59
- * @returns {string[]}
60
- */
61
- export function getPathFromKey(key: string): string[];
62
- /**
63
- * Get snippet function from an object
64
- * @param {Object} obj
65
- * @param {string} key
66
- * @param {null|Function} defaultSnippet
67
- * @returns {Function|undefined}
68
- */
69
- export function getSnippet(obj: Object, key: string, defaultSnippet?: null | Function): Function | undefined;
70
- export function importIcons(icons: Object): Object;
@@ -1,2 +0,0 @@
1
- export function counter(values: any[]): number;
2
- export function violin(values: number[]): Object;
@@ -1,46 +0,0 @@
1
- export const pickAllowedConfig: <U extends Partial<Record<"children" | "actual_flag", any>>>(obj: "children" | "actual_flag" extends keyof U ? U : never) => "children" | "actual_flag" extends keyof U ? Pick<U, keyof U & ("children" | "actual_flag")> : never;
2
- /** @type {import('./types').DataFrameConfig */
3
- export const defaultConfig: import("./types").DataFrameConfig;
4
- export namespace defaultPathOptions {
5
- let path: null;
6
- let separator: string;
7
- let currencySuffix: string;
8
- }
9
- export namespace defaultViewOptions {
10
- let expanded: boolean;
11
- let actions: never[];
12
- let language: string;
13
- let scanMode: string;
14
- }
15
- export namespace defaultActionOrder {
16
- export let select: number;
17
- export let edit: number;
18
- let _delete: number;
19
- export { _delete as delete };
20
- }
21
- /**
22
- * Returns the default properties for a column
23
- * @param {string} key - the key to use for the column
24
- * @returns {Object} the default properties for a column
25
- */
26
- export const filterOperations: {
27
- '=': (value: any, pattern: any) => boolean;
28
- '<': (value: any, pattern: any) => boolean;
29
- '>': (value: any, pattern: any) => boolean;
30
- '<=': (value: any, pattern: any) => boolean;
31
- '>=': (value: any, pattern: any) => boolean;
32
- '~*': (value: any, pattern: any) => any;
33
- '~': (value: any, pattern: any) => any;
34
- '!=': (value: any, pattern: any) => boolean;
35
- '!~*': (value: any, pattern: any) => boolean;
36
- '!~': (value: any, pattern: any) => boolean;
37
- };
38
- export namespace typeConverters {
39
- export function string(value: any): string;
40
- export function number(value: any): number;
41
- export function boolean(value: any): boolean;
42
- export function date(value: any): Date;
43
- export { identity as mixed };
44
- }
45
- export function includeAll(): boolean;
46
- import { identity } from 'ramda';