@petrarca/sonnet-playground 0.7.0 → 0.9.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.
Files changed (76) hide show
  1. package/README.md +10 -8
  2. package/dist/{PlayAdvancedComponents-ZYK66UII.js → PlayAdvancedComponents-VMUI472R.js} +2 -2
  3. package/dist/PlayCodeEditor-AMTFE5SW.js +8 -0
  4. package/dist/PlayCodedValues-G2EVIVMO.js +9 -0
  5. package/dist/{PlayCoreComponents-YTEAS3GL.js → PlayCoreComponents-EQ2BMY2S.js} +2 -2
  6. package/dist/{PlayDataComponents-W44OITT5.js → PlayDataComponents-W2KQHOI7.js} +2 -2
  7. package/dist/PlayFhirQuestionnaire-TO35Q7CP.js +8 -0
  8. package/dist/{PlayFormWidgets-6JYFRTAL.js → PlayFormWidgets-HP3VF2LK.js} +2 -2
  9. package/dist/PlayForms-4CQNEBLS.js +7 -0
  10. package/dist/PlayGraph-25ZKQAQR.js +7 -0
  11. package/dist/PlayGraph-25ZKQAQR.js.map +1 -0
  12. package/dist/PlayMarkdownViewer-X6AIFO2U.js +8 -0
  13. package/dist/PlayMarkdownViewer-X6AIFO2U.js.map +1 -0
  14. package/dist/PlayQuestionnaireDesigner-IR7TKSOT.js +9 -0
  15. package/dist/PlayQuestionnaireDesigner-IR7TKSOT.js.map +1 -0
  16. package/dist/PlaySchemaDesigner-ZQBA7AYO.js +8 -0
  17. package/dist/PlaySchemaDesigner-ZQBA7AYO.js.map +1 -0
  18. package/dist/{PlayShellApi-5O6VYR2X.js → PlayShellApi-MMCQ2AKK.js} +2 -2
  19. package/dist/PlayShellApi-MMCQ2AKK.js.map +1 -0
  20. package/dist/chunk-3FYM6B3E.js +1163 -0
  21. package/dist/chunk-3FYM6B3E.js.map +1 -0
  22. package/dist/{chunk-CQ6PGFRV.js → chunk-3RZHYZRL.js} +57 -1
  23. package/dist/chunk-3RZHYZRL.js.map +1 -0
  24. package/dist/chunk-7IMCPUSI.js +100 -0
  25. package/dist/chunk-7IMCPUSI.js.map +1 -0
  26. package/dist/{chunk-2XMWOZ5O.js → chunk-EPCUUTBZ.js} +48 -41
  27. package/dist/chunk-EPCUUTBZ.js.map +1 -0
  28. package/dist/{chunk-I2FLG6ZD.js → chunk-LDCNLHO2.js} +195 -18
  29. package/dist/chunk-LDCNLHO2.js.map +1 -0
  30. package/dist/chunk-LVV32F7G.js +104 -0
  31. package/dist/chunk-LVV32F7G.js.map +1 -0
  32. package/dist/chunk-OUL3DN2E.js +510 -0
  33. package/dist/chunk-OUL3DN2E.js.map +1 -0
  34. package/dist/chunk-QKFQI4VX.js +83 -0
  35. package/dist/chunk-QKFQI4VX.js.map +1 -0
  36. package/dist/{chunk-6WI3N7JI.js → chunk-RGBSHXS5.js} +145 -4
  37. package/dist/chunk-RGBSHXS5.js.map +1 -0
  38. package/dist/{chunk-UB7462QG.js → chunk-RLJI5VMP.js} +72 -1
  39. package/dist/chunk-RLJI5VMP.js.map +1 -0
  40. package/dist/chunk-VGAS5Z6X.js +543 -0
  41. package/dist/chunk-VGAS5Z6X.js.map +1 -0
  42. package/dist/chunk-VKZ2RJFL.js +647 -0
  43. package/dist/chunk-VKZ2RJFL.js.map +1 -0
  44. package/dist/chunk-WR74TMW4.js +219 -0
  45. package/dist/chunk-WR74TMW4.js.map +1 -0
  46. package/dist/{chunk-E5X7GVLU.js → chunk-XNDD4UN4.js} +2 -2
  47. package/dist/chunk-XNDD4UN4.js.map +1 -0
  48. package/dist/chunk-YTGQRDD2.js +343 -0
  49. package/dist/chunk-YTGQRDD2.js.map +1 -0
  50. package/dist/index.d.ts +13 -10
  51. package/dist/index.js +72 -11
  52. package/dist/index.js.map +1 -1
  53. package/dist/pages/index.d.ts +56 -20
  54. package/dist/pages/index.js +39 -17
  55. package/package.json +15 -14
  56. package/dist/PlayForms-L532W3JL.js +0 -7
  57. package/dist/PlayGraph-M4KQSFI7.js +0 -7
  58. package/dist/PlaySchemaDesigner-S4DBB53G.js +0 -7
  59. package/dist/chunk-2XMWOZ5O.js.map +0 -1
  60. package/dist/chunk-4Y4JFKAK.js +0 -240
  61. package/dist/chunk-4Y4JFKAK.js.map +0 -1
  62. package/dist/chunk-6WI3N7JI.js.map +0 -1
  63. package/dist/chunk-CQ6PGFRV.js.map +0 -1
  64. package/dist/chunk-E5X7GVLU.js.map +0 -1
  65. package/dist/chunk-I2FLG6ZD.js.map +0 -1
  66. package/dist/chunk-O2QMWJZI.js +0 -881
  67. package/dist/chunk-O2QMWJZI.js.map +0 -1
  68. package/dist/chunk-UB7462QG.js.map +0 -1
  69. /package/dist/{PlayAdvancedComponents-ZYK66UII.js.map → PlayAdvancedComponents-VMUI472R.js.map} +0 -0
  70. /package/dist/{PlayCoreComponents-YTEAS3GL.js.map → PlayCodeEditor-AMTFE5SW.js.map} +0 -0
  71. /package/dist/{PlayDataComponents-W44OITT5.js.map → PlayCodedValues-G2EVIVMO.js.map} +0 -0
  72. /package/dist/{PlayFormWidgets-6JYFRTAL.js.map → PlayCoreComponents-EQ2BMY2S.js.map} +0 -0
  73. /package/dist/{PlayForms-L532W3JL.js.map → PlayDataComponents-W2KQHOI7.js.map} +0 -0
  74. /package/dist/{PlayGraph-M4KQSFI7.js.map → PlayFhirQuestionnaire-TO35Q7CP.js.map} +0 -0
  75. /package/dist/{PlaySchemaDesigner-S4DBB53G.js.map → PlayFormWidgets-HP3VF2LK.js.map} +0 -0
  76. /package/dist/{PlayShellApi-5O6VYR2X.js.map → PlayForms-4CQNEBLS.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/pages/PlayQuestionnaireDesigner.tsx","../src/pages/questionnaires/examples.ts"],"sourcesContent":["import { useState } from \"react\";\nimport {\n QuestionnaireDesigner,\n SchemaDesigner,\n type QuestionnaireDesignerCapabilities,\n} from \"@petrarca/sonnet-schema-designer\";\nimport { ViewSwitch } from \"@petrarca/sonnet-ui\";\nimport { ClipboardList, PencilRuler } from \"lucide-react\";\nimport type { JsonSchema, UISchema } from \"@petrarca/sonnet-core/schema\";\nimport { TerminologyProvider } from \"@petrarca/sonnet-core/terminology\";\nimport { DesignerControls } from \"./DesignerControls\";\nimport { PLAYGROUND_TERMINOLOGY } from \"./codedValues/lists\";\nimport {\n ASSESSMENT,\n BUG_REPORT,\n FEEDBACK,\n type QuestionnaireExample,\n} from \"./questionnaires/examples\";\n\n// The examples to work on, simple to advanced.\nconst EXAMPLES = {\n simple: { label: \"Simple -- event feedback\", ...FEEDBACK },\n medium: { label: \"Medium -- bug report\", ...BUG_REPORT },\n advanced: { label: \"Advanced -- product assessment\", ...ASSESSMENT },\n} satisfies Record<string, QuestionnaireExample & { label: string }>;\ntype ExampleKey = keyof typeof EXAMPLES;\n\n// The capability profiles to work with -- what the designer lets an author do.\nconst PROFILES = {\n full: {\n label: \"Full\",\n description:\n \"Every capability: all answer types, sections, show-if, reasons for no answer, the way to the schema designer.\",\n capabilities: { previews: [\"form\", \"json\", \"capabilities\"] },\n },\n standard: {\n label: \"Standard\",\n description:\n \"Sections and show-if; no reasons for no answer, no way to the schema designer.\",\n capabilities: {\n reasons: false,\n switchToDesigner: false,\n previews: [\"form\", \"json\", \"capabilities\"],\n },\n },\n simple: {\n label: \"Simple\",\n description:\n \"A few answer types; no sections, no logic, no reasons -- parts beyond it stay locked.\",\n capabilities: {\n answerTypes: [\"shortText\", \"longText\", \"yesNo\", \"singleChoice\", \"date\"],\n sections: false,\n logic: false,\n reasons: false,\n previews: [\"form\", \"capabilities\"],\n },\n },\n structure: {\n label: \"Structure only (no preview)\",\n description: \"Question list and panel only; the centre preview is hidden.\",\n capabilities: { previews: [] },\n },\n} satisfies Record<\n string,\n {\n label: string;\n description: string;\n capabilities: QuestionnaireDesignerCapabilities;\n }\n>;\ntype ProfileKey = keyof typeof PROFILES;\ntype Designer = \"questionnaire\" | \"schema\";\n\nexport default function PlayQuestionnaireDesigner() {\n const [exampleKey, setExampleKey] = useState<ExampleKey>(\"advanced\");\n const [profileKey, setProfileKey] = useState<ProfileKey>(\"full\");\n const [schema, setSchema] = useState<JsonSchema>(EXAMPLES.advanced.schema);\n const [uiSchema, setUiSchema] = useState<Record<string, UISchema>>(\n EXAMPLES.advanced.uiSchema,\n );\n // Another example replaces what is being edited; another profile keeps it.\n const selectExample = (key: ExampleKey) => {\n setExampleKey(key);\n setSchema(EXAMPLES[key].schema);\n setUiSchema(EXAMPLES[key].uiSchema);\n };\n const [designer, setDesigner] = useState<Designer>(\"questionnaire\");\n // Both designers edit the same schema and uiSchema: switching converts nothing.\n const onChange = (\n nextSchema: JsonSchema,\n nextUiSchema: Record<string, UISchema>,\n ) => {\n setSchema(nextSchema);\n setUiSchema(nextUiSchema);\n };\n\n return (\n <TerminologyProvider service={PLAYGROUND_TERMINOLOGY}>\n <div className=\"w-full flex flex-col gap-3 h-[calc(100vh-8rem)]\">\n <div>\n <h1>Questionnaire Designer</h1>\n <p className=\"text-sm text-muted-foreground mb-3\">\n Author a questionnaire as sections and questions. It edits the same\n JSON Schema and uiSchema as the Schema Designer, and keeps every\n part it does not understand as it is -- switch between the two and\n back.\n </p>\n </div>\n\n <DesignerControls\n examples={EXAMPLES}\n example={exampleKey}\n onExample={selectExample}\n profiles={PROFILES}\n profile={profileKey}\n onProfile={setProfileKey}\n right={\n <ViewSwitch<Designer>\n label=\"Designer\"\n value={designer}\n onChange={setDesigner}\n options={[\n {\n value: \"questionnaire\",\n label: \"Questionnaire designer\",\n icon: <ClipboardList />,\n },\n {\n value: \"schema\",\n label: \"Schema designer\",\n icon: <PencilRuler />,\n },\n ]}\n />\n }\n />\n\n <div style={{ flex: 1, minHeight: 0 }}>\n {designer === \"questionnaire\" ? (\n <QuestionnaireDesigner\n key={`${exampleKey}-${profileKey}`}\n schema={schema}\n uiSchema={uiSchema}\n onChange={onChange}\n capabilities={PROFILES[profileKey].capabilities}\n onOpenSchemaDesigner={() => setDesigner(\"schema\")}\n />\n ) : (\n <SchemaDesigner\n key={exampleKey}\n schema={schema}\n uiSchema={uiSchema}\n onChange={onChange}\n />\n )}\n </div>\n </div>\n </TerminologyProvider>\n );\n}\n","/**\n * Example questionnaires for the questionnaire designer's playground, from\n * simple to advanced; each one the designer understands but where it says\n * otherwise.\n */\n\nimport {\n CODING_TYPE_ID,\n QUANTITY_TYPE_ID,\n type JsonSchema,\n type JsonSchemaProperty,\n type UISchema,\n} from \"@petrarca/sonnet-core/schema\";\nimport { CHOICE_WITH_TEXT_WIDGET } from \"@petrarca/sonnet-schema-designer\";\nimport { CWE, HTTP_STATUS, SPDX } from \"../codedValues/lists\";\n\n/** An example questionnaire: its schema and uiSchema. */\nexport interface QuestionnaireExample {\n schema: JsonSchema;\n uiSchema: Record<string, UISchema>;\n}\n\n// -- Simple: questions only ----------------------------------------------------\n\n// Event feedback: four questions, no sections -- what the \"Simple\" capability\n// profile can author.\nexport const FEEDBACK: QuestionnaireExample = {\n schema: {\n title: \"Event feedback\",\n description: \"Tell us how the meetup went.\",\n type: \"object\",\n required: [\"name\"],\n properties: {\n name: { type: \"string\", title: \"Your name\" },\n rating: {\n type: \"string\",\n title: \"How was it?\",\n enum: [\"poor\", \"fair\", \"good\", \"excellent\"],\n },\n again: { type: \"boolean\", title: \"I would come again\" },\n comments: { type: \"string\", title: \"Comments\" },\n },\n },\n uiSchema: {\n rating: {\n \"x-ui-widget\": \"radio\",\n \"x-ui-options\": {\n enumNames: {\n poor: \"Poor\",\n fair: \"Fair\",\n good: \"Good\",\n excellent: \"Excellent\",\n },\n },\n },\n comments: { \"x-ui-widget\": \"textarea\" },\n },\n};\n\n// -- Medium: sections, a coded value, a condition -----------------------------\n\n// A bug report: two sections, a coded HTTP status, a follow-up for production\n// issues, a choice with a note, a list, and limits.\nexport const BUG_REPORT: QuestionnaireExample = {\n schema: {\n title: \"Bug report\",\n type: \"object\",\n properties: {\n reporter: {\n type: \"object\",\n title: \"Reporter\",\n required: [\"name\"],\n properties: {\n name: { type: \"string\", title: \"Name\" },\n email: {\n type: \"string\",\n title: \"Email\",\n pattern: \"^[^@\\\\s]+@[^@\\\\s]+$\",\n },\n },\n },\n issue: {\n type: \"object\",\n title: \"Issue\",\n required: [\"summary\"],\n properties: {\n summary: { type: \"string\", title: \"Summary\", maxLength: 120 },\n severity: {\n type: \"string\",\n title: \"Severity\",\n enum: [\"low\", \"medium\", \"high\", \"critical\"],\n },\n status: {\n $ref: CODING_TYPE_ID,\n title: \"Error response, if any\",\n \"x-binding\": { system: HTTP_STATUS, strength: \"required\" },\n },\n browser: {\n type: \"object\",\n title: \"Browser\",\n properties: {\n choice: {\n type: \"string\",\n enum: [\"chrome\", \"firefox\", \"safari\", \"edge\"],\n },\n text: { type: \"string\", title: \"Version\" },\n },\n },\n steps: {\n type: \"array\",\n title: \"Steps to reproduce\",\n items: { type: \"string\" },\n },\n production: { type: \"boolean\", title: \"Happens in production\" },\n },\n allOf: [\n {\n if: {\n properties: { production: { const: true } },\n required: [\"production\"],\n },\n then: {\n properties: {\n since: {\n type: \"string\",\n format: \"date\",\n title: \"Seen in production since\",\n },\n },\n },\n },\n ],\n },\n },\n },\n uiSchema: {\n issue: {\n \"x-ui-fields\": {\n severity: {\n \"x-ui-widget\": \"radio\",\n \"x-ui-options\": {\n enumNames: {\n low: \"Low\",\n medium: \"Medium\",\n high: \"High\",\n critical: \"Critical\",\n },\n },\n },\n browser: {\n \"x-ui-widget\": CHOICE_WITH_TEXT_WIDGET,\n \"x-ui-fields\": {\n choice: {\n \"x-ui-options\": {\n enumNames: {\n chrome: \"Chrome\",\n firefox: \"Firefox\",\n safari: \"Safari\",\n edge: \"Edge\",\n },\n },\n },\n },\n },\n },\n },\n },\n};\n\n// -- Advanced: every feature ---------------------------------------------------\n\n// A product assessment for Acme: facts and targets about a product that its\n// source code cannot show. Every feature of the questionnaire designer once:\n// sections (one repeating), a text, each answer type -- a quantity and coded\n// values among them, on the playground's terminology -- choice with text in\n// both variants, limits, show-if (one on a coded answer), reasons for no\n// answer, a question with a setting beyond its type (a code-only bound string:\n// partly understood) and one part it does not understand (a oneOf).\n\n// Not defined, unknown, none: a reason instead of an answer.\nconst REASONS = {\n type: \"object\",\n title: \"Not answered\",\n additionalProperties: {\n type: \"string\",\n enum: [\"not_defined\", \"unknown\", \"none\"],\n },\n \"x-ui-widget\": \"absent-reasons\",\n \"x-ui-options\": {\n enumNames: {\n not_defined: \"Not defined\",\n unknown: \"Unknown\",\n none: \"None\",\n },\n immediate: true,\n },\n} as JsonSchemaProperty;\n\n// A question required unless a reason is given for it.\nconst requiredUnlessReason = (key: string): JsonSchemaProperty => ({\n if: {\n not: {\n properties: { absent: { required: [key] } },\n required: [\"absent\"],\n },\n },\n then: { required: [key] },\n});\n\nconst ASSESSMENT_SCHEMA: JsonSchema = {\n title: \"Product assessment\",\n description:\n \"Facts and targets about the product that its source code cannot show. Where you have no answer, give a reason.\",\n type: \"object\",\n properties: {\n overview: {\n type: \"object\",\n title: \"Product overview\",\n properties: {\n intro: {\n type: \"null\",\n title: \"About the product\",\n description: \"State facts and targets, never a verdict.\",\n },\n product_type: {\n type: \"string\",\n title: \"Product type\",\n description: \"What is the product, in one sentence?\",\n maxLength: 200,\n },\n industry: {\n type: \"object\",\n title: \"Industry\",\n properties: {\n choice: {\n type: \"string\",\n enum: [\"finance\", \"logistics\", \"retail\", \"public\", \"other\"],\n },\n },\n allOf: [\n {\n if: {\n properties: { choice: { const: \"other\" } },\n required: [\"choice\"],\n },\n then: {\n properties: {\n text: { type: \"string\", title: \"Please describe\" },\n },\n required: [\"text\"],\n },\n },\n ],\n },\n users: {\n type: \"string\",\n title: \"Users\",\n description: \"Who works with the product -- the roles?\",\n },\n user_count: {\n type: \"integer\",\n title: \"People working with it, roughly\",\n minimum: 0,\n },\n languages: {\n type: \"array\",\n title: \"Languages\",\n uniqueItems: true,\n items: { type: \"string\", enum: [\"en\", \"de\", \"fr\", \"es\"] },\n },\n license: {\n title: \"License\",\n anyOf: [{ $ref: CODING_TYPE_ID }, { type: \"string\" }],\n \"x-binding\": { system: SPDX, strength: \"extensible\" },\n },\n absent: REASONS,\n },\n allOf: [requiredUnlessReason(\"product_type\")],\n },\n maturity: {\n type: \"object\",\n title: \"Maturity\",\n properties: {\n lifecycle: {\n type: \"string\",\n title: \"Lifecycle stage\",\n enum: [\"introduction\", \"growth\", \"maturity\", \"decline\", \"retired\"],\n },\n phase: {\n type: \"object\",\n title: \"Development phase\",\n properties: {\n choice: {\n type: \"string\",\n enum: [\"features\", \"maintenance\", \"modernization\", \"end_of_life\"],\n },\n text: { type: \"string\", title: \"Details\" },\n },\n },\n ai_tools: { type: \"boolean\", title: \"Teams use AI coding tools\" },\n goals: {\n type: \"array\",\n title: \"Key goals for the next years\",\n items: { type: \"string\" },\n },\n absent: REASONS,\n },\n allOf: [requiredUnlessReason(\"lifecycle\")],\n },\n architecture: {\n type: \"object\",\n title: \"Architecture boundary\",\n properties: {\n deployment: {\n type: \"string\",\n title: \"Deployment model\",\n enum: [\"cloud_native\", \"hosted\", \"on_premises\"],\n },\n tenancy: {\n type: \"string\",\n title: \"Tenancy\",\n enum: [\"multi_tenant\", \"single_tenant\"],\n },\n absent: REASONS,\n },\n allOf: [\n requiredUnlessReason(\"deployment\"),\n {\n if: {\n properties: { deployment: { not: { const: \"cloud_native\" } } },\n required: [\"deployment\"],\n },\n then: {\n properties: {\n planned_change: {\n type: \"string\",\n format: \"date\",\n title: \"Planned move to the cloud, by\",\n },\n },\n },\n },\n ],\n },\n integrations: {\n type: \"array\",\n title: \"External integrations\",\n description: \"One entry per system the product must connect to.\",\n items: {\n type: \"object\",\n properties: {\n system: { type: \"string\", title: \"System\" },\n interface: { type: \"string\", title: \"Interface or standard\" },\n },\n },\n },\n targets: {\n type: \"object\",\n title: \"Operational targets\",\n properties: {\n users_per_customer: {\n type: \"object\",\n title: \"Users per customer\",\n properties: {\n today: { type: \"integer\", title: \"Today\" },\n target: { type: \"integer\", title: \"Target\" },\n },\n \"x-ui-layout\": { rows: [{ fields: [\"today\", \"target\"] }] },\n },\n response_time: {\n $ref: QUANTITY_TYPE_ID,\n title: \"Response time of the main actions\",\n properties: { unit: { enum: [\"ms\", \"s\"] } },\n },\n availability: {\n type: \"number\",\n title: \"Availability, in percent\",\n minimum: 0,\n maximum: 100,\n },\n absent: REASONS,\n },\n },\n security: {\n type: \"object\",\n title: \"Security\",\n properties: {\n weakness: {\n $ref: CODING_TYPE_ID,\n title: \"Weakness found most often\",\n \"x-binding\": { system: CWE, strength: \"required\" },\n },\n error_status: {\n type: \"string\",\n title: \"Most frequent error response\",\n \"x-binding\": { system: HTTP_STATUS, strength: \"required\" },\n },\n absent: REASONS,\n },\n allOf: [\n {\n if: {\n properties: {\n weakness: {\n type: \"object\",\n properties: {\n system: { const: CWE },\n code: { const: \"CWE-89\" },\n },\n required: [\"code\"],\n },\n },\n required: [\"weakness\"],\n },\n then: {\n properties: {\n sql_prevention: {\n type: \"string\",\n title: \"How is SQL injection prevented?\",\n },\n },\n },\n },\n ],\n },\n questions: {\n type: \"array\",\n title: \"Specific questions\",\n description: \"One question per entry.\",\n items: { type: \"string\" },\n },\n reviewed_by: {\n title: \"Reviewed by\",\n oneOf: [\n { type: \"string\", title: \"Name\" },\n {\n type: \"object\",\n title: \"Team\",\n properties: { name: { type: \"string\" } },\n },\n ],\n },\n absent: REASONS,\n },\n};\n\nconst ASSESSMENT_UI_SCHEMA: Record<string, UISchema> = {\n overview: {\n \"x-ui-fields\": {\n product_type: { \"x-ui-placeholder\": \"A web application for ...\" },\n industry: {\n \"x-ui-widget\": CHOICE_WITH_TEXT_WIDGET,\n \"x-ui-fields\": {\n choice: {\n \"x-ui-options\": {\n enumNames: {\n finance: \"Finance\",\n logistics: \"Logistics\",\n retail: \"Retail\",\n public: \"Public sector\",\n other: \"Other\",\n },\n },\n },\n },\n },\n users: { \"x-ui-widget\": \"textarea\" },\n languages: {\n \"x-ui-widget\": \"checkbox-group\",\n \"x-ui-options\": {\n enumNames: {\n en: \"English\",\n de: \"German\",\n fr: \"French\",\n es: \"Spanish\",\n },\n },\n },\n },\n },\n maturity: {\n \"x-ui-fields\": {\n lifecycle: {\n \"x-ui-options\": {\n enumNames: {\n introduction: \"Introduction\",\n growth: \"Growth\",\n maturity: \"Maturity\",\n decline: \"Decline\",\n retired: \"Retired\",\n },\n },\n },\n phase: {\n \"x-ui-widget\": CHOICE_WITH_TEXT_WIDGET,\n \"x-ui-fields\": {\n choice: {\n \"x-ui-options\": {\n enumNames: {\n features: \"Feature development\",\n maintenance: \"Maintenance\",\n modernization: \"Modernization\",\n end_of_life: \"End of life\",\n },\n },\n },\n },\n },\n },\n },\n architecture: {\n \"x-ui-fields\": {\n deployment: {\n \"x-ui-widget\": \"radio\",\n \"x-ui-options\": {\n enumNames: {\n cloud_native: \"Cloud-native\",\n hosted: \"Hosted\",\n on_premises: \"On-premises\",\n },\n },\n },\n tenancy: {\n \"x-ui-widget\": \"radio\",\n \"x-ui-options\": {\n enumNames: {\n multi_tenant: \"Customers share one installation\",\n single_tenant: \"One installation per customer\",\n },\n },\n },\n },\n },\n targets: {\n \"x-ui-fields\": {\n response_time: {\n \"x-ui-options\": {\n units: [\n { value: \"ms\", label: \"ms\" },\n { value: \"s\", label: \"s\" },\n ],\n },\n },\n },\n },\n};\n\nexport const ASSESSMENT: QuestionnaireExample = {\n schema: ASSESSMENT_SCHEMA,\n uiSchema: ASSESSMENT_UI_SCHEMA,\n};\n"],"mappings":";;;;;;;;;;;AAAA,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,kBAAkB;AAC3B,SAAS,eAAe,mBAAmB;AAE3C,SAAS,2BAA2B;;;ACHpC;AAAA,EACE;AAAA,EACA;AAAA,OAIK;AACP,SAAS,+BAA+B;AAajC,IAAM,WAAiC;AAAA,EAC5C,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,UAAU,CAAC,MAAM;AAAA,IACjB,YAAY;AAAA,MACV,MAAM,EAAE,MAAM,UAAU,OAAO,YAAY;AAAA,MAC3C,QAA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AAAA,YACN,OAAO;AAAA,YACP,UAAU;AAAA,YACV,SAAS;AAAA,cACP;AAAA,gBACE,OAAO;AAAA,gBACP,OAAO;AAAA,gBACP,MAAM,oBAAC,iBAAc;AAAA,cACvB;AAAA,cACA;AAAA,gBACE,OAAO;AAAA,gBACP,OAAO;AAAA,gBACP,MAAM,oBAAC,eAAY;AAAA,cACrB;AAAA,YACF;AAAA;AAAA,QACF;AAAA;AAAA,IAEJ;AAAA,IAEA,oBAAC,SAAI,OAAO,EAAE,MAAM,GAAG,WAAW,EAAE,GACjC,uBAAa,kBACZ;AAAA,MAAC;AAAA;AAAA,QAEC;AAAA,QACA;AAAA,QACA;AAAA,QACA,cAAc,SAAS,UAAU,EAAE;AAAA,QACnC,sBAAsB,MAAM,YAAY,QAAQ;AAAA;AAAA,MAL3C,GAAG,UAAU,IAAI,UAAU;AAAA,IAMlC,IAEA;AAAA,MAAC;AAAA;AAAA,QAEC;AAAA,QACA;AAAA,QACA;AAAA;AAAA,MAHK;AAAA,IAIP,GAEJ;AAAA,KACF,GACF;AAEJ;","names":[]}
