@askrjs/askr 0.0.4 → 0.0.6

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 (80) hide show
  1. package/dist/{index.d.cts → component-BBGWJdqJ.d.ts} +42 -33
  2. package/dist/foundations/index.d.ts +32 -0
  3. package/dist/{chunk-WTFWRSHB.js → foundations/index.js} +76 -28
  4. package/dist/foundations/index.js.map +1 -0
  5. package/dist/fx/index.js +295 -77
  6. package/dist/fx/index.js.map +1 -1
  7. package/dist/index.d.ts +4 -134
  8. package/dist/index.js +3709 -42
  9. package/dist/index.js.map +1 -1
  10. package/dist/{jsx/jsx-dev-runtime.d.ts → jsx-dev-runtime.d.ts} +3 -3
  11. package/dist/jsx-dev-runtime.js +17 -0
  12. package/dist/jsx-dev-runtime.js.map +1 -0
  13. package/dist/jsx-runtime.d.ts +14 -0
  14. package/dist/{chunk-SALJX5PZ.js → jsx-runtime.js} +6 -9
  15. package/dist/jsx-runtime.js.map +1 -0
  16. package/dist/layout-D5MqtW_q.d.ts +14 -0
  17. package/dist/resources/index.d.ts +3 -0
  18. package/dist/resources/index.js +753 -239
  19. package/dist/resources/index.js.map +1 -1
  20. package/dist/router/index.d.ts +2 -14
  21. package/dist/router/index.js +3115 -19
  22. package/dist/router/index.js.map +1 -1
  23. package/dist/ssr/index.js +3363 -103
  24. package/dist/ssr/index.js.map +1 -1
  25. package/dist/{types-CZHOAiC1.d.ts → types-uOPfcrdz.d.ts} +3 -1
  26. package/dist/vite/index.d.ts +17 -0
  27. package/dist/vite/index.js +2306 -0
  28. package/dist/vite/index.js.map +1 -0
  29. package/package.json +21 -23
  30. package/dist/chunk-64C7W2AE.js +0 -43
  31. package/dist/chunk-64C7W2AE.js.map +0 -1
  32. package/dist/chunk-6FLMH4EL.js +0 -124
  33. package/dist/chunk-6FLMH4EL.js.map +0 -1
  34. package/dist/chunk-FJUXFA72.js +0 -16
  35. package/dist/chunk-FJUXFA72.js.map +0 -1
  36. package/dist/chunk-SALJX5PZ.js.map +0 -1
  37. package/dist/chunk-VRAEBIJ3.js +0 -82
  38. package/dist/chunk-VRAEBIJ3.js.map +0 -1
  39. package/dist/chunk-WTFWRSHB.js.map +0 -1
  40. package/dist/chunk-XHKZGJE3.js +0 -2907
  41. package/dist/chunk-XHKZGJE3.js.map +0 -1
  42. package/dist/chunk-Z5ZSTLYF.js +0 -420
  43. package/dist/chunk-Z5ZSTLYF.js.map +0 -1
  44. package/dist/fx/index.cjs +0 -1193
  45. package/dist/fx/index.cjs.map +0 -1
  46. package/dist/fx/index.d.cts +0 -186
  47. package/dist/index.cjs +0 -4035
  48. package/dist/index.cjs.map +0 -1
  49. package/dist/jsx/jsx-dev-runtime.cjs +0 -46
  50. package/dist/jsx/jsx-dev-runtime.cjs.map +0 -1
  51. package/dist/jsx/jsx-dev-runtime.d.cts +0 -12
  52. package/dist/jsx/jsx-dev-runtime.js +0 -19
  53. package/dist/jsx/jsx-dev-runtime.js.map +0 -1
  54. package/dist/jsx/jsx-runtime.cjs +0 -54
  55. package/dist/jsx/jsx-runtime.cjs.map +0 -1
  56. package/dist/jsx/jsx-runtime.d.cts +0 -21
  57. package/dist/jsx/jsx-runtime.d.ts +0 -21
  58. package/dist/jsx/jsx-runtime.js +0 -16
  59. package/dist/jsx/jsx-runtime.js.map +0 -1
  60. package/dist/jsx-AzPM8gMS.d.cts +0 -35
  61. package/dist/navigate-LUVYHYZZ.js +0 -17
  62. package/dist/navigate-LUVYHYZZ.js.map +0 -1
  63. package/dist/resources/index.cjs +0 -1200
  64. package/dist/resources/index.cjs.map +0 -1
  65. package/dist/resources/index.d.cts +0 -21
  66. package/dist/route-BCND6MPK.js +0 -32
  67. package/dist/route-BCND6MPK.js.map +0 -1
  68. package/dist/router/index.cjs +0 -3247
  69. package/dist/router/index.cjs.map +0 -1
  70. package/dist/router/index.d.cts +0 -64
  71. package/dist/router-DaGtH1Sq.d.cts +0 -36
  72. package/dist/ssr/index.cjs +0 -4059
  73. package/dist/ssr/index.cjs.map +0 -1
  74. package/dist/ssr/index.d.cts +0 -123
  75. package/dist/types-CZ5sWur5.d.cts +0 -23
  76. package/src/jsx/index.ts +0 -4
  77. package/src/jsx/jsx-dev-runtime.ts +0 -23
  78. package/src/jsx/jsx-runtime.ts +0 -48
  79. package/src/jsx/types.ts +0 -33
  80. package/src/jsx/utils.ts +0 -19
