@stonecrop/schema 0.13.2 → 0.13.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.
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Controls the level of user interaction for a field, container, or table.
3
+ *
4
+ * - `'edit'` — field is fully interactive; user can change the value
5
+ * - `'read'` — field is non-interactive but displayed with form chrome (input outline, etc.)
6
+ * - `'display'` — field is non-interactive and displayed as plain text; no form chrome
7
+ *
8
+ * Applied at authoring time via `mode` on any `DoctypeField` variant. Propagated through
9
+ * `resolveSchema()` into the resolved output types. Nested `AForm` and `ATable` components
10
+ * inherit `mode` from their parent unless overridden at the field level.
11
+ *
12
+ * @public
13
+ */
14
+ export type InteractionMode = 'edit' | 'read' | 'display';
15
+ //# sourceMappingURL=mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../../src/mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA"}
File without changes
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * JSON-safe view configuration for table fields in doctype authoring.
4
+ *
5
+ * This is the authoring-time subset of `@stonecrop/atable`'s `TableConfig`. It covers
6
+ * the view discriminator and structural options that can be expressed in static JSON.
7
+ * `rowActions` (which requires function-typed handlers) stays in the runtime `TableConfig`.
8
+ *
9
+ * @public
10
+ */
11
+ export declare const TableViewConfig: z.ZodObject<{
12
+ view: z.ZodOptional<z.ZodEnum<{
13
+ list: "list";
14
+ uncounted: "uncounted";
15
+ "list-expansion": "list-expansion";
16
+ tree: "tree";
17
+ gantt: "gantt";
18
+ "tree-gantt": "tree-gantt";
19
+ }>>;
20
+ fullWidth: z.ZodOptional<z.ZodBoolean>;
21
+ defaultTreeExpansion: z.ZodOptional<z.ZodEnum<{
22
+ root: "root";
23
+ branch: "branch";
24
+ leaf: "leaf";
25
+ }>>;
26
+ dependencyGraph: z.ZodOptional<z.ZodBoolean>;
27
+ }, z.core.$strip>;
28
+ /**
29
+ * Table view configuration type inferred from Zod schema
30
+ * @public
31
+ */
32
+ export type TableViewConfig = z.infer<typeof TableViewConfig>;
33
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;iBAiBzB,CAAA;AAEH;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * JSON-safe view configuration for table fields in doctype authoring.
4
+ *
5
+ * This is the authoring-time subset of `@stonecrop/atable`'s `TableConfig`. It covers
6
+ * the view discriminator and structural options that can be expressed in static JSON.
7
+ * `rowActions` (which requires function-typed handlers) stays in the runtime `TableConfig`.
8
+ *
9
+ * @public
10
+ */
11
+ export const TableViewConfig = z
12
+ .object({
13
+ /** The table view type */
14
+ view: z.enum(['list', 'uncounted', 'list-expansion', 'tree', 'gantt', 'tree-gantt']).optional(),
15
+ /** Allow the table to use the full width of its container */
16
+ fullWidth: z.boolean().optional(),
17
+ /** Default expansion state for tree views */
18
+ defaultTreeExpansion: z.enum(['root', 'branch', 'leaf']).optional(),
19
+ /** Enable dependency graph connections for Gantt views */
20
+ dependencyGraph: z.boolean().optional(),
21
+ })
22
+ .meta({
23
+ title: 'TableViewConfig',
24
+ description: 'JSON-safe view configuration for table fields in doctype authoring',
25
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/schema",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "type": "module",
5
5
  "types": "./dist/schema.d.ts",
6
6
  "exports": {