@rokkit/core 1.0.0-next.113 → 1.0.0-next.115

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 (163) 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/dist/utils.d.ts +1 -1
  161. package/package.json +2 -2
  162. package/src/constants.js +5 -4
  163. package/src/utils.js +5 -3
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Recursively get files in a folder that match the given pattern.
3
+ * @param {string} folderPath - The folder to search in.
4
+ * @param {RegExp} pattern - The pattern to match the file names.
5
+ * @param {string} [dir=''] - The current directory, used for recursion.
6
+ * @returns {Promise<Array<import('./types').FileMetadata>>} - An array of matched files.
7
+ */
8
+ export function getFiles(folderPath: string, pattern?: RegExp, dir?: string): Promise<Array<import("./types").FileMetadata>>;
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export { assimilateTutorials } from "./assimilate.js";
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Base class for reading story metadata from files
3
+ * @abstract
4
+ */
5
+ export class BaseMetadataReader {
6
+ /**
7
+ * @param {string} filePath - Path to the file containing metadata
8
+ * @throws {Error} If filePath is not provided or empty
9
+ */
10
+ constructor(filePath: string);
11
+ filePath: string;
12
+ /**
13
+ * Reads metadata from the file
14
+ * @abstract
15
+ * @returns {Promise<object>} Story metadata
16
+ * @throws {Error} If not implemented by child class
17
+ */
18
+ read(): Promise<object>;
19
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Factory for creating story metadata readers
3
+ */
4
+ export class MetadataFactory {
5
+ /**
6
+ * @param {MetadataRegistry} registry - Registry of metadata readers
7
+ * @throws {Error} If registry is not provided
8
+ */
9
+ constructor(registry: MetadataRegistry);
10
+ registry: MetadataRegistry;
11
+ /**
12
+ * Creates a metadata reader for the given file type
13
+ * @param {string} filePath - Path to the file
14
+ * @returns {import('./base.js').BaseMetadataReader} A metadata reader instance
15
+ * @throws {Error} If no reader found for file type or if filePath is not provided
16
+ */
17
+ create(filePath: string): import("./base.js").BaseMetadataReader;
18
+ }
19
+ import { MetadataRegistry } from './registry.js';
@@ -0,0 +1,2 @@
1
+ export const factory: MetadataFactory;
2
+ import { MetadataFactory } from './factory.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Reads story metadata from JavaScript files
3
+ * @extends BaseMetadataReader
4
+ */
5
+ export class JavaScriptMetadata extends BaseMetadataReader {
6
+ }
7
+ import { BaseMetadataReader } from './base.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Reads story metadata from JSON files
3
+ * @extends BaseMetadataReader
4
+ */
5
+ export class JsonMetadata extends BaseMetadataReader {
6
+ }
7
+ import { BaseMetadataReader } from './base.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Reads story metadata from Markdown files using frontmatter
3
+ * @extends BaseMetadataReader
4
+ */
5
+ export class MarkdownMetadata extends BaseMetadataReader {
6
+ }
7
+ import { BaseMetadataReader } from './base.js';
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Registry for story metadata readers
3
+ */
4
+ export class MetadataRegistry {
5
+ /**
6
+ * Register a metadata reader for a file type
7
+ * @param {string} fileType - The file type (extension)
8
+ * @param {typeof BaseMetadataReader} ReaderClass - The metadata reader class
9
+ * @throws {Error} If reader class is invalid
10
+ */
11
+ register(fileType: string, ReaderClass: typeof BaseMetadataReader): void;
12
+ /**
13
+ * Get a metadata reader for a file type
14
+ * @param {string} fileType - The file type (extension)
15
+ * @returns {typeof BaseMetadataReader|undefined} The metadata reader class or undefined if not found
16
+ */
17
+ getReader(fileType: string): typeof BaseMetadataReader | undefined;
18
+ /**
19
+ * Check if a reader exists for a file type
20
+ * @param {string} fileType - The file type (extension)
21
+ * @returns {boolean} True if a reader exists
22
+ */
23
+ hasReader(fileType: string): boolean;
24
+ #private;
25
+ }
26
+ import { BaseMetadataReader } from './base.js';
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Fetches the content of the modules.
3
+ *
4
+ * @param {Object} modules - The modules to fetch the content from.
5
+ * @returns {Promise<Array>} - The content of the modules.
6
+ */
7
+ export function fetchImports(modules: Object): Promise<any[]>;
8
+ /**
9
+ * Adds metadata to the files.
10
+ *
11
+ * @param {Array} files - The files to add metadata to.
12
+ * @returns {Array} - The files with metadata.
13
+ */
14
+ export function addPathMetadata(files: any[]): any[];
15
+ /**
16
+ * Adds metadata to the module
17
+ *
18
+ * @param {*} modules
19
+ * @param {import('./types.js').TutorialOptions} options
20
+ * @returns
21
+ */
22
+ export function addModuleMetadata(modules: any, options: import("./types.js").TutorialOptions): any;
23
+ /**
24
+ * Recursively add part and its children to the data object.
25
+ *
26
+ * @param {Object} data - The data object to add the part to.
27
+ * @param {Object} item - The item containing the part information.
28
+ * @param {number} index - The index of the part in the item's parts array.
29
+ * @returns {Object} - The updated data object.
30
+ */
31
+ export function tutorialsToNestedObject(data: Object, item: Object, index?: number): Object;
32
+ /**
33
+ * Converts an array of files to a folder hierarchy.
34
+ *
35
+ * @param {Array} files - The files to convert to a folder hierarchy.
36
+ * @returns {Object} - The folder hierarchy.
37
+ */
38
+ export function convertFilesToFolderHierarchy(tutorials: any, options: any): Object;
39
+ /**
40
+ * Extracts all thr routes from the folder hierarchy and returns them as an array.
41
+ *
42
+ * @param {Array} files - The files to convert to a folder hierarchy.
43
+ * @returns {Array<string>} - array of route paths
44
+ */
45
+ export function generateRouteEntries(input: any): Array<string>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Convert a data object to a sorted hierarchy.
3
+ * @param {Object} data - The data object to convert.
4
+ * @param {Object} [fields={}] - The fields used for creating the hierarchy.
5
+ * @returns {Array} - An array of sorted hierarchical data.
6
+ */
7
+ export function toSortedHierarchy(data: Object, fields?: Object): any[];
8
+ /**
9
+ * Get the tutorial by the given route.
10
+ * @param {Object} tutorials - The tutorials data.
11
+ * @param {Array<string>} route - The route to find the tutorial by.
12
+ * @returns {Object|null} - The found tutorial or null if not found.
13
+ */
14
+ export function findTutorial(tutorials: Object, route: Array<string>): Object | null;
15
+ /**
16
+ * Get the tutorial by the route and fetch all files under the folders specified by solutionFolder and partialFolder.
17
+ * @param {TutorialOptions} options - The options for getting the tutorial.
18
+ * @param {string} route - The route of the tutorial to get.
19
+ * @returns {Promise<Object|null>} - A promise that resolves to the tutorial with file content or null if not found.
20
+ */
21
+ export function getTutorials(options: TutorialOptions): Promise<Object | null>;
@@ -0,0 +1,172 @@
1
+ declare const _default: {};
2
+ export default _default;
3
+ export type Extractors = {
4
+ /**
5
+ * - Function to extract metadata from JavaScript files.
6
+ */
7
+ js: (arg0: string) => Promise<any>;
8
+ /**
9
+ * - Function to extract metadata from JSON files.
10
+ */
11
+ json: (arg0: string) => Promise<any>;
12
+ /**
13
+ * - Function to extract metadata from Markdown files.
14
+ */
15
+ md: (arg0: string) => Promise<any>;
16
+ };
17
+ export type StoryFile = {
18
+ file: string;
19
+ fileName: string;
20
+ folder: string;
21
+ pageNumber: string;
22
+ code?: string | undefined;
23
+ preview?: any;
24
+ notes?: any;
25
+ };
26
+ export type SampleWithCode = {
27
+ file: string;
28
+ code: string;
29
+ language: string;
30
+ };
31
+ export type StoryPage = {
32
+ files: Array<SampleWithCode>;
33
+ preview: any;
34
+ notes: any;
35
+ metadata: {
36
+ [x: string]: any;
37
+ };
38
+ };
39
+ export type ComponentStory = {
40
+ name: string;
41
+ metadata?: {
42
+ [x: string]: any;
43
+ } | undefined;
44
+ pages: Array<StoryPage>;
45
+ };
46
+ export type Stories = {
47
+ [x: string]: ComponentStory;
48
+ };
49
+ export type StoryOptions = {
50
+ /**
51
+ * - filename to render the preview component
52
+ */
53
+ preview: string;
54
+ /**
55
+ * - filename to render the notes component
56
+ */
57
+ notes: string;
58
+ /**
59
+ * - filename containing component metadata
60
+ */
61
+ metadata: string;
62
+ };
63
+ export type TutorialOptions = {
64
+ /**
65
+ * - The root folder containing tutorial files.
66
+ */
67
+ rootFolder: string;
68
+ /**
69
+ * - The optional filename for metadata, defaults to 'meta.json'.
70
+ */
71
+ metadataFilename?: string | undefined;
72
+ /**
73
+ * - The optional filename for the readme, defaults to 'README.md'.
74
+ */
75
+ readmeFilename?: string | undefined;
76
+ /**
77
+ * - The optional filename for the preview, defaults to 'App.svelte'.
78
+ */
79
+ previewFilename?: string | undefined;
80
+ /**
81
+ * - The folder containing partial example.
82
+ */
83
+ partialFolder?: string | undefined;
84
+ /**
85
+ * - The folder containing correct example.
86
+ */
87
+ solutionFolder?: string | undefined;
88
+ /**
89
+ * - The filename to write the hierarchical data.
90
+ */
91
+ tutorialMetadata?: string | undefined;
92
+ };
93
+ export type FileMetadata = {
94
+ /**
95
+ * - The name of the file.
96
+ */
97
+ name: string;
98
+ /**
99
+ * - The path to the file.
100
+ */
101
+ path: string;
102
+ /**
103
+ * - The type of file.
104
+ */
105
+ type: string;
106
+ /**
107
+ * - The content of the file.
108
+ */
109
+ content?: string | undefined;
110
+ /**
111
+ * - Contains files in sub folder if the type is 'folder'.
112
+ */
113
+ children?: FileMetadata[] | undefined;
114
+ };
115
+ export type SourceContent = {
116
+ /**
117
+ * - Svelte component for previewing the example.
118
+ */
119
+ preview: any;
120
+ /**
121
+ * - Metadata including source for the example.
122
+ */
123
+ files: Array<FileMetadata>;
124
+ };
125
+ export type TutorialMetadata = {
126
+ /**
127
+ * - The title of the tutorial.
128
+ */
129
+ title: string;
130
+ /**
131
+ * - The sequence of the tutorial.
132
+ */
133
+ sequence: number;
134
+ /**
135
+ * - Key used for identifying the tutorial.
136
+ */
137
+ key: string;
138
+ /**
139
+ * - The route to the tutorial.
140
+ */
141
+ route: string;
142
+ /**
143
+ * - The readme content as a svelte component.
144
+ */
145
+ readme: any;
146
+ /**
147
+ * - The app preview as a svelte component.
148
+ */
149
+ preview: any;
150
+ /**
151
+ * - Contains preview and source files for partial example
152
+ */
153
+ pre?: SourceContent | undefined;
154
+ /**
155
+ * - Contains preview and source files for completed example.
156
+ */
157
+ src?: SourceContent | undefined;
158
+ /**
159
+ * - Contains metadata for sub tutorials.
160
+ */
161
+ children?: TutorialMetadata[] | undefined;
162
+ };
163
+ export type TutorialData = {
164
+ /**
165
+ * - The metadata for the tutorials.
166
+ */
167
+ tutorials: Array<TutorialMetadata>;
168
+ /**
169
+ * - List of routes for the tutorials.
170
+ */
171
+ routes: Array<string>;
172
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Converts a flat array of file metadata into a nested array of file metadata.
3
+ *
4
+ * @param {Array<import('../../rokkit/packages/tutorial/src/types.js').FileMetadata>} files - Flat Array of file metadata
5
+ * @returns {Array<import('../../rokkit/packages/tutorial/src/types.js').FileMetadata>} - Nested Array of file metadata
6
+ */
7
+ export function folderHierarchy(files: Array<any>): Array<any>;
8
+ /**
9
+ * Get the sequence and key from a text string.
10
+ * @param {string} text - The text to extract the sequence and key from.
11
+ * @returns {Object|null} - An object containing the sequence and key or null if not found.
12
+ */
13
+ export function getSequenceAndKey(text: string): Object | null;
@@ -0,0 +1,2 @@
1
+ export const defaultMapping: FieldMapper;
2
+ import { FieldMapper } from '@rokkit/core';
@@ -0,0 +1,42 @@
1
+ export * from "./types.js";
2
+ export { default as Button } from "./Button.svelte";
3
+ export { default as Icon } from "./Icon.svelte";
4
+ export { default as Item } from "./Item.svelte";
5
+ export { default as Pill } from "./Pill.svelte";
6
+ export { default as ProgressBar } from "./ProgressBar.svelte";
7
+ export { default as Separator } from "./Separator.svelte";
8
+ export { default as Connector } from "./Connector.svelte";
9
+ export { default as RangeTick } from "./RangeTick.svelte";
10
+ export { default as RangeSlider } from "./RangeSlider.svelte";
11
+ export { default as Node } from "./Node.svelte";
12
+ export { default as Summary } from "./Summary.svelte";
13
+ export { default as BreadCrumbs } from "./BreadCrumbs.svelte";
14
+ export { default as Rating } from "./Rating.svelte";
15
+ export { default as RangeMinMax } from "./RangeMinMax.svelte";
16
+ export { default as Range } from "./Range.svelte";
17
+ export { default as RadioGroup } from "./RadioGroup.svelte";
18
+ export { default as CheckBox } from "./CheckBox.svelte";
19
+ export { default as Calendar } from "./Calendar.svelte";
20
+ export { default as ValidationReport } from "./ValidationReport.svelte";
21
+ export { default as ResponsiveGrid } from "./ResponsiveGrid.svelte";
22
+ export { default as Toggle } from "./Toggle.svelte";
23
+ export { default as Switch } from "./Switch.svelte";
24
+ export { default as List } from "./List.svelte";
25
+ export { default as Accordion } from "./Accordion.svelte";
26
+ export { default as Tree } from "./Tree.svelte";
27
+ export { default as Tabs } from "./Tabs.svelte";
28
+ export { default as Select } from "./Select.svelte";
29
+ export { default as MultiSelect } from "./MultiSelect.svelte";
30
+ export { default as DropDown } from "./DropDown.svelte";
31
+ export { default as Table } from "./TreeTable.svelte";
32
+ export { default as ToggleThemeMode } from "./ToggleThemeMode.svelte";
33
+ export { default as Overlay } from "./Overlay.svelte";
34
+ export { default as Message } from "./Message.svelte";
35
+ export { default as SlidingColumns } from "./SlidingColumns.svelte";
36
+ export { default as InputField } from "./input/InputField.svelte";
37
+ export { default as Form } from "./Form.svelte";
38
+ export { default as FieldLayout } from "./FieldLayout.svelte";
39
+ export { default as DataEditor } from "./DataEditor.svelte";
40
+ export { default as NestedEditor } from "./NestedEditor.svelte";
41
+ export { default as Stepper } from "./Stepper.svelte";
42
+ export { default as ProgressDots } from "./ProgressDots.svelte";
@@ -0,0 +1,9 @@
1
+ export namespace types {
2
+ export let string: any;
3
+ export let integer: any;
4
+ export { CheckBox as boolean };
5
+ export { InputSelect as enum };
6
+ export let phone: any;
7
+ }
8
+ import CheckBox from '../CheckBox.svelte';
9
+ import InputSelect from './InputSelect.svelte';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Find an attribute in a schema by path
3
+ * @param {string} scope
4
+ * @param {import('../types').DataSchema} schema
5
+ * @returns {import('../types').LayoutSchema}
6
+ * @throws {Error} Invalid path
7
+ */
8
+ export function findAttributeByPath(scope: string, schema: import("../types").DataSchema): import("../types").LayoutSchema;
9
+ /**
10
+ * Get combined schema and layout
11
+ * @param {*} data
12
+ * @param {import('../types').DataSchema} schema
13
+ * @param {import('../types').LayoutSchema} layout
14
+ * @returns {import('../types').LayoutSchema}
15
+ */
16
+ export function getSchemaWithLayout(schema: import("../types").DataSchema, layout: import("../types").LayoutSchema): import("../types").LayoutSchema;
@@ -0,0 +1,95 @@
1
+ export namespace messages {
2
+ let required: string;
3
+ let email: string;
4
+ let url: string;
5
+ let color: string;
6
+ let number: string;
7
+ let min: string;
8
+ let max: string;
9
+ let pattern: string;
10
+ let exclusiveMin: string;
11
+ let exclusiveMax: string;
12
+ let minLength: string;
13
+ let maxLength: string;
14
+ let minItems: string;
15
+ let maxItems: string;
16
+ let uniqueItems: string;
17
+ let contains: string;
18
+ let exclude: string;
19
+ let integer: string;
20
+ }
21
+ export namespace dataTypes {
22
+ export namespace integer_1 {
23
+ let editor: string;
24
+ namespace props {
25
+ let type: string;
26
+ let step: number;
27
+ }
28
+ let availableProps: string[];
29
+ }
30
+ export { integer_1 as integer };
31
+ export namespace number_1 {
32
+ let editor_1: string;
33
+ export { editor_1 as editor };
34
+ export namespace props_1 {
35
+ let type_1: string;
36
+ export { type_1 as type };
37
+ let step_1: number;
38
+ export { step_1 as step };
39
+ }
40
+ export { props_1 as props };
41
+ let availableProps_1: string[];
42
+ export { availableProps_1 as availableProps };
43
+ }
44
+ export { number_1 as number };
45
+ export namespace range {
46
+ let editor_2: string;
47
+ export { editor_2 as editor };
48
+ export namespace props_2 {
49
+ let type_2: string;
50
+ export { type_2 as type };
51
+ }
52
+ export { props_2 as props };
53
+ }
54
+ export let string: {
55
+ default: string;
56
+ text: string;
57
+ password: string;
58
+ email: string;
59
+ url: string;
60
+ tel: string;
61
+ date: string;
62
+ 'datetime-local': string;
63
+ time: string;
64
+ week: string;
65
+ month: string;
66
+ file: string;
67
+ hidden: string;
68
+ color: string;
69
+ colorpicker: string;
70
+ };
71
+ export namespace _enum {
72
+ let _default: string;
73
+ export { _default as default };
74
+ export let select: string;
75
+ export let radio: string;
76
+ }
77
+ export { _enum as enum };
78
+ export namespace boolean {
79
+ let _default_1: string;
80
+ export { _default_1 as default };
81
+ export let checkbox: string;
82
+ let _switch: string;
83
+ export { _switch as switch };
84
+ let radio_1: string;
85
+ export { radio_1 as radio };
86
+ }
87
+ export namespace array {
88
+ let _default_2: string;
89
+ export { _default_2 as default };
90
+ }
91
+ export namespace object {
92
+ let _default_3: string;
93
+ export { _default_3 as default };
94
+ }
95
+ }
@@ -0,0 +1,6 @@
1
+ export { addRootNode } from "./tree";
2
+ export { deriveSchemaFromValue } from "./schema";
3
+ export { deriveLayoutFromValue } from "./layout";
4
+ export { messages, dataTypes } from "./form";
5
+ export { getSchemaWithLayout, findAttributeByPath } from "./fields";
6
+ export { deriveNestedSchema, flattenAttributes, flattenObject, flattenElement, generateIndex, generateTreeTable } from "./nested";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Derives a layout from a given value.
3
+ * @param {any} value
4
+ * @param {string} scope
5
+ * @returns {import('../types').DataLayout}
6
+ */
7
+ export function deriveLayoutFromValue(value: any, scope?: string): import("../types").DataLayout;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Flattens an object into a flat object
3
+ *
4
+ * @param {Object} input - The object to flatten
5
+ * @param {String} scope - The scope of the object
6
+ */
7
+ export function flattenObject(input: Object, scope?: string): any;
8
+ /**
9
+ * Flattens an object into an array of key-value pairs
10
+ *
11
+ * @param {Object} input - The object to flatten
12
+ * @param {String} scope - The scope of the object
13
+ */
14
+ export function flattenAttributes(input: Object, scope?: string): {
15
+ key: string;
16
+ value: any;
17
+ type: string;
18
+ scope: string;
19
+ }[];
20
+ /**
21
+ * Derives a nested schema from an object
22
+ *
23
+ * @param {Object} input - The object to derive the schema from
24
+ * @param {String} scope - The scope of the object
25
+ * @returns {Object} The derived schema
26
+ */
27
+ export function deriveNestedSchema(input: Object, scope?: string): Object;
28
+ /**
29
+ * Flattens an element into a flat object
30
+ *
31
+ * @param {Object} element - The element to flatten
32
+ */
33
+ export function flattenElement(element: Object): any;
34
+ /**
35
+ * Generates an index array referencing the input data
36
+ *
37
+ * @param {Object} data - The flat object to index
38
+ * @param {String} key - The key to use as index
39
+ */
40
+ export function generateIndex(data: Object, key?: string): any;
41
+ /**
42
+ * Generates a tree table from the input data
43
+ *
44
+ * @param {Object} data - The data to generate the tree table from
45
+ * @param {String} key - The key to use as index
46
+ * @param {Boolean} ellipsis - Whether to truncate the value
47
+ */
48
+ export function generateTreeTable(data: Object, key?: string, ellipsis?: boolean): any;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Derives a schema from a given value.
3
+ *
4
+ * @param {any} data
5
+ * @returns {import('../types').DataSchema}
6
+ */
7
+ export function deriveSchemaFromValue(data: any): import("../types").DataSchema;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Get the optimal position for the list based on anchor and viewport dimensions.
3
+ *
4
+ * @param {HTMLElement} anchor - The anchor element to position the list relative to.
5
+ * @param {HTMLElement} viewport - The viewport element that determines the position.
6
+ * @returns {string} - A string with CSS position properties and values.
7
+ */
8
+ export function getListPosition(anchor: HTMLElement, viewport: HTMLElement): string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Adds a root node to the items array converting it into a nested tree with one root node
3
+ *
4
+ * @param {Array<Object>} items
5
+ * @param {string} root
6
+ * @param {import('@rokkit/core').FieldMapping} fields
7
+ * @returns
8
+ */
9
+ export function addRootNode(items: Array<Object>, root?: string, mapping?: import("@rokkit/core").FieldMapper): Object[];
@@ -0,0 +1,5 @@
1
+ export type NodeStateIcons = {
2
+ opened: string;
3
+ closed: string;
4
+ };
5
+ export type ConnectionType = "empty" | "last" | "child" | "sibling";
@@ -0,0 +1,3 @@
1
+ export { default as Wrapper } from "./Wrapper.svelte";
2
+ export { default as Section } from "./Section.svelte";
3
+ export { default as Category } from "./Category.svelte";
@@ -0,0 +1 @@
1
+ export const reroute: any;
@@ -0,0 +1,2 @@
1
+ /** @type {import('@sveltejs/kit').Handle} */
2
+ export const handle: import("@sveltejs/kit").Handle;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Finds an item in the menu based on the URL.
3
+ * @param {Array<any>} menu
4
+ * @param {*} url
5
+ * @returns {any}
6
+ */
7
+ export function findItemInMenu(menu: Array<any>, url: any): any;