@@ -1,6 +1,6 @@
1
- import '../types-CZHOAiC1.js';
2
- import { J as JSXElement } from '../jsx-AzPM8gMS.js';
3
- export { F as Fragment } from '../jsx-AzPM8gMS.js';
1
+ import './types-uOPfcrdz.js';
2
+ import { J as JSXElement } from './jsx-AzPM8gMS.js';
3
+ export { F as Fragment } from './jsx-AzPM8gMS.js';
4
4
 
5
5
  /**
6
6
  * JSX dev runtime factory
@@ -0,0 +1,17 @@
1
+ // src/common/jsx.ts
2
+ var ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("askr.element");
3
+ var Fragment = /* @__PURE__ */ Symbol.for("askr.fragment");
4
+
5
+ // src/jsx/jsx-dev-runtime.ts
6
+ function jsxDEV(type, props, key) {
7
+ return {
8
+ $$typeof: ELEMENT_TYPE,
9
+ type,
10
+ props: props ?? {},
11
+ key: key ?? null
12
+ };
13
+ }
14
+
15
+ export { Fragment, jsxDEV };
16
+ //# sourceMappingURL=jsx-dev-runtime.js.map
17
+ //# sourceMappingURL=jsx-dev-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common/jsx.ts","../src/jsx/jsx-dev-runtime.ts"],"names":[],"mappings":";AAMO,IAAM,YAAA,mBAAe,MAAA,CAAO,GAAA,CAAI,cAAc,CAAA;AAC9C,IAAM,QAAA,mBAAW,MAAA,CAAO,GAAA,CAAI,eAAe;;;ACD3C,SAAS,MAAA,CACd,IAAA,EACA,KAAA,EACA,GAAA,EACY;AACZ,EAAA,OAAO;AAAA,IACL,QAAA,EAAU,YAAA;AAAA,IACV,IAAA;AAAA,IACA,KAAA,EAAO,SAAS,EAAC;AAAA,IACjB,KAAK,GAAA,IAAO;AAAA,GACd;AACF","file":"jsx-dev-runtime.js","sourcesContent":["/**\n * Common call contracts: JSX element shape\n */\n\nimport type { Props } from './props';\n\nexport const ELEMENT_TYPE = Symbol.for('askr.element');\nexport const Fragment = Symbol.for('askr.fragment');\n\nexport interface JSXElement {\n /** Internal element marker (optional for plain vnode objects) */\n $$typeof?: symbol;\n\n /** Element type: string, component, Fragment, etc */\n type: unknown;\n\n /** Props bag */\n props: Props;\n\n /** Optional key (normalized by runtime) */\n key?: string | number | null;\n}\n","/**\n * JSX dev runtime factory\n * Same element shape as production runtime, with room for dev warnings.\n */\nimport { ELEMENT_TYPE, Fragment, JSXElement } from './types';\n\nexport function jsxDEV(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: string | number\n): JSXElement {\n return {\n $$typeof: ELEMENT_TYPE,\n type,\n props: props ?? {},\n key: key ?? null,\n };\n}\n\n// Re-export Fragment for JSX\nexport { Fragment };\n"]}
@@ -0,0 +1,14 @@
1
+ import './types-uOPfcrdz.js';
2
+ import { J as JSXElement } from './jsx-AzPM8gMS.js';
3
+ export { F as Fragment } from './jsx-AzPM8gMS.js';
4
+
5
+ /**
6
+ * JSX runtime factory
7
+ * Same element shape as production runtime.
8
+ */
9
+
10
+ declare function jsxDEV(type: unknown, props: Record<string, unknown> | null, key?: string | number): JSXElement;
11
+ declare function jsx(type: unknown, props: Record<string, unknown> | null, key?: string | number): JSXElement;
12
+ declare function jsxs(type: unknown, props: Record<string, unknown> | null, key?: string | number): JSXElement;
13
+
14
+ export { jsx, jsxDEV, jsxs };
@@ -1,6 +1,8 @@
1
- // src/jsx/jsx-runtime.ts
1
+ // src/common/jsx.ts
2
2
  var ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("askr.element");
