@devframes/json-render 1.3.1 → 1.3.3

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.
package/dist/core.d.mts CHANGED
@@ -1,2 +1,12 @@
1
+ /**
2
+ * Curated, named re-exports of `@json-render/core`, the upstream wire
3
+ * contract Devframes builds on. This is an **explicit** allowlist (never
4
+ * `export *`): every name here is a Devframes semver commitment, so the
5
+ * surface stays small and reviewed. Streaming, prompt/generation, and
6
+ * devtools hooks are deliberately excluded from the base contract (a
7
+ * streaming subpath may be added later, see the plan).
8
+ *
9
+ * @see https://www.npmjs.com/package/@json-render/core
10
+ */
1
11
  import { Catalog, InferActionParams, InferCatalogActions, InferCatalogComponents, InferCatalogInput, InferComponentProps, InferSpec, Schema, SchemaBuilder, SchemaDefinition, SchemaOptions, SchemaType, Spec, StateModel, StateStore, UIElement, createStateStore, defineCatalog, defineSchema } from "@json-render/core";
2
12
  export { type Catalog, type InferActionParams, type InferCatalogActions, type InferCatalogComponents, type InferCatalogInput, type InferComponentProps, type InferSpec, type Schema, type SchemaBuilder, type SchemaDefinition, type SchemaOptions, type SchemaType, type Spec, type StateModel, type StateStore, type UIElement, createStateStore, defineCatalog, defineSchema };
package/dist/core.mjs CHANGED
@@ -1,2 +1 @@
1
- import { createStateStore, defineCatalog, defineSchema } from "@json-render/core";
2
- export { createStateStore, defineCatalog, defineSchema };
1
+ export { createStateStore, defineCatalog, defineSchema } from "@json-render/core";
package/dist/hub.d.mts CHANGED
@@ -1,7 +1,6 @@
1
- import { a as JsonRenderViewRef, r as JsonRenderView } from "./types-ByXkazOp.mjs";
1
+ import { a as JsonRenderViewRef, r as JsonRenderView } from "./types-paiFdDLk.mjs";
2
2
  import { DockRenderer, DockRendererMountOptions } from "@devframes/hub/client";
3
3
  import { DevframeDockEntryBase } from "@devframes/hub/types";
4
- //#region src/hub.d.ts
5
4
  /**
6
5
  * A `json-render` dock entry. Contributed to the hub's **open** dock union
7
6
  * (`DevframeDockEntryRegistry`) by this opt-in integration, since the hub itself
@@ -40,5 +39,4 @@ export type JsonRenderDockRenderer = DockRenderer<DevframeJsonRenderDockEntry>;
40
39
  * metadata (id, title, icon, …). Projects the view down to its serializable
41
40
  * {@link JsonRenderViewRef} so it survives dock projection into shared state.
42
41
  */
43
- export declare function toJsonRenderDockEntry(view: JsonRenderView, meta: Omit<DevframeJsonRenderDockEntry, 'type' | 'view'>): DevframeJsonRenderDockEntry;
44
- //#endregion
42
+ export declare function toJsonRenderDockEntry(view: JsonRenderView, meta: Omit<DevframeJsonRenderDockEntry, 'type' | 'view'>): DevframeJsonRenderDockEntry;
package/dist/hub.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/hub.ts
1
+ // src/hub.ts
2
2
  /**
3
3
  * Build a `json-render` dock entry from a {@link JsonRenderView} and the dock
4
4
  * metadata (id, title, icon, …). Projects the view down to its serializable
@@ -11,5 +11,4 @@ function toJsonRenderDockEntry(view, meta) {
11
11
  view: view.ref
12
12
  };
13
13
  }
14
- //#endregion
15
14
  export { toJsonRenderDockEntry };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { Catalog, InferComponentProps, Spec, StateModel, StateStore, UIElement } from "./core.mjs";
2
- import { a as JsonRenderViewRef, i as JsonRenderViewInlineRef, n as DevframeJsonRenderSpec, o as JsonRenderViewStateRef, r as JsonRenderView, t as CatalogUIElement } from "./types-ByXkazOp.mjs";
2
+ import { a as JsonRenderViewRef, i as JsonRenderViewInlineRef, n as DevframeJsonRenderSpec, o as JsonRenderViewStateRef, r as JsonRenderView, t as CatalogUIElement } from "./types-paiFdDLk.mjs";
3
3
  import { z } from "zod";
4
- //#region src/prop-schemas.d.ts
5
4
  export declare const StackPropsSchema: z.ZodObject<{
6
5
  direction: z.ZodOptional<z.ZodEnum<{
7
6
  row: "row";
@@ -357,8 +356,6 @@ export declare const basePropSchemas: {
357
356
  type BaseComponentName = keyof typeof basePropSchemas;
358
357
  /** The ordered list of base-catalog component names (catalog v1). */
