@vesk/compiler 0.1.1 → 0.2.8

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 (51) hide show
  1. package/dist/api-routes.d.ts +6 -1
  2. package/dist/api-routes.d.ts.map +1 -1
  3. package/dist/api-routes.js +52 -7
  4. package/dist/client-codegen.d.ts +15 -0
  5. package/dist/client-codegen.d.ts.map +1 -1
  6. package/dist/client-codegen.js +73 -10
  7. package/dist/config.d.ts +2 -0
  8. package/dist/config.d.ts.map +1 -1
  9. package/dist/config.js +25 -0
  10. package/dist/errors.d.ts.map +1 -1
  11. package/dist/errors.js +33 -4
  12. package/dist/index.d.ts +3 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +2 -0
  15. package/dist/ir-generator.d.ts.map +1 -1
  16. package/dist/ir-generator.js +109 -1
  17. package/dist/md-inline.d.ts +17 -0
  18. package/dist/md-inline.d.ts.map +1 -0
  19. package/dist/md-inline.js +149 -0
  20. package/dist/middleware.d.ts.map +1 -1
  21. package/dist/middleware.js +42 -7
  22. package/dist/router.d.ts +2 -0
  23. package/dist/router.d.ts.map +1 -1
  24. package/dist/router.js +48 -3
  25. package/dist/server-codegen.d.ts +1 -1
  26. package/dist/server-codegen.d.ts.map +1 -1
  27. package/dist/server-codegen.js +1 -1
  28. package/dist/server-jsgen.d.ts.map +1 -1
  29. package/dist/server-jsgen.js +4 -3
  30. package/dist/server-render.d.ts.map +1 -1
  31. package/dist/server-render.js +16 -8
  32. package/dist/server-utils.d.ts +31 -0
  33. package/dist/server-utils.d.ts.map +1 -1
  34. package/dist/server-utils.js +478 -52
  35. package/dist/ssr-store.d.ts +1 -1
  36. package/dist/ssr-store.d.ts.map +1 -1
  37. package/dist/ssr-store.js +3 -0
  38. package/dist/typecheck.d.ts +2 -0
  39. package/dist/typecheck.d.ts.map +1 -1
  40. package/dist/typecheck.js +452 -29
  41. package/dist/types.d.ts +4 -129
  42. package/dist/types.d.ts.map +1 -1
  43. package/dist/types.js +1 -0
  44. package/dist/vesk-plugin.d.ts +2 -0
  45. package/dist/vesk-plugin.d.ts.map +1 -1
  46. package/dist/vesk-plugin.js +152 -0
  47. package/dist/vsk-tsx.d.ts +62 -0
  48. package/dist/vsk-tsx.d.ts.map +1 -1
  49. package/dist/vsk-tsx.js +844 -362
  50. package/package.json +2 -1
  51. package/dist/package.json +0 -15
@@ -9,6 +9,8 @@ export interface TypecheckError {
9
9
  code: string;
10
10
  message: string;
11
11
  }
