@petrarca/sonnet-forms 0.4.2 → 0.5.0

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,61 @@
1
+ import { JsonSchema } from '@petrarca/sonnet-core/schema';
2
+
3
+ /**
4
+ * Widget option metadata -- design-time descriptors for each widget's
5
+ * `x-ui-options`.
6
+ *
7
+ * This module is authoring metadata for a schema designer, NOT runtime code.
8
+ * It is intentionally kept out of the widget component files and the main
9
+ * package entry so that form-rendering consumers never pull it into their
10
+ * bundle. It is exported only from the `@petrarca/sonnet-forms/widget-options`
11
+ * subpath.
12
+ *
13
+ * A `WidgetOptionDef` is our ergonomic, widget-specific descriptor; a designer
14
+ * translates a list of them into a plain `JsonSchema` (via `optionDefsToSchema`)
15
+ * and renders that with `JsonSchemaFormRenderer` to produce the options editor.
16
+ *
17
+ * Options that are *derived* rather than chosen are deliberately omitted:
18
+ * - `multiple` (SelectWidget) is inferred from `type: "array"`.
19
+ * - `enumNames` is owned by a dedicated enum editor (seeded from `enum`).
20
+ *
21
+ * The declared keys are kept in sync with what each widget actually reads via a
22
+ * drift-guard test (widgetOptions.test.ts).
23
+ */
24
+
25
+ /** Value kinds a widget option can take. */
26
+ type WidgetOptionType = "string" | "number" | "boolean" | "enum" | "string[]" | "json";
27
+ /**
28
+ * A single widget option descriptor.
29
+ *
30
+ * `type: "json"` is the escape hatch for irregular options that do not fit the
31
+ * simple set (e.g. a `string | string[]` union); a designer renders it as a raw
32
+ * JSON editor for that one option.
33
+ */
34
+ interface WidgetOptionDef {
35
+ /** The x-ui-options key. */
36
+ key: string;
37
+ /** Human label for the designer's options editor. */
38
+ label: string;
39
+ /** Value kind. */
40
+ type: WidgetOptionType;
41
+ /** Default value (advisory; shown in the generated editor). */
42
+ default?: unknown;
43
+ /** Allowed values when `type` is "enum". */
44
+ enumValues?: string[];
45
+ /** Optional help text shown under the field. */
46
+ help?: string;
47
+ }
48
+ /**
49
+ * Translate a list of widget option descriptors into a plain JsonSchema that a
50
+ * designer can render with JsonSchemaFormRenderer. The result is an object
51
+ * schema whose properties are the options.
52
+ */
53
+ declare function optionDefsToSchema(defs: WidgetOptionDef[]): JsonSchema;
54
+ /**
55
+ * Built-in widget option descriptors, keyed by widget name (both canonical and
56
+ * lowercase-alias names, matching DEFAULT_WIDGETS). A designer merges consumer
57
+ * overrides for custom widgets over this map.
58
+ */
59
+ declare const WIDGET_OPTION_DEFS: Record<string, WidgetOptionDef[]>;
60
+
61
+ export { WIDGET_OPTION_DEFS, type WidgetOptionDef, type WidgetOptionType, optionDefsToSchema };
@@ -0,0 +1,166 @@
1
+ // src/widgets/widgetOptions.ts
2
+ function defToProperty(def) {
3
+ const base = {
4
+ title: def.label,
5
+ description: def.help,
6
+ default: def.default
7
+ };
8
+ switch (def.type) {
9
+ case "string":
10
+ return { ...base, type: "string" };
11
+ case "number":
12
+ return { ...base, type: "number" };
13
+ case "boolean":
14
+ return { ...base, type: "boolean" };
15
+ case "enum":
16
+ return { ...base, type: "string", enum: def.enumValues ?? [] };
17
+ case "string[]":
18
+ return {
19
+ ...base,
20
+ type: "array",
21
+ items: { type: "string" },
22
+ "x-ui-widget": "tags"
23
+ };
24
+ case "json":
25
+ return { ...base, type: "object", "x-ui-widget": "json-editor" };
26
+ }
27
+ }
28
+ function optionDefsToSchema(defs) {
29
+ const properties = {};
30
+ for (const def of defs) {
31
+ properties[def.key] = defToProperty(def);
32
+ }
33
+ return { title: "", type: "object", properties };
34
+ }
35
+ var textInputOptions = [
36
+ {
37
+ key: "inputType",
38
+ label: "Input type",
39
+ type: "string",
40
+ help: "HTML input type override (e.g. email, url, tel)."
41
+ },
42
+ { key: "compact", label: "Compact", type: "boolean" }
43
+ ];
44
+ var textareaOptions = [
45
+ { key: "rows", label: "Rows", type: "number", default: 3 },
46
+ { key: "minRows", label: "Min rows", type: "number" },
47
+ { key: "autosize", label: "Autosize", type: "boolean", default: true }
48
+ ];
49
+ var numberOptions = [
50
+ { key: "step", label: "Step", type: "number" },
51
+ { key: "allowDecimal", label: "Allow decimal", type: "boolean" }
52
+ ];
53
+ var checkboxOptions = [
54
+ { key: "compact", label: "Compact", type: "boolean" }
55
+ ];
56
+ var selectOptions = [
57
+ { key: "clearable", label: "Clearable", type: "boolean", default: true },
58
+ { key: "compact", label: "Compact", type: "boolean" },
59
+ {
60
+ key: "badgeColor",
61
+ label: "Badge color",
62
+ type: "string",
63
+ help: "Badge color for multi-select values."
64
+ }
65
+ ];
66
+ var tagsOptions = [
67
+ { key: "maxTags", label: "Max tags", type: "number" },
68
+ {
69
+ key: "splitKeys",
70
+ label: "Split keys",
71
+ type: "string[]",
72
+ help: "Characters that commit a tag (e.g. comma, Enter)."
73
+ }
74
+ ];
75
+ var jsonEditorOptions = [
76
+ { key: "height", label: "Height", type: "string", default: "240px" }
77
+ ];
78
+ var quantityOptions = [
79
+ {
80
+ key: "units",
81
+ label: "Units",
82
+ type: "json",
83
+ help: "Array of unit options ({ value, label })."
84
+ },
85
+ {
86
+ key: "unitPosition",
87
+ label: "Unit position",
88
+ type: "enum",
89
+ enumValues: ["prefix", "suffix"]
90
+ },
91
+ { key: "precision", label: "Precision", type: "number" },
92
+ { key: "step", label: "Step", type: "number" }
93
+ ];
94
+ var objectOptions = [
95
+ {
96
+ key: "variant",
97
+ label: "Variant",
98
+ type: "enum",
99
+ enumValues: ["section", "card", "collapsible", "inline", "borderless"],
100
+ default: "section"
101
+ },
102
+ { key: "defaultOpen", label: "Default open", type: "boolean", default: true }
103
+ ];
104
+ var arrayOptions = [
105
+ {
106
+ key: "addLabel",
107
+ label: "Add button label",
108
+ type: "string",
109
+ default: "Add item"
110
+ },
111
+ {
112
+ key: "itemTitle",
113
+ label: "Item title",
114
+ type: "string",
115
+ help: "Supports {index} placeholder."
116
+ },
117
+ { key: "orderable", label: "Orderable", type: "boolean" },
118
+ { key: "emptyMessage", label: "Empty message", type: "string" }
119
+ ];
120
+ var entitySelectOptions = [
121
+ {
122
+ key: "mode",
123
+ label: "Mode",
124
+ type: "enum",
125
+ enumValues: ["eager", "typeahead", "explicit"]
126
+ },
127
+ { key: "minChars", label: "Min chars", type: "number" },
128
+ { key: "endpoint", label: "REST endpoint", type: "string" },
129
+ { key: "valueKey", label: "Value key", type: "string", default: "id" },
130
+ { key: "labelKey", label: "Label key", type: "string", default: "name" },
131
+ { key: "searchKey", label: "Search key", type: "string" },
132
+ { key: "extraParams", label: "Extra params", type: "json" },
133
+ { key: "query", label: "GraphQL query", type: "string" },
134
+ { key: "dataPath", label: "GraphQL data path", type: "string" }
135
+ ];
136
+ var WIDGET_OPTION_DEFS = {
137
+ // Canonical names
138
+ TextInputWidget: textInputOptions,
139
+ TextareaWidget: textareaOptions,
140
+ NumberWidget: numberOptions,
141
+ CheckboxWidget: checkboxOptions,
142
+ SelectWidget: selectOptions,
143
+ TagsInputWidget: tagsOptions,
144
+ JsonEditorWidget: jsonEditorOptions,
145
+ EntitySelectWidget: entitySelectOptions,
146
+ ObjectWidget: objectOptions,
147
+ ArrayWidget: arrayOptions,
148
+ QuantityWidget: quantityOptions,
149
+ // Lowercase aliases
150
+ text: textInputOptions,
151
+ textarea: textareaOptions,
152
+ number: numberOptions,
153
+ checkbox: checkboxOptions,
154
+ select: selectOptions,
155
+ tags: tagsOptions,
156
+ "json-editor": jsonEditorOptions,
157
+ "entity-select": entitySelectOptions,
158
+ object: objectOptions,
159
+ array: arrayOptions,
160
+ quantity: quantityOptions
161
+ };
162
+ export {
163
+ WIDGET_OPTION_DEFS,
164
+ optionDefsToSchema
165
+ };
166
+ //# sourceMappingURL=widget-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/widgets/widgetOptions.ts"],"sourcesContent":["/**\n * Widget option metadata -- design-time descriptors for each widget's\n * `x-ui-options`.\n *\n * This module is authoring metadata for a schema designer, NOT runtime code.\n * It is intentionally kept out of the widget component files and the main\n * package entry so that form-rendering consumers never pull it into their\n * bundle. It is exported only from the `@petrarca/sonnet-forms/widget-options`\n * subpath.\n *\n * A `WidgetOptionDef` is our ergonomic, widget-specific descriptor; a designer\n * translates a list of them into a plain `JsonSchema` (via `optionDefsToSchema`)\n * and renders that with `JsonSchemaFormRenderer` to produce the options editor.\n *\n * Options that are *derived* rather than chosen are deliberately omitted:\n * - `multiple` (SelectWidget) is inferred from `type: \"array\"`.\n * - `enumNames` is owned by a dedicated enum editor (seeded from `enum`).\n *\n * The declared keys are kept in sync with what each widget actually reads via a\n * drift-guard test (widgetOptions.test.ts).\n */\n\nimport type {\n JsonSchema,\n JsonSchemaProperty,\n} from \"@petrarca/sonnet-core/schema\";\n\n/** Value kinds a widget option can take. */\nexport type WidgetOptionType =\n | \"string\"\n | \"number\"\n | \"boolean\"\n | \"enum\"\n | \"string[]\"\n | \"json\";\n\n/**\n * A single widget option descriptor.\n *\n * `type: \"json\"` is the escape hatch for irregular options that do not fit the\n * simple set (e.g. a `string | string[]` union); a designer renders it as a raw\n * JSON editor for that one option.\n */\nexport interface WidgetOptionDef {\n /** The x-ui-options key. */\n key: string;\n /** Human label for the designer's options editor. */\n label: string;\n /** Value kind. */\n type: WidgetOptionType;\n /** Default value (advisory; shown in the generated editor). */\n default?: unknown;\n /** Allowed values when `type` is \"enum\". */\n enumValues?: string[];\n /** Optional help text shown under the field. */\n help?: string;\n}\n\n/** Map a WidgetOptionDef to its JsonSchemaProperty. */\nfunction defToProperty(def: WidgetOptionDef): JsonSchemaProperty {\n const base: JsonSchemaProperty = {\n title: def.label,\n description: def.help,\n default: def.default,\n };\n switch (def.type) {\n case \"string\":\n return { ...base, type: \"string\" };\n case \"number\":\n return { ...base, type: \"number\" };\n case \"boolean\":\n return { ...base, type: \"boolean\" };\n case \"enum\":\n return { ...base, type: \"string\", enum: def.enumValues ?? [] };\n case \"string[]\":\n return {\n ...base,\n type: \"array\",\n items: { type: \"string\" },\n \"x-ui-widget\": \"tags\",\n };\n case \"json\":\n // Render as a raw JSON editor; the value shape is open.\n return { ...base, type: \"object\", \"x-ui-widget\": \"json-editor\" };\n }\n}\n\n/**\n * Translate a list of widget option descriptors into a plain JsonSchema that a\n * designer can render with JsonSchemaFormRenderer. The result is an object\n * schema whose properties are the options.\n */\nexport function optionDefsToSchema(defs: WidgetOptionDef[]): JsonSchema {\n const properties: Record<string, JsonSchemaProperty> = {};\n for (const def of defs) {\n properties[def.key] = defToProperty(def);\n }\n return { title: \"\", type: \"object\", properties };\n}\n\n// Per-widget descriptors. Keys mirror what each widget reads from x-ui-options.\n\nconst textInputOptions: WidgetOptionDef[] = [\n {\n key: \"inputType\",\n label: \"Input type\",\n type: \"string\",\n help: \"HTML input type override (e.g. email, url, tel).\",\n },\n { key: \"compact\", label: \"Compact\", type: \"boolean\" },\n];\n\nconst textareaOptions: WidgetOptionDef[] = [\n { key: \"rows\", label: \"Rows\", type: \"number\", default: 3 },\n { key: \"minRows\", label: \"Min rows\", type: \"number\" },\n { key: \"autosize\", label: \"Autosize\", type: \"boolean\", default: true },\n];\n\nconst numberOptions: WidgetOptionDef[] = [\n { key: \"step\", label: \"Step\", type: \"number\" },\n { key: \"allowDecimal\", label: \"Allow decimal\", type: \"boolean\" },\n];\n\nconst checkboxOptions: WidgetOptionDef[] = [\n { key: \"compact\", label: \"Compact\", type: \"boolean\" },\n];\n\nconst selectOptions: WidgetOptionDef[] = [\n { key: \"clearable\", label: \"Clearable\", type: \"boolean\", default: true },\n { key: \"compact\", label: \"Compact\", type: \"boolean\" },\n {\n key: \"badgeColor\",\n label: \"Badge color\",\n type: \"string\",\n help: \"Badge color for multi-select values.\",\n },\n];\n\nconst tagsOptions: WidgetOptionDef[] = [\n { key: \"maxTags\", label: \"Max tags\", type: \"number\" },\n {\n key: \"splitKeys\",\n label: \"Split keys\",\n type: \"string[]\",\n help: \"Characters that commit a tag (e.g. comma, Enter).\",\n },\n];\n\nconst jsonEditorOptions: WidgetOptionDef[] = [\n { key: \"height\", label: \"Height\", type: \"string\", default: \"240px\" },\n];\n\nconst quantityOptions: WidgetOptionDef[] = [\n {\n key: \"units\",\n label: \"Units\",\n type: \"json\",\n help: \"Array of unit options ({ value, label }).\",\n },\n {\n key: \"unitPosition\",\n label: \"Unit position\",\n type: \"enum\",\n enumValues: [\"prefix\", \"suffix\"],\n },\n { key: \"precision\", label: \"Precision\", type: \"number\" },\n { key: \"step\", label: \"Step\", type: \"number\" },\n];\n\nconst objectOptions: WidgetOptionDef[] = [\n {\n key: \"variant\",\n label: \"Variant\",\n type: \"enum\",\n enumValues: [\"section\", \"card\", \"collapsible\", \"inline\", \"borderless\"],\n default: \"section\",\n },\n { key: \"defaultOpen\", label: \"Default open\", type: \"boolean\", default: true },\n];\n\nconst arrayOptions: WidgetOptionDef[] = [\n {\n key: \"addLabel\",\n label: \"Add button label\",\n type: \"string\",\n default: \"Add item\",\n },\n {\n key: \"itemTitle\",\n label: \"Item title\",\n type: \"string\",\n help: \"Supports {index} placeholder.\",\n },\n { key: \"orderable\", label: \"Orderable\", type: \"boolean\" },\n { key: \"emptyMessage\", label: \"Empty message\", type: \"string\" },\n];\n\nconst entitySelectOptions: WidgetOptionDef[] = [\n {\n key: \"mode\",\n label: \"Mode\",\n type: \"enum\",\n enumValues: [\"eager\", \"typeahead\", \"explicit\"],\n },\n { key: \"minChars\", label: \"Min chars\", type: \"number\" },\n { key: \"endpoint\", label: \"REST endpoint\", type: \"string\" },\n { key: \"valueKey\", label: \"Value key\", type: \"string\", default: \"id\" },\n { key: \"labelKey\", label: \"Label key\", type: \"string\", default: \"name\" },\n { key: \"searchKey\", label: \"Search key\", type: \"string\" },\n { key: \"extraParams\", label: \"Extra params\", type: \"json\" },\n { key: \"query\", label: \"GraphQL query\", type: \"string\" },\n { key: \"dataPath\", label: \"GraphQL data path\", type: \"string\" },\n];\n\n/**\n * Built-in widget option descriptors, keyed by widget name (both canonical and\n * lowercase-alias names, matching DEFAULT_WIDGETS). A designer merges consumer\n * overrides for custom widgets over this map.\n */\nexport const WIDGET_OPTION_DEFS: Record<string, WidgetOptionDef[]> = {\n // Canonical names\n TextInputWidget: textInputOptions,\n TextareaWidget: textareaOptions,\n NumberWidget: numberOptions,\n CheckboxWidget: checkboxOptions,\n SelectWidget: selectOptions,\n TagsInputWidget: tagsOptions,\n JsonEditorWidget: jsonEditorOptions,\n EntitySelectWidget: entitySelectOptions,\n ObjectWidget: objectOptions,\n ArrayWidget: arrayOptions,\n QuantityWidget: quantityOptions,\n\n // Lowercase aliases\n text: textInputOptions,\n textarea: textareaOptions,\n number: numberOptions,\n checkbox: checkboxOptions,\n select: selectOptions,\n tags: tagsOptions,\n \"json-editor\": jsonEditorOptions,\n \"entity-select\": entitySelectOptions,\n object: objectOptions,\n array: arrayOptions,\n quantity: quantityOptions,\n};\n"],"mappings":";AA2DA,SAAS,cAAc,KAA0C;AAC/D,QAAM,OAA2B;AAAA,IAC/B,OAAO,IAAI;AAAA,IACX,aAAa,IAAI;AAAA,IACjB,SAAS,IAAI;AAAA,EACf;AACA,UAAQ,IAAI,MAAM;AAAA,IAChB,KAAK;AACH,aAAO,EAAE,GAAG,MAAM,MAAM,SAAS;AAAA,IACnC,KAAK;AACH,aAAO,EAAE,GAAG,MAAM,MAAM,SAAS;AAAA,IACnC,KAAK;AACH,aAAO,EAAE,GAAG,MAAM,MAAM,UAAU;AAAA,IACpC,KAAK;AACH,aAAO,EAAE,GAAG,MAAM,MAAM,UAAU,MAAM,IAAI,cAAc,CAAC,EAAE;AAAA,IAC/D,KAAK;AACH,aAAO;AAAA,QACL,GAAG;AAAA,QACH,MAAM;AAAA,QACN,OAAO,EAAE,MAAM,SAAS;AAAA,QACxB,eAAe;AAAA,MACjB;AAAA,IACF,KAAK;AAEH,aAAO,EAAE,GAAG,MAAM,MAAM,UAAU,eAAe,cAAc;AAAA,EACnE;AACF;AAOO,SAAS,mBAAmB,MAAqC;AACtE,QAAM,aAAiD,CAAC;AACxD,aAAW,OAAO,MAAM;AACtB,eAAW,IAAI,GAAG,IAAI,cAAc,GAAG;AAAA,EACzC;AACA,SAAO,EAAE,OAAO,IAA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;AAAA,EACxD,EAAE,KAAK,eAAe,OAAO,gBAAgB,MAAM,OAAO;AAAA,EAC1D,EAAE,KAAK,SAAS,OAAO,iBAAiB,MAAM,SAAS;AAAA,EACvD,EAAE,KAAK,YAAY,OAAO,qBAAqB,MAAM,SAAS;AAChE;AAOO,IAAM,qBAAwD;AAAA;AAAA,EAEnE,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,gBAAgB;AAAA;AAAA,EAGhB,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AACZ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petrarca/sonnet-forms",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Schema-driven form renderer, field components, and widgets for the Petrarca Sonnet component library",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -13,6 +13,10 @@
13
13
  ".": {
14
14
  "import": "./dist/index.js",
15
15
  "types": "./dist/index.d.ts"
16
+ },
17
+ "./widget-options": {
18
+ "import": "./dist/widget-options.js",
19
+ "types": "./dist/widget-options.d.ts"
16
20
  }
17
21
  },
18
22
  "files": [
@@ -21,8 +25,8 @@
21
25
  "dependencies": {
22
26
  "class-variance-authority": "^0.7.1",
23
27
  "lucide-react": "^0.553.0",
24
- "@petrarca/sonnet-core": "0.4.2",
25
- "@petrarca/sonnet-ui": "0.4.2"
28
+ "@petrarca/sonnet-core": "0.5.0",
29
+ "@petrarca/sonnet-ui": "0.5.0"
26
30
  },
27
31
  "peerDependencies": {
28
32
  "react": ">=19",