359
358
  export declare const baseComponentNames: BaseComponentName[];
360
- //#endregion
361
- //#region src/catalog.d.ts
362
359
  /**
363
360
  * The Devframes base-catalog schema. A Devframes spec is an
364
361
  * `@json-render/core` `Spec` (flat `root` + `elements` map); the structural
@@ -416,8 +413,6 @@ export declare const baseCatalog: import("@json-render/core").Catalog<{
416
413
  }; };
417
414
  actions: {};
418
415
  }>;
419
- //#endregion
420
- //#region src/view-index.d.ts
421
416
  /**
422
417
  * Well-known shared-state key carrying the **view index**: a map of every
423
418
  * live JSON-render view registered on a context, keyed by its `stateKey`.
@@ -446,5 +441,4 @@ interface JsonRenderIndexEntry {
446
441
  }
447
442
  /** The shape of the view-index shared state: entries keyed by `stateKey`. */
448
443
  type JsonRenderIndex = Record<string, JsonRenderIndexEntry>;
449
- //#endregion
450
444
  export type { BaseComponentName, Catalog, CatalogUIElement, DevframeJsonRenderSpec, InferComponentProps, JsonRenderIndex, JsonRenderIndexEntry, JsonRenderView, JsonRenderViewInlineRef, JsonRenderViewRef, JsonRenderViewStateRef, Spec, StateModel, StateStore, UIElement };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { _ as TextPropsSchema, a as CodeBlockPropsSchema, b as basePropSchemas, c as IconPropsSchema, d as ProgressPropsSchema, f as SelectPropsSchema, g as TextInputPropsSchema, h as TabsPropsSchema, i as CardPropsSchema, l as KeyValueTablePropsSchema, m as SwitchPropsSchema, n as BadgePropsSchema, o as DataTablePropsSchema, p as StackPropsSchema, r as ButtonPropsSchema, s as DividerPropsSchema, t as JSON_RENDER_INDEX_KEY, u as LinkPropsSchema, v as TreePropsSchema, y as baseComponentNames } from "./view-index-De3Gt127.mjs";
1
+ import { _ as TextPropsSchema, a as CodeBlockPropsSchema, b as basePropSchemas, c as IconPropsSchema, d as ProgressPropsSchema, f as SelectPropsSchema, g as TextInputPropsSchema, h as TabsPropsSchema, i as CardPropsSchema, l as KeyValueTablePropsSchema, m as SwitchPropsSchema, n as BadgePropsSchema, o as DataTablePropsSchema, p as StackPropsSchema, r as ButtonPropsSchema, s as DividerPropsSchema, t as JSON_RENDER_INDEX_KEY, u as LinkPropsSchema, v as TreePropsSchema, y as baseComponentNames } from "./view-index-BR-ubXvO.mjs";
2
2
  import { defineCatalog, defineSchema } from "@json-render/core";