12
+ export declare const AMBIENT = "\ndeclare namespace JSX {\n type VeskEventHandler<E extends Event = Event> = (event: E) => void;\n interface VeskCommonAttributes {\n key?: string | number;\n class?: string;\n id?: string;\n style?: string;\n title?: string;\n hidden?: boolean | string;\n lang?: string;\n dir?: 'ltr' | 'rtl' | 'auto';\n tabIndex?: number;\n role?: string;\n }\n interface VeskEventAttributes {\n onClick?: VeskEventHandler<MouseEvent>;\n onDblClick?: VeskEventHandler<MouseEvent>;\n onMouseDown?: VeskEventHandler<MouseEvent>;\n onMouseUp?: VeskEventHandler<MouseEvent>;\n onMouseEnter?: VeskEventHandler<MouseEvent>;\n onMouseLeave?: VeskEventHandler<MouseEvent>;\n onMouseMove?: VeskEventHandler<MouseEvent>;\n onKeyDown?: VeskEventHandler<KeyboardEvent>;\n onKeyUp?: VeskEventHandler<KeyboardEvent>;\n onFocus?: VeskEventHandler<FocusEvent>;\n onBlur?: VeskEventHandler<FocusEvent>;\n onInput?: VeskEventHandler<InputEvent>;\n onChange?: VeskEventHandler<Event>;\n onSubmit?: VeskEventHandler<SubmitEvent>;\n onScroll?: VeskEventHandler<UIEvent>;\n onWheel?: VeskEventHandler<WheelEvent>;\n // Lowercase aliases \u2014 HTML attribute names are case-insensitive and real\n // code writes onclick=/oninput=. Keep in sync with the camelCase members.\n onclick?: VeskEventHandler<MouseEvent>;\n ondblclick?: VeskEventHandler<MouseEvent>;\n onmousedown?: VeskEventHandler<MouseEvent>;\n onmouseup?: VeskEventHandler<MouseEvent>;\n onmouseenter?: VeskEventHandler<MouseEvent>;\n onmouseleave?: VeskEventHandler<MouseEvent>;\n onmousemove?: VeskEventHandler<MouseEvent>;\n onkeydown?: VeskEventHandler<KeyboardEvent>;\n onkeyup?: VeskEventHandler<KeyboardEvent>;\n onfocus?: VeskEventHandler<FocusEvent>;\n onblur?: VeskEventHandler<FocusEvent>;\n oninput?: VeskEventHandler<InputEvent>;\n onchange?: VeskEventHandler<Event>;\n onsubmit?: VeskEventHandler<SubmitEvent>;\n }\n type Component = string | number | boolean | null | undefined | Component[];\n interface VeskGlobalAttributes extends VeskCommonAttributes, VeskEventAttributes {\n children?: Component;\n }\n interface VeskAnchorAttributes extends VeskGlobalAttributes {\n href?: string;\n target?: string;\n rel?: string;\n download?: string | boolean;\n type?: string;\n hreflang?: string;\n }\n interface VeskMediaAttributes extends VeskGlobalAttributes {\n src?: string;\n width?: string | number;\n height?: string | number;\n }\n interface VeskInputAttributes extends VeskGlobalAttributes {\n type?: string;\n name?: string;\n value?: string | number | readonly string[];\n placeholder?: string;\n checked?: boolean | string;\n disabled?: boolean | string;\n readOnly?: boolean | string;\n required?: boolean | string;\n min?: string | number;\n max?: string | number;\n step?: string | number;\n pattern?: string;\n autoComplete?: string;\n autoFocus?: boolean | string;\n multiple?: boolean | string;\n accept?: string;\n size?: number;\n list?: string;\n }\n interface IntrinsicElements {\n html?: VeskGlobalAttributes & { manifest?: string };\n head?: VeskGlobalAttributes;\n body?: VeskGlobalAttributes;\n div?: VeskGlobalAttributes;\n span?: VeskGlobalAttributes;\n p?: VeskGlobalAttributes;\n h1?: VeskGlobalAttributes;\n h2?: VeskGlobalAttributes;\n h3?: VeskGlobalAttributes;\n h4?: VeskGlobalAttributes;\n h5?: VeskGlobalAttributes;\n h6?: VeskGlobalAttributes;\n a?: VeskAnchorAttributes;\n nav?: VeskGlobalAttributes;\n header?: VeskGlobalAttributes;\n footer?: VeskGlobalAttributes;\n main?: VeskGlobalAttributes;\n section?: VeskGlobalAttributes;\n article?: VeskGlobalAttributes;\n aside?: VeskGlobalAttributes;\n button?: VeskGlobalAttributes & {\n type?: 'button' | 'submit' | 'reset';\n disabled?: boolean | string;\n name?: string;\n value?: string | number;\n };\n form?: VeskGlobalAttributes & {\n action?: string;\n method?: 'get' | 'post';\n target?: string;\n encType?: string;\n noValidate?: boolean | string;\n name?: string;\n autoComplete?: string;\n };\n input?: VeskInputAttributes;\n textarea?: VeskGlobalAttributes & {\n rows?: number;\n cols?: number;\n placeholder?: string;\n value?: string | number;\n disabled?: boolean | string;\n readOnly?: boolean | string;\n required?: boolean | string;\n name?: string;\n };\n select?: VeskGlobalAttributes & {\n name?: string;\n value?: string | number | readonly string[];\n disabled?: boolean | string;\n required?: boolean | string;\n multiple?: boolean | string;\n size?: number;\n autoComplete?: string;\n };\n option?: VeskGlobalAttributes & {\n value?: string | number;\n selected?: boolean | string;\n disabled?: boolean | string;\n label?: string;\n };\n optgroup?: VeskGlobalAttributes & { label?: string; disabled?: boolean | string };\n label?: VeskGlobalAttributes & { htmlFor?: string };\n fieldset?: VeskGlobalAttributes & { disabled?: boolean | string; name?: string; form?: string };\n legend?: VeskGlobalAttributes;\n datalist?: VeskGlobalAttributes;\n img?: VeskGlobalAttributes & {\n src?: string;\n alt?: string;\n width?: string | number;\n height?: string | number;\n srcSet?: string;\n sizes?: string;\n loading?: 'eager' | 'lazy';\n decoding?: 'sync' | 'async' | 'auto';\n };\n picture?: VeskGlobalAttributes;\n source?: VeskGlobalAttributes & { src?: string; srcSet?: string; sizes?: string; media?: string; type?: string };\n video?: VeskMediaAttributes & {\n controls?: boolean | string;\n autoPlay?: boolean | string;\n loop?: boolean | string;\n muted?: boolean | string;\n preload?: 'none' | 'metadata' | 'auto' | '';\n poster?: string;\n playsInline?: boolean | string;\n };\n audio?: VeskGlobalAttributes & {\n src?: string;\n controls?: boolean | string;\n autoPlay?: boolean | string;\n loop?: boolean | string;\n muted?: boolean | string;\n preload?: 'none' | 'metadata' | 'auto' | '';\n };\n track?: VeskGlobalAttributes & {\n src?: string;\n kind?: string;\n srclang?: string;\n label?: string;\n default?: boolean | string;\n };\n canvas?: VeskGlobalAttributes & { width?: number; height?: number };\n iframe?: VeskGlobalAttributes & {\n src?: string;\n srcDoc?: string;\n width?: string | number;\n height?: string | number;\n allow?: string;\n loading?: 'eager' | 'lazy';\n sandbox?: string;\n allowFullScreen?: boolean | string;\n referrerPolicy?: string;\n };\n embed?: VeskGlobalAttributes & { src?: string; type?: string; width?: string | number; height?: string | number };\n object?: VeskGlobalAttributes & { data?: string; type?: string; name?: string; width?: string | number; height?: string | number };\n table?: VeskGlobalAttributes;\n caption?: VeskGlobalAttributes;\n thead?: VeskGlobalAttributes;\n tbody?: VeskGlobalAttributes;\n tfoot?: VeskGlobalAttributes;\n tr?: VeskGlobalAttributes;\n th?: VeskGlobalAttributes & { colSpan?: number; rowSpan?: number; scope?: string; headers?: string };\n td?: VeskGlobalAttributes & { colSpan?: number; rowSpan?: number; headers?: string };\n col?: VeskGlobalAttributes & { span?: number };\n colgroup?: VeskGlobalAttributes & { span?: number };\n ul?: VeskGlobalAttributes;\n ol?: VeskGlobalAttributes & { start?: number; reversed?: boolean | string; type?: string };\n li?: VeskGlobalAttributes & { value?: number };\n dl?: VeskGlobalAttributes;\n dt?: VeskGlobalAttributes;\n dd?: VeskGlobalAttributes;\n br?: VeskGlobalAttributes;\n hr?: VeskGlobalAttributes;\n pre?: VeskGlobalAttributes;\n code?: VeskGlobalAttributes;\n blockquote?: VeskGlobalAttributes & { cite?: string };\n q?: VeskGlobalAttributes & { cite?: string };\n strong?: VeskGlobalAttributes;\n em?: VeskGlobalAttributes;\n small?: VeskGlobalAttributes;\n s?: VeskGlobalAttributes;\n cite?: VeskGlobalAttributes;\n dfn?: VeskGlobalAttributes;\n abbr?: VeskGlobalAttributes & { title?: string };\n time?: VeskGlobalAttributes & { dateTime?: string };\n data?: VeskGlobalAttributes & { value?: string | number };\n mark?: VeskGlobalAttributes;\n del?: VeskGlobalAttributes & { cite?: string; dateTime?: string };\n ins?: VeskGlobalAttributes & { cite?: string; dateTime?: string };\n sub?: VeskGlobalAttributes;\n sup?: VeskGlobalAttributes;\n u?: VeskGlobalAttributes;\n kbd?: VeskGlobalAttributes;\n samp?: VeskGlobalAttributes;\n var?: VeskGlobalAttributes;\n figure?: VeskGlobalAttributes;\n figcaption?: VeskGlobalAttributes;\n details?: VeskGlobalAttributes & { open?: boolean | string };\n summary?: VeskGlobalAttributes;\n dialog?: VeskGlobalAttributes & { open?: boolean | string };\n menu?: VeskGlobalAttributes;\n address?: VeskGlobalAttributes;\n b?: VeskGlobalAttributes;\n i?: VeskGlobalAttributes;\n ruby?: VeskGlobalAttributes;\n rt?: VeskGlobalAttributes;\n rp?: VeskGlobalAttributes;\n bdi?: VeskGlobalAttributes;\n bdo?: VeskGlobalAttributes;\n wbr?: VeskGlobalAttributes;\n area?: VeskGlobalAttributes & {\n coords?: string;\n shape?: string;\n href?: string;\n target?: string;\n alt?: string;\n };\n map?: VeskGlobalAttributes & { name?: string };\n noscript?: VeskGlobalAttributes;\n template?: VeskGlobalAttributes;\n slot?: VeskGlobalAttributes & { name?: string };\n meta?: VeskGlobalAttributes & { name?: string; content?: string; charSet?: string; httpEquiv?: string };\n title?: VeskGlobalAttributes;\n base?: VeskGlobalAttributes & { href?: string; target?: string };\n link?: VeskGlobalAttributes & {\n rel?: string;\n href?: string;\n sizes?: string;\n media?: string;\n as?: string;\n crossOrigin?: string;\n integrity?: string;\n type?: string;\n };\n style?: VeskGlobalAttributes & { media?: string };\n script?: VeskGlobalAttributes & {\n src?: string;\n async?: boolean | string;\n defer?: boolean | string;\n type?: string;\n crossOrigin?: string;\n integrity?: string;\n nonce?: string;\n noModule?: boolean | string;\n };\n svg?: VeskGlobalAttributes & {\n viewBox?: string;\n xmlns?: string;\n width?: string | number;\n height?: string | number;\n fill?: string;\n stroke?: string;\n strokeWidth?: string | number;\n };\n g?: VeskGlobalAttributes & { transform?: string; fill?: string; stroke?: string; strokeWidth?: string | number };\n path?: VeskGlobalAttributes & {\n d?: string;\n fill?: string;\n stroke?: string;\n strokeWidth?: string | number;\n fillRule?: string;\n clipRule?: string;\n };\n circle?: VeskGlobalAttributes & {\n cx?: string | number;\n cy?: string | number;\n r?: string | number;\n fill?: string;\n stroke?: string;\n strokeWidth?: string | number;\n };\n ellipse?: VeskGlobalAttributes & {\n cx?: string | number;\n cy?: string | number;\n rx?: string | number;\n ry?: string | number;\n fill?: string;\n };\n rect?: VeskGlobalAttributes & {\n x?: string | number;\n y?: string | number;\n width?: string | number;\n height?: string | number;\n rx?: string | number;\n ry?: string | number;\n fill?: string;\n };\n line?: VeskGlobalAttributes & {\n x1?: string | number;\n y1?: string | number;\n x2?: string | number;\n y2?: string | number;\n stroke?: string;\n strokeWidth?: string | number;\n };\n polyline?: VeskGlobalAttributes & { points?: string; fill?: string; stroke?: string };\n polygon?: VeskGlobalAttributes & { points?: string; fill?: string; stroke?: string };\n text?: VeskGlobalAttributes & { x?: string | number; y?: string | number; fill?: string; fontSize?: string | number };\n defs?: VeskGlobalAttributes;\n linearGradient?: VeskGlobalAttributes;\n radialGradient?: VeskGlobalAttributes;\n stop?: VeskGlobalAttributes & { offset?: string | number; stopColor?: string; stopOpacity?: string | number };\n\n // Unknown/custom tags stay permissive \u2014 components and web components\n // resolve through the index signature, known tags get the typed members.\n [elemName: string]: unknown;\n }\n type Component = string | number | boolean | null | undefined | Component[];\n}\ndeclare type Component = string | number | boolean | null | undefined | Component[];\ndeclare const Head: (props: { children?: Component }) => Component;\ninterface Tracked<T> {\n get(): T;\n set(value: T): void;\n}\ninterface Derived<T> {\n get(): T;\n set(value: T): void;\n}\ndeclare function track<T>(initialValue: T): Tracked<T>;\ndeclare function track<T>(fn: () => T): Derived<T>;\ndeclare function derived<T>(fn: () => T): Derived<T>;\ndeclare function effect(fn: () => void): unknown;\ndeclare function untrack<T>(fn: () => T): T;\ndeclare function peek<T>(fn: () => T): T;\ndeclare function tick(): Promise<void>;\ndeclare function flushSync(fn: () => void): void;\ndeclare function on_destroy(fn: () => void): void;\ndeclare function createContext<T>(defaultValue?: T): { id: symbol; defaultValue: T | undefined };\n// useFetch returns a THENABLE resource, not the data itself. In async\n// components you must `await` it before reading/iterating the payload;\n// passing `into: <tracked cell>` writes the payload into the cell and makes\n// awaiting unnecessary (the return value can be ignored).\ninterface VeskResource<T> {\n loading: boolean;\n error: unknown;\n data: T | undefined;\n refresh(): void;\n abort(): void;\n then<TResult1 = T, TResult2 = never>(\n onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null,\n onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | undefined | null,\n ): PromiseLike<TResult1 | TResult2>;\n}\ninterface VeskUseFetchOptions<T> {\n /** Cache/SSR key \u2014 defaults to the URL string. */\n key?: string;\n /** Target tracked cell (from track<T>()) \u2014 the payload is written into it, so awaiting is unnecessary. */\n into?: Tracked<T>;\n staleTime?: number;\n keepPreviousData?: boolean;\n retry?: number;\n retryDelay?: number;\n timeout?: number;\n enabled?: boolean;\n dedupe?: boolean;\n method?: string;\n headers?: Record<string, string>;\n body?: unknown;\n credentials?: 'omit' | 'same-origin' | 'include';\n signal?: { readonly aborted: boolean };\n}\ndeclare function useFetch<T = unknown>(\n urlOrFn: string | (() => Promise<T>),\n options?: VeskUseFetchOptions<T>,\n): VeskResource<T>;\ndeclare function useRouter(): unknown;\ndeclare function useParams(): Record<string, string>;\ndeclare function usePathname(): string;\ndeclare function useSearchParams(): URLSearchParams;\ndeclare function useNavigate(): (to: string) => void;\ndeclare function defineAction(...args: unknown[]): unknown;\ndeclare const Form: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const Field: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare function required(...args: unknown[]): unknown;\ndeclare function email(...args: unknown[]): unknown;\ndeclare function minLength(...args: unknown[]): unknown;\ndeclare function maxLength(...args: unknown[]): unknown;\ndeclare function pattern(...args: unknown[]): unknown;\ndeclare function custom(...args: unknown[]): unknown;\ndeclare const Link: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const NavLink: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const Outlet: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const Image: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const Portal: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const Experiment: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare function useLoadingIndicator(options?: {\n duration?: number;\n throttle?: number;\n hideDelay?: number;\n resetDelay?: number;\n estimatedProgress?: (duration: number, elapsed: number) => number;\n}): {\n progress: Tracked<number>;\n isLoading: Tracked<boolean>;\n error: Tracked<boolean>;\n start(opts?: { force?: boolean }): void;\n set(value: number, opts?: { force?: boolean }): void;\n finish(opts?: { force?: boolean; error?: boolean }): void;\n clear(): void;\n};\ndeclare const LoadingIndicator: (props: {\n color?: string | false;\n errorColor?: string;\n height?: number | string;\n position?: 'top' | 'bottom';\n zIndex?: number;\n duration?: number;\n throttle?: number;\n hideDelay?: number;\n resetDelay?: number;\n estimatedProgress?: (duration: number, elapsed: number) => number;\n class?: string;\n className?: string;\n style?: string;\n children?: Component;\n [k: string]: unknown;\n}) => Component;\ndeclare const JsonLd: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const ArticleSchema: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const ProductSchema: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const FAQPageSchema: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const BreadcrumbListSchema: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const OrganizationSchema: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const LocalBusinessSchema: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare const VideoSchema: (props: { [k: string]: unknown; children?: Component }) => Component;\ndeclare function redirect(...args: unknown[]): unknown;\ndeclare function permanentRedirect(...args: unknown[]): unknown;\ndeclare function notFound(...args: unknown[]): never;\ndeclare class NotFoundError extends Error {}\ndeclare function createResource(...args: unknown[]): unknown;\ndeclare function getAction(...args: unknown[]): unknown;\ndeclare function validateActionInput(...args: unknown[]): unknown;\ndeclare function issuesToFieldMap(...args: unknown[]): unknown;\ndeclare function isFormAction(...args: unknown[]): unknown;\n";
13
+ export declare const RUNTIME_OVERRIDE = "\nimport '@vesk/runtime';\ndeclare module '@vesk/runtime' {\n export function track<T>(initialValue: T): Tracked<T>;\n export function track<T>(fn: () => T): Derived<T>;\n export function derived<T>(fn: () => T): Derived<T>;\n}\n";
12
14
  export interface TypecheckResult {
13
15
  errors: TypecheckError[];
14
16
  warnings: TypecheckError[];
@@ -1 +1 @@
1
- {"version":3,"file":"typecheck.d.ts","sourceRoot":"","sources":["../src/typecheck.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAmQD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE,gBAAqB,GAAG,eAAe,CA0FlG;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAItE;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,MAAM,CAI1E"}
1
+ {"version":3,"file":"typecheck.d.ts","sourceRoot":"","sources":["../src/typecheck.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD,eAAO,MAAM,OAAO,66kBAmenB,CAAC;AAEF,eAAO,MAAM,gBAAgB,6OAO5B,CAAC;AAyLF,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE,gBAAqB,GAAG,eAAe,CA0FlG;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAItE;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,MAAM,CAI1E"}
package/dist/typecheck.js CHANGED
@@ -5,22 +5,376 @@ import { parse } from '@vesk/compiler/src/parser';
5
5
  import { vskToTsx, generateVskDts } from '@vesk/compiler/src/vsk-tsx';
6
6
  const SKIP_DIRS = new Set(['node_modules', '.vesk', '.git', 'dist', 'tarballs', '.next']);
7
7
  const SKIP_FILES = new Set(['__vesk_ambient.d.ts', '__vesk_runtime_override.d.ts']);
8
- const AMBIENT = `
8
+ export const AMBIENT = `
9
9
  declare namespace JSX {
10
+ type VeskEventHandler<E extends Event = Event> = (event: E) => void;
11
+ interface VeskCommonAttributes {
12
+ key?: string | number;
13
+ class?: string;
14
+ id?: string;
15
+ style?: string;
16
+ title?: string;
17
+ hidden?: boolean | string;
18
+ lang?: string;
19
+ dir?: 'ltr' | 'rtl' | 'auto';
20
+ tabIndex?: number;
21
+ role?: string;
22
+ }
23
+ interface VeskEventAttributes {
24
+ onClick?: VeskEventHandler<MouseEvent>;
25
+ onDblClick?: VeskEventHandler<MouseEvent>;
26
+ onMouseDown?: VeskEventHandler<MouseEvent>;
27
+ onMouseUp?: VeskEventHandler<MouseEvent>;
28
+ onMouseEnter?: VeskEventHandler<MouseEvent>;
29
+ onMouseLeave?: VeskEventHandler<MouseEvent>;
30
+ onMouseMove?: VeskEventHandler<MouseEvent>;
31
+ onKeyDown?: VeskEventHandler<KeyboardEvent>;
32
+ onKeyUp?: VeskEventHandler<KeyboardEvent>;
33
+ onFocus?: VeskEventHandler<FocusEvent>;
34
+ onBlur?: VeskEventHandler<FocusEvent>;
35
+ onInput?: VeskEventHandler<InputEvent>;
36
+ onChange?: VeskEventHandler<Event>;
37
+ onSubmit?: VeskEventHandler<SubmitEvent>;
38
+ onScroll?: VeskEventHandler<UIEvent>;
39
+ onWheel?: VeskEventHandler<WheelEvent>;
40
+ // Lowercase aliases — HTML attribute names are case-insensitive and real
41
+ // code writes onclick=/oninput=. Keep in sync with the camelCase members.
42
+ onclick?: VeskEventHandler<MouseEvent>;
43
+ ondblclick?: VeskEventHandler<MouseEvent>;
44
+ onmousedown?: VeskEventHandler<MouseEvent>;
45
+ onmouseup?: VeskEventHandler<MouseEvent>;
46
+ onmouseenter?: VeskEventHandler<MouseEvent>;
47
+ onmouseleave?: VeskEventHandler<MouseEvent>;
48
+ onmousemove?: VeskEventHandler<MouseEvent>;
49
+ onkeydown?: VeskEventHandler<KeyboardEvent>;
50
+ onkeyup?: VeskEventHandler<KeyboardEvent>;
51
+ onfocus?: VeskEventHandler<FocusEvent>;
52
+ onblur?: VeskEventHandler<FocusEvent>;
53
+ oninput?: VeskEventHandler<InputEvent>;
54
+ onchange?: VeskEventHandler<Event>;
55
+ onsubmit?: VeskEventHandler<SubmitEvent>;
56
+ }
57
+ type Component = string | number | boolean | null | undefined | Component[];
58
+ interface VeskGlobalAttributes extends VeskCommonAttributes, VeskEventAttributes {
59
+ children?: Component;
60
+ }
61
+ interface VeskAnchorAttributes extends VeskGlobalAttributes {
62
+ href?: string;
63
+ target?: string;
64
+ rel?: string;
65
+ download?: string | boolean;
66
+ type?: string;
67
+ hreflang?: string;
68
+ }
69
+ interface VeskMediaAttributes extends VeskGlobalAttributes {
70
+ src?: string;
71
+ width?: string | number;
72
+ height?: string | number;
73
+ }
74
+ interface VeskInputAttributes extends VeskGlobalAttributes {
75
+ type?: string;
76
+ name?: string;
77
+ value?: string | number | readonly string[];
78
+ placeholder?: string;
79
+ checked?: boolean | string;
80
+ disabled?: boolean | string;
81
+ readOnly?: boolean | string;
82
+ required?: boolean | string;
83
+ min?: string | number;
84
+ max?: string | number;
85
+ step?: string | number;
86
+ pattern?: string;
87
+ autoComplete?: string;
88
+ autoFocus?: boolean | string;
89
+ multiple?: boolean | string;
90
+ accept?: string;
91
+ size?: number;
92
+ list?: string;
93
+ }
10
94
  interface IntrinsicElements {
95
+ html?: VeskGlobalAttributes & { manifest?: string };
96
+ head?: VeskGlobalAttributes;
97
+ body?: VeskGlobalAttributes;
98
+ div?: VeskGlobalAttributes;
99
+ span?: VeskGlobalAttributes;
100
+ p?: VeskGlobalAttributes;
101
+ h1?: VeskGlobalAttributes;
102
+ h2?: VeskGlobalAttributes;
103
+ h3?: VeskGlobalAttributes;
104
+ h4?: VeskGlobalAttributes;
105
+ h5?: VeskGlobalAttributes;
106
+ h6?: VeskGlobalAttributes;
107
+ a?: VeskAnchorAttributes;
108
+ nav?: VeskGlobalAttributes;
109
+ header?: VeskGlobalAttributes;
110
+ footer?: VeskGlobalAttributes;
111
+ main?: VeskGlobalAttributes;
112
+ section?: VeskGlobalAttributes;
113
+ article?: VeskGlobalAttributes;
114
+ aside?: VeskGlobalAttributes;
115
+ button?: VeskGlobalAttributes & {
116
+ type?: 'button' | 'submit' | 'reset';
117
+ disabled?: boolean | string;
118
+ name?: string;
119
+ value?: string | number;
120
+ };
121
+ form?: VeskGlobalAttributes & {
122
+ action?: string;
123
+ method?: 'get' | 'post';
124
+ target?: string;
125
+ encType?: string;
126
+ noValidate?: boolean | string;
127
+ name?: string;
128
+ autoComplete?: string;
129
+ };
130
+ input?: VeskInputAttributes;
131
+ textarea?: VeskGlobalAttributes & {
132
+ rows?: number;
133
+ cols?: number;
134
+ placeholder?: string;
135
+ value?: string | number;
136
+ disabled?: boolean | string;
137
+ readOnly?: boolean | string;
138
+ required?: boolean | string;
139
+ name?: string;
140
+ };
141
+ select?: VeskGlobalAttributes & {
142
+ name?: string;
143
+ value?: string | number | readonly string[];
144
+ disabled?: boolean | string;
145
+ required?: boolean | string;
146
+ multiple?: boolean | string;
147
+ size?: number;
148
+ autoComplete?: string;
149
+ };
150
+ option?: VeskGlobalAttributes & {
151
+ value?: string | number;
152
+ selected?: boolean | string;
153
+ disabled?: boolean | string;
154
+ label?: string;
155
+ };
156
+ optgroup?: VeskGlobalAttributes & { label?: string; disabled?: boolean | string };
157
+ label?: VeskGlobalAttributes & { htmlFor?: string };
158
+ fieldset?: VeskGlobalAttributes & { disabled?: boolean | string; name?: string; form?: string };
159
+ legend?: VeskGlobalAttributes;
160
+ datalist?: VeskGlobalAttributes;
161
+ img?: VeskGlobalAttributes & {
162
+ src?: string;
163
+ alt?: string;
164
+ width?: string | number;
165
+ height?: string | number;
166
+ srcSet?: string;
167
+ sizes?: string;
168
+ loading?: 'eager' | 'lazy';
169
+ decoding?: 'sync' | 'async' | 'auto';
170
+ };
171
+ picture?: VeskGlobalAttributes;
172
+ source?: VeskGlobalAttributes & { src?: string; srcSet?: string; sizes?: string; media?: string; type?: string };
173
+ video?: VeskMediaAttributes & {
174
+ controls?: boolean | string;
175
+ autoPlay?: boolean | string;
176
+ loop?: boolean | string;
177
+ muted?: boolean | string;
178
+ preload?: 'none' | 'metadata' | 'auto' | '';
179
+ poster?: string;
180
+ playsInline?: boolean | string;
181
+ };
182
+ audio?: VeskGlobalAttributes & {
183
+ src?: string;
184
+ controls?: boolean | string;
185
+ autoPlay?: boolean | string;
186
+ loop?: boolean | string;
187
+ muted?: boolean | string;
188
+ preload?: 'none' | 'metadata' | 'auto' | '';
189
+ };
190
+ track?: VeskGlobalAttributes & {
191
+ src?: string;
192
+ kind?: string;
193
+ srclang?: string;
194
+ label?: string;
195
+ default?: boolean | string;
196
+ };
197
+ canvas?: VeskGlobalAttributes & { width?: number; height?: number };
198
+ iframe?: VeskGlobalAttributes & {
199
+ src?: string;
200
+ srcDoc?: string;
201
+ width?: string | number;
202
+ height?: string | number;
203
+ allow?: string;
204
+ loading?: 'eager' | 'lazy';
205
+ sandbox?: string;
206
+ allowFullScreen?: boolean | string;
207
+ referrerPolicy?: string;
208
+ };
209
+ embed?: VeskGlobalAttributes & { src?: string; type?: string; width?: string | number; height?: string | number };
210
+ object?: VeskGlobalAttributes & { data?: string; type?: string; name?: string; width?: string | number; height?: string | number };
211
+ table?: VeskGlobalAttributes;
212
+ caption?: VeskGlobalAttributes;
213
+ thead?: VeskGlobalAttributes;
214
+ tbody?: VeskGlobalAttributes;
215
+ tfoot?: VeskGlobalAttributes;
216
+ tr?: VeskGlobalAttributes;
217
+ th?: VeskGlobalAttributes & { colSpan?: number; rowSpan?: number; scope?: string; headers?: string };
218
+ td?: VeskGlobalAttributes & { colSpan?: number; rowSpan?: number; headers?: string };
219
+ col?: VeskGlobalAttributes & { span?: number };
220
+ colgroup?: VeskGlobalAttributes & { span?: number };
221
+ ul?: VeskGlobalAttributes;
222
+ ol?: VeskGlobalAttributes & { start?: number; reversed?: boolean | string; type?: string };
223
+ li?: VeskGlobalAttributes & { value?: number };
224
+ dl?: VeskGlobalAttributes;
225
+ dt?: VeskGlobalAttributes;
226
+ dd?: VeskGlobalAttributes;
227
+ br?: VeskGlobalAttributes;
228
+ hr?: VeskGlobalAttributes;
229
+ pre?: VeskGlobalAttributes;
230
+ code?: VeskGlobalAttributes;
231
+ blockquote?: VeskGlobalAttributes & { cite?: string };
232
+ q?: VeskGlobalAttributes & { cite?: string };
233
+ strong?: VeskGlobalAttributes;
234
+ em?: VeskGlobalAttributes;
235
+ small?: VeskGlobalAttributes;
236
+ s?: VeskGlobalAttributes;
237
+ cite?: VeskGlobalAttributes;
238
+ dfn?: VeskGlobalAttributes;
239
+ abbr?: VeskGlobalAttributes & { title?: string };
240
+ time?: VeskGlobalAttributes & { dateTime?: string };
241
+ data?: VeskGlobalAttributes & { value?: string | number };
242
+ mark?: VeskGlobalAttributes;
243
+ del?: VeskGlobalAttributes & { cite?: string; dateTime?: string };
244
+ ins?: VeskGlobalAttributes & { cite?: string; dateTime?: string };
245
+ sub?: VeskGlobalAttributes;
246
+ sup?: VeskGlobalAttributes;
247
+ u?: VeskGlobalAttributes;
248
+ kbd?: VeskGlobalAttributes;
249
+ samp?: VeskGlobalAttributes;
250
+ var?: VeskGlobalAttributes;
251
+ figure?: VeskGlobalAttributes;
252
+ figcaption?: VeskGlobalAttributes;
253
+ details?: VeskGlobalAttributes & { open?: boolean | string };
254
+ summary?: VeskGlobalAttributes;
255
+ dialog?: VeskGlobalAttributes & { open?: boolean | string };
256
+ menu?: VeskGlobalAttributes;
257
+ address?: VeskGlobalAttributes;
258
+ b?: VeskGlobalAttributes;
259
+ i?: VeskGlobalAttributes;
260
+ ruby?: VeskGlobalAttributes;
261
+ rt?: VeskGlobalAttributes;
262
+ rp?: VeskGlobalAttributes;
263
+ bdi?: VeskGlobalAttributes;
264
+ bdo?: VeskGlobalAttributes;
265
+ wbr?: VeskGlobalAttributes;
266
+ area?: VeskGlobalAttributes & {
267
+ coords?: string;
268
+ shape?: string;
269
+ href?: string;
270
+ target?: string;
271
+ alt?: string;
272
+ };
273
+ map?: VeskGlobalAttributes & { name?: string };
274
+ noscript?: VeskGlobalAttributes;
275
+ template?: VeskGlobalAttributes;
276
+ slot?: VeskGlobalAttributes & { name?: string };
277
+ meta?: VeskGlobalAttributes & { name?: string; content?: string; charSet?: string; httpEquiv?: string };
278
+ title?: VeskGlobalAttributes;
279
+ base?: VeskGlobalAttributes & { href?: string; target?: string };
280
+ link?: VeskGlobalAttributes & {
281
+ rel?: string;
282
+ href?: string;
283
+ sizes?: string;
284
+ media?: string;
285
+ as?: string;
286
+ crossOrigin?: string;
287
+ integrity?: string;
288
+ type?: string;
289
+ };
290
+ style?: VeskGlobalAttributes & { media?: string };
291
+ script?: VeskGlobalAttributes & {
292
+ src?: string;
293
+ async?: boolean | string;
294
+ defer?: boolean | string;
295
+ type?: string;
296
+ crossOrigin?: string;
297
+ integrity?: string;
298
+ nonce?: string;
299
+ noModule?: boolean | string;
300
+ };
301
+ svg?: VeskGlobalAttributes & {
302
+ viewBox?: string;
303
+ xmlns?: string;
304
+ width?: string | number;
305
+ height?: string | number;
306
+ fill?: string;
307
+ stroke?: string;
308
+ strokeWidth?: string | number;
309
+ };
310
+ g?: VeskGlobalAttributes & { transform?: string; fill?: string; stroke?: string; strokeWidth?: string | number };
311
+ path?: VeskGlobalAttributes & {
312
+ d?: string;
313
+ fill?: string;
314
+ stroke?: string;
315
+ strokeWidth?: string | number;
316
+ fillRule?: string;
317
+ clipRule?: string;
318
+ };
319
+ circle?: VeskGlobalAttributes & {
320
+ cx?: string | number;
321
+ cy?: string | number;
322
+ r?: string | number;
323
+ fill?: string;
324
+ stroke?: string;
325
+ strokeWidth?: string | number;
326
+ };
327
+ ellipse?: VeskGlobalAttributes & {
328
+ cx?: string | number;
329
+ cy?: string | number;
330
+ rx?: string | number;
331
+ ry?: string | number;
332
+ fill?: string;
333
+ };
334
+ rect?: VeskGlobalAttributes & {
335
+ x?: string | number;
336
+ y?: string | number;
337
+ width?: string | number;
338
+ height?: string | number;
339
+ rx?: string | number;
340
+ ry?: string | number;
341
+ fill?: string;
342
+ };
343
+ line?: VeskGlobalAttributes & {
344
+ x1?: string | number;
345
+ y1?: string | number;
346
+ x2?: string | number;
347
+ y2?: string | number;
348
+ stroke?: string;
349
+ strokeWidth?: string | number;
350
+ };
351
+ polyline?: VeskGlobalAttributes & { points?: string; fill?: string; stroke?: string };
352
+ polygon?: VeskGlobalAttributes & { points?: string; fill?: string; stroke?: string };
353
+ text?: VeskGlobalAttributes & { x?: string | number; y?: string | number; fill?: string; fontSize?: string | number };
354
+ defs?: VeskGlobalAttributes;
355
+ linearGradient?: VeskGlobalAttributes;
356
+ radialGradient?: VeskGlobalAttributes;
357
+ stop?: VeskGlobalAttributes & { offset?: string | number; stopColor?: string; stopOpacity?: string | number };
358
+
359
+ // Unknown/custom tags stay permissive — components and web components
360
+ // resolve through the index signature, known tags get the typed members.
11
361
  [elemName: string]: unknown;
12
362
  }
363
+ type Component = string | number | boolean | null | undefined | Component[];
13
364
  }
14
- declare const Head: (props: { children?: unknown }) => unknown;
15
- declare class Cell<T> {
365
+ declare type Component = string | number | boolean | null | undefined | Component[];
366
+ declare const Head: (props: { children?: Component }) => Component;
367
+ interface Tracked<T> {
16
368
  get(): T;
17
- set(value: T): boolean;
18
- peek(): T;
19
- update(fn: (current: T) => T): boolean;
20
- unsubscribe(effect: unknown): void;
369
+ set(value: T): void;
21
370
  }
22
- declare function track<T>(initialValue: T): Cell<T>;
23
- declare function derived<T>(fn: () => T): Cell<T>;
371
+ interface Derived<T> {
372
+ get(): T;
373
+ set(value: T): void;
374
+ }
375
+ declare function track<T>(initialValue: T): Tracked<T>;
376
+ declare function track<T>(fn: () => T): Derived<T>;
377
+ declare function derived<T>(fn: () => T): Derived<T>;
24
378
  declare function effect(fn: () => void): unknown;
25
379
  declare function untrack<T>(fn: () => T): T;
26
380
  declare function peek<T>(fn: () => T): T;
@@ -28,35 +382,103 @@ declare function tick(): Promise<void>;
28
382
  declare function flushSync(fn: () => void): void;
29
383
  declare function on_destroy(fn: () => void): void;
30
384
  declare function createContext<T>(defaultValue?: T): { id: symbol; defaultValue: T | undefined };
31
- declare function useFetch<T = unknown>(...args: unknown[]): T;
385
+ // useFetch returns a THENABLE resource, not the data itself. In async
386
+ // components you must \`await\` it before reading/iterating the payload;
387
+ // passing \`into: <tracked cell>\` writes the payload into the cell and makes
388
+ // awaiting unnecessary (the return value can be ignored).
389
+ interface VeskResource<T> {
390
+ loading: boolean;
391
+ error: unknown;
392
+ data: T | undefined;
393
+ refresh(): void;
394
+ abort(): void;
395
+ then<TResult1 = T, TResult2 = never>(
396
+ onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null,
397
+ onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | undefined | null,
398
+ ): PromiseLike<TResult1 | TResult2>;
399
+ }
400
+ interface VeskUseFetchOptions<T> {
401
+ /** Cache/SSR key — defaults to the URL string. */
402
+ key?: string;
403
+ /** Target tracked cell (from track<T>()) — the payload is written into it, so awaiting is unnecessary. */
404
+ into?: Tracked<T>;
405
+ staleTime?: number;
406
+ keepPreviousData?: boolean;
407
+ retry?: number;
408
+ retryDelay?: number;
409
+ timeout?: number;
410
+ enabled?: boolean;
411
+ dedupe?: boolean;
412
+ method?: string;
413
+ headers?: Record<string, string>;
414
+ body?: unknown;
415
+ credentials?: 'omit' | 'same-origin' | 'include';
416
+ signal?: { readonly aborted: boolean };
417
+ }
418
+ declare function useFetch<T = unknown>(
419
+ urlOrFn: string | (() => Promise<T>),
420
+ options?: VeskUseFetchOptions<T>,
421
+ ): VeskResource<T>;
32
422
  declare function useRouter(): unknown;
33
423
  declare function useParams(): Record<string, string>;
34
424
  declare function usePathname(): string;
35
425
  declare function useSearchParams(): URLSearchParams;
36
426
  declare function useNavigate(): (to: string) => void;
37
427
  declare function defineAction(...args: unknown[]): unknown;
38
- declare const Form: (props: { [k: string]: unknown; children?: unknown }) => unknown;
39
- declare const Field: (props: { [k: string]: unknown; children?: unknown }) => unknown;
428
+ declare const Form: (props: { [k: string]: unknown; children?: Component }) => Component;
429
+ declare const Field: (props: { [k: string]: unknown; children?: Component }) => Component;
40
430
  declare function required(...args: unknown[]): unknown;
41
431
  declare function email(...args: unknown[]): unknown;
42
432
  declare function minLength(...args: unknown[]): unknown;
43
433
  declare function maxLength(...args: unknown[]): unknown;
44
434
  declare function pattern(...args: unknown[]): unknown;
45
435
  declare function custom(...args: unknown[]): unknown;
46
- declare const Link: (props: { [k: string]: unknown; children?: unknown }) => unknown;
47
- declare const NavLink: (props: { [k: string]: unknown; children?: unknown }) => unknown;
48
- declare const Outlet: (props: { [k: string]: unknown; children?: unknown }) => unknown;
49
- declare const Image: (props: { [k: string]: unknown; children?: unknown }) => unknown;
50
- declare const Portal: (props: { [k: string]: unknown; children?: unknown }) => unknown;
51
- declare const Experiment: (props: { [k: string]: unknown; children?: unknown }) => unknown;
52
- declare const JsonLd: (props: { [k: string]: unknown; children?: unknown }) => unknown;
53
- declare const ArticleSchema: (props: { [k: string]: unknown; children?: unknown }) => unknown;
54
- declare const ProductSchema: (props: { [k: string]: unknown; children?: unknown }) => unknown;
55
- declare const FAQPageSchema: (props: { [k: string]: unknown; children?: unknown }) => unknown;
56
- declare const BreadcrumbListSchema: (props: { [k: string]: unknown; children?: unknown }) => unknown;
57
- declare const OrganizationSchema: (props: { [k: string]: unknown; children?: unknown }) => unknown;
58
- declare const LocalBusinessSchema: (props: { [k: string]: unknown; children?: unknown }) => unknown;
59
- declare const VideoSchema: (props: { [k: string]: unknown; children?: unknown }) => unknown;
436
+ declare const Link: (props: { [k: string]: unknown; children?: Component }) => Component;
437
+ declare const NavLink: (props: { [k: string]: unknown; children?: Component }) => Component;
438
+ declare const Outlet: (props: { [k: string]: unknown; children?: Component }) => Component;
439
+ declare const Image: (props: { [k: string]: unknown; children?: Component }) => Component;
440
+ declare const Portal: (props: { [k: string]: unknown; children?: Component }) => Component;
441
+ declare const Experiment: (props: { [k: string]: unknown; children?: Component }) => Component;
442
+ declare function useLoadingIndicator(options?: {
443
+ duration?: number;
444
+ throttle?: number;
445
+ hideDelay?: number;
446
+ resetDelay?: number;
447
+ estimatedProgress?: (duration: number, elapsed: number) => number;
448
+ }): {
449
+ progress: Tracked<number>;
450
+ isLoading: Tracked<boolean>;
451
+ error: Tracked<boolean>;
452
+ start(opts?: { force?: boolean }): void;
453
+ set(value: number, opts?: { force?: boolean }): void;
454
+ finish(opts?: { force?: boolean; error?: boolean }): void;
455
+ clear(): void;
456
+ };
457
+ declare const LoadingIndicator: (props: {
458
+ color?: string | false;
459
+ errorColor?: string;
460
+ height?: number | string;
461
+ position?: 'top' | 'bottom';
462
+ zIndex?: number;
463
+ duration?: number;
464
+ throttle?: number;
465
+ hideDelay?: number;
466
+ resetDelay?: number;
467
+ estimatedProgress?: (duration: number, elapsed: number) => number;
468
+ class?: string;
469
+ className?: string;
470
+ style?: string;
471
+ children?: Component;
472
+ [k: string]: unknown;
473
+ }) => Component;
474
+ declare const JsonLd: (props: { [k: string]: unknown; children?: Component }) => Component;
475
+ declare const ArticleSchema: (props: { [k: string]: unknown; children?: Component }) => Component;
476
+ declare const ProductSchema: (props: { [k: string]: unknown; children?: Component }) => Component;
477
+ declare const FAQPageSchema: (props: { [k: string]: unknown; children?: Component }) => Component;
478
+ declare const BreadcrumbListSchema: (props: { [k: string]: unknown; children?: Component }) => Component;
479
+ declare const OrganizationSchema: (props: { [k: string]: unknown; children?: Component }) => Component;
480
+ declare const LocalBusinessSchema: (props: { [k: string]: unknown; children?: Component }) => Component;
481
+ declare const VideoSchema: (props: { [k: string]: unknown; children?: Component }) => Component;
60
482
  declare function redirect(...args: unknown[]): unknown;
61
483
  declare function permanentRedirect(...args: unknown[]): unknown;
62
484
  declare function notFound(...args: unknown[]): never;
@@ -67,11 +489,12 @@ declare function validateActionInput(...args: unknown[]): unknown;
67
489
  declare function issuesToFieldMap(...args: unknown[]): unknown;
68
490
  declare function isFormAction(...args: unknown[]): unknown;
69
491
  `;
70
- const RUNTIME_OVERRIDE = `
492
+ export const RUNTIME_OVERRIDE = `
71
493
  import '@vesk/runtime';
72
494
  declare module '@vesk/runtime' {
73
- export function track<T>(initialValue: T): Cell<T>;
74
- export function derived<T>(fn: () => T): Cell<T>;
495
+ export function track<T>(initialValue: T): Tracked<T>;
496
+ export function track<T>(fn: () => T): Derived<T>;
497
+ export function derived<T>(fn: () => T): Derived<T>;
75
498
  }
76
499
  `;
77
500
  function walkProjectFiles(projectRoot) {