@@ -0,0 +1,219 @@
1
+ // src/pages/codedValues/lists.ts
2
+ import {
3
+ staticTerminology
4
+ } from "@petrarca/sonnet-core/terminology";
5
+ var YES_NO_DONT_KNOW = "http://hl7.org/fhir/ValueSet/yesnodontknow";
6
+ var HTTP_STATUS = "https://www.iana.org/assignments/http-status-codes";
7
+ var CWE = "https://cwe.mitre.org";
8
+ var SPDX = "https://spdx.org/licenses";
9
+ var ACME_ERRORS = "https://codes.acme.example/errors";
10
+ var V2_0136 = "http://terminology.hl7.org/CodeSystem/v2-0136";
11
+ var ABSENT = "http://terminology.hl7.org/CodeSystem/data-absent-reason";
12
+ var yesNoDontKnow = {
13
+ id: YES_NO_DONT_KNOW,
14
+ codes: [
15
+ { system: V2_0136, code: "Y", display: "Yes" },
16
+ { system: V2_0136, code: "N", display: "No" },
17
+ { system: ABSENT, code: "asked-unknown", display: "Don't know" }
18
+ ]
19
+ };
20
+ var httpStatus = {
21
+ id: HTTP_STATUS,
22
+ codes: [
23
+ ["200", "OK"],
24
+ ["201", "Created"],
25
+ ["204", "No Content"],
26
+ ["301", "Moved Permanently"],
27
+ ["304", "Not Modified"],
28
+ ["400", "Bad Request"],
29
+ ["401", "Unauthorized"],
30
+ ["403", "Forbidden"],
31
+ ["404", "Not Found"],
32
+ ["409", "Conflict"],
33
+ ["422", "Unprocessable Content"],
34
+ ["429", "Too Many Requests"],
35
+ ["500", "Internal Server Error"],
36
+ ["502", "Bad Gateway"],
37
+ ["503", "Service Unavailable"]
38
+ ].map(([code, display]) => ({ code, display }))
39
+ };
40
+ var acmeErrors = {
41
+ id: ACME_ERRORS,
42
+ codes: [
43
+ ["OK", "Done"],
44
+ ["CREATED", "Created"],
45
+ ["INVALID_INPUT", "The request is invalid"],
46
+ ["NOT_SIGNED_IN", "Not signed in"],
47
+ ["NOT_ALLOWED", "Not allowed"],
48
+ ["NOT_FOUND", "Not found"],
49
+ ["CONFLICT", "Changed meanwhile"],
50
+ ["RATE_LIMITED", "Too many requests"],
51
+ ["INTERNAL", "Something went wrong"],
52
+ ["UNAVAILABLE", "Down for maintenance"]
53
+ ].map(([code, display]) => ({ code, display }))
54
+ };
55
+ var NEUTRALIZATION = "Improper Neutralization";
56
+ var INJECTION = "Injection";
57
+ var RESOURCE = "Improper Control of a Resource Through its Lifetime";
58
+ var BUFFER = "Improper Restriction of Operations within the Bounds of a Memory Buffer";
59
+ var ACCESS = "Improper Access Control";
60
+ var weaknesses = {
61
+ id: CWE,
62
+ codes: [
63
+ { code: "CWE-707", display: NEUTRALIZATION, path: [] },
64
+ {
65
+ code: "CWE-20",
66
+ display: "Improper Input Validation",
67
+ path: [NEUTRALIZATION]
68
+ },
69
+ { code: "CWE-74", display: INJECTION, path: [NEUTRALIZATION] },
70
+ {
71
+ code: "CWE-79",
72
+ display: "Cross-site Scripting",
73
+ path: [NEUTRALIZATION, INJECTION]
74
+ },
75
+ {
76
+ code: "CWE-89",
77
+ display: "SQL Injection",
78
+ path: [NEUTRALIZATION, INJECTION]
79
+ },
80
+ {
81
+ code: "CWE-78",
82
+ display: "OS Command Injection",
83
+ path: [NEUTRALIZATION, INJECTION]
84
+ },
85
+ { code: "CWE-664", display: RESOURCE, path: [] },
86
+ { code: "CWE-119", display: BUFFER, path: [RESOURCE] },
87
+ {
88
+ code: "CWE-787",
89
+ display: "Out-of-bounds Write",
90
+ path: [RESOURCE, BUFFER]
91
+ },
92
+ {
93
+ code: "CWE-125",
94
+ display: "Out-of-bounds Read",
95
+ path: [RESOURCE, BUFFER]
96
+ },
97
+ { code: "CWE-416", display: "Use After Free", path: [RESOURCE] },
98
+ { code: "CWE-284", display: ACCESS, path: [] },
99
+ { code: "CWE-287", display: "Improper Authentication", path: [ACCESS] },
100
+ { code: "CWE-862", display: "Missing Authorization", path: [ACCESS] }
101
+ ]
102
+ };
103
+ var licenses = {
104
+ id: SPDX,
105
+ codes: [
106
+ ["0BSD", "BSD Zero Clause License"],
107
+ ["AFL-3.0", "Academic Free License v3.0"],
108
+ ["AGPL-3.0-only", "GNU Affero General Public License v3.0 only"],
109
+ ["AGPL-3.0-or-later", "GNU Affero General Public License v3.0 or later"],
110
+ ["Apache-1.1", "Apache License 1.1"],
111
+ ["Apache-2.0", "Apache License 2.0"],
112
+ ["APSL-2.0", "Apple Public Source License 2.0"],
113
+ ["Artistic-2.0", "Artistic License 2.0"],
114
+ ["BlueOak-1.0.0", "Blue Oak Model License 1.0.0"],
115
+ ["BSD-1-Clause", "BSD 1-Clause License"],
116
+ ["BSD-2-Clause", 'BSD 2-Clause "Simplified" License'],
117
+ ["BSD-3-Clause", 'BSD 3-Clause "New" or "Revised" License'],
118
+ ["BSD-3-Clause-Clear", "BSD 3-Clause Clear License"],
119
+ ["BSL-1.0", "Boost Software License 1.0"],
120
+ ["BUSL-1.1", "Business Source License 1.1"],
121
+ ["CC-BY-4.0", "Creative Commons Attribution 4.0 International"],
122
+ [
123
+ "CC-BY-SA-4.0",
124
+ "Creative Commons Attribution Share Alike 4.0 International"
125
+ ],
126
+ ["CC0-1.0", "Creative Commons Zero v1.0 Universal"],
127
+ ["CDDL-1.0", "Common Development and Distribution License 1.0"],
128
+ ["CDDL-1.1", "Common Development and Distribution License 1.1"],
129
+ ["CECILL-2.1", "CeCILL Free Software License Agreement v2.1"],
130
+ ["CPL-1.0", "Common Public License 1.0"],
131
+ ["ECL-2.0", "Educational Community License v2.0"],
132
+ ["EPL-1.0", "Eclipse Public License 1.0"],
133
+ ["EPL-2.0", "Eclipse Public License 2.0"],
134
+ ["EUPL-1.1", "European Union Public License 1.1"],
135
+ ["EUPL-1.2", "European Union Public License 1.2"],
136
+ ["GPL-2.0-only", "GNU General Public License v2.0 only"],
137
+ ["GPL-2.0-or-later", "GNU General Public License v2.0 or later"],
138
+ ["GPL-3.0-only", "GNU General Public License v3.0 only"],
139
+ ["GPL-3.0-or-later", "GNU General Public License v3.0 or later"],
140
+ ["ISC", "ISC License"],
141
+ ["LGPL-2.0-only", "GNU Library General Public License v2 only"],
142
+ ["LGPL-2.1-only", "GNU Lesser General Public License v2.1 only"],
143
+ ["LGPL-2.1-or-later", "GNU Lesser General Public License v2.1 or later"],
144
+ ["LGPL-3.0-only", "GNU Lesser General Public License v3.0 only"],
145
+ ["LGPL-3.0-or-later", "GNU Lesser General Public License v3.0 or later"],
146
+ ["LPPL-1.3c", "LaTeX Project Public License v1.3c"],
147
+ ["MIT", "MIT License"],
148
+ ["MIT-0", "MIT No Attribution"],
149
+ ["MPL-1.1", "Mozilla Public License 1.1"],
150
+ ["MPL-2.0", "Mozilla Public License 2.0"],
151
+ ["MS-PL", "Microsoft Public License"],
152
+ ["MS-RL", "Microsoft Reciprocal License"],
153
+ ["MulanPSL-2.0", "Mulan Permissive Software License, Version 2"],
154
+ ["NCSA", "University of Illinois/NCSA Open Source License"],
155
+ ["ODbL-1.0", "Open Data Commons Open Database License v1.0"],
156
+ ["OFL-1.1", "SIL Open Font License 1.1"],
157
+ ["OSL-3.0", "Open Software License 3.0"],
158
+ ["PHP-3.01", "PHP License v3.01"],
159
+ ["PostgreSQL", "PostgreSQL License"],
160
+ ["Python-2.0", "Python License 2.0"],
161
+ ["QPL-1.0", "Q Public License 1.0"],
162
+ ["Ruby", "Ruby License"],
163
+ ["SSPL-1.0", "Server Side Public License, v 1"],
164
+ ["Unicode-3.0", "Unicode License v3"],
165
+ ["Unlicense", "The Unlicense"],
166
+ ["UPL-1.0", "Universal Permissive License v1.0"],
167
+ ["Vim", "Vim License"],
168
+ ["Zlib", "zlib License"],
169
+ ["ZPL-2.1", "Zope Public License 2.1"]
170
+ ].map(([code, display]) => ({ code, display }))
171
+ };
172
+ var LISTS = [
173
+ { id: HTTP_STATUS, label: "HTTP status codes (IANA)", kind: "system" },
174
+ { id: CWE, label: "Weaknesses (CWE, a hierarchy)", kind: "system" },
175
+ { id: SPDX, label: "Licenses (SPDX, searched)", kind: "system" },
176
+ { id: ACME_ERRORS, label: "Acme error codes (internal)", kind: "system" },
177
+ {
178
+ id: YES_NO_DONT_KNOW,
179
+ label: "Yes / no / don't know (HL7)",
180
+ kind: "valueSet"
181
+ }
182
+ ];
183
+ var statusToError = {
184
+ source: HTTP_STATUS,
185
+ target: ACME_ERRORS,
186
+ elements: [
187
+ ["200", "OK"],
188
+ ["201", "CREATED"],
189
+ ["204", "OK", "broader"],
190
+ ["400", "INVALID_INPUT"],
191
+ ["401", "NOT_SIGNED_IN"],
192
+ ["403", "NOT_ALLOWED"],
193
+ ["404", "NOT_FOUND"],
194
+ ["409", "CONFLICT"],
195
+ ["422", "INVALID_INPUT", "broader"],
196
+ ["429", "RATE_LIMITED"],
197
+ ["500", "INTERNAL"],
198
+ ["502", "UNAVAILABLE", "broader"],
199
+ ["503", "UNAVAILABLE"]
200
+ ].map(([code, target, match]) => ({
201
+ code,
202
+ target,
203
+ match: match ?? "equivalent"
204
+ }))
205
+ };
206
+ var PLAYGROUND_TERMINOLOGY = staticTerminology(
207
+ [httpStatus, weaknesses, licenses, acmeErrors, yesNoDontKnow],
208
+ [statusToError]
209
+ );
210
+
211
+ export {
212
+ HTTP_STATUS,
213
+ CWE,
214
+ SPDX,
215
+ ACME_ERRORS,
216
+ LISTS,
217
+ PLAYGROUND_TERMINOLOGY
218
+ };
219
+ //# sourceMappingURL=chunk-WR74TMW4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/pages/codedValues/lists.ts"],"sourcesContent":["/**\n * Code lists for the playground, served by a static terminology -- public\n * code sets of software engineering, and HL7's yes / no / don't know, which\n * the FHIR specification's own example questionnaire uses:\n *\n * HTTP status codes (IANA) a short list, shown whole\n * CWE weaknesses (MITRE) an excerpt of a hierarchy: hits show their path\n * SPDX licenses more than a page: searched as it is typed\n * Acme error codes an application's own codes for the same statuses --\n * the second list of a codeable concept, mapped from\n * the HTTP statuses by a concept map, so a status\n * picked suggests its code\n */\n\nimport {\n staticTerminology,\n type CodeList,\n type ConceptMap,\n} from \"@petrarca/sonnet-core/terminology\";\n\nexport const YES_NO_DONT_KNOW = \"http://hl7.org/fhir/ValueSet/yesnodontknow\";\nexport const HTTP_STATUS = \"https://www.iana.org/assignments/http-status-codes\";\nexport const CWE = \"https://cwe.mitre.org\";\nexport const SPDX = \"https://spdx.org/licenses\";\nexport const ACME_ERRORS = \"https://codes.acme.example/errors\";\n\nconst V2_0136 = \"http://terminology.hl7.org/CodeSystem/v2-0136\";\nconst ABSENT = \"http://terminology.hl7.org/CodeSystem/data-absent-reason\";\n\nconst yesNoDontKnow: CodeList = {\n id: YES_NO_DONT_KNOW,\n codes: [\n { system: V2_0136, code: \"Y\", display: \"Yes\" },\n { system: V2_0136, code: \"N\", display: \"No\" },\n { system: ABSENT, code: \"asked-unknown\", display: \"Don't know\" },\n ],\n};\n\nconst httpStatus: CodeList = {\n id: HTTP_STATUS,\n codes: [\n [\"200\", \"OK\"],\n [\"201\", \"Created\"],\n [\"204\", \"No Content\"],\n [\"301\", \"Moved Permanently\"],\n [\"304\", \"Not Modified\"],\n [\"400\", \"Bad Request\"],\n [\"401\", \"Unauthorized\"],\n [\"403\", \"Forbidden\"],\n [\"404\", \"Not Found\"],\n [\"409\", \"Conflict\"],\n [\"422\", \"Unprocessable Content\"],\n [\"429\", \"Too Many Requests\"],\n [\"500\", \"Internal Server Error\"],\n [\"502\", \"Bad Gateway\"],\n [\"503\", \"Service Unavailable\"],\n ].map(([code, display]) => ({ code, display })),\n};\n\n// An application's own codes for the statuses it answers with: the same\n// concept as an HTTP status, coded for its own logs and support desk.\nconst acmeErrors: CodeList = {\n id: ACME_ERRORS,\n codes: [\n [\"OK\", \"Done\"],\n [\"CREATED\", \"Created\"],\n [\"INVALID_INPUT\", \"The request is invalid\"],\n [\"NOT_SIGNED_IN\", \"Not signed in\"],\n [\"NOT_ALLOWED\", \"Not allowed\"],\n [\"NOT_FOUND\", \"Not found\"],\n [\"CONFLICT\", \"Changed meanwhile\"],\n [\"RATE_LIMITED\", \"Too many requests\"],\n [\"INTERNAL\", \"Something went wrong\"],\n [\"UNAVAILABLE\", \"Down for maintenance\"],\n ].map(([code, display]) => ({ code, display })),\n};\n\n// Ancestors in CWE's research view (CWE-1000), root first.\nconst NEUTRALIZATION = \"Improper Neutralization\";\nconst INJECTION = \"Injection\";\nconst RESOURCE = \"Improper Control of a Resource Through its Lifetime\";\nconst BUFFER =\n \"Improper Restriction of Operations within the Bounds of a Memory Buffer\";\nconst ACCESS = \"Improper Access Control\";\n\nconst weaknesses: CodeList = {\n id: CWE,\n codes: [\n { code: \"CWE-707\", display: NEUTRALIZATION, path: [] },\n {\n code: \"CWE-20\",\n display: \"Improper Input Validation\",\n path: [NEUTRALIZATION],\n },\n { code: \"CWE-74\", display: INJECTION, path: [NEUTRALIZATION] },\n {\n code: \"CWE-79\",\n display: \"Cross-site Scripting\",\n path: [NEUTRALIZATION, INJECTION],\n },\n {\n code: \"CWE-89\",\n display: \"SQL Injection\",\n path: [NEUTRALIZATION, INJECTION],\n },\n {\n code: \"CWE-78\",\n display: \"OS Command Injection\",\n path: [NEUTRALIZATION, INJECTION],\n },\n { code: \"CWE-664\", display: RESOURCE, path: [] },\n { code: \"CWE-119\", display: BUFFER, path: [RESOURCE] },\n {\n code: \"CWE-787\",\n display: \"Out-of-bounds Write\",\n path: [RESOURCE, BUFFER],\n },\n {\n code: \"CWE-125\",\n display: \"Out-of-bounds Read\",\n path: [RESOURCE, BUFFER],\n },\n { code: \"CWE-416\", display: \"Use After Free\", path: [RESOURCE] },\n { code: \"CWE-284\", display: ACCESS, path: [] },\n { code: \"CWE-287\", display: \"Improper Authentication\", path: [ACCESS] },\n { code: \"CWE-862\", display: \"Missing Authorization\", path: [ACCESS] },\n ],\n};\n\nconst licenses: CodeList = {\n id: SPDX,\n codes: [\n [\"0BSD\", \"BSD Zero Clause License\"],\n [\"AFL-3.0\", \"Academic Free License v3.0\"],\n [\"AGPL-3.0-only\", \"GNU Affero General Public License v3.0 only\"],\n [\"AGPL-3.0-or-later\", \"GNU Affero General Public License v3.0 or later\"],\n [\"Apache-1.1\", \"Apache License 1.1\"],\n [\"Apache-2.0\", \"Apache License 2.0\"],\n [\"APSL-2.0\", \"Apple Public Source License 2.0\"],\n [\"Artistic-2.0\", \"Artistic License 2.0\"],\n [\"BlueOak-1.0.0\", \"Blue Oak Model License 1.0.0\"],\n [\"BSD-1-Clause\", \"BSD 1-Clause License\"],\n [\"BSD-2-Clause\", 'BSD 2-Clause \"Simplified\" License'],\n [\"BSD-3-Clause\", 'BSD 3-Clause \"New\" or \"Revised\" License'],\n [\"BSD-3-Clause-Clear\", \"BSD 3-Clause Clear License\"],\n [\"BSL-1.0\", \"Boost Software License 1.0\"],\n [\"BUSL-1.1\", \"Business Source License 1.1\"],\n [\"CC-BY-4.0\", \"Creative Commons Attribution 4.0 International\"],\n [\n \"CC-BY-SA-4.0\",\n \"Creative Commons Attribution Share Alike 4.0 International\",\n ],\n [\"CC0-1.0\", \"Creative Commons Zero v1.0 Universal\"],\n [\"CDDL-1.0\", \"Common Development and Distribution License 1.0\"],\n [\"CDDL-1.1\", \"Common Development and Distribution License 1.1\"],\n [\"CECILL-2.1\", \"CeCILL Free Software License Agreement v2.1\"],\n [\"CPL-1.0\", \"Common Public License 1.0\"],\n [\"ECL-2.0\", \"Educational Community License v2.0\"],\n [\"EPL-1.0\", \"Eclipse Public License 1.0\"],\n [\"EPL-2.0\", \"Eclipse Public License 2.0\"],\n [\"EUPL-1.1\", \"European Union Public License 1.1\"],\n [\"EUPL-1.2\", \"European Union Public License 1.2\"],\n [\"GPL-2.0-only\", \"GNU General Public License v2.0 only\"],\n [\"GPL-2.0-or-later\", \"GNU General Public License v2.0 or later\"],\n [\"GPL-3.0-only\", \"GNU General Public License v3.0 only\"],\n [\"GPL-3.0-or-later\", \"GNU General Public License v3.0 or later\"],\n [\"ISC\", \"ISC License\"],\n [\"LGPL-2.0-only\", \"GNU Library General Public License v2 only\"],\n [\"LGPL-2.1-only\", \"GNU Lesser General Public License v2.1 only\"],\n [\"LGPL-2.1-or-later\", \"GNU Lesser General Public License v2.1 or later\"],\n [\"LGPL-3.0-only\", \"GNU Lesser General Public License v3.0 only\"],\n [\"LGPL-3.0-or-later\", \"GNU Lesser General Public License v3.0 or later\"],\n [\"LPPL-1.3c\", \"LaTeX Project Public License v1.3c\"],\n [\"MIT\", \"MIT License\"],\n [\"MIT-0\", \"MIT No Attribution\"],\n [\"MPL-1.1\", \"Mozilla Public License 1.1\"],\n [\"MPL-2.0\", \"Mozilla Public License 2.0\"],\n [\"MS-PL\", \"Microsoft Public License\"],\n [\"MS-RL\", \"Microsoft Reciprocal License\"],\n [\"MulanPSL-2.0\", \"Mulan Permissive Software License, Version 2\"],\n [\"NCSA\", \"University of Illinois/NCSA Open Source License\"],\n [\"ODbL-1.0\", \"Open Data Commons Open Database License v1.0\"],\n [\"OFL-1.1\", \"SIL Open Font License 1.1\"],\n [\"OSL-3.0\", \"Open Software License 3.0\"],\n [\"PHP-3.01\", \"PHP License v3.01\"],\n [\"PostgreSQL\", \"PostgreSQL License\"],\n [\"Python-2.0\", \"Python License 2.0\"],\n [\"QPL-1.0\", \"Q Public License 1.0\"],\n [\"Ruby\", \"Ruby License\"],\n [\"SSPL-1.0\", \"Server Side Public License, v 1\"],\n [\"Unicode-3.0\", \"Unicode License v3\"],\n [\"Unlicense\", \"The Unlicense\"],\n [\"UPL-1.0\", \"Universal Permissive License v1.0\"],\n [\"Vim\", \"Vim License\"],\n [\"Zlib\", \"zlib License\"],\n [\"ZPL-2.1\", \"Zope Public License 2.1\"],\n ].map(([code, display]) => ({ code, display })),\n};\n\n/** The lists, by what the playground offers them as. */\n/** A list the coded-value page offers: its identifier, its label, whether it is a value set or a code system. */\nexport interface CodedValueList {\n id: string;\n label: string;\n kind: \"valueSet\" | \"system\";\n}\n\nexport const LISTS: CodedValueList[] = [\n { id: HTTP_STATUS, label: \"HTTP status codes (IANA)\", kind: \"system\" },\n { id: CWE, label: \"Weaknesses (CWE, a hierarchy)\", kind: \"system\" },\n { id: SPDX, label: \"Licenses (SPDX, searched)\", kind: \"system\" },\n { id: ACME_ERRORS, label: \"Acme error codes (internal)\", kind: \"system\" },\n {\n id: YES_NO_DONT_KNOW,\n label: \"Yes / no / don't know (HL7)\",\n kind: \"valueSet\",\n },\n];\n\n// The HTTP statuses as the application's own codes: most the same; a few of\n// its codes broader than the status, which it does not tell apart.\nconst statusToError: ConceptMap = {\n source: HTTP_STATUS,\n target: ACME_ERRORS,\n elements: [\n [\"200\", \"OK\"],\n [\"201\", \"CREATED\"],\n [\"204\", \"OK\", \"broader\"],\n [\"400\", \"INVALID_INPUT\"],\n [\"401\", \"NOT_SIGNED_IN\"],\n [\"403\", \"NOT_ALLOWED\"],\n [\"404\", \"NOT_FOUND\"],\n [\"409\", \"CONFLICT\"],\n [\"422\", \"INVALID_INPUT\", \"broader\"],\n [\"429\", \"RATE_LIMITED\"],\n [\"500\", \"INTERNAL\"],\n [\"502\", \"UNAVAILABLE\", \"broader\"],\n [\"503\", \"UNAVAILABLE\"],\n ].map(([code, target, match]) => ({\n code,\n target,\n match: (match ?? \"equivalent\") as \"equivalent\" | \"broader\",\n })),\n};\n\n/** The playground's terminology service: the lists above, in memory, and their map. */\nexport const PLAYGROUND_TERMINOLOGY = staticTerminology(\n [httpStatus, weaknesses, licenses, acmeErrors, yesNoDontKnow],\n [statusToError],\n);\n"],"mappings":";AAcA;AAAA,EACE;AAAA,OAGK;AAEA,IAAM,mBAAmB;AACzB,IAAM,cAAc;AACpB,IAAM,MAAM;AACZ,IAAM,OAAO;AACb,IAAM,cAAc;AAE3B,IAAM,UAAU;AAChB,IAAM,SAAS;AAEf,IAAM,gBAA0B;AAAA,EAC9B,IAAI;AAAA,EACJ,OAAO;AAAA,IACL,EAAE,QAAQ,SAAS,MAAM,KAAK,SAAS,MAAM;AAAA,IAC7C,EAAE,QAAQ,SAAS,MAAM,KAAK,SAAS,KAAK;AAAA,IAC5C,EAAE,QAAQ,QAAQ,MAAM,iBAAiB,SAAS,aAAa;AAAA,EACjE;AACF;AAEA,IAAM,aAAuB;AAAA,EAC3B,IAAI;AAAA,EACJ,OAAO;AAAA,IACL,CAAC,OAAO,IAAI;AAAA,IACZ,CAAC,OAAO,SAAS;AAAA,IACjB,CAAC,OAAO,YAAY;AAAA,IACpB,CAAC,OAAO,mBAAmB;AAAA,IAC3B,CAAC,OAAO,cAAc;AAAA,IACtB,CAAC,OAAO,aAAa;AAAA,IACrB,CAAC,OAAO,cAAc;AAAA,IACtB,CAAC,OAAO,WAAW;AAAA,IACnB,CAAC,OAAO,WAAW;AAAA,IACnB,CAAC,OAAO,UAAU;AAAA,IAClB,CAAC,OAAO,uBAAuB;AAAA,IAC/B,CAAC,OAAO,mBAAmB;AAAA,IAC3B,CAAC,OAAO,uBAAuB;AAAA,IAC/B,CAAC,OAAO,aAAa;AAAA,IACrB,CAAC,OAAO,qBAAqB;AAAA,EAC/B,EAAE,IAAI,CAAC,CAAC,MAAM,OAAO,OAAO,EAAE,MAAM,QAAQ,EAAE;AACh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,aAAa;AAChB;","names":[]}
@@ -681,7 +681,7 @@ var DATASETS = {
681
681
  label: "Organization model",
682
682
  data: { nodes: ORG_NODES, edges: ORG_EDGES },
683
683
  model: ORG_MODEL,
684
- // Simulates the planned Sestina org editor: fixed edge-type catalog (no new
684
+ // Simulates an organization editor: fixed edge-type catalog (no new
685
685
  // edge types) and no property editing (node/edge properties hidden).
686
686
  capabilities: {
687
687
  readOnly: false,
@@ -1055,4 +1055,4 @@ function PlayGraph() {
1055
1055
  export {
1056
1056
  PlayGraph
1057
1057
  };
1058
- //# sourceMappingURL=chunk-E5X7GVLU.js.map
1058
+ //# sourceMappingURL=chunk-XNDD4UN4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/pages/PlayGraph.tsx","../src/pages/graph/inMemoryGraphEditing.ts","../src/pages/graph/relationWidget.tsx"],"sourcesContent":["/**\n * Playground page for @petrarca/sonnet-graph.\n * Accessible at /playground/graph\n *\n * Demonstrates graph visualization with static mock data -- no backend required.\n * Uses the GraphStoresContext provider pattern that consumers like explorer\n * and any consumer app would use to wire their own stores.\n */\n\nimport React, { useCallback, useMemo, useRef, useState } from \"react\";\nimport {\n GraphVisualizer,\n ActionPanel,\n GraphA11yList,\n GraphRendererProvider,\n GraphStoresContext,\n GraphEditToolbar,\n createGraphDataStore,\n createGraphFilterStore,\n createGraphExplorationStore,\n createSelectionStore,\n createGraphFocusStore,\n enrichNodes,\n enrichEdges,\n buildColorPalette,\n GraphModelEditor,\n type GraphModel,\n type GraphModelCapabilities,\n type GraphCapabilities,\n type RawGraphNode,\n type RawGraphEdge,\n type WorkspaceStores,\n} from \"@petrarca/sonnet-graph\";\nimport { DEFAULT_WIDGETS, type WidgetRegistry } from \"@petrarca/sonnet-forms\";\nimport {\n createInMemoryPort,\n createModelSchemaProvider,\n type GraphStore,\n} from \"./graph/inMemoryGraphEditing\";\nimport { createRelationWidget } from \"./graph/relationWidget\";\nimport {\n Button,\n Alert,\n AlertDescription,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n ResizeHandle,\n} from \"@petrarca/sonnet-ui\";\nimport { FormSelect } from \"@petrarca/sonnet-forms\";\nimport { Play, RotateCcw } from \"lucide-react\";\n\n// ---------------------------------------------------------------------------\n// Technology Stack dataset (fictitious) -- a Product at the centre, broken\n// into Components, the Technologies they use, and external Dependencies.\n// Domain: a technology / knowledge graph.\n// ---------------------------------------------------------------------------\n\nconst TECH_NODES: RawGraphNode[] = [\n {\n id_: 1,\n label_: \"Product\",\n properties_: { key: \"product-a\", name: \"Product A\" },\n },\n {\n id_: 2,\n label_: \"Product\",\n properties_: { key: \"product-b\", name: \"Product B\" },\n },\n {\n id_: 3,\n label_: \"TechnologyStack\",\n properties_: { key: \"product-a-stack\", name: \"Product A stack\" },\n },\n {\n id_: 4,\n label_: \"TechnologyStack\",\n properties_: { key: \"product-b-stack\", name: \"Product B stack\" },\n },\n {\n id_: 5,\n label_: \"Technology\",\n properties_: { key: \"react\", name: \"React\" },\n },\n {\n id_: 6,\n label_: \"Technology\",\n properties_: { key: \"postgresql\", name: \"PostgreSQL\" },\n },\n {\n id_: 7,\n label_: \"Technology\",\n properties_: { key: \"kafka\", name: \"Kafka\" },\n },\n {\n id_: 8,\n label_: \"Technology\",\n properties_: { key: \"go\", name: \"Go\" },\n },\n {\n id_: 9,\n label_: \"TechnologyCategory\",\n properties_: { key: \"frontend-framework\", name: \"Frontend Framework\" },\n },\n {\n id_: 10,\n label_: \"TechnologyCategory\",\n properties_: { key: \"database\", name: \"Database\" },\n },\n {\n id_: 11,\n label_: \"TechnologyCategory\",\n properties_: { key: \"messaging\", name: \"Messaging\" },\n },\n {\n id_: 12,\n label_: \"TechnologyCategory\",\n properties_: { key: \"language\", name: \"Language\" },\n },\n];\n\nconst TECH_EDGES: RawGraphEdge[] = [\n // Two products, each with its own stack; both stacks share PostgreSQL.\n {\n id_: 101,\n label_: \"HAS_TECH_STACK\",\n start_id_: 1,\n end_id_: 3,\n properties_: {},\n },\n {\n id_: 102,\n label_: \"HAS_TECH_STACK\",\n start_id_: 2,\n end_id_: 4,\n properties_: {},\n },\n {\n id_: 103,\n label_: \"INTEGRATES_WITH\",\n start_id_: 1,\n end_id_: 2,\n properties_: {},\n },\n // Product A stack: React, PostgreSQL, Kafka.\n {\n id_: 104,\n label_: \"USES_TECHNOLOGY\",\n start_id_: 3,\n end_id_: 5,\n properties_: {},\n },\n {\n id_: 105,\n label_: \"USES_TECHNOLOGY\",\n start_id_: 3,\n end_id_: 6,\n properties_: {},\n },\n {\n id_: 106,\n label_: \"USES_TECHNOLOGY\",\n start_id_: 3,\n end_id_: 7,\n properties_: {},\n },\n // Product B stack: Go + the shared PostgreSQL.\n {\n id_: 107,\n label_: \"USES_TECHNOLOGY\",\n start_id_: 4,\n end_id_: 6,\n properties_: {},\n },\n {\n id_: 108,\n label_: \"USES_TECHNOLOGY\",\n start_id_: 4,\n end_id_: 8,\n properties_: {},\n },\n // Technology -> category.\n { id_: 109, label_: \"BELONGS_TO\", start_id_: 5, end_id_: 9, properties_: {} },\n {\n id_: 110,\n label_: \"BELONGS_TO\",\n start_id_: 6,\n end_id_: 10,\n properties_: {},\n },\n {\n id_: 111,\n label_: \"BELONGS_TO\",\n start_id_: 7,\n end_id_: 11,\n properties_: {},\n },\n {\n id_: 112,\n label_: \"BELONGS_TO\",\n start_id_: 8,\n end_id_: 12,\n properties_: {},\n },\n];\n\n// ---------------------------------------------------------------------------\n// Store setup\n//\n// Stores are created once at module load, not inside the component.\n// This avoids re-creation on re-render and removes the need for useMemo.\n// ---------------------------------------------------------------------------\n\nfunction createPlaygroundStores(): WorkspaceStores {\n const graphFilter = createGraphFilterStore();\n const graphData = createGraphDataStore();\n const selection = createSelectionStore();\n const graphFocus = createGraphFocusStore();\n const graphExploration = createGraphExplorationStore({\n graphData,\n selection,\n graphFocus,\n graphFilter,\n // Static data -- no server expansion available in the playground\n expandNode: async () => ({ nodes: [], edges: [], has_more: false }),\n getNodes: async () => [],\n });\n return { graphFilter, graphData, graphExploration, selection, graphFocus };\n}\n\nconst PLAYGROUND_STORES = createPlaygroundStores();\n\n// ---------------------------------------------------------------------------\n// Data helpers\n// ---------------------------------------------------------------------------\n\ninterface GraphInput {\n nodes: RawGraphNode[];\n edges: RawGraphEdge[];\n}\n\nconst EMPTY_DATA: GraphInput = { nodes: [], edges: [] };\n\nfunction serializeGraphData(data: GraphInput): string {\n return JSON.stringify(data, null, 2);\n}\n\nfunction validateNode(n: unknown, i: number): string | null {\n if (!n || typeof n !== \"object\") return `nodes[${i}] must be an object`;\n const node = n as Record<string, unknown>;\n if (node.id_ === undefined) return `nodes[${i}] is missing id_`;\n if (typeof node.label_ !== \"string\") return `nodes[${i}] is missing label_`;\n return null;\n}\n\nfunction validateEdge(e: unknown, i: number): string | null {\n if (!e || typeof e !== \"object\") return `edges[${i}] must be an object`;\n const edge = e as Record<string, unknown>;\n if (edge.id_ === undefined) return `edges[${i}] is missing id_`;\n if (typeof edge.label_ !== \"string\") return `edges[${i}] is missing label_`;\n if (edge.start_id_ === undefined) return `edges[${i}] is missing start_id_`;\n if (edge.end_id_ === undefined) return `edges[${i}] is missing end_id_`;\n return null;\n}\n\n/** Validates that parsed JSON is a usable GraphInput. Returns an error string or null. */\nfunction validateGraphInput(value: unknown): string | null {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) {\n return \"JSON must be an object with nodes and edges arrays\";\n }\n const obj = value as Record<string, unknown>;\n if (!Array.isArray(obj.nodes)) return '\"nodes\" must be an array';\n if (!Array.isArray(obj.edges)) return '\"edges\" must be an array';\n for (const [i, n] of (obj.nodes as unknown[]).entries()) {\n const err = validateNode(n, i);\n if (err) return err;\n }\n for (const [i, e] of (obj.edges as unknown[]).entries()) {\n const err = validateEdge(e, i);\n if (err) return err;\n }\n return null;\n}\n\nfunction loadIntoStore(stores: WorkspaceStores, data: GraphInput) {\n const labelCounts: Record<string, number> = {};\n for (const n of data.nodes) {\n labelCounts[n.label_] = (labelCounts[n.label_] ?? 0) + 1;\n }\n const palette = buildColorPalette(labelCounts);\n const nodes = enrichNodes(data.nodes, palette);\n const edges = enrichEdges(data.edges, palette);\n stores.graphFilter.getState().resetFilters();\n stores.graphData.getState().setQueryData(nodes, edges, {\n nodes: nodes.length,\n edges: edges.length,\n });\n // Signal renderers to re-fit layout after data change\n stores.graphFilter.getState().notifyDataChange();\n}\n\n// The mutable in-memory dataset the instance-editing port operates on. It is\n// the single source of truth shared by the Data JSON tab and the live editor;\n// after each edit it is re-enriched into the graph data store (the consumer's\n// cache-patch analog). Initialised to the default dataset's data below.\nconst LIVE_STORE: GraphStore = { nodes: [], edges: [] };\n\n// Replace LIVE_STORE's contents and load them into the visual store.\nfunction setLiveData(stores: WorkspaceStores, data: GraphInput): void {\n LIVE_STORE.nodes = data.nodes.map((n) => ({ ...n }));\n LIVE_STORE.edges = data.edges.map((e) => ({ ...e }));\n loadIntoStore(stores, LIVE_STORE);\n}\n\n// Load the default dataset's data immediately -- no effect needed, no empty\n// render cycle. (The dataset bundle is defined below; its data lives here.)\nsetLiveData(PLAYGROUND_STORES, { nodes: TECH_NODES, edges: TECH_EDGES });\n\n// ---------------------------------------------------------------------------\n// Model tab -- GraphModelEditor over the metamodel of the Graph/Data tabs\n// ---------------------------------------------------------------------------\n\n// A faithful subset of the apex-graph tech-stack domain model: Product at the\n// centre, with TechnologyStack, Technology and TechnologyCategory node types\n// and the real relation types between them (HAS_TECH_STACK, INTEGRATES_WITH,\n// USES_TECHNOLOGY, BELONGS_TO). PROVIDES_STACK_FOR is a second, fictitious\n// Product -> TechnologyStack relation so a single node-type pair has two\n// distinct relation types (exercises the edge editor's multi-relation create).\n// The Model tab is the schema; the Graph / Data tabs are instances conforming\n// to it.\nconst TECH_MODEL: GraphModel = [\n {\n title: \"Product\",\n type: \"object\",\n properties: { key: { type: \"string\" }, name: { type: \"string\" } },\n required: [\"key\", \"name\"],\n \"x-graph\": {\n type: \"NODE\",\n label: \"Product\",\n relations: [\n {\n rel_type_name: \"HAS_TECH_STACK\",\n to_type_name: \"TechnologyStack\",\n cardinality: \"ONE_TO_ONE\",\n form_field: true,\n },\n {\n // Fictitious second Product -> TechnologyStack relation: a product\n // may also provision a stack it does not own (one-to-many).\n rel_type_name: \"PROVIDES_STACK_FOR\",\n to_type_name: \"TechnologyStack\",\n cardinality: \"ONE_TO_MANY\",\n form_field: true,\n },\n {\n rel_type_name: \"INTEGRATES_WITH\",\n to_type_name: \"Product\",\n cardinality: \"ONE_TO_MANY\",\n form_field: true,\n },\n ],\n },\n },\n {\n title: \"TechnologyStack\",\n type: \"object\",\n properties: { key: { type: \"string\" }, name: { type: \"string\" } },\n \"x-graph\": {\n type: \"NODE\",\n label: \"TechnologyStack\",\n relations: [\n {\n rel_type_name: \"USES_TECHNOLOGY\",\n to_type_name: \"Technology\",\n cardinality: \"ONE_TO_MANY\",\n form_field: true,\n },\n ],\n },\n },\n {\n title: \"Technology\",\n type: \"object\",\n properties: { key: { type: \"string\" }, name: { type: \"string\" } },\n required: [\"key\", \"name\"],\n \"x-graph\": {\n type: \"NODE\",\n label: \"Technology\",\n relations: [\n {\n rel_type_name: \"BELONGS_TO\",\n to_type_name: \"TechnologyCategory\",\n cardinality: \"ONE_TO_ONE\",\n form_field: true,\n },\n ],\n },\n },\n {\n title: \"TechnologyCategory\",\n type: \"object\",\n properties: { key: { type: \"string\" }, name: { type: \"string\" } },\n required: [\"key\", \"name\"],\n \"x-graph\": { type: \"NODE\", label: \"TechnologyCategory\" },\n },\n];\n\n// The Organization metamodel -- a small healthcare-organization example.\n// Node-type labels are the organization types (Network, Hospital, Department,\n// Practice). Relations are directional triples: `partOf` is containment\n// (child -> parent, FHIR Organization.partOf); `affiliation` is a\n// non-hierarchical link (FHIR OrganizationAffiliation). Directionality\n// encodes the rules (a Department is\n// partOf a Hospital, not the reverse). Paired with a locked-down profile (see\n// the dataset below): edgeTypes \"catalog\" (a fixed relation-type vocabulary,\n// no new edge types) and no property editing.\nconst ORG_MODEL: GraphModel = [\n {\n title: \"Network\",\n type: \"object\",\n \"x-graph\": { type: \"NODE\", label: \"Network\" },\n },\n {\n title: \"Hospital\",\n type: \"object\",\n \"x-graph\": {\n type: \"NODE\",\n label: \"Hospital\",\n relations: [\n {\n rel_type_name: \"partOf\",\n to_type_name: \"Network\",\n cardinality: \"ONE_TO_ONE\",\n },\n ],\n },\n },\n {\n title: \"Department\",\n type: \"object\",\n \"x-graph\": {\n type: \"NODE\",\n label: \"Department\",\n relations: [\n {\n rel_type_name: \"partOf\",\n to_type_name: \"Hospital\",\n cardinality: \"ONE_TO_ONE\",\n },\n ],\n },\n },\n {\n title: \"Practice\",\n type: \"object\",\n \"x-graph\": {\n type: \"NODE\",\n label: \"Practice\",\n relations: [\n {\n rel_type_name: \"partOf\",\n to_type_name: \"Network\",\n cardinality: \"ONE_TO_ONE\",\n },\n {\n rel_type_name: \"affiliation\",\n to_type_name: \"Hospital\",\n cardinality: \"ONE_TO_MANY\",\n },\n ],\n },\n },\n // Pre-defined relation-type catalog. With edgeTypes \"catalog\", relations may\n // only use these types; no new edge types can be created.\n {\n title: \"partOf\",\n type: \"object\",\n \"x-graph\": { type: \"EDGE\", label: \"partOf\" },\n },\n {\n title: \"affiliation\",\n type: \"object\",\n \"x-graph\": { type: \"EDGE\", label: \"affiliation\" },\n },\n];\n\nconst ORG_NODES: RawGraphNode[] = [\n {\n id_: 1,\n label_: \"Network\",\n properties_: { name: \"Northwind Care Network\" },\n },\n { id_: 2, label_: \"Hospital\", properties_: { name: \"Riverside General\" } },\n { id_: 3, label_: \"Hospital\", properties_: { name: \"Lakeside Clinic\" } },\n { id_: 4, label_: \"Department\", properties_: { name: \"Cardiology\" } },\n { id_: 5, label_: \"Department\", properties_: { name: \"Radiology\" } },\n { id_: 6, label_: \"Practice\", properties_: { name: \"Maple Street GP\" } },\n];\n\nconst ORG_EDGES: RawGraphEdge[] = [\n // partOf: child -> parent (containment).\n { id_: 201, label_: \"partOf\", start_id_: 2, end_id_: 1, properties_: {} },\n { id_: 202, label_: \"partOf\", start_id_: 3, end_id_: 1, properties_: {} },\n { id_: 203, label_: \"partOf\", start_id_: 4, end_id_: 2, properties_: {} },\n { id_: 204, label_: \"partOf\", start_id_: 5, end_id_: 2, properties_: {} },\n // affiliation: a practice affiliated with a hospital (non-hierarchical).\n {\n id_: 205,\n label_: \"affiliation\",\n start_id_: 6,\n end_id_: 2,\n properties_: {},\n },\n];\n\n// ---------------------------------------------------------------------------\n// Datasets -- each bundles { graph data + model + capability profile }. The\n// selector above the tabs swaps all three at once.\n// ---------------------------------------------------------------------------\n\n// The Model Editor's { readOnly, capabilities } config, edited as JSON on the\n// Capabilities tab and applied to the GraphModelEditor.\ninterface CapabilitiesConfig {\n readOnly: boolean;\n capabilities: GraphModelCapabilities;\n}\n\ninterface GraphDataset {\n label: string;\n data: GraphInput;\n model: GraphModel;\n capabilities: CapabilitiesConfig;\n /** Instance-editing capabilities for the live data graph (the Graph tab). */\n editCapabilities: GraphCapabilities;\n}\n\nconst DATASETS: Record<string, GraphDataset> = {\n empty: {\n label: \"Empty\",\n data: EMPTY_DATA,\n model: [],\n capabilities: { readOnly: false, capabilities: {} },\n // No model to drive forms, so editing stays off.\n editCapabilities: {},\n },\n techStack: {\n label: \"Technology Stack\",\n data: { nodes: TECH_NODES, edges: TECH_EDGES },\n model: TECH_MODEL,\n capabilities: { readOnly: false, capabilities: {} },\n // Full instance editing: create / edit / delete nodes and edges.\n editCapabilities: {\n createNode: \"edit\",\n updateNode: \"edit\",\n deleteNode: \"edit\",\n createEdge: \"edit\",\n updateEdge: \"edit\",\n deleteEdge: \"edit\",\n },\n },\n organization: {\n label: \"Organization model\",\n data: { nodes: ORG_NODES, edges: ORG_EDGES },\n model: ORG_MODEL,\n // Simulates an organization editor: fixed edge-type catalog (no new\n // edge types) and no property editing (node/edge properties hidden).\n capabilities: {\n readOnly: false,\n capabilities: {\n edgeTypes: \"catalog\",\n nodeProperties: \"hidden\",\n edgeProperties: \"hidden\",\n },\n },\n // A constrained instance-editing profile: edges may be linked / unlinked\n // (partOf / affiliation), but nodes are not created or deleted here.\n editCapabilities: {\n updateNode: \"edit\",\n createEdge: \"edit\",\n deleteEdge: \"edit\",\n },\n },\n};\n\nconst DATASET_OPTIONS = Object.entries(DATASETS).map(([value, d]) => ({\n value,\n label: d.label,\n}));\n\nconst DEFAULT_DATASET = \"techStack\";\n\ninterface ModelState {\n model: GraphModel;\n modelText: string;\n modelError: string | null;\n setModelText: (v: string) => void;\n applyModel: () => void;\n /** Replace the model wholesale (used by the dataset selector). */\n loadModel: (model: GraphModel) => void;\n /** Apply an edited model (from the graph editor) and re-sync the JSON text. */\n updateModel: (model: GraphModel) => void;\n}\n\n// Shared model state for the Model and Model JSON tabs.\nfunction useModelState(initialModel: GraphModel): ModelState {\n const [modelText, setModelText] = useState(() =>\n JSON.stringify(initialModel, null, 2),\n );\n const [model, setModel] = useState<GraphModel>(initialModel);\n const [modelError, setModelError] = useState<string | null>(null);\n\n const applyModel = useCallback(() => {\n let parsed: unknown;\n try {\n parsed = JSON.parse(modelText);\n } catch (e) {\n setModelError(e instanceof Error ? e.message : \"Invalid JSON\");\n return;\n }\n if (!Array.isArray(parsed)) {\n setModelError(\"A graph model must be a JSON array of type schemas.\");\n return;\n }\n setModelError(null);\n setModel(parsed as GraphModel);\n }, [modelText]);\n\n const loadModel = useCallback((next: GraphModel) => {\n setModelText(JSON.stringify(next, null, 2));\n setModel(next);\n setModelError(null);\n }, []);\n\n const updateModel = useCallback((next: GraphModel) => {\n setModel(next);\n setModelText(JSON.stringify(next, null, 2));\n setModelError(null);\n }, []);\n\n return {\n model,\n modelText,\n modelError,\n setModelText,\n applyModel,\n loadModel,\n updateModel,\n };\n}\n\n// Full-canvas model editor (editable; changes flow back to the shared state).\nfunction ModelGraphTab({\n model,\n onChange,\n readOnly,\n capabilities,\n}: {\n model: GraphModel;\n onChange: (model: GraphModel) => void;\n readOnly: boolean;\n capabilities: GraphModelCapabilities;\n}): React.ReactElement {\n return (\n <div className=\"h-[640px] rounded-lg border overflow-hidden\">\n <GraphModelEditor\n value={model}\n onChange={onChange}\n readOnly={readOnly}\n capabilities={capabilities}\n widgetOptions={[\"entity-select\", \"coded-value\", \"textarea\"]}\n />\n </div>\n );\n}\n\nfunction CapabilitiesTab({\n config,\n onApply,\n}: {\n config: CapabilitiesConfig;\n onApply: (config: CapabilitiesConfig) => void;\n}): React.ReactElement {\n const [text, setText] = useState(() => JSON.stringify(config, null, 2));\n const [error, setError] = useState<string | null>(null);\n\n const apply = useCallback(() => {\n let parsed: unknown;\n try {\n parsed = JSON.parse(text);\n } catch (e) {\n setError(e instanceof Error ? e.message : \"Invalid JSON\");\n return;\n }\n setError(null);\n const obj = parsed as Partial<CapabilitiesConfig>;\n onApply({\n readOnly: Boolean(obj.readOnly),\n capabilities: (obj.capabilities ?? {}) as GraphModelCapabilities,\n });\n }, [text, onApply]);\n\n const reset = useCallback(() => {\n const fresh: CapabilitiesConfig = { readOnly: false, capabilities: {} };\n setText(JSON.stringify(fresh, null, 2));\n setError(null);\n onApply(fresh);\n }, [onApply]);\n\n return (\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Button size=\"sm\" onClick={apply}>\n <Play className=\"h-4 w-4 mr-1\" />\n Apply\n </Button>\n <Button size=\"sm\" variant=\"outline\" onClick={reset}>\n <RotateCcw className=\"h-4 w-4 mr-1\" />\n Reset\n </Button>\n <span className=\"text-xs text-muted-foreground ml-2\">\n Edit, Apply, then open the Model Editor tab and select a node.\n </span>\n </div>\n {error && (\n <Alert variant=\"destructive\">\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n )}\n <textarea\n value={text}\n onChange={(e) => setText(e.target.value)}\n spellCheck={false}\n className=\"w-full h-[280px] font-mono text-xs p-3 border rounded-lg bg-muted/30 resize-y focus:outline-none focus:ring-2 focus:ring-ring\"\n />\n <div>\n <p className=\"text-xs font-medium text-muted-foreground mb-1\">\n Effective config (applied to GraphModelEditor)\n </p>\n <pre className=\"rounded-md bg-muted px-3 py-2 text-xs overflow-auto max-h-40\">\n {JSON.stringify(config, null, 2)}\n </pre>\n <p className=\"mt-2 text-xs text-muted-foreground\">\n readOnly = lock everything. capabilities: nodeTypes / relations (edit\n | readonly), edgeTypes (edit = select or create | catalog = select\n only | readonly), nodeProperties / edgeProperties (edit | readonly |\n hidden), showEdgeTypes (bool, default false starts edge-type nodes\n deselected; true shows them). More fields are added as the editor\n grows.\n </p>\n </div>\n </div>\n );\n}\n\n// Editable model JSON, applied to the shared model state.\nfunction ModelJsonTab({\n state,\n onReset,\n}: {\n state: ModelState;\n onReset: () => void;\n}): React.ReactElement {\n const { modelText, modelError, setModelText, applyModel } = state;\n return (\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Button size=\"sm\" onClick={applyModel}>\n <Play className=\"h-4 w-4 mr-1\" />\n Apply\n </Button>\n <Button size=\"sm\" variant=\"outline\" onClick={onReset}>\n <RotateCcw className=\"h-4 w-4 mr-1\" />\n Reset\n </Button>\n <span className=\"text-xs text-muted-foreground ml-2\">\n Edit the model, Apply, then switch to the Model tab\n </span>\n </div>\n {modelError && (\n <Alert variant=\"destructive\">\n <AlertDescription>{modelError}</AlertDescription>\n </Alert>\n )}\n <textarea\n value={modelText}\n onChange={(e) => setModelText(e.target.value)}\n spellCheck={false}\n className=\"w-full h-[600px] font-mono text-xs p-3 border rounded-lg bg-muted/30 resize-y focus:outline-none focus:ring-2 focus:ring-ring\"\n />\n </div>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Component\n// ---------------------------------------------------------------------------\n\nexport default function PlayGraph(): React.ReactElement {\n const [datasetKey, setDatasetKey] = useState(DEFAULT_DATASET);\n const [jsonText, setJsonText] = useState(() =>\n serializeGraphData(DATASETS[DEFAULT_DATASET].data),\n );\n const [parseError, setParseError] = useState<string | null>(null);\n const modelState = useModelState(DATASETS[DEFAULT_DATASET].model);\n const { loadModel } = modelState;\n const [capsConfig, setCapsConfig] = useState<CapabilitiesConfig>(\n DATASETS[DEFAULT_DATASET].capabilities,\n );\n\n // Instance-editing seams over the in-memory store + the current model. The\n // port re-loads LIVE_STORE into the visual store after every mutation; the\n // schema provider resolves forms from the (live-edited) model. Recreated when\n // the model changes so edits use the latest schema.\n const editPort = useMemo(\n () =>\n createInMemoryPort(LIVE_STORE, () =>\n loadIntoStore(PLAYGROUND_STORES, LIVE_STORE),\n ),\n [],\n );\n const editSchemaProvider = useMemo(\n () => createModelSchemaProvider(modelState.model),\n [modelState.model],\n );\n // Keep the Data JSON tab in sync after a live edit.\n const handleMutated = useCallback(() => {\n setJsonText(serializeGraphData(LIVE_STORE));\n }, []);\n\n // App-supplied form widgets: the relation widget resolves __rel_* options\n // from the in-memory store, registered under \"entity-select\" (the library's\n // default relation widget hint). This is the playground analog of the\n // explorer's cypher-select.\n const editWidgets = useMemo<WidgetRegistry>(\n () => ({\n ...DEFAULT_WIDGETS,\n \"entity-select\": createRelationWidget(LIVE_STORE),\n }),\n [],\n );\n\n // Swap the whole dataset: graph data + model + capability profile.\n const loadDataset = useCallback(\n (key: string) => {\n const ds = DATASETS[key];\n if (!ds) return;\n setDatasetKey(key);\n setJsonText(serializeGraphData(ds.data));\n setParseError(null);\n setLiveData(PLAYGROUND_STORES, ds.data);\n loadModel(ds.model);\n setCapsConfig(ds.capabilities);\n },\n [loadModel],\n );\n\n // Resizable side panel (demonstrates ResizeHandle).\n const [panelWidth, setPanelWidth] = useState(300);\n const rowRef = useRef<HTMLDivElement>(null);\n const startResize = useCallback((e: React.PointerEvent) => {\n e.preventDefault();\n const target = e.currentTarget as HTMLElement;\n target.setPointerCapture(e.pointerId);\n const move = (ev: PointerEvent) => {\n const right = rowRef.current?.getBoundingClientRect().right ?? 0;\n setPanelWidth(Math.min(560, Math.max(200, right - ev.clientX)));\n };\n const up = () => {\n window.removeEventListener(\"pointermove\", move);\n window.removeEventListener(\"pointerup\", up);\n };\n window.addEventListener(\"pointermove\", move);\n window.addEventListener(\"pointerup\", up);\n }, []);\n\n const handleApply = useCallback(() => {\n let parsed: unknown;\n try {\n parsed = JSON.parse(jsonText);\n } catch (e) {\n setParseError(e instanceof Error ? e.message : \"Invalid JSON\");\n return;\n }\n const validationError = validateGraphInput(parsed);\n if (validationError) {\n setParseError(validationError);\n return;\n }\n setParseError(null);\n setLiveData(PLAYGROUND_STORES, parsed as GraphInput);\n }, [jsonText]);\n\n const handleReset = useCallback(() => {\n const data = DATASETS[datasetKey].data;\n setJsonText(serializeGraphData(data));\n setParseError(null);\n setLiveData(PLAYGROUND_STORES, data);\n }, [datasetKey]);\n\n // Reset the model JSON tab to the current dataset's model.\n const handleResetModel = useCallback(() => {\n loadModel(DATASETS[datasetKey].model);\n }, [datasetKey, loadModel]);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if ((e.metaKey || e.ctrlKey) && e.key === \"Enter\") {\n e.preventDefault();\n handleApply();\n }\n },\n [handleApply],\n );\n\n return (\n <div className=\"space-y-6\">\n <div>\n <h1>Graph Visualization</h1>\n <p className=\"text-sm text-muted-foreground mt-1\">\n Interactive property graph with dual renderer support. Edit the JSON\n data and apply to re-render. The Model tab renders a graph model\n (metamodel) with GraphModelEditor.\n </p>\n </div>\n <div className=\"flex items-center gap-3\">\n <FormSelect\n label=\"Dataset\"\n options={DATASET_OPTIONS}\n value={datasetKey}\n onChange={(v) => v && loadDataset(v)}\n clearable={false}\n wrapperClassName=\"w-64\"\n />\n <span className=\"text-xs text-muted-foreground mt-5\">\n A dataset bundles graph data + model + capability profile.\n </span>\n </div>\n <GraphStoresContext.Provider value={PLAYGROUND_STORES}>\n <Tabs defaultValue=\"graph\" className=\"space-y-3\">\n <TabsList>\n <TabsTrigger value=\"graph\">Graph</TabsTrigger>\n <TabsTrigger value=\"data\">Data JSON</TabsTrigger>\n <TabsTrigger value=\"model\">Model Editor</TabsTrigger>\n <TabsTrigger value=\"model-json\">Model JSON</TabsTrigger>\n <TabsTrigger value=\"model-capabilities\">\n Model Editor Capabilities\n </TabsTrigger>\n </TabsList>\n\n <TabsContent value=\"graph\" className=\"mt-0\">\n <GraphRendererProvider defaultRenderer=\"cytoscape\">\n <div ref={rowRef} className=\"flex overflow-hidden h-[600px]\">\n <div className=\"flex-1 min-w-0\">\n <GraphVisualizer />\n </div>\n {/* Drag to resize the side panel (ResizeHandle demo). */}\n <ResizeHandle\n orientation=\"vertical\"\n aria-valuenow={panelWidth}\n aria-valuemin={200}\n aria-valuemax={560}\n onPointerDown={startResize}\n onDoubleClick={() => setPanelWidth(300)}\n />\n <div\n style={{ width: panelWidth }}\n className=\"flex-shrink-0 flex flex-col min-h-0\"\n >\n <div className=\"flex-1 min-h-0 overflow-hidden\">\n <ActionPanel\n actions={\n <GraphEditToolbar\n port={editPort}\n schemaProvider={editSchemaProvider}\n capabilities={DATASETS[datasetKey].editCapabilities}\n widgets={editWidgets}\n onMutated={handleMutated}\n />\n }\n />\n </div>\n {/* Accessible DOM mirror (playground demo only): keyboard / AT /\n automation can select the same nodes/edges as the canvas.\n Real consumers render it sr-only (omit `visible`). */}\n <div className=\"shrink-0 px-4 pb-4 pt-2\">\n <p className=\"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2\">\n Accessible list (demo)\n </p>\n <GraphA11yList visible maxHeight={160} />\n </div>\n </div>\n </div>\n </GraphRendererProvider>\n </TabsContent>\n\n <TabsContent value=\"data\" className=\"mt-0\">\n <div className=\"space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Button size=\"sm\" onClick={handleApply}>\n <Play className=\"h-4 w-4 mr-1\" />\n Apply\n </Button>\n <Button size=\"sm\" variant=\"outline\" onClick={handleReset}>\n <RotateCcw className=\"h-4 w-4 mr-1\" />\n Reset\n </Button>\n <span className=\"text-xs text-muted-foreground ml-2\">\n Cmd+Enter to apply\n </span>\n </div>\n {parseError && (\n <Alert variant=\"destructive\">\n <AlertDescription>{parseError}</AlertDescription>\n </Alert>\n )}\n <textarea\n value={jsonText}\n onChange={(e) => setJsonText(e.target.value)}\n onKeyDown={handleKeyDown}\n spellCheck={false}\n className=\"w-full h-[600px] font-mono text-xs p-3 border rounded-lg bg-muted/30 resize-y focus:outline-none focus:ring-2 focus:ring-ring\"\n />\n </div>\n </TabsContent>\n\n <TabsContent value=\"model\" className=\"mt-0\">\n <ModelGraphTab\n model={modelState.model}\n onChange={modelState.updateModel}\n readOnly={capsConfig.readOnly}\n capabilities={capsConfig.capabilities}\n />\n </TabsContent>\n\n <TabsContent value=\"model-json\" className=\"mt-0\">\n <ModelJsonTab state={modelState} onReset={handleResetModel} />\n </TabsContent>\n\n <TabsContent value=\"model-capabilities\" className=\"mt-0\">\n <CapabilitiesTab config={capsConfig} onApply={setCapsConfig} />\n </TabsContent>\n </Tabs>\n </GraphStoresContext.Provider>\n </div>\n );\n}\n","/**\n * In-memory graph-editing adapters for the playground.\n *\n * Implements the sonnet-graph instance-editing seams against a mutable\n * in-memory dataset and the selected dataset's model, with NO backend:\n *\n * - `createInMemoryPort` -> a `GraphMutationPort` that mutates the dataset\n * and re-loads the store so the canvas reflects the change.\n * - `createModelSchemaProvider` -> a `GraphSchemaProvider` that resolves\n * node/edge schemas and relations synchronously from the in-memory model.\n *\n * This is the playground's acceptance demo (tier 1 of the override model): the\n * shared library editor driven end-to-end with zero app-specific UI. A real\n * consumer (e.g. the explorer) implements the same seams over its REST API.\n */\n\nimport type {\n GraphMutationPort,\n GraphSchemaProvider,\n RelationDef,\n RawGraphNode,\n RawGraphEdge,\n GraphModel,\n CreateNodeInput,\n UpdateNodeInput,\n CreateEdgeInput,\n UpdateEdgeInput,\n CreateNodeWithRelationsInput,\n UpdateNodeWithRelationsInput,\n RelationMap,\n} from \"@petrarca/sonnet-graph\";\nimport type { JsonSchema } from \"@petrarca/sonnet-core/schema\";\n\n/** The mutable dataset the in-memory port operates on. */\nexport interface GraphStore {\n nodes: RawGraphNode[];\n edges: RawGraphEdge[];\n}\n\n/** Allocates monotonically increasing ids, seeded above the existing maximum.\n * Uses reduce instead of spread-into-Math.max to avoid stack overflow on large\n * stores. */\nfunction createIdAllocator(store: GraphStore): () => number {\n const allIds = [\n ...store.nodes.map((n) => n.id_ ?? 0),\n ...store.edges.map((e) => e.id_ ?? 0),\n ];\n const max = allIds.reduce((m, id) => (id > m ? id : m), 0);\n let next = max + 1;\n return () => next++;\n}\n\n/** Edges touching a node, as the inbound / outbound subsets. */\nfunction edgesForNode(\n store: GraphStore,\n id: number,\n): { inbound: RawGraphEdge[]; outbound: RawGraphEdge[] } {\n return {\n inbound: store.edges.filter((e) => e.end_id_ === id),\n outbound: store.edges.filter((e) => e.start_id_ === id),\n };\n}\n\n/**\n * Apply a relation map to a node by diffing against its current edges: create\n * edges for new targets, delete edges for removed targets, keep the rest.\n * Returns the created and deleted-edge ids (mirrors the backend's atomic diff).\n */\nfunction diffRelations(\n store: GraphStore,\n nodeId: number,\n relations: RelationMap,\n nextId: () => number,\n): { created: RawGraphEdge[]; deleted: number[] } {\n const created: RawGraphEdge[] = [];\n const deleted: number[] = [];\n\n for (const [relType, targetIds] of Object.entries(relations)) {\n const existing = store.edges.filter(\n (e) => e.label_ === relType && e.start_id_ === nodeId,\n );\n const desired = new Set(targetIds);\n\n // Delete edges whose target is no longer desired.\n for (const edge of existing) {\n if (!desired.has(edge.end_id_) && edge.id_ != null) {\n deleted.push(edge.id_);\n }\n }\n // Create edges for desired targets not already present.\n const present = new Set(existing.map((e) => e.end_id_));\n for (const targetId of targetIds) {\n if (!present.has(targetId)) {\n const edge: RawGraphEdge = {\n id_: nextId(),\n label_: relType,\n start_id_: nodeId,\n end_id_: targetId,\n properties_: {},\n };\n created.push(edge);\n }\n }\n }\n\n store.edges = store.edges\n .filter((e) => e.id_ == null || !deleted.includes(e.id_))\n .concat(created);\n return { created, deleted };\n}\n\n/**\n * Build a `GraphMutationPort` over a mutable in-memory store. `onChange` is\n * called after every mutation so the playground can re-load the store into the\n * graph data store (the consumer's cache-patch analog).\n */\nexport function createInMemoryPort(\n store: GraphStore,\n onChange: () => void,\n): GraphMutationPort {\n const nextId = createIdAllocator(store);\n\n const createNode = (input: CreateNodeInput): RawGraphNode => {\n const node: RawGraphNode = {\n id_: nextId(),\n label_: input.label_,\n properties_: input.properties_,\n };\n store.nodes = [...store.nodes, node];\n return node;\n };\n\n const updateNode = (input: UpdateNodeInput): RawGraphNode => {\n const node: RawGraphNode = {\n id_: input.id_,\n label_: input.label_,\n properties_: input.properties_,\n };\n store.nodes = store.nodes.map((n) => (n.id_ === input.id_ ? node : n));\n return node;\n };\n\n const createEdge = (input: CreateEdgeInput): RawGraphEdge => {\n const edge: RawGraphEdge = {\n id_: nextId(),\n label_: input.label_,\n start_id_: input.start_id_,\n end_id_: input.end_id_,\n properties_: input.properties_ ?? {},\n };\n store.edges = [...store.edges, edge];\n return edge;\n };\n\n const updateEdge = (input: UpdateEdgeInput): RawGraphEdge => {\n let updated: RawGraphEdge | undefined;\n store.edges = store.edges.map((e) => {\n if (e.id_ !== input.id_) return e;\n updated = { ...e, properties_: input.properties_ };\n return updated;\n });\n if (!updated) throw new Error(`Edge ${input.id_} not found`);\n return updated;\n };\n\n // Wrap each mutation: call onChange synchronously after the mutation\n // completes so the canvas reflects the change immediately (the playground\n // has no async cache layer). The Promise wrapper satisfies the port contract.\n const withRefresh = <Args extends unknown[], R>(\n fn: (...args: Args) => R,\n ): ((...args: Args) => Promise<R>) => {\n return (...args: Args) => {\n const result = fn(...args);\n onChange();\n return Promise.resolve(result);\n };\n };\n\n return {\n createNode: withRefresh(createNode),\n updateNode: withRefresh(updateNode),\n deleteNode: withRefresh((id: number) => {\n store.nodes = store.nodes.filter((n) => n.id_ !== id);\n store.edges = store.edges.filter(\n (e) => e.start_id_ !== id && e.end_id_ !== id,\n );\n }),\n createEdge: withRefresh(createEdge),\n updateEdge: withRefresh(updateEdge),\n deleteEdge: withRefresh((id: number) => {\n store.edges = store.edges.filter((e) => e.id_ !== id);\n }),\n createNodeWithRelations: withRefresh(\n (input: CreateNodeWithRelationsInput) => {\n const node = createNode(input);\n const { created } = diffRelations(\n store,\n node.id_!,\n input.relations,\n nextId,\n );\n return { node, edges: created };\n },\n ),\n updateNodeWithRelations: withRefresh(\n (input: UpdateNodeWithRelationsInput) => {\n const node = updateNode(input);\n const { created, deleted } = diffRelations(\n store,\n input.id_,\n input.relations,\n nextId,\n );\n return { node, edges: { created, deleted } };\n },\n ),\n getInboundEdges: (id: number) =>\n Promise.resolve(edgesForNode(store, id).inbound),\n getOutboundEdges: (id: number) =>\n Promise.resolve(edgesForNode(store, id).outbound),\n getPairEdges: (a: number, b: number) =>\n Promise.resolve(\n store.edges.filter(\n (e) =>\n (e.start_id_ === a && e.end_id_ === b) ||\n (e.start_id_ === b && e.end_id_ === a),\n ),\n ),\n getNodes: (ids: number[]) =>\n Promise.resolve(\n store.nodes.filter((n) => n.id_ != null && ids.includes(n.id_)),\n ),\n };\n}\n\n/**\n * Strip the model's `x-graph` extension, yielding a plain property JSON Schema.\n * `GraphModelProperty` is structurally compatible with `JsonSchemaProperty`\n * (same keys: type, title, description, enum, format, items, default); the cast\n * via unknown is safe here and confined to this playground adapter.\n */\nfunction toPropertySchema(\n type: GraphModel[number] | undefined,\n): JsonSchema | null {\n if (!type) return null;\n return {\n type: \"object\",\n properties: (type.properties ?? {}) as unknown as JsonSchema[\"properties\"],\n required: type.required ?? [],\n } as unknown as JsonSchema;\n}\n\n/**\n * Build a `GraphSchemaProvider` from an in-memory `GraphModel`. All lookups\n * resolve synchronously (wrapped in `Promise.resolve`); a host with the model\n * already in memory does not need an async source.\n */\nexport function createModelSchemaProvider(\n model: GraphModel,\n): GraphSchemaProvider {\n const byLabel = new Map(model.map((t) => [t[\"x-graph\"].label, t]));\n\n const nodeLabels = model\n .filter((t) => t[\"x-graph\"].type !== \"EDGE\")\n .map((t) => t[\"x-graph\"].label);\n\n return {\n getNodeSchema: (label: string) =>\n Promise.resolve(toPropertySchema(byLabel.get(label))),\n getEdgeSchema: (type: string) =>\n Promise.resolve(toPropertySchema(byLabel.get(type))),\n listNodeLabels: () => Promise.resolve(nodeLabels),\n relationsFor: (label: string): Promise<RelationDef[]> => {\n const relations = byLabel.get(label)?.[\"x-graph\"].relations ?? [];\n return Promise.resolve(\n relations.map((r) => ({\n rel_type_name: r.rel_type_name,\n to_type_name: r.to_type_name,\n form_field: r.form_field,\n // cardinality drives single- vs multi-select in the form.\n cardinality: r.cardinality as RelationDef[\"cardinality\"],\n })),\n );\n },\n };\n}\n","/**\n * Playground relation widget -- an app-level form widget that renders the\n * `__rel_*` relation fields produced by the library's schema enrichment.\n *\n * This is the playground's analog of the explorer's `cypher-select` widget: the\n * library emits the relation field schema/uiSchema (with `x-ui-widget:\n * \"entity-select\"` and `x-ui-options.targetType`), and the consuming app\n * supplies the actual widget via the form widget registry. Here the options are\n * resolved synchronously from the in-memory store; the explorer resolves them\n * via Cypher. This demonstrates the \"widget stays app-level\" seam.\n */\n\nimport React from \"react\";\nimport {\n FormSelect,\n FormMultiSelect,\n type WidgetProps,\n} from \"@petrarca/sonnet-forms\";\nimport { extractDisplayLabel } from \"@petrarca/sonnet-graph\";\nimport type { GraphStore } from \"./inMemoryGraphEditing\";\n\ninterface RelationOption {\n value: string;\n label: string;\n}\n\n// Options for a target node-type label: every node of that label as {id, name}.\nfunction optionsForType(\n store: GraphStore,\n targetType: string,\n): RelationOption[] {\n return store.nodes\n .filter((n) => n.label_ === targetType && n.id_ != null)\n .map((n) => ({ value: String(n.id_), label: extractDisplayLabel(n) }));\n}\n\nfunction toStringArray(value: unknown): string[] {\n if (Array.isArray(value)) return value.map(String);\n if (value == null || value === \"\") return [];\n return [String(value)];\n}\n\n/**\n * Build the relation widget bound to a store. Registered under \"entity-select\"\n * (the library's default relation widget hint) so the enriched `__rel_*` fields\n * resolve to it.\n */\nexport function createRelationWidget(store: GraphStore) {\n return function RelationWidget({\n value,\n onChange,\n label,\n options,\n placeholder,\n }: WidgetProps): React.ReactElement {\n const targetType = String(options?.targetType ?? \"\");\n const multiple = options?.multiple !== false;\n const selectOptions = optionsForType(store, targetType);\n\n if (multiple) {\n return (\n <FormMultiSelect\n label={label || false}\n options={selectOptions}\n value={toStringArray(value)}\n onChange={(v) => onChange(v)}\n placeholder={placeholder ?? `Select ${targetType}...`}\n />\n );\n }\n\n const single = toStringArray(value)[0] ?? null;\n return (\n <FormSelect\n label={label || false}\n options={selectOptions}\n value={single}\n onChange={(v) => onChange(v ?? \"\")}\n placeholder={placeholder ?? `Select ${targetType}...`}\n />\n );\n };\n}\n"],"mappings":";AASA,SAAgB,aAAa,SAAS,QAAQ,gBAAgB;AAC9D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AACP,SAAS,uBAA4C;;;ACSrD,SAAS,kBAAkB,OAAiC;AAC1D,QAAM,SAAS;AAAA,IACb,GAAG,MAAM,MAAM,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;AAAA,IACpC,GAAG,MAAM,MAAM,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;AAAA,EACtC;AACA,QAAM,MAAM,OAAO,OAAO,CAAC,GAAG,OAAQ,KAAK,IAAI,KAAK,GAAI,CAAC;AACzD,MAAI,OAAO,MAAM;AACjB,SAAO,MAAM;AACf;AAGA,SAAS,aACP,OACA,IACuD;AACvD,SAAO;AAAA,IACL,SAAS,MAAM,MAAM,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE;AAAA,IACnD,UAAU,MAAM,MAAM,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE;AAAA,EACxD;AACF;AAOA,SAAS,cACP,OACA,QACA,WACA,QACgD;AAChD,QAAM,UAA0B,CAAC;AACjC,QAAM,UAAoB,CAAC;AAE3B,aAAW,CAAC,SAAS,SAAS,KAAK,OAAO,QAAQ,SAAS,GAAG;AAC5D,UAAM,WAAW,MAAM,MAAM;AAAA,MAC3B,CAAC,MAAM,EAAE,WAAW,WAAW,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