3
- //#region src/catalog.ts
3
+ // src/catalog.ts
4
4
  /**
5
5
  * The Devframes base-catalog schema. A Devframes spec is an
6
6
  * `@json-render/core` `Spec` (flat `root` + `elements` map); the structural
@@ -57,5 +57,4 @@ const baseCatalog = defineCatalog(baseSchema, {
57
57
  }])),
58
58
  actions: {}
59
59
  });
60
- //#endregion
61
60
  export { BadgePropsSchema, ButtonPropsSchema, CardPropsSchema, CodeBlockPropsSchema, DataTablePropsSchema, DividerPropsSchema, IconPropsSchema, JSON_RENDER_INDEX_KEY, KeyValueTablePropsSchema, LinkPropsSchema, ProgressPropsSchema, SelectPropsSchema, StackPropsSchema, SwitchPropsSchema, TabsPropsSchema, TextInputPropsSchema, TextPropsSchema, TreePropsSchema, baseCatalog, baseComponentNames, basePropSchemas, baseSchema };
@@ -1,8 +1,7 @@
1
- import { n as DevframeJsonRenderSpec, r as JsonRenderView } from "../types-ByXkazOp.mjs";
1
+ import { n as DevframeJsonRenderSpec, r as JsonRenderView } from "../types-paiFdDLk.mjs";
2
2
  import { DevframeDiagnostics } from "devframe/utils/nostics";
3
3
  import { DevframeNodeContext, DevframeScopedNodeContext } from "devframe";
4
4
  import { StandardSchemaV1 } from "devframe/utils/simple-schema";
5
- //#region src/node/create-view.d.ts
6
5
  /** Options for {@link createJsonRenderView}. */