3
3
  var Fragment = /* @__PURE__ */ Symbol.for("askr.fragment");
4
+
5
+ // src/jsx/jsx-runtime.ts
4
6
  function jsxDEV(type, props, key) {
5
7
  return {
6
8
  $$typeof: ELEMENT_TYPE,
@@ -16,11 +18,6 @@ function jsxs(type, props, key) {
16
18
  return jsxDEV(type, props, key);
17
19
  }
18
20
 
19
- export {
20
- ELEMENT_TYPE,
21
- Fragment,
22
- jsxDEV,
23
- jsx,
24
- jsxs
25
- };
26
- //# sourceMappingURL=chunk-SALJX5PZ.js.map
21
+ export { Fragment, jsx, jsxDEV, jsxs };
22
+ //# sourceMappingURL=jsx-runtime.js.map
23
+ //# sourceMappingURL=jsx-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common/jsx.ts","../src/jsx/jsx-runtime.ts"],"names":[],"mappings":";AAMO,IAAM,YAAA,mBAAe,MAAA,CAAO,GAAA,CAAI,cAAc,CAAA;AAC9C,IAAM,QAAA,mBAAW,MAAA,CAAO,GAAA,CAAI,eAAe;;;ACA3C,SAAS,MAAA,CACd,IAAA,EACA,KAAA,EACA,GAAA,EACY;AACZ,EAAA,OAAO;AAAA,IACL,QAAA,EAAU,YAAA;AAAA,IACV,IAAA;AAAA,IACA,KAAA,EAAO,SAAS,EAAC;AAAA,IACjB,KAAK,GAAA,IAAO;AAAA,GACd;AACF;AAGO,SAAS,GAAA,CACd,IAAA,EACA,KAAA,EACA,GAAA,EACA;AACA,EAAA,OAAO,MAAA,CAAO,IAAA,EAAM,KAAA,EAAO,GAAG,CAAA;AAChC;AAEO,SAAS,IAAA,CACd,IAAA,EACA,KAAA,EACA,GAAA,EACA;AACA,EAAA,OAAO,MAAA,CAAO,IAAA,EAAM,KAAA,EAAO,GAAG,CAAA;AAChC","file":"jsx-runtime.js","sourcesContent":["/**\n * Common call contracts: JSX element shape\n */\n\nimport type { Props } from './props';\n\nexport const ELEMENT_TYPE = Symbol.for('askr.element');\nexport const Fragment = Symbol.for('askr.fragment');\n\nexport interface JSXElement {\n /** Internal element marker (optional for plain vnode objects) */\n $$typeof?: symbol;\n\n /** Element type: string, component, Fragment, etc */\n type: unknown;\n\n /** Props bag */\n props: Props;\n\n /** Optional key (normalized by runtime) */\n key?: string | number | null;\n}\n","/**\n * JSX runtime factory\n * Same element shape as production runtime.\n */\n\nimport { ELEMENT_TYPE, Fragment, type JSXElement } from './types';\n\nexport function jsxDEV(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: string | number\n): JSXElement {\n return {\n $$typeof: ELEMENT_TYPE,\n type,\n props: props ?? {},\n key: key ?? null,\n };\n}\n\n// Production-style helpers: alias to the DEV factory for now\nexport function jsx(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: string | number\n) {\n return jsxDEV(type, props, key);\n}\n\nexport function jsxs(\n type: unknown,\n props: Record<string, unknown> | null,\n key?: string | number\n) {\n return jsxDEV(type, props, key);\n}\n\n// Re-export Fragment for JSX.\nexport { Fragment };\n"]}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Layout helper.
3
+ *
4
+ * A layout is just a normal component that wraps children.
5
+ * Persistence and reuse are handled by the runtime via component identity.
6
+ *
7
+ * This helper exists purely for readability and convention.
8
+ */
9
+ type LayoutComponent<P = object> = (props: P & {
10
+ children?: unknown;
11
+ }) => unknown;
12
+ declare function layout<P = object>(Layout: LayoutComponent<P>): (children?: unknown, props?: P) => unknown;
13
+
14
+ export { type LayoutComponent as L, layout as l };
@@ -1,3 +1,6 @@
1
+ export { g as getSignal } from '../component-BBGWJdqJ.js';
2
+ import '../jsx-AzPM8gMS.js';
3
+
1
4
  interface ResourceResult<T> {
2
5
  value: T | null;
3
6
  pending: boolean;