@askrjs/askr 0.0.6 → 0.0.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.
@@ -22,8 +22,8 @@ interface Props {
22
22
 
23
23
  declare const Fragment: unique symbol;
24
24
  interface JSXElement {
25
- /** Internal element marker (optional for plain vnode objects) */
26
- $$typeof?: symbol;
25
+ /** Internal element marker */
26
+ $$typeof: symbol;
27
27
  /** Element type: string, component, Fragment, etc */
28
28
  type: unknown;
29
29
  /** Props bag */
@@ -1,6 +1,6 @@
1
- import './types-uOPfcrdz.js';
2
- import { J as JSXElement } from './jsx-AzPM8gMS.js';
3
- export { F as Fragment } from './jsx-AzPM8gMS.js';
1
+ import './types-DxdosFWx.js';
2
+ import { J as JSXElement } from './jsx-CSWf4VFg.js';
3
+ export { F as Fragment } from './jsx-CSWf4VFg.js';
4
4
 
5
5
  /**
6
6
  * JSX dev runtime factory
@@ -1 +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"]}
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 */\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"]}
@@ -1,6 +1,6 @@
1
- import './types-uOPfcrdz.js';
2
- import { J as JSXElement } from './jsx-AzPM8gMS.js';
3
- export { F as Fragment } from './jsx-AzPM8gMS.js';
1
+ import './types-DxdosFWx.js';
2
+ import { J as JSXElement } from './jsx-CSWf4VFg.js';
3
+ export { F as Fragment } from './jsx-CSWf4VFg.js';
4
4
 
5
5
  /**
6
6
  * JSX runtime factory
@@ -1 +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"]}
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 */\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,29 @@
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
+ * POLICY DECISIONS (LOCKED):
10
+ *
11
+ * 1. Return Type is Opaque (unknown)
12
+ * Layout components return `unknown` to remain runtime-agnostic.
13
+ * The runtime owns concrete JSX element types.
14
+ *
15
+ * 2. Children Positioning
16
+ * Layout receives children as first argument (router-friendly).
17
+ * Props come second. This matches route layout conventions where
18
+ * children represent the nested route content.
19
+ *
20
+ * 3. Props Spreading
21
+ * Props are spread into the layout component. This is intentional
22
+ * and deterministic — no merging or composition.
23
+ */
24
+ type LayoutComponent<P = object> = (props: P & {
25
+ children?: unknown;
26
+ }) => unknown;
27
+ declare function layout<P = object>(Layout: LayoutComponent<P>): (children?: unknown, props?: P) => unknown;
28
+
29
+ export { type LayoutComponent as L, layout as l };
@@ -1,5 +1,5 @@
1
- export { g as getSignal } from '../component-BBGWJdqJ.js';
2
- import '../jsx-AzPM8gMS.js';
1
+ export { g as getSignal } from '../component-DHAn9JxU.js';
2
+ import '../jsx-CSWf4VFg.js';
3
3
 
4
4
  interface ResourceResult<T> {
5
5
  value: T | null;
@@ -288,6 +288,9 @@ var Scheduler = class {
288
288
  };
289
289
  var globalScheduler = new Scheduler();
290
290
 
291
+ // src/common/jsx.ts
292
+ var Fragment = /* @__PURE__ */ Symbol.for("askr.fragment");
293
+
291
294
  // src/renderer/utils.ts
292
295
  function isIgnoredForPropChanges(key) {
293
296
  if (key === "children" || key === "key") return true;
@@ -456,9 +459,6 @@ function isKeyedReorderFastPathEligible(parent, newChildren, oldKeyMap) {
456
459
  };
457
460
  }
458
461
 
459
- // src/common/jsx.ts
460
- var Fragment = /* @__PURE__ */ Symbol.for("askr.fragment");
461
-
462
462
  // src/runtime/dev-namespace.ts
463
463
  function getDevNamespace() {
464
464
  if (process.env.NODE_ENV === "production") return {};