7
6
  interface CreateJsonRenderViewOptions<SpecType extends DevframeJsonRenderSpec = DevframeJsonRenderSpec> {
8
7
  /**
@@ -45,8 +44,6 @@ type AnyContext = DevframeNodeContext | DevframeScopedNodeContext<string>;
45
44
  * ```
46
45
  */
47
46
  export declare function createJsonRenderView<SpecType extends DevframeJsonRenderSpec = DevframeJsonRenderSpec>(ctx: AnyContext, options: CreateJsonRenderViewOptions<SpecType>): JsonRenderView<SpecType>;
48
- //#endregion
49
- //#region src/node/diagnostics.d.ts
50
47
  declare const codes: {
51
48
  DF0038: {
52
49
  why: (p: {
@@ -99,5 +96,4 @@ declare const codes: {
99
96
  * through the `devframe/utils/nostics` peer rather than inlining `nostics`.
100
97
  */
101
98
  declare const diagnostics: DevframeDiagnostics<typeof codes>;
102
- //#endregion
103
99
  export { type CreateJsonRenderViewOptions, diagnostics as jsonRenderDiagnostics };
@@ -1,4 +1,4 @@
1
- import { b as basePropSchemas, t as JSON_RENDER_INDEX_KEY } from "../view-index-De3Gt127.mjs";
1
+ import { b as basePropSchemas, t as JSON_RENDER_INDEX_KEY } from "../view-index-BR-ubXvO.mjs";
2
2
  import { createSharedState } from "devframe/utils/shared-state";
3
3
  import { defineDiagnostics } from "devframe/utils/nostics";
4
4
  /**
@@ -38,8 +38,7 @@ const diagnostics = defineDiagnostics({
38
38
  }
39
39
  }
40
40
  });
41
- //#endregion
42
- //#region src/node/create-view.ts
41
+ // src/node/create-view.ts
43
42
  function isScoped(ctx) {
44
43
  return "base" in ctx && "namespace" in ctx;
45
44
  }
@@ -200,5 +199,4 @@ function createJsonRenderView(ctx, options) {
200
199
  }
201
200
  };
202
201
  }
203
- //#endregion
204
202
  export { createJsonRenderView, diagnostics as jsonRenderDiagnostics };
@@ -1,5 +1,4 @@
1
1
  import { Catalog, InferCatalogComponents, InferComponentProps, Spec, UIElement } from "@json-render/core";
2
- //#region src/view-ref.d.ts
3
2
  /**
4
3
  * A view backed by **live shared state**: the client subscribes to `stateKey`
5
4
  * for the spec + state and re-renders on every update. This is what a
@@ -29,8 +28,6 @@ interface JsonRenderViewInlineRef<SpecType extends DevframeJsonRenderSpec = Devf
29
28
  * inline spec} rendered directly.
30
29
  */
31
30
  type JsonRenderViewRef<SpecType extends DevframeJsonRenderSpec = DevframeJsonRenderSpec> = JsonRenderViewStateRef | JsonRenderViewInlineRef<SpecType>;
32
- //#endregion
33
- //#region src/types.d.ts
34
31
  /**
35
32
  * A Devframes JSON-render spec **is** an `@json-render/core` `Spec`: a flat
36
33
  * `root` key, an `elements` map, and optional initial `state`. This alias is
@@ -79,5 +76,4 @@ interface JsonRenderView<SpecType extends DevframeJsonRenderSpec = DevframeJsonR
79
76
  /** Unregister the shared state and its listeners. */
80
77
  dispose: () => void;
81
78
  }
82
- //#endregion
83
79
  export { JsonRenderViewRef as a, JsonRenderViewInlineRef as i, DevframeJsonRenderSpec as n, JsonRenderViewStateRef as o, JsonRenderView as r, CatalogUIElement as t };
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- //#region src/prop-schemas.ts
2
+ // src/prop-schemas.ts
3
3
  /**
4
4
  * Devframes-authored per-component prop schemas for the base catalog.
5
5
  *
@@ -212,8 +212,7 @@ const basePropSchemas = {
212
212
  };
213
213
  /** The ordered list of base-catalog component names (catalog v1). */
214
214
  const baseComponentNames = Object.keys(basePropSchemas);
215
- //#endregion
216
- //#region src/view-index.ts
215
+ // src/view-index.ts
217
216
  /**
218
217
  * Well-known shared-state key carrying the **view index**: a map of every
219
218
  * live JSON-render view registered on a context, keyed by its `stateKey`.
@@ -225,5 +224,4 @@ const baseComponentNames = Object.keys(basePropSchemas);
225
224
  * no index.
226
225
  */
227
226
  const JSON_RENDER_INDEX_KEY = "devframe:json-render:index";
228
- //#endregion
229
227
  export { TextPropsSchema as _, CodeBlockPropsSchema as a, basePropSchemas as b, IconPropsSchema as c, ProgressPropsSchema as d, SelectPropsSchema as f, TextInputPropsSchema as g, TabsPropsSchema as h, CardPropsSchema as i, KeyValueTablePropsSchema as l, SwitchPropsSchema as m, BadgePropsSchema as n, DataTablePropsSchema as o, StackPropsSchema as p, ButtonPropsSchema as r, DividerPropsSchema as s, JSON_RENDER_INDEX_KEY as t, LinkPropsSchema as u, TreePropsSchema as v, baseComponentNames as y };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devframes/json-render",
3
3
  "type": "module",
4
- "version": "1.3.1",
4
+ "version": "1.3.3",
5
5
  "description": "Protocol layer for describing devframe views as JSON that any renderer can display.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -30,8 +30,8 @@
30
30
  "dist"
31
31
  ],
32
32
  "peerDependencies": {
33
- "@devframes/hub": "1.3.1",
34
- "devframe": "1.3.1"
33
+ "@devframes/hub": "1.3.3",
34
+ "devframe": "1.3.3"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "@devframes/hub": {
@@ -39,14 +39,14 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
- "@json-render/core": "^0.21.1",
42
+ "@json-render/core": "^0.22.0",
43
43
  "zod": "^4.6.7"
44
44
  },
45
45
  "devDependencies": {
46
- "@devframes/hub": "1.3.1",
47
- "@types/node": "^26.6.5",
48
- "devframe": "1.3.1",
49
- "tsdown": "0.23.0"
46
+ "@devframes/hub": "1.3.3",
47
+ "@types/node": "^26.6.6",
48
+ "devframe": "1.3.3",
49
+ "tsdown": "^0.23.7"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsdown",