slexkit 0.2.0

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 (221) hide show
  1. package/AGENTS.slexkit.md +29 -0
  2. package/CHANGELOG.md +90 -0
  3. package/LICENSE +21 -0
  4. package/README.md +165 -0
  5. package/README.zh-CN.md +165 -0
  6. package/dist/ai/llms-authoring.txt +44 -0
  7. package/dist/ai/llms-components.txt +669 -0
  8. package/dist/ai/llms-full.txt +6586 -0
  9. package/dist/ai/llms-runtime.txt +1475 -0
  10. package/dist/ai/llms-toolhost.txt +295 -0
  11. package/dist/ai/llms.txt +69 -0
  12. package/dist/ai/slexkit-ai-manifest.json +2922 -0
  13. package/dist/base.css +621 -0
  14. package/dist/chunks/accordion-5f0nvjjm.js +376 -0
  15. package/dist/chunks/accordion-830dw78f.js +221 -0
  16. package/dist/chunks/accordion-cfjyxw93.js +630 -0
  17. package/dist/chunks/accordion-cw5r75jm.js +424 -0
  18. package/dist/chunks/accordion-ehnhpeca.js +492 -0
  19. package/dist/chunks/accordion-hzyrngd6.js +2377 -0
  20. package/dist/chunks/accordion-nw12ytps.js +6823 -0
  21. package/dist/components/accordion.js +163 -0
  22. package/dist/components/badge.js +80 -0
  23. package/dist/components/button.css +114 -0
  24. package/dist/components/button.js +16 -0
  25. package/dist/components/callout.js +154 -0
  26. package/dist/components/card.js +95 -0
  27. package/dist/components/checkbox.js +114 -0
  28. package/dist/components/choice.css +165 -0
  29. package/dist/components/code-block.js +264 -0
  30. package/dist/components/collapsible.js +111 -0
  31. package/dist/components/column.js +49 -0
  32. package/dist/components/content.css +474 -0
  33. package/dist/components/disclosure.css +162 -0
  34. package/dist/components/display.css +259 -0
  35. package/dist/components/divider.js +98 -0
  36. package/dist/components/feedback.css +219 -0
  37. package/dist/components/grid.js +67 -0
  38. package/dist/components/index.js +13364 -0
  39. package/dist/components/input.css +1247 -0
  40. package/dist/components/input.js +384 -0
  41. package/dist/components/link.js +77 -0
  42. package/dist/components/progress.js +111 -0
  43. package/dist/components/radio-group.js +189 -0
  44. package/dist/components/row.js +200 -0
  45. package/dist/components/section.js +161 -0
  46. package/dist/components/select.css +260 -0
  47. package/dist/components/select.js +16 -0
  48. package/dist/components/slider.css +125 -0
  49. package/dist/components/slider.js +175 -0
  50. package/dist/components/specs.js +1090 -0
  51. package/dist/components/stat.js +178 -0
  52. package/dist/components/submit.css +9 -0
  53. package/dist/components/submit.js +77 -0
  54. package/dist/components/switch.css +114 -0
  55. package/dist/components/switch.js +114 -0
  56. package/dist/components/table.js +157 -0
  57. package/dist/components/tabs.css +192 -0
  58. package/dist/components/tabs.js +17 -0
  59. package/dist/components/text-input.css +245 -0
  60. package/dist/components/text.js +50 -0
  61. package/dist/components/toast.js +240 -0
  62. package/dist/components/tooling.css +1009 -0
  63. package/dist/components/tooling.js +48951 -0
  64. package/dist/runtime.cjs +3728 -0
  65. package/dist/runtime.js +3686 -0
  66. package/dist/slexkit.cjs +18539 -0
  67. package/dist/slexkit.css +4776 -0
  68. package/dist/slexkit.js +18497 -0
  69. package/dist/tooling.js +59141 -0
  70. package/dist/types/components/accordion.d.ts +2 -0
  71. package/dist/types/components/badge.d.ts +2 -0
  72. package/dist/types/components/button.d.ts +2 -0
  73. package/dist/types/components/callout.d.ts +2 -0
  74. package/dist/types/components/card.d.ts +2 -0
  75. package/dist/types/components/checkbox.d.ts +2 -0
  76. package/dist/types/components/code-block.d.ts +2 -0
  77. package/dist/types/components/collapsible.d.ts +2 -0
  78. package/dist/types/components/column.d.ts +2 -0
  79. package/dist/types/components/divider.d.ts +2 -0
  80. package/dist/types/components/entries/accordion.d.ts +3 -0
  81. package/dist/types/components/entries/badge.d.ts +3 -0
  82. package/dist/types/components/entries/button.d.ts +3 -0
  83. package/dist/types/components/entries/callout.d.ts +3 -0
  84. package/dist/types/components/entries/card.d.ts +3 -0
  85. package/dist/types/components/entries/checkbox.d.ts +3 -0
  86. package/dist/types/components/entries/code-block.d.ts +3 -0
  87. package/dist/types/components/entries/collapsible.d.ts +3 -0
  88. package/dist/types/components/entries/column.d.ts +3 -0
  89. package/dist/types/components/entries/divider.d.ts +3 -0
  90. package/dist/types/components/entries/grid.d.ts +3 -0
  91. package/dist/types/components/entries/input.d.ts +3 -0
  92. package/dist/types/components/entries/link.d.ts +3 -0
  93. package/dist/types/components/entries/progress.d.ts +3 -0
  94. package/dist/types/components/entries/radio-group.d.ts +3 -0
  95. package/dist/types/components/entries/row.d.ts +3 -0
  96. package/dist/types/components/entries/section.d.ts +3 -0
  97. package/dist/types/components/entries/select.d.ts +3 -0
  98. package/dist/types/components/entries/slider.d.ts +3 -0
  99. package/dist/types/components/entries/specs.d.ts +1 -0
  100. package/dist/types/components/entries/stat.d.ts +3 -0
  101. package/dist/types/components/entries/submit.d.ts +3 -0
  102. package/dist/types/components/entries/switch.d.ts +3 -0
  103. package/dist/types/components/entries/table.d.ts +3 -0
  104. package/dist/types/components/entries/tabs.d.ts +3 -0
  105. package/dist/types/components/entries/text.d.ts +3 -0
  106. package/dist/types/components/entries/toast.d.ts +3 -0
  107. package/dist/types/components/entries/tooling.d.ts +1 -0
  108. package/dist/types/components/grid.d.ts +2 -0
  109. package/dist/types/components/index.d.ts +6 -0
  110. package/dist/types/components/input.d.ts +2 -0
  111. package/dist/types/components/link.d.ts +2 -0
  112. package/dist/types/components/progress.d.ts +2 -0
  113. package/dist/types/components/radio-group.d.ts +2 -0
  114. package/dist/types/components/row.d.ts +2 -0
  115. package/dist/types/components/section.d.ts +2 -0
  116. package/dist/types/components/select.d.ts +2 -0
  117. package/dist/types/components/slider.d.ts +2 -0
  118. package/dist/types/components/spec-helpers.d.ts +23 -0
  119. package/dist/types/components/spec-registry.d.ts +12 -0
  120. package/dist/types/components/spec-schema.d.ts +74 -0
  121. package/dist/types/components/specs.d.ts +2 -0
  122. package/dist/types/components/stat.d.ts +2 -0
  123. package/dist/types/components/submit.d.ts +2 -0
  124. package/dist/types/components/svelte/adapter.d.ts +3 -0
  125. package/dist/types/components/svelte/bindProps.d.ts +2 -0
  126. package/dist/types/components/svelte/helpers.d.ts +33 -0
  127. package/dist/types/components/svelte/layout/balancedTiles.d.ts +14 -0
  128. package/dist/types/components/svelte/types.d.ts +12 -0
  129. package/dist/types/components/switch.d.ts +2 -0
  130. package/dist/types/components/table.d.ts +2 -0
  131. package/dist/types/components/tabs.d.ts +2 -0
  132. package/dist/types/components/text.d.ts +2 -0
  133. package/dist/types/components/toast.d.ts +2 -0
  134. package/dist/types/components/tooling.d.ts +2 -0
  135. package/dist/types/components-svelte.d.ts +5 -0
  136. package/dist/types/engine/component-scope.d.ts +14 -0
  137. package/dist/types/engine/component-state.d.ts +9 -0
  138. package/dist/types/engine/diagnostics.d.ts +24 -0
  139. package/dist/types/engine/engineering.d.ts +11 -0
  140. package/dist/types/engine/eval.d.ts +5 -0
  141. package/dist/types/engine/index.d.ts +26 -0
  142. package/dist/types/engine/markdown-runtime.d.ts +33 -0
  143. package/dist/types/engine/merge.d.ts +1 -0
  144. package/dist/types/engine/reactive.d.ts +11 -0
  145. package/dist/types/engine/registry.d.ts +4 -0
  146. package/dist/types/engine/renderer.d.ts +6 -0
  147. package/dist/types/engine/sandbox-runner.d.ts +2 -0
  148. package/dist/types/engine/secure-runtime.d.ts +214 -0
  149. package/dist/types/engine/store.d.ts +12 -0
  150. package/dist/types/engine/types.d.ts +58 -0
  151. package/dist/types/icons/manager.d.ts +17 -0
  152. package/dist/types/icons/phosphor.d.ts +45 -0
  153. package/dist/types/index.d.ts +61 -0
  154. package/dist/types/runtime.d.ts +32 -0
  155. package/dist/types/toolhost/index.d.ts +78 -0
  156. package/dist/types/tooling-umd.d.ts +47 -0
  157. package/dist/types/version.d.ts +8 -0
  158. package/dist/umd/slexkit.tooling.umd.js +66553 -0
  159. package/dist/umd/slexkit.umd.js +18552 -0
  160. package/package.json +136 -0
  161. package/scripts/cli.mjs +47 -0
  162. package/skills/slexkit/SKILL.md +27 -0
  163. package/skills/slexkit-author/SKILL.md +50 -0
  164. package/skills/slexkit-host-integration/SKILL.md +33 -0
  165. package/skills/slexkit-secure-runtime/SKILL.md +31 -0
  166. package/skills/slexkit-toolhost/SKILL.md +38 -0
  167. package/skills/slexkit-update/SKILL.md +23 -0
  168. package/src/components/svelte/InlineIcon.svelte +66 -0
  169. package/src/components/svelte/adapter.ts +76 -0
  170. package/src/components/svelte/bindProps.ts +9 -0
  171. package/src/components/svelte/content/Badge.svelte +19 -0
  172. package/src/components/svelte/content/Callout.svelte +57 -0
  173. package/src/components/svelte/content/CodeBlock.svelte +130 -0
  174. package/src/components/svelte/content/Divider.svelte +21 -0
  175. package/src/components/svelte/content/Link.svelte +21 -0
  176. package/src/components/svelte/content/Section.svelte +24 -0
  177. package/src/components/svelte/content/Table.svelte +44 -0
  178. package/src/components/svelte/disclosure/Accordion.svelte +100 -0
  179. package/src/components/svelte/disclosure/Collapsible.svelte +45 -0
  180. package/src/components/svelte/display/Stat.svelte +102 -0
  181. package/src/components/svelte/display/Text.svelte +11 -0
  182. package/src/components/svelte/feedback/Progress.svelte +34 -0
  183. package/src/components/svelte/feedback/Toast.svelte +105 -0
  184. package/src/components/svelte/helpers.ts +148 -0
  185. package/src/components/svelte/input/Button.svelte +78 -0
  186. package/src/components/svelte/input/Checkbox.svelte +52 -0
  187. package/src/components/svelte/input/Input.svelte +202 -0
  188. package/src/components/svelte/input/RadioGroup.svelte +71 -0
  189. package/src/components/svelte/input/Select.svelte +220 -0
  190. package/src/components/svelte/input/Slider.svelte +96 -0
  191. package/src/components/svelte/input/Submit.svelte +32 -0
  192. package/src/components/svelte/input/Switch.svelte +53 -0
  193. package/src/components/svelte/input/Tabs.svelte +188 -0
  194. package/src/components/svelte/layout/Card.svelte +17 -0
  195. package/src/components/svelte/layout/Column.svelte +15 -0
  196. package/src/components/svelte/layout/Grid.svelte +26 -0
  197. package/src/components/svelte/layout/Row.svelte +105 -0
  198. package/src/components/svelte/layout/balancedTiles.ts +85 -0
  199. package/src/components/svelte/tooling/CodeMirror.svelte +91 -0
  200. package/src/components/svelte/tooling/Playground.svelte +765 -0
  201. package/src/components/svelte/tooling/PlaygroundMarkdown.svelte +26 -0
  202. package/src/components/svelte/tooling/PlaygroundSlexCode.svelte +76 -0
  203. package/src/components/svelte/types.ts +17 -0
  204. package/src/styles/animation.css +98 -0
  205. package/src/styles/components/button.css +114 -0
  206. package/src/styles/components/choice.css +165 -0
  207. package/src/styles/components/select.css +260 -0
  208. package/src/styles/components/slider.css +125 -0
  209. package/src/styles/components/submit.css +9 -0
  210. package/src/styles/components/switch.css +114 -0
  211. package/src/styles/components/tabs.css +192 -0
  212. package/src/styles/components/text-input.css +245 -0
  213. package/src/styles/content.css +474 -0
  214. package/src/styles/disclosure.css +162 -0
  215. package/src/styles/display.css +259 -0
  216. package/src/styles/entry.css +34 -0
  217. package/src/styles/feedback.css +219 -0
  218. package/src/styles/input.css +8 -0
  219. package/src/styles/layout.css +365 -0
  220. package/src/styles/theme.css +31 -0
  221. package/src/styles/tooling.css +1009 -0
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "accordion" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "badge" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "button" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "callout" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "card" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "checkbox" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "code-block" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "collapsible" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "column" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "divider" component type.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ import Accordion from "../svelte/disclosure/Accordion.svelte";
2
+ export { Accordion };
3
+ export default Accordion;
@@ -0,0 +1,3 @@
1
+ import Badge from "../svelte/content/Badge.svelte";
2
+ export { Badge };
3
+ export default Badge;
@@ -0,0 +1,3 @@
1
+ import Button from "../svelte/input/Button.svelte";
2
+ export { Button };
3
+ export default Button;
@@ -0,0 +1,3 @@
1
+ import Callout from "../svelte/content/Callout.svelte";
2
+ export { Callout };
3
+ export default Callout;
@@ -0,0 +1,3 @@
1
+ import Card from "../svelte/layout/Card.svelte";
2
+ export { Card };
3
+ export default Card;
@@ -0,0 +1,3 @@
1
+ import Checkbox from "../svelte/input/Checkbox.svelte";
2
+ export { Checkbox };
3
+ export default Checkbox;
@@ -0,0 +1,3 @@
1
+ import CodeBlock from "../svelte/content/CodeBlock.svelte";
2
+ export { CodeBlock };
3
+ export default CodeBlock;
@@ -0,0 +1,3 @@
1
+ import Collapsible from "../svelte/disclosure/Collapsible.svelte";
2
+ export { Collapsible };
3
+ export default Collapsible;
@@ -0,0 +1,3 @@
1
+ import Column from "../svelte/layout/Column.svelte";
2
+ export { Column };
3
+ export default Column;
@@ -0,0 +1,3 @@
1
+ import Divider from "../svelte/content/Divider.svelte";
2
+ export { Divider };
3
+ export default Divider;
@@ -0,0 +1,3 @@
1
+ import Grid from "../svelte/layout/Grid.svelte";
2
+ export { Grid };
3
+ export default Grid;
@@ -0,0 +1,3 @@
1
+ import Input from "../svelte/input/Input.svelte";
2
+ export { Input };
3
+ export default Input;
@@ -0,0 +1,3 @@
1
+ import Link from "../svelte/content/Link.svelte";
2
+ export { Link };
3
+ export default Link;
@@ -0,0 +1,3 @@
1
+ import Progress from "../svelte/feedback/Progress.svelte";
2
+ export { Progress };
3
+ export default Progress;
@@ -0,0 +1,3 @@
1
+ import RadioGroup from "../svelte/input/RadioGroup.svelte";
2
+ export { RadioGroup };
3
+ export default RadioGroup;
@@ -0,0 +1,3 @@
1
+ import Row from "../svelte/layout/Row.svelte";
2
+ export { Row };
3
+ export default Row;
@@ -0,0 +1,3 @@
1
+ import Section from "../svelte/content/Section.svelte";
2
+ export { Section };
3
+ export default Section;
@@ -0,0 +1,3 @@
1
+ import Select from "../svelte/input/Select.svelte";
2
+ export { Select };
3
+ export default Select;
@@ -0,0 +1,3 @@
1
+ import Slider from "../svelte/input/Slider.svelte";
2
+ export { Slider };
3
+ export default Slider;
@@ -0,0 +1 @@
1
+ export declare const componentSpecs: import("../spec-schema").ComponentSpec[];
@@ -0,0 +1,3 @@
1
+ import Stat from "../svelte/display/Stat.svelte";
2
+ export { Stat };
3
+ export default Stat;
@@ -0,0 +1,3 @@
1
+ import Submit from "../svelte/input/Submit.svelte";
2
+ export { Submit };
3
+ export default Submit;
@@ -0,0 +1,3 @@
1
+ import Switch from "../svelte/input/Switch.svelte";
2
+ export { Switch };
3
+ export default Switch;
@@ -0,0 +1,3 @@
1
+ import Table from "../svelte/content/Table.svelte";
2
+ export { Table };
3
+ export default Table;
@@ -0,0 +1,3 @@
1
+ import Tabs from "../svelte/input/Tabs.svelte";
2
+ export { Tabs };
3
+ export default Tabs;
@@ -0,0 +1,3 @@
1
+ import Text from "../svelte/display/Text.svelte";
2
+ export { Text };
3
+ export default Text;
@@ -0,0 +1,3 @@
1
+ import Toast from "../svelte/feedback/Toast.svelte";
2
+ export { Toast };
3
+ export default Toast;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "grid" component type.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { SvelteBuiltinComponent } from "./svelte/types";
2
+ import type { ComponentRegistrationOptions } from "../engine/types";
3
+ export declare const ALL_COMPONENT_TYPES: string[];
4
+ export declare function registerAll(): void;
5
+ export declare function registerSvelteComponent(type: string, component: SvelteBuiltinComponent, options?: ComponentRegistrationOptions): void;
6
+ export declare function registerSubset(types: string[]): void;
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "input" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "link" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "progress" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "radio-group" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "row" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "section" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "select" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "slider" component type.
2
+ export {};
@@ -0,0 +1,23 @@
1
+ import type { ComponentSpec } from "./spec-schema";
2
+ import type { SlexExpression } from "../engine/types";
3
+ export declare function docs(type: string): {
4
+ href: string;
5
+ anchors: {
6
+ api: string;
7
+ examples: string;
8
+ };
9
+ };
10
+ export declare function example(type: string, propsOrSource: Record<string, unknown> | SlexExpression, title?: string): ComponentSpec["examples"][number];
11
+ export declare const semanticTones: readonly ["info", "success", "warning", "danger", "muted"];
12
+ export declare function stateFor(type: string): ComponentSpec["state"];
13
+ export declare function component(spec: Omit<ComponentSpec, "status" | "since" | "docs" | "state"> & {
14
+ state?: ComponentSpec["state"];
15
+ }): ComponentSpec;
16
+ export declare const childContent: {
17
+ allowed: boolean;
18
+ description: string;
19
+ };
20
+ export declare const noChildren: {
21
+ allowed: boolean;
22
+ description: string;
23
+ };
@@ -0,0 +1,12 @@
1
+ import type { ComponentSpec, ComponentSpecLocaleOverlay, LocalizedComponentSpec } from "./spec-schema";
2
+ import { componentSpecs } from "./entries/specs";
3
+ export { componentSpecs };
4
+ export declare const publicComponentTypes: string[];
5
+ export declare function getComponentSpec(type: string): ComponentSpec | undefined;
6
+ export declare function hashSpecText(source: string): string;
7
+ export declare function componentSpecTextKey(type: string, field: "title" | "summary" | "description"): string;
8
+ export declare function componentPropTextKey(type: string, prop: string): string;
9
+ export declare function componentChildrenTextKey(type: string): string;
10
+ export declare function localizeComponentSpec(spec: ComponentSpec, locale?: string, overlay?: ComponentSpecLocaleOverlay): LocalizedComponentSpec;
11
+ export declare function localizeComponentSpecs(locale?: string, overlay?: ComponentSpecLocaleOverlay): LocalizedComponentSpec[];
12
+ export declare function getLocalizedComponentSpec(type: string, locale?: string, overlay?: ComponentSpecLocaleOverlay): LocalizedComponentSpec | undefined;
@@ -0,0 +1,74 @@
1
+ import type { ComponentStateMode, SlexExpression } from "../engine/types";
2
+ export type ComponentSpecStatus = "ready" | "draft" | "experimental" | "deprecated";
3
+ export type ComponentSpecCategory = "Layout" | "Content" | "Display" | "Action" | "Input" | "Navigation" | "Disclosure" | "Feedback" | "Data" | "Tooling" | "Component";
4
+ export type PropSpec = {
5
+ type: string;
6
+ required?: boolean;
7
+ default?: unknown;
8
+ dynamic?: boolean;
9
+ values?: readonly string[];
10
+ description: string;
11
+ };
12
+ export type ChildrenSpec = {
13
+ allowed: boolean;
14
+ description?: string;
15
+ };
16
+ export type ComponentExampleSpec = {
17
+ id: string;
18
+ title: string;
19
+ description?: string;
20
+ source: SlexExpression;
21
+ };
22
+ export type ComponentDocsSpec = {
23
+ href: string;
24
+ anchors?: Record<string, string>;
25
+ };
26
+ export type ComponentSpec = {
27
+ type: string;
28
+ category: ComponentSpecCategory;
29
+ status: ComponentSpecStatus;
30
+ state: ComponentStateMode;
31
+ since: string;
32
+ title: string;
33
+ summary: string;
34
+ description: string;
35
+ props: Record<string, PropSpec>;
36
+ children: ChildrenSpec;
37
+ examples: ComponentExampleSpec[];
38
+ docs: ComponentDocsSpec;
39
+ };
40
+ export type ComponentSpecLocaleEntry = {
41
+ source: string;
42
+ sourceHash: string;
43
+ translation: string;
44
+ };
45
+ export type ComponentSpecLocaleOverlay = {
46
+ locale: string;
47
+ entries: Record<string, ComponentSpecLocaleEntry>;
48
+ };
49
+ export type LocalizedText = {
50
+ value: string;
51
+ source: string;
52
+ key: string;
53
+ stale: boolean;
54
+ missing: boolean;
55
+ };
56
+ export type LocalizedPropSpec = Omit<PropSpec, "description"> & {
57
+ description: string;
58
+ descriptionMeta: LocalizedText;
59
+ };
60
+ export type LocalizedChildrenSpec = Omit<ChildrenSpec, "description"> & {
61
+ description?: string;
62
+ descriptionMeta?: LocalizedText;
63
+ };
64
+ export type LocalizedComponentSpec = Omit<ComponentSpec, "title" | "summary" | "description" | "props" | "children"> & {
65
+ locale: string;
66
+ title: string;
67
+ summary: string;
68
+ description: string;
69
+ titleMeta: LocalizedText;
70
+ summaryMeta: LocalizedText;
71
+ descriptionMeta: LocalizedText;
72
+ props: Record<string, LocalizedPropSpec>;
73
+ children: LocalizedChildrenSpec;
74
+ };
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "specs" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "stat" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "submit" component type.
2
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { ComponentRenderer } from "../../engine/types";
2
+ import type { SvelteBuiltinComponent } from "./types";
3
+ export declare function createSvelteRenderer(type: string, Component: SvelteBuiltinComponent): ComponentRenderer;
@@ -0,0 +1,2 @@
1
+ import type { PropStore, PropValues } from "./types";
2
+ export declare function bindPropStore(store: PropStore, set: (value: PropValues) => void): () => void;
@@ -0,0 +1,33 @@
1
+ import type { RenderContext } from "../../engine/types";
2
+ type Item = {
3
+ label?: string;
4
+ value?: string;
5
+ content?: string;
6
+ description?: string;
7
+ disabled?: boolean;
8
+ [key: string]: unknown;
9
+ };
10
+ export declare function formatDisplayNumber(value: number): string;
11
+ export declare function text(value: unknown, fallback?: string): string;
12
+ export declare function label(ctx: RenderContext, key: string, value: unknown, fallback?: string): string;
13
+ export declare function bool(value: unknown): boolean;
14
+ export declare function list(value: unknown): Item[];
15
+ export declare function rows(value: unknown): unknown[];
16
+ export declare function objects(value: unknown): Record<string, unknown>[];
17
+ export declare function itemLabel(item: unknown): string;
18
+ export declare function itemDescription(item: unknown): string;
19
+ export declare function readColumns(value: unknown): string[];
20
+ export declare function readColumnLabel(column: unknown, fallback: string): string;
21
+ export declare function readCell(row: unknown, column: string): string;
22
+ export declare function catalogItems(value: unknown): Record<string, unknown>[];
23
+ export declare function catalogGroups(value: unknown): Array<{
24
+ label: string;
25
+ items: Record<string, unknown>[];
26
+ }>;
27
+ export declare function renderChildren(node: HTMLElement, ctx: RenderContext): {
28
+ destroy(): void;
29
+ };
30
+ export declare function emit(ctx: RenderContext, event: string, data?: unknown): void;
31
+ export declare function formatScriptValue(value: unknown, indent?: number): string;
32
+ export declare function stringifySource(source: unknown): string;
33
+ export {};
@@ -0,0 +1,14 @@
1
+ type BalancedColumnsInput = {
2
+ itemCount: number;
3
+ containerWidth: number;
4
+ targetTileWidth?: number;
5
+ gap?: number;
6
+ };
7
+ type BalancedTileLayout = {
8
+ columns: number;
9
+ tracks: number;
10
+ spans: number[];
11
+ };
12
+ export declare function chooseBalancedColumns({ itemCount, containerWidth, targetTileWidth, gap, }: BalancedColumnsInput): number;
13
+ export declare function createBalancedTileLayout(itemCount: number, columns: number): BalancedTileLayout;
14
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { Component } from "svelte";
2
+ import type { RenderContext } from "../../engine/types";
3
+ export type PropValues = Record<string, unknown>;
4
+ export type PropStore = {
5
+ subscribe(run: (value: PropValues) => void): () => void;
6
+ };
7
+ export type SvelteComponentProps = {
8
+ componentName: string;
9
+ ctx: RenderContext;
10
+ props: PropStore;
11
+ };
12
+ export type SvelteBuiltinComponent = Component<SvelteComponentProps>;
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "switch" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "table" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "tabs" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "text" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "toast" component type.
2
+ export {};
@@ -0,0 +1,2 @@
1
+ // Type stub: importing this module registers the "tooling" component type.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import { registerAll, registerSvelteComponent, registerSubset } from "./components/index";
2
+ declare const registerAllApi: typeof registerAll;
3
+ declare const registerSvelteComponentApi: typeof registerSvelteComponent;
4
+ declare const registerSubsetApi: typeof registerSubset;
5
+ export { registerAllApi as registerAll, registerSvelteComponentApi as registerSvelteComponent, registerSubsetApi as registerSubset, };
@@ -0,0 +1,14 @@
1
+ type Cleanup = () => void;
2
+ type Subscriber<T> = (value: T) => void;
3
+ type FlushDom = () => void;
4
+ export type ReadableAccessor<T> = (() => T) & {
5
+ subscribe(run: Subscriber<T>): Cleanup;
6
+ };
7
+ export declare function configureComponentScope(options: {
8
+ flush?: FlushDom;
9
+ }): void;
10
+ export declare function createComponentAccessor<T>(read: () => T): ReadableAccessor<T>;
11
+ export declare function renderComponent(render: () => HTMLElement | void): HTMLElement | null;
12
+ export declare function attachComponentDisposer(el: HTMLElement, dispose: Cleanup): void;
13
+ export declare function disposeComponent(el: HTMLElement): void;
14
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { ComponentState, ComponentStateMap, ComponentTypeMap, ForContext, LayoutNode } from "./types";
2
+ export declare function publicComponentState(name: string, state: ComponentState, componentTypes: ComponentTypeMap): ComponentState;
3
+ export declare function createGProxy(g: Record<string, unknown>, components: ComponentStateMap, componentTypes: ComponentTypeMap): Record<string, unknown>;
4
+ export declare function ensureComponentState(name: string, type: string, components: ComponentStateMap, componentTypes: ComponentTypeMap): ComponentState;
5
+ export declare function syncComponentProps(type: string, name: string, props: Record<string, unknown>, components: ComponentStateMap, componentTypes: ComponentTypeMap): ComponentState | undefined;
6
+ export declare function bindInputStateProps(type: string, state: ComponentState | undefined, props: Record<string, unknown>): void;
7
+ export declare function applyComponentEventState(type: string, name: string, data: unknown, components: ComponentStateMap, componentTypes: ComponentTypeMap): void;
8
+ export declare function prepareComponentStates(layout: LayoutNode, components: ComponentStateMap, componentTypes: ComponentTypeMap, ns: string): void;
9
+ export declare function buildComponentEvalContext(g: Record<string, unknown>, components: ComponentStateMap, componentTypes: ComponentTypeMap, api?: Record<string, unknown>, forCtx?: ForContext): Record<string, unknown>;
@@ -0,0 +1,24 @@
1
+ export type SlexKitSourceDiagnostic = {
2
+ message: string;
3
+ line: number;
4
+ column: number;
5
+ detail?: string;
6
+ excerpt: string;
7
+ };
8
+ export type SlexKitParseResult = {
9
+ ok: true;
10
+ value: unknown;
11
+ } | {
12
+ ok: false;
13
+ error: SlexKitSyntaxError;
14
+ diagnostic: SlexKitSourceDiagnostic;
15
+ };
16
+ export declare class SlexKitSyntaxError extends SyntaxError {
17
+ diagnostic: SlexKitSourceDiagnostic;
18
+ constructor(diagnostic: SlexKitSourceDiagnostic);
19
+ }
20
+ export declare function formatSlexKitDiagnostic(diagnostic: SlexKitSourceDiagnostic): string;
21
+ export declare function diagnoseSlexKitSource(source: string, error: unknown): SlexKitSourceDiagnostic;
22
+ export declare function parseSlexSource(source: string): SlexKitParseResult;
23
+ /** @deprecated Use parseSlexSource instead. */
24
+ export declare const parseSlexKitDsl: typeof parseSlexSource;
@@ -0,0 +1,11 @@
1
+ export type EngineeringNumberResult = {
2
+ raw: string;
3
+ number: number | null;
4
+ valid: boolean;
5
+ prefix: string;
6
+ unit: string;
7
+ normalized: string;
8
+ error?: string;
9
+ };
10
+ export declare function parseEngineeringNumber(input: unknown): EngineeringNumberResult;
11
+ export declare function isEngineeringNumberResult(value: unknown): value is EngineeringNumberResult;
@@ -0,0 +1,5 @@
1
+ export declare const SKIP_EAGER_TRACK: unique symbol;
2
+ export declare const EAGER_TRACK_TARGET: unique symbol;
3
+ export declare function clearEvalCache(ns: string): void;
4
+ export declare function evalRead(expr: string, context: Record<string, unknown>, ns?: string, path?: string): unknown;
5
+ export declare function execWrite(stmt: string, context: Record<string, unknown>, ns?: string, path?: string): void;
@@ -0,0 +1,26 @@
1
+ import type { SlexExpression, MountOptions, ThemeMode } from "./types";
2
+ import type { SecureMountOptions } from "./secure-runtime";
3
+ export { register, getRenderer } from "./registry";
4
+ export { diagnoseSlexKitSource, SlexKitSyntaxError, formatSlexKitDiagnostic, parseSlexSource, parseSlexKitDsl, } from "./diagnostics";
5
+ export type { SlexKitParseResult, SlexKitSourceDiagnostic } from "./diagnostics";
6
+ export type { ComponentRegistrationOptions, ComponentRenderer, ComponentStateMode, MountOptions, RenderContext, SlexExpression, ThemeMode,
7
+ /** @deprecated Use SlexExpression instead. */
8
+ DSL, } from "./types";
9
+ export { createSecureRuntime, SlexKitRuntimeError, serializeRuntimeError, } from "./secure-runtime";
10
+ export { createSlexKitMarkdownRuntimeHost, getSlexKitMarkdownRuntimeHost, installSlexKitMarkdownRuntimeHost, } from "./markdown-runtime";
11
+ export type { SlexKitMarkdownBlock, SlexKitMarkdownRuntimeHost, SlexKitMarkdownRuntimeMode, SlexKitMarkdownRuntimeOptions, } from "./markdown-runtime";
12
+ export type { SlexKitRuntimeApi, HostFetchRequest, HostRuntimeAdapter, HostRuntimePolicy, NetworkOptions, NetworkResult, RafId, RuntimeCanvasContext, RuntimeCanvasContextId, RuntimeErrorEvent, RuntimeErrorKind, RuntimeNetworkLogEvent, SandboxSlotSizeMessage, SandboxSlotsMessage, SandboxFetchRequestMessage, SandboxFetchResponseMessage, SandboxHostMessage, SandboxMountMessage, SandboxRunnerMessage, SandboxStatusMessage, SecureFrameOptions, SecureArtifactSlot, SecureMountOptions, SecureRuntimeHandle, SerializedRuntimeError, TimerId, } from "./secure-runtime";
13
+ export declare function setSlexKitRuntimeUrl(url: string | undefined): void;
14
+ export declare function getSlexKitRuntimeUrl(): string | undefined;
15
+ export declare function mount(input: SlexExpression | string, container: HTMLElement, options?: MountOptions): () => void;
16
+ export declare function disposeNamespace(namespace: string): void;
17
+ export declare function mountSecureArtifact(input: SlexExpression | string, container: HTMLElement, options: SecureMountOptions): () => void;
18
+ export declare function ingest(input: SlexExpression | string): boolean;
19
+ export type BootOptions = {
20
+ selector?: string;
21
+ sourceControls?: boolean;
22
+ theme?: ThemeMode;
23
+ dir?: MountOptions["dir"];
24
+ labels?: MountOptions["labels"];
25
+ };
26
+ export declare function boot(options?: BootOptions): void;
@@ -0,0 +1,33 @@
1
+ import type { SlexExpression, MountOptions, ThemeMode } from "./types";
2
+ import type { HostRuntimeAdapter, HostRuntimePolicy, SecureFrameOptions } from "./secure-runtime";
3
+ export type SlexKitMarkdownRuntimeMode = "trusted" | "secure";
4
+ export type SlexKitMarkdownRuntimeOptions = {
5
+ mode?: SlexKitMarkdownRuntimeMode;
6
+ policy?: HostRuntimePolicy;
7
+ hostAdapter?: HostRuntimeAdapter;
8
+ secureFrame?: boolean | SecureFrameOptions;
9
+ theme?: ThemeMode;
10
+ dir?: MountOptions["dir"];
11
+ labels?: MountOptions["labels"];
12
+ };
13
+ export type SlexKitMarkdownBlock = {
14
+ artifactId?: string;
15
+ blockId?: string;
16
+ source: SlexExpression | string;
17
+ container: HTMLElement;
18
+ stateOnly?: boolean;
19
+ theme?: ThemeMode;
20
+ dir?: MountOptions["dir"];
21
+ labels?: MountOptions["labels"];
22
+ };
23
+ export type SlexKitMarkdownRuntimeHost = {
24
+ configure(options: Partial<SlexKitMarkdownRuntimeOptions>): void;
25
+ getMode(): SlexKitMarkdownRuntimeMode;
26
+ mountBlock(block: SlexKitMarkdownBlock): () => void;
27
+ disposeBlock(container: HTMLElement): void;
28
+ disposeArtifact(artifactId: string): void;
29
+ disposeAll(): void;
30
+ };
31
+ export declare function createSlexKitMarkdownRuntimeHost(initialOptions?: SlexKitMarkdownRuntimeOptions): SlexKitMarkdownRuntimeHost;
32
+ export declare function installSlexKitMarkdownRuntimeHost(options?: SlexKitMarkdownRuntimeOptions): SlexKitMarkdownRuntimeHost;
33
+ export declare function getSlexKitMarkdownRuntimeHost(): SlexKitMarkdownRuntimeHost;
@@ -0,0 +1 @@
1
+ export declare function deepMerge(target: Record<string, unknown>, source: Record<string, unknown>): Record<string, unknown>;
@@ -0,0 +1,11 @@
1
+ type Cleanup = () => void;
2
+ export declare function createReactiveState<T extends object>(value: T): T;
3
+ export declare function asReactiveValue<T>(value: T, owner: unknown): T;
4
+ export declare function trackReactiveValue(value: unknown): void;
5
+ export declare function createRoot<T>(fn: (dispose: Cleanup) => T): T;
6
+ export declare function createEffect(fn: () => void): Cleanup;
7
+ export declare function createMemo<T>(fn: () => T): () => T;
8
+ export declare function createSignal<T>(initial: T): [() => T, (next: T) => void];
9
+ export declare function onCleanup(cleanup: Cleanup): void;
10
+ export declare function batch<T>(fn: () => T): T;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { ComponentRegistrationOptions, ComponentRenderer, ComponentStateMode } from "./types";
2
+ export declare function register(type: string, renderFn: ComponentRenderer, options?: ComponentRegistrationOptions): void;
3
+ export declare function getRenderer(type: string): ComponentRenderer | undefined;
4
+ export declare function getComponentStateMode(type: string): ComponentStateMode;