@assistant-ui/react-generative-ui 0.0.23 → 0.1.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.
- package/README.md +2 -0
- package/dist/a2ui.d.ts +1 -4
- package/dist/a2ui.d.ts.map +1 -1
- package/dist/a2ui.js +1 -4
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -10
- package/dist/index.server.d.ts +1 -2
- package/dist/index.server.d.ts.map +1 -1
- package/dist/index.server.js +1 -10
- package/dist/ir.d.ts +1 -111
- package/dist/ir.d.ts.map +1 -1
- package/dist/ir.js +1 -175
- package/dist/slack.d.ts +1 -4
- package/dist/slack.d.ts.map +1 -1
- package/dist/slack.js +1 -4
- package/dist/teams.d.ts +1 -4
- package/dist/teams.d.ts.map +1 -1
- package/dist/teams.js +1 -4
- package/package.json +5 -5
- package/src/a2ui.ts +1 -22
- package/src/index.server.ts +1 -2
- package/src/index.test.ts +75 -0
- package/src/index.ts +1 -2
- package/src/ir.ts +1 -279
- package/src/slack.ts +1 -39
- package/src/teams.ts +1 -35
- package/dist/JSONGenerativeUI.client.d.ts +0 -28
- package/dist/JSONGenerativeUI.client.d.ts.map +0 -1
- package/dist/JSONGenerativeUI.client.js +0 -101
- package/dist/JSONGenerativeUI.client.js.map +0 -1
- package/dist/JSONGenerativeUI.server.d.ts +0 -21
- package/dist/JSONGenerativeUI.server.d.ts.map +0 -1
- package/dist/JSONGenerativeUI.server.js +0 -32
- package/dist/JSONGenerativeUI.server.js.map +0 -1
- package/dist/JSONGenerativeUI.shared.d.ts +0 -63
- package/dist/JSONGenerativeUI.shared.d.ts.map +0 -1
- package/dist/JSONGenerativeUI.shared.js +0 -31
- package/dist/JSONGenerativeUI.shared.js.map +0 -1
- package/dist/RadioGroupScope.d.ts +0 -6
- package/dist/RadioGroupScope.d.ts.map +0 -1
- package/dist/RadioGroupScope.js +0 -25
- package/dist/RadioGroupScope.js.map +0 -1
- package/dist/a2ui/BindingContext.d.ts +0 -11
- package/dist/a2ui/BindingContext.d.ts.map +0 -1
- package/dist/a2ui/BindingContext.js +0 -12
- package/dist/a2ui/BindingContext.js.map +0 -1
- package/dist/a2ui/PresentRenderer.d.ts +0 -11
- package/dist/a2ui/PresentRenderer.d.ts.map +0 -1
- package/dist/a2ui/PresentRenderer.js +0 -39
- package/dist/a2ui/PresentRenderer.js.map +0 -1
- package/dist/a2ui/convert.d.ts +0 -15
- package/dist/a2ui/convert.d.ts.map +0 -1
- package/dist/a2ui/convert.js +0 -728
- package/dist/a2ui/convert.js.map +0 -1
- package/dist/a2ui/dataModel.d.ts +0 -9
- package/dist/a2ui/dataModel.d.ts.map +0 -1
- package/dist/a2ui/dataModel.js +0 -44
- package/dist/a2ui/dataModel.js.map +0 -1
- package/dist/a2ui/reducer.d.ts +0 -8
- package/dist/a2ui/reducer.d.ts.map +0 -1
- package/dist/a2ui/reducer.js +0 -242
- package/dist/a2ui/reducer.js.map +0 -1
- package/dist/a2ui/snapshot.d.ts +0 -3
- package/dist/a2ui/snapshot.d.ts.map +0 -1
- package/dist/a2ui/snapshot.js +0 -33
- package/dist/a2ui/snapshot.js.map +0 -1
- package/dist/a2ui/types.d.ts +0 -88
- package/dist/a2ui/types.d.ts.map +0 -1
- package/dist/a2ui/types.js +0 -6
- package/dist/a2ui/types.js.map +0 -1
- package/dist/a2ui/valueFunctions.d.ts +0 -16
- package/dist/a2ui/valueFunctions.d.ts.map +0 -1
- package/dist/a2ui/valueFunctions.js +0 -332
- package/dist/a2ui/valueFunctions.js.map +0 -1
- package/dist/actionRegistry.d.ts +0 -29
- package/dist/actionRegistry.d.ts.map +0 -1
- package/dist/actionRegistry.js +0 -41
- package/dist/actionRegistry.js.map +0 -1
- package/dist/answeredValues.d.ts +0 -16
- package/dist/answeredValues.d.ts.map +0 -1
- package/dist/answeredValues.js +0 -37
- package/dist/answeredValues.js.map +0 -1
- package/dist/buildPresentParameters.d.ts +0 -21
- package/dist/buildPresentParameters.d.ts.map +0 -1
- package/dist/buildPresentParameters.js +0 -95
- package/dist/buildPresentParameters.js.map +0 -1
- package/dist/constants.d.ts +0 -15
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -19
- package/dist/constants.js.map +0 -1
- package/dist/convert/boundSpec.d.ts +0 -48
- package/dist/convert/boundSpec.d.ts.map +0 -1
- package/dist/convert/boundSpec.js +0 -108
- package/dist/convert/boundSpec.js.map +0 -1
- package/dist/convert/copyBounded.d.ts +0 -25
- package/dist/convert/copyBounded.d.ts.map +0 -1
- package/dist/convert/copyBounded.js +0 -38
- package/dist/convert/copyBounded.js.map +0 -1
- package/dist/convert/isElement.d.ts +0 -3
- package/dist/convert/isElement.d.ts.map +0 -1
- package/dist/convert/isElement.js +0 -6
- package/dist/convert/isElement.js.map +0 -1
- package/dist/convert/takeRun.d.ts +0 -6
- package/dist/convert/takeRun.d.ts.map +0 -1
- package/dist/convert/takeRun.js +0 -20
- package/dist/convert/takeRun.js.map +0 -1
- package/dist/defineGenerativeComponents.d.ts +0 -29
- package/dist/defineGenerativeComponents.d.ts.map +0 -1
- package/dist/defineGenerativeComponents.js +0 -34
- package/dist/defineGenerativeComponents.js.map +0 -1
- package/dist/fieldReferences.d.ts +0 -9
- package/dist/fieldReferences.d.ts.map +0 -1
- package/dist/fieldReferences.js +0 -53
- package/dist/fieldReferences.js.map +0 -1
- package/dist/generativeUIToJSX.d.ts +0 -18
- package/dist/generativeUIToJSX.d.ts.map +0 -1
- package/dist/generativeUIToJSX.js +0 -76
- package/dist/generativeUIToJSX.js.map +0 -1
- package/dist/index.shared.d.ts +0 -15
- package/dist/index.shared.d.ts.map +0 -1
- package/dist/index.shared.js +0 -9
- package/dist/ir.js.map +0 -1
- package/dist/renderGenerativeUI.d.ts +0 -14
- package/dist/renderGenerativeUI.d.ts.map +0 -1
- package/dist/renderGenerativeUI.js +0 -83
- package/dist/renderGenerativeUI.js.map +0 -1
- package/dist/scopeSchema.d.ts +0 -6
- package/dist/scopeSchema.d.ts.map +0 -1
- package/dist/scopeSchema.js +0 -56
- package/dist/scopeSchema.js.map +0 -1
- package/dist/slack/constants.d.ts +0 -93
- package/dist/slack/constants.d.ts.map +0 -1
- package/dist/slack/constants.js +0 -146
- package/dist/slack/constants.js.map +0 -1
- package/dist/slack/decodeBlockAction.d.ts +0 -10
- package/dist/slack/decodeBlockAction.d.ts.map +0 -1
- package/dist/slack/decodeBlockAction.js +0 -129
- package/dist/slack/decodeBlockAction.js.map +0 -1
- package/dist/slack/fromSlackBlocks.d.ts +0 -27
- package/dist/slack/fromSlackBlocks.d.ts.map +0 -1
- package/dist/slack/fromSlackBlocks.js +0 -483
- package/dist/slack/fromSlackBlocks.js.map +0 -1
- package/dist/slack/toSlackBlocks.d.ts +0 -4
- package/dist/slack/toSlackBlocks.d.ts.map +0 -1
- package/dist/slack/toSlackBlocks.js +0 -901
- package/dist/slack/toSlackBlocks.js.map +0 -1
- package/dist/slack/types.d.ts +0 -204
- package/dist/slack/types.d.ts.map +0 -1
- package/dist/slack/types.js +0 -0
- package/dist/teams/constants.d.ts +0 -34
- package/dist/teams/constants.d.ts.map +0 -1
- package/dist/teams/constants.js +0 -68
- package/dist/teams/constants.js.map +0 -1
- package/dist/teams/decodeSubmitData.d.ts +0 -26
- package/dist/teams/decodeSubmitData.d.ts.map +0 -1
- package/dist/teams/decodeSubmitData.js +0 -70
- package/dist/teams/decodeSubmitData.js.map +0 -1
- package/dist/teams/temporalId.d.ts +0 -5
- package/dist/teams/temporalId.d.ts.map +0 -1
- package/dist/teams/temporalId.js +0 -28
- package/dist/teams/temporalId.js.map +0 -1
- package/dist/teams/toAdaptiveCard.d.ts +0 -45
- package/dist/teams/toAdaptiveCard.d.ts.map +0 -1
- package/dist/teams/toAdaptiveCard.js +0 -642
- package/dist/teams/toAdaptiveCard.js.map +0 -1
- package/dist/teams/toTeamsAttachments.d.ts +0 -10
- package/dist/teams/toTeamsAttachments.d.ts.map +0 -1
- package/dist/teams/toTeamsAttachments.js +0 -99
- package/dist/teams/toTeamsAttachments.js.map +0 -1
- package/dist/teams/types.d.ts +0 -224
- package/dist/teams/types.d.ts.map +0 -1
- package/dist/teams/types.js +0 -0
- package/dist/temporal.d.ts +0 -33
- package/dist/temporal.d.ts.map +0 -1
- package/dist/temporal.js +0 -152
- package/dist/temporal.js.map +0 -1
- package/dist/types.d.ts +0 -99
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -0
- package/dist/vocabulary/alert.d.ts +0 -32
- package/dist/vocabulary/alert.d.ts.map +0 -1
- package/dist/vocabulary/alert.js +0 -160
- package/dist/vocabulary/alert.js.map +0 -1
- package/dist/vocabulary/collectFormValues.d.ts +0 -23
- package/dist/vocabulary/collectFormValues.d.ts.map +0 -1
- package/dist/vocabulary/collectFormValues.js +0 -44
- package/dist/vocabulary/collectFormValues.js.map +0 -1
- package/dist/vocabulary/data.d.ts +0 -66
- package/dist/vocabulary/data.d.ts.map +0 -1
- package/dist/vocabulary/data.js +0 -503
- package/dist/vocabulary/data.js.map +0 -1
- package/dist/vocabulary/dispatch.d.ts +0 -9
- package/dist/vocabulary/dispatch.d.ts.map +0 -1
- package/dist/vocabulary/dispatch.js +0 -50
- package/dist/vocabulary/dispatch.js.map +0 -1
- package/dist/vocabulary/fact.d.ts +0 -19
- package/dist/vocabulary/fact.d.ts.map +0 -1
- package/dist/vocabulary/fact.js +0 -51
- package/dist/vocabulary/fact.js.map +0 -1
- package/dist/vocabulary/form.d.ts +0 -11
- package/dist/vocabulary/form.d.ts.map +0 -1
- package/dist/vocabulary/form.js +0 -23
- package/dist/vocabulary/form.js.map +0 -1
- package/dist/vocabulary/formatValue.d.ts +0 -7
- package/dist/vocabulary/formatValue.d.ts.map +0 -1
- package/dist/vocabulary/formatValue.js +0 -76
- package/dist/vocabulary/formatValue.js.map +0 -1
- package/dist/vocabulary/icon.d.ts +0 -41
- package/dist/vocabulary/icon.d.ts.map +0 -1
- package/dist/vocabulary/icon.js +0 -272
- package/dist/vocabulary/icon.js.map +0 -1
- package/dist/vocabulary/index.d.ts +0 -12
- package/dist/vocabulary/index.d.ts.map +0 -1
- package/dist/vocabulary/index.js +0 -36
- package/dist/vocabulary/index.js.map +0 -1
- package/dist/vocabulary/interactive.d.ts +0 -230
- package/dist/vocabulary/interactive.d.ts.map +0 -1
- package/dist/vocabulary/interactive.js +0 -530
- package/dist/vocabulary/interactive.js.map +0 -1
- package/dist/vocabulary/layout.d.ts +0 -79
- package/dist/vocabulary/layout.d.ts.map +0 -1
- package/dist/vocabulary/layout.js +0 -139
- package/dist/vocabulary/layout.js.map +0 -1
- package/dist/vocabulary/list.d.ts +0 -14
- package/dist/vocabulary/list.d.ts.map +0 -1
- package/dist/vocabulary/list.js +0 -50
- package/dist/vocabulary/list.js.map +0 -1
- package/dist/vocabulary/media.d.ts +0 -25
- package/dist/vocabulary/media.d.ts.map +0 -1
- package/dist/vocabulary/media.js +0 -42
- package/dist/vocabulary/media.js.map +0 -1
- package/dist/vocabulary/text.d.ts +0 -57
- package/dist/vocabulary/text.d.ts.map +0 -1
- package/dist/vocabulary/text.js +0 -49
- package/dist/vocabulary/text.js.map +0 -1
- package/dist/vocabulary/toTextContent.d.ts +0 -2
- package/dist/vocabulary/toTextContent.d.ts.map +0 -1
- package/dist/vocabulary/toTextContent.js +0 -6
- package/dist/vocabulary/toTextContent.js.map +0 -1
- package/src/JSONGenerativeUI.client.tsx +0 -168
- package/src/JSONGenerativeUI.server.tsx +0 -39
- package/src/JSONGenerativeUI.shared.ts +0 -90
- package/src/JSONGenerativeUI.test.tsx +0 -1298
- package/src/RadioGroupScope.server.test.tsx +0 -24
- package/src/RadioGroupScope.tsx +0 -34
- package/src/a2ui/BindingContext.ts +0 -26
- package/src/a2ui/PresentRenderer.tsx +0 -83
- package/src/a2ui/convert.test.ts +0 -2923
- package/src/a2ui/convert.ts +0 -1207
- package/src/a2ui/dataModel.ts +0 -69
- package/src/a2ui/reducer.test.ts +0 -422
- package/src/a2ui/reducer.ts +0 -363
- package/src/a2ui/snapshot.test.ts +0 -52
- package/src/a2ui/snapshot.ts +0 -52
- package/src/a2ui/types.ts +0 -114
- package/src/a2ui/valueFunctions.test.ts +0 -271
- package/src/a2ui/valueFunctions.ts +0 -523
- package/src/actionRegistry.test.ts +0 -90
- package/src/actionRegistry.ts +0 -88
- package/src/answeredValues.test.ts +0 -33
- package/src/answeredValues.tsx +0 -70
- package/src/buildPresentParameters.test.ts +0 -246
- package/src/buildPresentParameters.ts +0 -130
- package/src/constants.ts +0 -17
- package/src/convert/boundSpec.test.ts +0 -192
- package/src/convert/boundSpec.ts +0 -134
- package/src/convert/copyBounded.test.ts +0 -131
- package/src/convert/copyBounded.ts +0 -38
- package/src/convert/isElement.ts +0 -6
- package/src/convert/takeRun.test.ts +0 -64
- package/src/convert/takeRun.ts +0 -19
- package/src/defineGenerativeComponents.ts +0 -38
- package/src/fieldReferences.test.ts +0 -66
- package/src/fieldReferences.ts +0 -83
- package/src/generativeUIToJSX.test.ts +0 -268
- package/src/generativeUIToJSX.ts +0 -152
- package/src/index.server.test.ts +0 -106
- package/src/index.shared.ts +0 -61
- package/src/ir.test.ts +0 -203
- package/src/renderGenerativeUI.test.tsx +0 -373
- package/src/renderGenerativeUI.tsx +0 -165
- package/src/scopeSchema.test.ts +0 -72
- package/src/scopeSchema.ts +0 -71
- package/src/slack/a2uiSlack.test.ts +0 -198
- package/src/slack/constants.ts +0 -194
- package/src/slack/datePicker.test.ts +0 -612
- package/src/slack/decodeBlockAction.test.ts +0 -233
- package/src/slack/decodeBlockAction.ts +0 -232
- package/src/slack/fromSlackBlocks.test.ts +0 -1465
- package/src/slack/fromSlackBlocks.ts +0 -789
- package/src/slack/toSlackBlocks.test.ts +0 -3065
- package/src/slack/toSlackBlocks.ts +0 -1818
- package/src/slack/types.ts +0 -264
- package/src/teams/constants.ts +0 -93
- package/src/teams/decodeSubmitData.test.ts +0 -397
- package/src/teams/decodeSubmitData.ts +0 -110
- package/src/teams/temporal.test.ts +0 -766
- package/src/teams/temporalId.ts +0 -56
- package/src/teams/toAdaptiveCard.test.ts +0 -1897
- package/src/teams/toAdaptiveCard.ts +0 -1057
- package/src/teams/toTeamsAttachments.test.ts +0 -74
- package/src/teams/toTeamsAttachments.ts +0 -133
- package/src/teams/types.ts +0 -266
- package/src/temporal.test.ts +0 -319
- package/src/temporal.ts +0 -259
- package/src/types.ts +0 -119
- package/src/vocabulary/alert.test.tsx +0 -427
- package/src/vocabulary/alert.tsx +0 -217
- package/src/vocabulary/collectFormValues.test.ts +0 -389
- package/src/vocabulary/collectFormValues.ts +0 -116
- package/src/vocabulary/data.test.tsx +0 -858
- package/src/vocabulary/data.tsx +0 -819
- package/src/vocabulary/datepicker.dom.test.tsx +0 -1148
- package/src/vocabulary/dispatch.ts +0 -83
- package/src/vocabulary/fact.test.tsx +0 -94
- package/src/vocabulary/fact.tsx +0 -54
- package/src/vocabulary/form.test.tsx +0 -113
- package/src/vocabulary/form.tsx +0 -39
- package/src/vocabulary/formatValue.test.ts +0 -72
- package/src/vocabulary/formatValue.ts +0 -127
- package/src/vocabulary/icon.test.tsx +0 -64
- package/src/vocabulary/icon.tsx +0 -174
- package/src/vocabulary/index.test.ts +0 -65
- package/src/vocabulary/index.ts +0 -33
- package/src/vocabulary/interactive.dispatch.test.tsx +0 -454
- package/src/vocabulary/interactive.dom.test.tsx +0 -1747
- package/src/vocabulary/interactive.test.tsx +0 -377
- package/src/vocabulary/interactive.tsx +0 -1048
- package/src/vocabulary/layout.test.tsx +0 -323
- package/src/vocabulary/layout.tsx +0 -247
- package/src/vocabulary/list.test.tsx +0 -222
- package/src/vocabulary/list.tsx +0 -50
- package/src/vocabulary/media.test.tsx +0 -85
- package/src/vocabulary/media.tsx +0 -56
- package/src/vocabulary/text.test.tsx +0 -102
- package/src/vocabulary/text.tsx +0 -60
- package/src/vocabulary/toTextContent.ts +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","names":[],"sources":["../../src/vocabulary/icon.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { z } from \"zod\";\nimport type { GenerativeUILibrary } from \"../types\";\nimport { ICON_NAMES } from \"../ir\";\n\nconst ICON_SIZE_TOKENS = [\"sm\", \"md\", \"lg\"] as const;\nconst ICON_SIZE_PX: Record<(typeof ICON_SIZE_TOKENS)[number], number> = {\n sm: 14,\n md: 16,\n lg: 20,\n};\n\nconst ICON_GLYPHS: Record<(typeof ICON_NAMES)[number], ReactNode> = {\n sun: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"4.5\" />\n <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"5\" />\n <line x1=\"12\" y1=\"19\" x2=\"12\" y2=\"22\" />\n <line x1=\"2\" y1=\"12\" x2=\"5\" y2=\"12\" />\n <line x1=\"19\" y1=\"12\" x2=\"22\" y2=\"12\" />\n <line x1=\"5.5\" y1=\"5.5\" x2=\"7.5\" y2=\"7.5\" />\n <line x1=\"16.5\" y1=\"16.5\" x2=\"18.5\" y2=\"18.5\" />\n <line x1=\"18.5\" y1=\"5.5\" x2=\"16.5\" y2=\"7.5\" />\n <line x1=\"7.5\" y1=\"16.5\" x2=\"5.5\" y2=\"18.5\" />\n </>\n ),\n moon: <path d=\"M19 13.5A8.5 8.5 0 1 1 10.5 4.5 6.8 6.8 0 0 0 19 13.5Z\" />,\n cloud: (\n <path d=\"M7 18a4 4 0 1 1 .5-8A5.5 5.5 0 0 1 17.5 11.5 3.5 3.5 0 0 1 17 18Z\" />\n ),\n rain: (\n <>\n <path d=\"M6.5 13a3 3 0 1 1 .4-6A4.5 4.5 0 0 1 15.5 8.5 3 3 0 0 1 15 13Z\" />\n <line x1=\"8\" y1=\"15\" x2=\"7\" y2=\"18\" />\n <line x1=\"12\" y1=\"15\" x2=\"11\" y2=\"18\" />\n <line x1=\"16\" y1=\"15\" x2=\"15\" y2=\"18\" />\n </>\n ),\n snow: (\n <>\n <path d=\"M6.5 13a3 3 0 1 1 .4-6A4.5 4.5 0 0 1 15.5 8.5 3 3 0 0 1 15 13Z\" />\n <circle cx=\"7.5\" cy=\"17\" r=\"0.75\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"12\" cy=\"18\" r=\"0.75\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"16.5\" cy=\"17\" r=\"0.75\" fill=\"currentColor\" stroke=\"none\" />\n </>\n ),\n wind: (\n <>\n <path d=\"M3 7.5h10.5a2.5 2.5 0 1 0-2-4\" />\n <path d=\"M3 12h14a2.5 2.5 0 1 1-2 4\" />\n <path d=\"M3 16.5h8\" />\n </>\n ),\n play: <path d=\"M7 4.5v15l13-7.5z\" />,\n pause: (\n <>\n <line x1=\"8\" y1=\"4\" x2=\"8\" y2=\"20\" />\n <line x1=\"16\" y1=\"4\" x2=\"16\" y2=\"20\" />\n </>\n ),\n check: <path d=\"M4 12.5l5 5.5 11-12\" />,\n x: (\n <>\n <line x1=\"5\" y1=\"5\" x2=\"19\" y2=\"19\" />\n <line x1=\"19\" y1=\"5\" x2=\"5\" y2=\"19\" />\n </>\n ),\n star: (\n <path d=\"M12 2.5l2.6 5.9 6.4.6-4.8 4.3 1.4 6.3-5.6-3-5.6 3 1.4-6.3-4.8-4.3 6.4-.6z\" />\n ),\n heart: (\n <path d=\"M12 20s-7.5-4.7-9.8-9.6C.6 6.8 3 3.3 6.6 3.3c2 0 3.7 1.1 5.4 3.3 1.7-2.2 3.4-3.3 5.4-3.3 3.6 0 6 3.5 4.4 7.1C19.5 15.3 12 20 12 20z\" />\n ),\n \"arrow-right\": <path d=\"M4 12h15M13 6l6 6-6 6\" />,\n \"arrow-up-right\": <path d=\"M7 17L17 7M9 7h8v8\" />,\n \"chevron-right\": <path d=\"M9 5l7 7-7 7\" />,\n calendar: (\n <>\n <rect x=\"3.5\" y=\"5\" width=\"17\" height=\"15\" rx=\"2\" />\n <line x1=\"3.5\" y1=\"9.5\" x2=\"20.5\" y2=\"9.5\" />\n <line x1=\"8\" y1=\"3\" x2=\"8\" y2=\"7\" />\n <line x1=\"16\" y1=\"3\" x2=\"16\" y2=\"7\" />\n </>\n ),\n clock: (\n <>\n <circle cx=\"12\" cy=\"12\" r=\"8.5\" />\n <path d=\"M12 7.5V12l3.5 2\" />\n </>\n ),\n \"map-pin\": (\n <>\n <path d=\"M12 21s7-6.7 7-12.2A7 7 0 1 0 5 8.8C5 14.3 12 21 12 21z\" />\n <circle cx=\"12\" cy=\"8.8\" r=\"2.3\" />\n </>\n ),\n plane: (\n <>\n <path d=\"M3 12l18-8-6 18-3-7-7-3z\" />\n <path d=\"M12 15l3-3\" />\n </>\n ),\n truck: (\n <>\n <path d=\"M2 8h11v9H2z\" />\n <path d=\"M13 11h4l3 3v3h-7z\" />\n <circle cx=\"6\" cy=\"19\" r=\"1.8\" />\n <circle cx=\"17\" cy=\"19\" r=\"1.8\" />\n </>\n ),\n \"credit-card\": (\n <>\n <rect x=\"2.5\" y=\"5.5\" width=\"19\" height=\"13\" rx=\"2\" />\n <line x1=\"2.5\" y1=\"10\" x2=\"21.5\" y2=\"10\" />\n <line x1=\"6\" y1=\"15\" x2=\"10\" y2=\"15\" />\n </>\n ),\n user: (\n <>\n <circle cx=\"12\" cy=\"8\" r=\"3.6\" />\n <path d=\"M4.5 20.5a7.5 7.5 0 0 1 15 0\" />\n </>\n ),\n search: (\n <>\n <circle cx=\"10.5\" cy=\"10.5\" r=\"6.5\" />\n <line x1=\"20\" y1=\"20\" x2=\"15.3\" y2=\"15.3\" />\n </>\n ),\n bell: (\n <>\n <path d=\"M12 3a5.5 5.5 0 0 0-5.5 5.5c0 4.5-2 6-2 6h15s-2-1.5-2-6A5.5 5.5 0 0 0 12 3z\" />\n <path d=\"M10 19a2 2 0 0 0 4 0\" />\n </>\n ),\n};\n\nexport const iconVocabulary = {\n Icon: {\n description:\n \"A small line icon from the built-in set. `size` controls the rendered pixel size.\",\n properties: z.object({\n name: z.enum(ICON_NAMES).describe(\"Which built-in icon to render.\"),\n size: z\n .enum(ICON_SIZE_TOKENS)\n .optional()\n .describe(\"Icon size; defaults to `md` (16px).\"),\n }),\n render: ({ name, size }) => {\n const glyph = ICON_GLYPHS[name as keyof typeof ICON_GLYPHS];\n if (!glyph) return null;\n const px = ICON_SIZE_PX[(size as keyof typeof ICON_SIZE_PX) ?? \"md\"];\n\n return (\n <svg\n data-aui=\"icon\"\n data-aui-name={name}\n data-aui-size={size}\n viewBox=\"0 0 24 24\"\n width={px}\n height={px}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n {glyph}\n </svg>\n );\n },\n },\n} satisfies GenerativeUILibrary;\n"],"mappings":";;;;AAKA,MAAM,mBAAmB;CAAC;CAAM;CAAM;AAAI;AAC1C,MAAM,eAAkE;CACtE,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,MAAM,cAA8D;CAClE,KACE,qBAAA,UAAA,EAAA,UAAA;EACE,oBAAC,UAAD;GAAQ,IAAG;GAAK,IAAG;GAAK,GAAE;EAAO,CAAA;EACjC,oBAAC,QAAD;GAAM,IAAG;GAAK,IAAG;GAAI,IAAG;GAAK,IAAG;EAAK,CAAA;EACrC,oBAAC,QAAD;GAAM,IAAG;GAAK,IAAG;GAAK,IAAG;GAAK,IAAG;EAAM,CAAA;EACvC,oBAAC,QAAD;GAAM,IAAG;GAAI,IAAG;GAAK,IAAG;GAAI,IAAG;EAAM,CAAA;EACrC,oBAAC,QAAD;GAAM,IAAG;GAAK,IAAG;GAAK,IAAG;GAAK,IAAG;EAAM,CAAA;EACvC,oBAAC,QAAD;GAAM,IAAG;GAAM,IAAG;GAAM,IAAG;GAAM,IAAG;EAAO,CAAA;EAC3C,oBAAC,QAAD;GAAM,IAAG;GAAO,IAAG;GAAO,IAAG;GAAO,IAAG;EAAQ,CAAA;EAC/C,oBAAC,QAAD;GAAM,IAAG;GAAO,IAAG;GAAM,IAAG;GAAO,IAAG;EAAO,CAAA;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,IAAG;CAAQ,CAAA,CAC3C,EAAA,CAAA;CAEJ,MACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD,EAAM,GAAE,8EAA+E,CAAA,GACvF,oBAAC,QAAD,EAAM,GAAE,uBAAwB,CAAA,CAChC,EAAA,CAAA;AAEN;AAEA,MAAa,iBAAiB,EAC5B,MAAM;CACJ,aACE;CACF,YAAY,EAAE,OAAO;EACnB,MAAM,EAAE,KAAK,UAAU,CAAC,CAAC,SAAS,gCAAgC;EAClE,MAAM,EACH,KAAK,gBAAgB,CAAC,CACtB,SAAS,CAAC,CACV,SAAS,qCAAqC;CACnD,CAAC;CACD,SAAS,EAAE,MAAM,WAAW;EAC1B,MAAM,QAAQ,YAAY;EAC1B,IAAI,CAAC,OAAO,OAAO;EACnB,MAAM,KAAK,aAAc,QAAsC;EAE/D,OACE,oBAAC,OAAD;GACE,YAAS;GACT,iBAAe;GACf,iBAAe;GACf,SAAQ;GACR,OAAO;GACP,QAAQ;GACR,MAAK;GACL,QAAO;GACP,aAAY;GACZ,eAAc;GACd,gBAAe;GACf,eAAY;GAEX,UAAA;EACE,CAAA;CAET;AACF,EACF"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { GenerativeUILibrary } from "../types.js";
|
|
2
|
-
/**
|
|
3
|
-
* The closed generative-ui vocabulary the factory ships: a fixed set of
|
|
4
|
-
* intrinsic components the model may render, each a zod `properties` schema
|
|
5
|
-
* plus an unstyled structural `render` (semantic HTML with a `data-aui`
|
|
6
|
-
* attribute naming the component, plus `data-aui-<prop>` hooks, for the host
|
|
7
|
-
* to style). Users opt in by passing it to
|
|
8
|
-
* `new JSONGenerativeUI({ library: defaultGenerativeUILibrary })`, and override
|
|
9
|
-
* or extend entries with their own `defineGenerativeComponents`.
|
|
10
|
-
*/
|
|
11
|
-
export declare const defaultGenerativeUILibrary: GenerativeUILibrary;
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vocabulary/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAiB;AAYpD;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBAWxC,CAAC"}
|
package/dist/vocabulary/index.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { alertVocabulary } from "./alert.js";
|
|
2
|
-
import { dataVocabulary } from "./data.js";
|
|
3
|
-
import { factVocabulary } from "./fact.js";
|
|
4
|
-
import { formVocabulary } from "./form.js";
|
|
5
|
-
import { iconVocabulary } from "./icon.js";
|
|
6
|
-
import { interactiveVocabulary } from "./interactive.js";
|
|
7
|
-
import { layoutVocabulary } from "./layout.js";
|
|
8
|
-
import { listVocabulary } from "./list.js";
|
|
9
|
-
import { mediaVocabulary } from "./media.js";
|
|
10
|
-
import { textVocabulary } from "./text.js";
|
|
11
|
-
//#region src/vocabulary/index.ts
|
|
12
|
-
/**
|
|
13
|
-
* The closed generative-ui vocabulary the factory ships: a fixed set of
|
|
14
|
-
* intrinsic components the model may render, each a zod `properties` schema
|
|
15
|
-
* plus an unstyled structural `render` (semantic HTML with a `data-aui`
|
|
16
|
-
* attribute naming the component, plus `data-aui-<prop>` hooks, for the host
|
|
17
|
-
* to style). Users opt in by passing it to
|
|
18
|
-
* `new JSONGenerativeUI({ library: defaultGenerativeUILibrary })`, and override
|
|
19
|
-
* or extend entries with their own `defineGenerativeComponents`.
|
|
20
|
-
*/
|
|
21
|
-
const defaultGenerativeUILibrary = {
|
|
22
|
-
...textVocabulary,
|
|
23
|
-
...mediaVocabulary,
|
|
24
|
-
...factVocabulary,
|
|
25
|
-
...interactiveVocabulary,
|
|
26
|
-
...formVocabulary,
|
|
27
|
-
...layoutVocabulary,
|
|
28
|
-
...listVocabulary,
|
|
29
|
-
...dataVocabulary,
|
|
30
|
-
...alertVocabulary,
|
|
31
|
-
...iconVocabulary
|
|
32
|
-
};
|
|
33
|
-
//#endregion
|
|
34
|
-
export { defaultGenerativeUILibrary };
|
|
35
|
-
|
|
36
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/vocabulary/index.ts"],"sourcesContent":["import type { GenerativeUILibrary } from \"../types\";\nimport { alertVocabulary } from \"./alert\";\nimport { dataVocabulary } from \"./data\";\nimport { factVocabulary } from \"./fact\";\nimport { formVocabulary } from \"./form\";\nimport { iconVocabulary } from \"./icon\";\nimport { interactiveVocabulary } from \"./interactive\";\nimport { layoutVocabulary } from \"./layout\";\nimport { listVocabulary } from \"./list\";\nimport { mediaVocabulary } from \"./media\";\nimport { textVocabulary } from \"./text\";\n\n/**\n * The closed generative-ui vocabulary the factory ships: a fixed set of\n * intrinsic components the model may render, each a zod `properties` schema\n * plus an unstyled structural `render` (semantic HTML with a `data-aui`\n * attribute naming the component, plus `data-aui-<prop>` hooks, for the host\n * to style). Users opt in by passing it to\n * `new JSONGenerativeUI({ library: defaultGenerativeUILibrary })`, and override\n * or extend entries with their own `defineGenerativeComponents`.\n */\nexport const defaultGenerativeUILibrary: GenerativeUILibrary = {\n ...textVocabulary,\n ...mediaVocabulary,\n ...factVocabulary,\n ...interactiveVocabulary,\n ...formVocabulary,\n ...layoutVocabulary,\n ...listVocabulary,\n ...dataVocabulary,\n ...alertVocabulary,\n ...iconVocabulary,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,6BAAkD;CAC7D,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL"}
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import type { Action } from "../ir.js";
|
|
4
|
-
import { BUTTON_STYLES } from "../ir.js";
|
|
5
|
-
import type { GenerativeUIDispatch, GenerativeUIStatus } from "../types.js";
|
|
6
|
-
type Option = {
|
|
7
|
-
label: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
value: string;
|
|
10
|
-
};
|
|
11
|
-
type RadioGroupRenderProps = {
|
|
12
|
-
value?: string;
|
|
13
|
-
options: Option[];
|
|
14
|
-
name?: string;
|
|
15
|
-
label?: string;
|
|
16
|
-
defaultValue?: string;
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
$status: GenerativeUIStatus;
|
|
19
|
-
$action?: Action;
|
|
20
|
-
$dispatch?: GenerativeUIDispatch;
|
|
21
|
-
};
|
|
22
|
-
declare function RadioGroupRender({ value, options, name, label, defaultValue, children, $action, $dispatch, }: RadioGroupRenderProps): React.JSX.Element;
|
|
23
|
-
type CheckboxGroupRenderProps = {
|
|
24
|
-
value?: string[];
|
|
25
|
-
options: Option[];
|
|
26
|
-
name?: string;
|
|
27
|
-
label?: string;
|
|
28
|
-
defaultValue?: string[];
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
$status: GenerativeUIStatus;
|
|
31
|
-
$action?: Action;
|
|
32
|
-
$dispatch?: GenerativeUIDispatch;
|
|
33
|
-
};
|
|
34
|
-
declare function CheckboxGroupRender({ value, options, name, label, defaultValue, children, $action, $dispatch, }: CheckboxGroupRenderProps): React.JSX.Element;
|
|
35
|
-
type SelectRenderProps = {
|
|
36
|
-
value?: string;
|
|
37
|
-
options: Option[];
|
|
38
|
-
placeholder?: string;
|
|
39
|
-
label?: string;
|
|
40
|
-
name?: string;
|
|
41
|
-
defaultValue?: string;
|
|
42
|
-
children?: React.ReactNode;
|
|
43
|
-
$status: GenerativeUIStatus;
|
|
44
|
-
$action?: Action;
|
|
45
|
-
$dispatch?: GenerativeUIDispatch;
|
|
46
|
-
};
|
|
47
|
-
declare function SelectRender({ value, options, placeholder, label, name, defaultValue, $action, $dispatch, children, }: SelectRenderProps): React.JSX.Element;
|
|
48
|
-
type InputRenderProps = {
|
|
49
|
-
value?: string;
|
|
50
|
-
inputType?: "text" | "password" | "number";
|
|
51
|
-
placeholder?: string;
|
|
52
|
-
multiline?: boolean;
|
|
53
|
-
label?: string;
|
|
54
|
-
name?: string;
|
|
55
|
-
defaultValue?: string;
|
|
56
|
-
$status: GenerativeUIStatus;
|
|
57
|
-
$action?: Action;
|
|
58
|
-
$dispatch?: GenerativeUIDispatch;
|
|
59
|
-
};
|
|
60
|
-
declare function InputRender({ value, inputType, placeholder, multiline, label, name, defaultValue, $action, $dispatch, }: InputRenderProps): React.JSX.Element;
|
|
61
|
-
type DatePickerRenderProps = {
|
|
62
|
-
inputType?: "date" | "datetime" | "time";
|
|
63
|
-
value?: string;
|
|
64
|
-
min?: string;
|
|
65
|
-
max?: string;
|
|
66
|
-
label?: string;
|
|
67
|
-
name?: string;
|
|
68
|
-
$status: GenerativeUIStatus;
|
|
69
|
-
$action?: Action;
|
|
70
|
-
$dispatch?: GenerativeUIDispatch;
|
|
71
|
-
};
|
|
72
|
-
declare function DatePickerRender({ inputType, value, min, max, label, name, $action, $dispatch, }: DatePickerRenderProps): React.JSX.Element;
|
|
73
|
-
type CheckboxRenderProps = {
|
|
74
|
-
checked?: boolean;
|
|
75
|
-
label: string;
|
|
76
|
-
name?: string;
|
|
77
|
-
defaultChecked?: boolean;
|
|
78
|
-
variant?: "checkbox" | "switch";
|
|
79
|
-
$status: GenerativeUIStatus;
|
|
80
|
-
$action?: Action;
|
|
81
|
-
$dispatch?: GenerativeUIDispatch;
|
|
82
|
-
};
|
|
83
|
-
declare function CheckboxRender({ checked, label, name, defaultChecked, variant, $action, $dispatch, }: CheckboxRenderProps): React.JSX.Element;
|
|
84
|
-
type SliderRenderProps = {
|
|
85
|
-
value?: number;
|
|
86
|
-
name?: string;
|
|
87
|
-
label?: string;
|
|
88
|
-
min: number;
|
|
89
|
-
max: number;
|
|
90
|
-
step?: number;
|
|
91
|
-
defaultValue?: number;
|
|
92
|
-
unit?: string;
|
|
93
|
-
$status: GenerativeUIStatus;
|
|
94
|
-
$action?: Action;
|
|
95
|
-
$dispatch?: GenerativeUIDispatch;
|
|
96
|
-
};
|
|
97
|
-
declare function SliderRender({ value, name, label, min, max, step, defaultValue, unit, $action, $dispatch, }: SliderRenderProps): React.JSX.Element;
|
|
98
|
-
type ButtonRenderProps = {
|
|
99
|
-
label: string;
|
|
100
|
-
buttonStyle?: (typeof BUTTON_STYLES)[number];
|
|
101
|
-
block?: boolean;
|
|
102
|
-
submit?: boolean;
|
|
103
|
-
undoable?: boolean;
|
|
104
|
-
children?: React.ReactNode;
|
|
105
|
-
$status: GenerativeUIStatus;
|
|
106
|
-
$action?: Action;
|
|
107
|
-
$dispatch?: GenerativeUIDispatch;
|
|
108
|
-
};
|
|
109
|
-
declare function ButtonRender({ label, buttonStyle, block, submit, undoable, children, $action, $dispatch, }: ButtonRenderProps): React.JSX.Element;
|
|
110
|
-
export declare const interactiveVocabulary: {
|
|
111
|
-
Button: {
|
|
112
|
-
description: string;
|
|
113
|
-
properties: z.ZodObject<{
|
|
114
|
-
label: z.ZodString;
|
|
115
|
-
buttonStyle: z.ZodOptional<z.ZodEnum<{
|
|
116
|
-
secondary: "secondary";
|
|
117
|
-
primary: "primary";
|
|
118
|
-
outline: "outline";
|
|
119
|
-
ghost: "ghost";
|
|
120
|
-
danger: "danger";
|
|
121
|
-
}>>;
|
|
122
|
-
block: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
-
submit: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
-
undoable: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
-
}, z.core.$strip>;
|
|
126
|
-
render: typeof ButtonRender;
|
|
127
|
-
};
|
|
128
|
-
Select: {
|
|
129
|
-
description: string;
|
|
130
|
-
properties: z.ZodObject<{
|
|
131
|
-
options: z.ZodArray<z.ZodObject<{
|
|
132
|
-
label: z.ZodString;
|
|
133
|
-
value: z.ZodString;
|
|
134
|
-
}, z.core.$strip>>;
|
|
135
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
136
|
-
label: z.ZodOptional<z.ZodString>;
|
|
137
|
-
name: z.ZodOptional<z.ZodString>;
|
|
138
|
-
defaultValue: z.ZodOptional<z.ZodString>;
|
|
139
|
-
}, z.core.$strip>;
|
|
140
|
-
render: typeof SelectRender;
|
|
141
|
-
};
|
|
142
|
-
Input: {
|
|
143
|
-
description: string;
|
|
144
|
-
properties: z.ZodObject<{
|
|
145
|
-
inputType: z.ZodOptional<z.ZodEnum<{
|
|
146
|
-
number: "number";
|
|
147
|
-
text: "text";
|
|
148
|
-
password: "password";
|
|
149
|
-
}>>;
|
|
150
|
-
placeholder: z.ZodOptional<z.ZodString>;
|
|
151
|
-
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
-
label: z.ZodOptional<z.ZodString>;
|
|
153
|
-
name: z.ZodOptional<z.ZodString>;
|
|
154
|
-
defaultValue: z.ZodOptional<z.ZodString>;
|
|
155
|
-
}, z.core.$strip>;
|
|
156
|
-
render: typeof InputRender;
|
|
157
|
-
};
|
|
158
|
-
DatePicker: {
|
|
159
|
-
description: string;
|
|
160
|
-
properties: z.ZodObject<{
|
|
161
|
-
inputType: z.ZodOptional<z.ZodEnum<{
|
|
162
|
-
date: "date";
|
|
163
|
-
time: "time";
|
|
164
|
-
datetime: "datetime";
|
|
165
|
-
}>>;
|
|
166
|
-
value: z.ZodOptional<z.ZodString>;
|
|
167
|
-
min: z.ZodOptional<z.ZodString>;
|
|
168
|
-
max: z.ZodOptional<z.ZodString>;
|
|
169
|
-
label: z.ZodOptional<z.ZodString>;
|
|
170
|
-
name: z.ZodOptional<z.ZodString>;
|
|
171
|
-
}, z.core.$strip>;
|
|
172
|
-
render: typeof DatePickerRender;
|
|
173
|
-
};
|
|
174
|
-
Checkbox: {
|
|
175
|
-
description: string;
|
|
176
|
-
properties: z.ZodObject<{
|
|
177
|
-
label: z.ZodString;
|
|
178
|
-
name: z.ZodOptional<z.ZodString>;
|
|
179
|
-
defaultChecked: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
-
variant: z.ZodOptional<z.ZodEnum<{
|
|
181
|
-
switch: "switch";
|
|
182
|
-
checkbox: "checkbox";
|
|
183
|
-
}>>;
|
|
184
|
-
}, z.core.$strip>;
|
|
185
|
-
render: typeof CheckboxRender;
|
|
186
|
-
};
|
|
187
|
-
Slider: {
|
|
188
|
-
description: string;
|
|
189
|
-
properties: z.ZodObject<{
|
|
190
|
-
name: z.ZodOptional<z.ZodString>;
|
|
191
|
-
label: z.ZodOptional<z.ZodString>;
|
|
192
|
-
min: z.ZodNumber;
|
|
193
|
-
max: z.ZodNumber;
|
|
194
|
-
step: z.ZodOptional<z.ZodNumber>;
|
|
195
|
-
defaultValue: z.ZodOptional<z.ZodNumber>;
|
|
196
|
-
unit: z.ZodOptional<z.ZodString>;
|
|
197
|
-
}, z.core.$strip>;
|
|
198
|
-
render: typeof SliderRender;
|
|
199
|
-
};
|
|
200
|
-
RadioGroup: {
|
|
201
|
-
description: string;
|
|
202
|
-
properties: z.ZodObject<{
|
|
203
|
-
options: z.ZodArray<z.ZodObject<{
|
|
204
|
-
label: z.ZodString;
|
|
205
|
-
value: z.ZodString;
|
|
206
|
-
description: z.ZodOptional<z.ZodString>;
|
|
207
|
-
}, z.core.$strip>>;
|
|
208
|
-
name: z.ZodOptional<z.ZodString>;
|
|
209
|
-
label: z.ZodOptional<z.ZodString>;
|
|
210
|
-
defaultValue: z.ZodOptional<z.ZodString>;
|
|
211
|
-
}, z.core.$strip>;
|
|
212
|
-
render: typeof RadioGroupRender;
|
|
213
|
-
};
|
|
214
|
-
CheckboxGroup: {
|
|
215
|
-
description: string;
|
|
216
|
-
properties: z.ZodObject<{
|
|
217
|
-
options: z.ZodArray<z.ZodObject<{
|
|
218
|
-
label: z.ZodString;
|
|
219
|
-
value: z.ZodString;
|
|
220
|
-
description: z.ZodOptional<z.ZodString>;
|
|
221
|
-
}, z.core.$strip>>;
|
|
222
|
-
name: z.ZodOptional<z.ZodString>;
|
|
223
|
-
label: z.ZodOptional<z.ZodString>;
|
|
224
|
-
defaultValue: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
225
|
-
}, z.core.$strip>;
|
|
226
|
-
render: typeof CheckboxGroupRender;
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
export {};
|
|
230
|
-
//# sourceMappingURL=interactive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../src/vocabulary/interactive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAc;AACpC,OAAO,EAAE,aAAa,EAAE,iBAAc;AACtC,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EACnB,oBAAiB;AAwBlB,KAAK,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAwBrE,KAAK,qBAAqB,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC,CAAC;AAEF,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,OAAO,EACP,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE,qBAAqB,qBA2CvB;AAED,KAAK,w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