@vadimcomanescu/nadicode-design-system 5.0.0 → 5.0.2

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 (124) hide show
  1. package/.agents/skills/seed/SKILL.md +100 -24
  2. package/.agents/skills/seed/references/composition.md +37 -21
  3. package/.agents/skills/seed/references/glass-and-effects.md +7 -5
  4. package/.agents/skills/seed/references/responsive.md +22 -63
  5. package/.agents/skills/seed/references/state-machines.md +54 -46
  6. package/contracts/release-governance-baseline.json +0 -1
  7. package/dist/{TeamPage-BX3RMSZU.js → TeamPage-UO3V2JDK.js} +33 -32
  8. package/dist/catalog/catalog.d.ts +66 -4
  9. package/dist/catalog/catalog.js +9 -9
  10. package/dist/catalog/components.d.ts +1 -2
  11. package/dist/catalog/components.js +27 -27
  12. package/dist/catalog/definitions/blocks-agent.d.ts +0 -1
  13. package/dist/catalog/definitions/blocks-agent.js +1 -1
  14. package/dist/catalog/definitions/blocks-auth.d.ts +16 -0
  15. package/dist/catalog/definitions/blocks-auth.js +1 -1
  16. package/dist/catalog/definitions/blocks-content.d.ts +18 -0
  17. package/dist/catalog/definitions/blocks-content.js +1 -1
  18. package/dist/catalog/definitions/blocks-crud.d.ts +22 -2
  19. package/dist/catalog/definitions/blocks-crud.js +1 -1
  20. package/dist/catalog/definitions/blocks-data.d.ts +2 -0
  21. package/dist/catalog/definitions/blocks-data.js +1 -1
  22. package/dist/catalog/definitions/blocks-marketing.d.ts +8 -0
  23. package/dist/catalog/definitions/blocks-marketing.js +1 -1
  24. package/dist/catalog/definitions/chat.d.ts +0 -1
  25. package/dist/catalog/definitions/chat.js +1 -1
  26. package/dist/catalog/definitions/index.d.ts +66 -4
  27. package/dist/catalog/definitions/index.js +8 -8
  28. package/dist/catalog/primitives/chat.js +2 -2
  29. package/dist/catalog/primitives/index.js +3 -3
  30. package/dist/{chunk-C7LO3JEF.js → chunk-33UWVOQ6.js} +44 -12
  31. package/dist/{chunk-IHGZJS7N.js → chunk-3FJG5MAT.js} +8 -2
  32. package/dist/{chunk-UOUERAB4.js → chunk-3LROWCZE.js} +26 -8
  33. package/dist/{chunk-UIYX2EMT.js → chunk-5RBO2IMZ.js} +7 -2
  34. package/dist/{chunk-7SRNVMBY.js → chunk-7LYRUSWM.js} +8 -3
  35. package/dist/{chunk-ZND7AAWG.js → chunk-A4QNTJUR.js} +4 -2
  36. package/dist/{chunk-P7CTBRHO.js → chunk-AP5SGSN7.js} +15 -5
  37. package/dist/{chunk-5MLOZVOQ.js → chunk-B4373MDA.js} +9 -4
  38. package/dist/{chunk-KV726HMK.js → chunk-BOWKE7OE.js} +4 -4
  39. package/dist/{chunk-NVBF4OWT.js → chunk-BY6LWOHB.js} +7 -2
  40. package/dist/{chunk-4TK2PXMJ.js → chunk-CTVV6JS6.js} +1 -1
  41. package/dist/{chunk-6KRT337C.js → chunk-E4KUPYHE.js} +1 -1
  42. package/dist/{chunk-3TYPQWKD.js → chunk-FSU7ZM5V.js} +7 -2
  43. package/dist/{chunk-QLPU2IEO.js → chunk-FX3GYS5O.js} +27 -4
  44. package/dist/{chunk-OMI2LLXM.js → chunk-H3KTAHJP.js} +17 -3
  45. package/dist/{chunk-UGXI4PES.js → chunk-IW36SVOH.js} +17 -7
  46. package/dist/{chunk-5L2RFJZR.js → chunk-JDHD4L6N.js} +1 -1
  47. package/dist/{chunk-CAET62YQ.js → chunk-NBDUZA66.js} +11 -4
  48. package/dist/{chunk-TNDMBLYP.js → chunk-NDQO7AO6.js} +15 -3
  49. package/dist/{chunk-MT76BPYV.js → chunk-PQOL3E2V.js} +1 -1
  50. package/dist/{chunk-ZNF6S3DQ.js → chunk-QCFDSOTV.js} +9 -5
  51. package/dist/{chunk-ID3N3MHQ.js → chunk-R4SBK6Y5.js} +7 -2
  52. package/dist/{chunk-GNKNT52O.js → chunk-TTDKPZ75.js} +1 -1
  53. package/dist/{chunk-BAB6AHOM.js → chunk-U43JTK45.js} +1 -1
  54. package/dist/{chunk-WHYKEOUV.js → chunk-U5QLJHYN.js} +0 -2
  55. package/dist/{chunk-4ACR6NGQ.js → chunk-UAN2YEI5.js} +3 -7
  56. package/dist/{chunk-NA6ZPKIK.js → chunk-UCFR7GLW.js} +11 -17
  57. package/dist/{chunk-R4DPHCHJ.js → chunk-UMEBNHKR.js} +9 -6
  58. package/dist/{chunk-A44E44UV.js → chunk-UPMSE6PQ.js} +7 -2
  59. package/dist/{chunk-HMN4K4L6.js → chunk-VQVWFCHF.js} +7 -7
  60. package/dist/{chunk-LZ66ADSL.js → chunk-WGQHM56J.js} +25 -25
  61. package/dist/{chunk-JPNNAU26.js → chunk-XLN4NVKU.js} +16 -28
  62. package/dist/{chunk-CPHVCY3M.js → chunk-XUWKGDUY.js} +1 -1
  63. package/dist/{chunk-FAKTXE3F.js → chunk-YEAJLVGB.js} +8 -4
  64. package/dist/{chunk-56TNQ2P4.js → chunk-YMAEXGD2.js} +1 -1
  65. package/dist/{chunk-YNBDA24W.js → chunk-ZKA5X3E4.js} +12 -3
  66. package/dist/{chunk-VUNXVYOH.js → chunk-ZL6BPQNN.js} +19 -10
  67. package/dist/{chunk-XYYZRQES.js → chunk-ZU7MDRCI.js} +1 -1
  68. package/dist/components/blocks/AgentConversationBlock.d.ts +2 -5
  69. package/dist/components/blocks/AgentConversationBlock.js +2 -2
  70. package/dist/components/blocks/AgentWorkbenchBlock.d.ts +2 -5
  71. package/dist/components/blocks/AgentWorkbenchBlock.js +2 -2
  72. package/dist/components/blocks/ApiKeysBlock.d.ts +1 -1
  73. package/dist/components/blocks/ApiKeysBlock.js +1 -1
  74. package/dist/components/blocks/AuthLayout.d.ts +1 -1
  75. package/dist/components/blocks/AuthLayout.js +2 -2
  76. package/dist/components/blocks/CommandPaletteBlock.d.ts +1 -1
  77. package/dist/components/blocks/CommandPaletteBlock.js +1 -1
  78. package/dist/components/blocks/ContactBlock.d.ts +1 -1
  79. package/dist/components/blocks/ContactBlock.js +1 -1
  80. package/dist/components/blocks/CreateBlock.d.ts +1 -1
  81. package/dist/components/blocks/CreateBlock.js +1 -1
  82. package/dist/components/blocks/CrudListBlock.d.ts +1 -1
  83. package/dist/components/blocks/CrudListBlock.js +1 -1
  84. package/dist/components/blocks/DashboardBlock.js +1 -1
  85. package/dist/components/blocks/HeroBlock.d.ts +1 -25
  86. package/dist/components/blocks/HeroBlock.js +1 -1
  87. package/dist/components/blocks/InteractiveAreaChartBlock.d.ts +1 -1
  88. package/dist/components/blocks/InteractiveAreaChartBlock.js +1 -1
  89. package/dist/components/blocks/LoginBlock.d.ts +1 -1
  90. package/dist/components/blocks/LoginBlock.js +1 -1
  91. package/dist/components/blocks/NewsletterBlock.d.ts +3 -1
  92. package/dist/components/blocks/NewsletterBlock.js +1 -1
  93. package/dist/components/blocks/OTPBlock.d.ts +1 -1
  94. package/dist/components/blocks/OTPBlock.js +1 -1
  95. package/dist/components/blocks/OnboardingBlock.d.ts +1 -1
  96. package/dist/components/blocks/OnboardingBlock.js +1 -1
  97. package/dist/components/blocks/OnboardingFlowBlock.d.ts +1 -1
  98. package/dist/components/blocks/OnboardingFlowBlock.js +2 -2
  99. package/dist/components/blocks/PasswordRecoveryBlock.d.ts +1 -1
  100. package/dist/components/blocks/PasswordRecoveryBlock.js +1 -1
  101. package/dist/components/blocks/ResetPasswordBlock.d.ts +1 -1
  102. package/dist/components/blocks/ResetPasswordBlock.js +1 -1
  103. package/dist/components/blocks/TwoFactorSetupBlock.d.ts +1 -1
  104. package/dist/components/blocks/TwoFactorSetupBlock.js +2 -2
  105. package/dist/components/blocks/WizardBlock.d.ts +1 -1
  106. package/dist/components/blocks/WizardBlock.js +1 -1
  107. package/dist/components/blocks/user/InviteUserModal.d.ts +1 -18
  108. package/dist/components/blocks/user/InviteUserModal.js +1 -1
  109. package/dist/components/ui/ChatMessage.d.ts +2 -6
  110. package/dist/components/ui/ChatMessage.js +1 -1
  111. package/dist/components/ui/FormWizard.d.ts +1 -2
  112. package/dist/components/ui/FormWizard.js +1 -1
  113. package/dist/components/ui/KanbanBoard.d.ts +3 -3
  114. package/dist/components/ui/KanbanBoard.js +1 -1
  115. package/dist/index.js +0 -137
  116. package/dist/lib/json-render/app.js +1 -1
  117. package/dist/lib/json-render/catalog.d.ts +28 -0
  118. package/dist/lib/json-render/catalog.js +10 -10
  119. package/dist/lib/json-render/registry.js +10 -10
  120. package/dist/lib/json-render/showcase-spec.js +1 -1
  121. package/dist/lib-index.d.ts +6 -24
  122. package/package.json +1 -5
  123. package/dist/catalog/types.d.ts +0 -4
  124. package/dist/catalog/types.js +0 -1
@@ -175,7 +175,8 @@ var blocksContentDefinitions = {
175
175
  group: z.string().nullable()
176
176
  })
177
177
  ).nullable(),
178
- placeholder: z.string().nullable()
178
+ placeholder: z.string().nullable(),
179
+ searchValue: z.string().nullable()
179
180
  }),
180
181
  events: ["select"],
181
182
  description: "Keyboard-driven command palette with fuzzy search, hotkey trigger (Cmd+K), and responsive trigger button.",
@@ -185,7 +186,8 @@ var blocksContentDefinitions = {
185
186
  { id: "team", title: "Team Members", group: "Settings" },
186
187
  { id: "deploy", title: "Deploy to Production", group: "Actions" }
187
188
  ],
188
- placeholder: "Search commands..."
189
+ placeholder: "Search commands...",
190
+ searchValue: null
189
191
  }
190
192
  },
191
193
  FormWizard: {
@@ -213,7 +215,8 @@ var blocksContentDefinitions = {
213
215
  description: z.string(),
214
216
  completed: z.boolean()
215
217
  })
216
- ).nullable()
218
+ ).nullable(),
219
+ toggledStepId: z.string().nullable()
217
220
  }),
218
221
  events: ["toggle"],
219
222
  description: "Onboarding checklist with toggleable step completion tracking.",
@@ -223,7 +226,8 @@ var blocksContentDefinitions = {
223
226
  { id: "profile", title: "Complete your profile", description: "Add your name, avatar, and bio.", completed: true },
224
227
  { id: "invite", title: "Invite teammates", description: "Bring your team onboard for collaboration.", completed: false },
225
228
  { id: "project", title: "Create your first project", description: "Set up a workspace and start building.", completed: false }
226
- ]
229
+ ],
230
+ toggledStepId: null
227
231
  }
228
232
  },
229
233
  OnboardingFlowBlock: {
@@ -258,7 +262,13 @@ var blocksContentDefinitions = {
258
262
  useCaseOptions: z.array(z.object({ value: z.string(), label: z.string() })).nullable(),
259
263
  reviewStepTitle: z.string().nullable(),
260
264
  reviewHeading: z.string().nullable(),
261
- reviewBody: z.string().nullable()
265
+ reviewBody: z.string().nullable(),
266
+ displayName: z.string().nullable(),
267
+ organization: z.string().nullable(),
268
+ bio: z.string().nullable(),
269
+ framework: z.string().nullable(),
270
+ teamSize: z.string().nullable(),
271
+ useCase: z.string().nullable()
262
272
  }),
263
273
  events: ["complete"],
264
274
  description: "Self-contained onboarding wizard flow with 4 steps (Welcome, Profile, Preferences, Review). Manages FormWizard and completion state internally. Accepts serializable config for step titles, field labels, and select options.",
@@ -308,7 +318,13 @@ var blocksContentDefinitions = {
308
318
  ],
309
319
  reviewStepTitle: "Complete",
310
320
  reviewHeading: "All set!",
311
- reviewBody: "Review your details and click Complete to launch your workspace."
321
+ reviewBody: "Review your details and click Complete to launch your workspace.",
322
+ displayName: null,
323
+ organization: null,
324
+ bio: null,
325
+ framework: null,
326
+ teamSize: null,
327
+ useCase: null
312
328
  }
313
329
  },
314
330
  PricingBlock: {
@@ -395,7 +411,8 @@ var blocksContentDefinitions = {
395
411
  icon: z.string().nullable()
396
412
  })
397
413
  ).nullable(),
398
- className: z.string().nullable()
414
+ className: z.string().nullable(),
415
+ activeStep: z.number().nullable()
399
416
  }),
400
417
  events: ["finish"],
401
418
  description: "Opinionated multi-step wizard card with Stepper progress indicator and built-in step content slots. Handles account, profile, plan, and launch steps by default. Use for onboarding and setup flows. Step icons are string keys resolved through ICON_MAP (User, Settings, CreditCard, Rocket); unknown keys render no icon.",
@@ -407,7 +424,8 @@ var blocksContentDefinitions = {
407
424
  { title: "Team Details", description: "Name your workspace and invite members.", icon: "Settings" },
408
425
  { title: "Choose Plan", description: "Select the plan that fits your needs.", icon: "CreditCard" }
409
426
  ],
410
- className: null
427
+ className: null,
428
+ activeStep: null
411
429
  }
412
430
  },
413
431
  UsageDonutBlock: {
@@ -10,16 +10,21 @@ import { KeyIcon } from './chunk-QSU23VYZ.js';
10
10
  import { Badge } from './chunk-S4JAHKOP.js';
11
11
  import { CopyIcon } from './chunk-TV4RSQH4.js';
12
12
  import { cn } from './chunk-QYZT24TS.js';
13
+ import { useBoundProp } from '@json-render/react';
13
14
  import { useState, useMemo } from 'react';
14
15
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
15
16
 
16
17
  var DEFAULT_KEYS = [];
17
- function ApiKeysBlock({ props, emit }) {
18
+ function ApiKeysBlock({ props, emit, bindings }) {
18
19
  const keys = props.keys ?? DEFAULT_KEYS;
19
20
  const title = props.title ?? "API Keys";
20
21
  const description = props.description ?? "Manage your API keys";
21
22
  const [dialogOpen, setDialogOpen] = useState(false);
22
- const [newKeyName, setNewKeyName] = useState("");
23
+ const [boundNewKeyName, setBoundNewKeyName] = useBoundProp(props.newKeyName, bindings?.newKeyName);
24
+ const [localNewKeyName, setLocalNewKeyName] = useState("");
25
+ const isBound = !!bindings?.newKeyName;
26
+ const newKeyName = isBound ? boundNewKeyName ?? "" : localNewKeyName;
27
+ const setNewKeyName = isBound ? setBoundNewKeyName : setLocalNewKeyName;
23
28
  const [creating, setCreating] = useState(false);
24
29
  const [createdKey, setCreatedKey] = useState(null);
25
30
  const [copied, setCopied] = useState(false);
@@ -7,17 +7,22 @@ import { bezier } from './chunk-CRY67BIF.js';
7
7
  import { Alert, AlertDescription } from './chunk-6CLSVCWP.js';
8
8
  import { cn } from './chunk-QYZT24TS.js';
9
9
  import * as React from 'react';
10
+ import { useBoundProp } from '@json-render/react';
10
11
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
12
 
12
13
  var SHAKE_TRANSITION = { duration: 0.3, ease: bezier["out-cubic"] };
13
- function OTPBlock({ props, emit }) {
14
+ function OTPBlock({ props, bindings, emit }) {
14
15
  const title = props.title ?? "One-Time Password";
15
16
  const description = props.description ?? "Please enter the one-time password sent to your phone.";
16
17
  const maxLength = props.maxLength ?? 6;
17
18
  const buttonText = props.buttonText ?? "Verify";
18
19
  const error = props.error ?? null;
19
20
  const backupCodeLink = props.backupCodeLink ?? null;
20
- const [otp, setOtp] = React.useState("");
21
+ const [boundOtp, setBoundOtp] = useBoundProp(props.value, bindings?.value);
22
+ const [localOtp, setLocalOtp] = React.useState("");
23
+ const isOtpBound = !!bindings?.value;
24
+ const otp = isOtpBound ? boundOtp ?? "" : localOtp;
25
+ const setOtp = isOtpBound ? setBoundOtp : setLocalOtp;
21
26
  const [shake, setShake] = React.useState(false);
22
27
  React.useEffect(() => {
23
28
  if (error) {
@@ -26,7 +31,7 @@ function OTPBlock({ props, emit }) {
26
31
  const timeout = setTimeout(() => setShake(false), 300);
27
32
  return () => clearTimeout(timeout);
28
33
  }
29
- }, [error]);
34
+ }, [error, setOtp]);
30
35
  return /* @__PURE__ */ jsx(m.div, { ...scaleIn, className: cn("w-full max-w-sm mx-auto"), children: /* @__PURE__ */ jsxs(Card, { className: "text-center", children: [
31
36
  /* @__PURE__ */ jsxs(CardHeader, { children: [
32
37
  /* @__PURE__ */ jsx(CardTitle, { className: "text-2xl", children: title }),
@@ -188,7 +188,8 @@ var blocksDataDefinitions = {
188
188
  label: z.string(),
189
189
  days: z.number()
190
190
  })
191
- ).nullable()
191
+ ).nullable(),
192
+ timeRange: z.string().nullable()
192
193
  }),
193
194
  events: ["timeRangeChange"],
194
195
  description: "Interactive area chart with time range selector and configurable data series.",
@@ -205,7 +206,8 @@ var blocksDataDefinitions = {
205
206
  { value: "7d", label: "Last 7 days", days: 7 },
206
207
  { value: "30d", label: "Last 30 days", days: 30 },
207
208
  { value: "90d", label: "Last 90 days", days: 90 }
208
- ]
209
+ ],
210
+ timeRange: null
209
211
  }
210
212
  },
211
213
  ProcessFlowBlock: {
@@ -7,6 +7,7 @@ import { Empty, EmptyTitle, EmptyDescription } from './chunk-4TF4QFIM.js';
7
7
  import { Card, CardHeader, CardTitle, CardContent } from './chunk-7UY24UWL.js';
8
8
  import { Button } from './chunk-7KIDDF3I.js';
9
9
  import { cn } from './chunk-QYZT24TS.js';
10
+ import { useBoundProp } from '@json-render/react';
10
11
  import { useMemo } from 'react';
11
12
  import { jsxs, jsx } from 'react/jsx-runtime';
12
13
 
@@ -32,13 +33,16 @@ function clampPage(value, min, max) {
32
33
  function CrudListBlock({
33
34
  props,
34
35
  emit,
36
+ bindings,
35
37
  children
36
38
  }) {
37
39
  const title = props.title;
38
40
  const description = props.description;
39
41
  const columns = props.columns ?? EMPTY_COLUMNS;
40
42
  const rows = props.rows ?? EMPTY_ROWS;
41
- const selectedRowId = props.selectedRowId ?? null;
43
+ const [boundSelectedRowId, setBoundSelectedRowId] = useBoundProp(props.selectedRowId, bindings?.selectedRowId);
44
+ const [boundFilterValue, setBoundFilterValue] = useBoundProp(props.filterValue, bindings?.filterValue);
45
+ const selectedRowId = bindings?.selectedRowId ? boundSelectedRowId ?? null : props.selectedRowId ?? null;
42
46
  const filterControls = props.filterControls ?? EMPTY_FILTERS;
43
47
  const pagination = props.pagination;
44
48
  const errorMessage = props.errorMessage ?? null;
@@ -65,15 +69,18 @@ function CrudListBlock({
65
69
  ] }) : null,
66
70
  filterControls.length > 0 ? /* @__PURE__ */ jsxs(Card, { children: [
67
71
  /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Filters" }) }),
68
- /* @__PURE__ */ jsx(CardContent, { className: "grid gap-3 md:grid-cols-2 xl:grid-cols-3", children: filterControls.map((filter) => /* @__PURE__ */ jsxs("label", { className: "space-y-1", children: [
72
+ /* @__PURE__ */ jsx(CardContent, { className: "grid gap-3 md:grid-cols-2 xl:grid-cols-3", children: filterControls.map((filter, filterIndex) => /* @__PURE__ */ jsxs("label", { className: "space-y-1", children: [
69
73
  /* @__PURE__ */ jsx(Typography, { variant: "small", className: "font-medium", children: filter.label }),
70
74
  /* @__PURE__ */ jsx(
71
75
  Input,
72
76
  {
73
77
  "aria-label": filter.label,
74
- value: filter.value,
78
+ value: filterIndex === 0 && bindings?.filterValue ? boundFilterValue ?? filter.value : filter.value,
75
79
  placeholder: filter.placeholder ?? void 0,
76
- onChange: () => emit("filterChange")
80
+ onChange: (e) => {
81
+ if (filterIndex === 0) setBoundFilterValue(e.target.value);
82
+ emit("filterChange");
83
+ }
77
84
  }
78
85
  )
79
86
  ] }, filter.id)) })
@@ -110,7 +117,10 @@ function CrudListBlock({
110
117
  {
111
118
  variant: "ghost",
112
119
  className: "h-auto p-0 font-normal",
113
- onClick: () => emit("rowSelect"),
120
+ onClick: () => {
121
+ setBoundSelectedRowId(row.id);
122
+ emit("rowSelect");
123
+ },
114
124
  "aria-label": `Select ${rowLabel}`,
115
125
  children: cell
116
126
  }
@@ -11,6 +11,7 @@ import { CreditCardIcon } from './chunk-JHQTKMKG.js';
11
11
  import { UserIcon } from './chunk-UHXGBV5N.js';
12
12
  import { cn } from './chunk-QYZT24TS.js';
13
13
  import { useState } from 'react';
14
+ import { useBoundProp } from '@json-render/react';
14
15
  import { jsxs, jsx } from 'react/jsx-runtime';
15
16
 
16
17
  var ICON_MAP = {
@@ -25,13 +26,17 @@ var defaultSteps = [
25
26
  { title: "Plan", description: "Choose a plan", icon: "CreditCard" },
26
27
  { title: "Launch", description: "Ready to go", icon: "Rocket" }
27
28
  ];
28
- function WizardBlock({ props, emit }) {
29
+ function WizardBlock({ props, bindings, emit }) {
29
30
  const title = props.title ?? "Create Project";
30
31
  const description = props.description ?? "Follow the steps to setup your new project workspace.";
31
32
  const steps = props.steps ?? defaultSteps;
32
- const [activeStep, setActiveStep] = useState(0);
33
- const handleNext = () => setActiveStep((p) => Math.min(p + 1, steps.length - 1));
34
- const handlePrev = () => setActiveStep((p) => Math.max(p - 1, 0));
33
+ const [boundActiveStep, setBoundActiveStep] = useBoundProp(props.activeStep, bindings?.activeStep);
34
+ const [localActiveStep, setLocalActiveStep] = useState(0);
35
+ const isActiveStepBound = !!bindings?.activeStep;
36
+ const activeStep = isActiveStepBound ? boundActiveStep ?? 0 : localActiveStep;
37
+ const setActiveStep = isActiveStepBound ? setBoundActiveStep : setLocalActiveStep;
38
+ const handleNext = () => setActiveStep(Math.min(activeStep + 1, steps.length - 1));
39
+ const handlePrev = () => setActiveStep(Math.max(activeStep - 1, 0));
35
40
  return /* @__PURE__ */ jsxs(Card, { className: cn("w-full max-w-2xl mx-auto", props.className), children: [
36
41
  /* @__PURE__ */ jsxs(CardHeader, { children: [
37
42
  /* @__PURE__ */ jsx(CardTitle, { children: title }),
@@ -11,7 +11,7 @@ import { CSS } from '@dnd-kit/utilities';
11
11
  import { useReducedMotion } from 'motion/react';
12
12
  import { jsx, jsxs } from 'react/jsx-runtime';
13
13
 
14
- function KanbanBoard({
14
+ function KanbanBoardImpl({
15
15
  value,
16
16
  onValueChange,
17
17
  getItemId,
@@ -262,14 +262,14 @@ function KanbanHandle({
262
262
  }
263
263
  );
264
264
  }
265
- function KanbanBoardCatalog({ props, emit, children }) {
265
+ function KanbanBoard({ props, emit, children }) {
266
266
  const [value, setValue] = React.useState([]);
267
267
  const handleValueChange = (next) => {
268
268
  setValue(next);
269
269
  emit("valueChange");
270
270
  };
271
271
  return /* @__PURE__ */ jsx(
272
- KanbanBoard,
272
+ KanbanBoardImpl,
273
273
  {
274
274
  value,
275
275
  onValueChange: handleValueChange,
@@ -281,4 +281,4 @@ function KanbanBoardCatalog({ props, emit, children }) {
281
281
  );
282
282
  }
283
283
 
284
- export { KanbanBoard, KanbanBoardCatalog, KanbanColumn, KanbanColumnHeader, KanbanHandle, KanbanItem };
284
+ export { KanbanBoard, KanbanBoardImpl, KanbanColumn, KanbanColumnHeader, KanbanHandle, KanbanItem };
@@ -5,6 +5,7 @@ import { Card, CardHeader, CardTitle, CardContent } from './chunk-7UY24UWL.js';
5
5
  import { CheckIcon } from './chunk-CXACRCZ4.js';
6
6
  import { cn } from './chunk-QYZT24TS.js';
7
7
  import * as React from 'react';
8
+ import { useBoundProp } from '@json-render/react';
8
9
  import { useTranslations } from 'next-intl';
9
10
  import { jsxs, jsx } from 'react/jsx-runtime';
10
11
 
@@ -15,12 +16,13 @@ var defaultSteps = [
15
16
  { id: "project", title: "Create first project", description: "Set up your first design system project.", completed: false },
16
17
  { id: "deploy", title: "Deploy to production", description: "Publish your component library.", completed: false }
17
18
  ];
18
- function OnboardingBlock({ props, emit }) {
19
+ function OnboardingBlock({ props, bindings, emit }) {
19
20
  const steps = props.steps ?? defaultSteps;
20
21
  const title = props.title ?? "Getting started";
21
22
  const t = useTranslations("blocks.onboardingBlock");
22
23
  const completedCount = React.useMemo(() => steps.filter((s) => s.completed).length, [steps]);
23
24
  const progressPercent = steps.length > 0 ? Math.round(completedCount / steps.length * 100) : 0;
25
+ const [, setToggledStepId] = useBoundProp(void 0, bindings?.toggledStepId);
24
26
  return /* @__PURE__ */ jsxs(Card, { className: cn("w-full max-w-lg"), children: [
25
27
  /* @__PURE__ */ jsxs(CardHeader, { children: [
26
28
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
@@ -38,7 +40,10 @@ function OnboardingBlock({ props, emit }) {
38
40
  Checkbox,
39
41
  {
40
42
  checked: step.completed,
41
- onCheckedChange: () => emit("toggle"),
43
+ onCheckedChange: () => {
44
+ setToggledStepId(step.id);
45
+ emit("toggle");
46
+ },
42
47
  "aria-label": step.title
43
48
  }
44
49
  ) }),
@@ -1,4 +1,4 @@
1
- import { allDefinitions } from './chunk-HMN4K4L6.js';
1
+ import { allDefinitions } from './chunk-VQVWFCHF.js';
2
2
 
3
3
  // src/catalog/catalog.ts
4
4
  var seedComponentDefinitions = allDefinitions;
@@ -13,7 +13,7 @@ var chatDefinitions = {
13
13
  },
14
14
  ChatMessage: {
15
15
  props: z.object({
16
- role: z.enum(["user", "assistant", "agent", "system"]),
16
+ role: z.enum(["user", "assistant", "system"]),
17
17
  isStreaming: z.boolean().nullable(),
18
18
  status: z.enum(["default", "error"]).nullable(),
19
19
  className: z.string().nullable()
@@ -9,12 +9,17 @@ import { Button } from './chunk-7KIDDF3I.js';
9
9
  import { CheckIcon } from './chunk-CXACRCZ4.js';
10
10
  import { cn } from './chunk-QYZT24TS.js';
11
11
  import { useState } from 'react';
12
+ import { useBoundProp } from '@json-render/react';
12
13
  import { jsx, jsxs } from 'react/jsx-runtime';
13
14
 
14
- function NewsletterBlock({ props, emit }) {
15
+ function NewsletterBlock({ props, bindings, emit }) {
15
16
  const title = props.title ?? "Stay in the loop";
16
17
  const description = props.description ?? "Get notified about new components, updates, and design system tips. No spam.";
17
- const [email, setEmail] = useState("");
18
+ const [boundEmail, setBoundEmail] = useBoundProp(props.email, bindings?.email);
19
+ const [localEmail, setLocalEmail] = useState("");
20
+ const isEmailBound = !!bindings?.email;
21
+ const email = isEmailBound ? boundEmail ?? "" : localEmail;
22
+ const setEmail = isEmailBound ? setBoundEmail : setLocalEmail;
18
23
  const [status, setStatus] = useState("idle");
19
24
  const setSafeTimeout = useSafeTimeout();
20
25
  const handleSubmit = async (e) => {
@@ -6,6 +6,8 @@ import { Card, CardHeader, CardDescription, CardContent, CardFooter } from './ch
6
6
  import { GoogleIcon, MicrosoftIcon } from './chunk-EL4XPFOD.js';
7
7
  import { Button } from './chunk-7KIDDF3I.js';
8
8
  import { cn } from './chunk-QYZT24TS.js';
9
+ import { useState } from 'react';
10
+ import { useBoundProp } from '@json-render/react';
9
11
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
10
12
 
11
13
  var FIELD_STAGGER_MS = 60;
@@ -33,7 +35,7 @@ var defaultLabels = {
33
35
  forgotPassword: "Forgot password?"
34
36
  };
35
37
  var accentButtonClass = "w-full bg-accent hover:bg-accent/90 text-accent-foreground shadow-[0_0_20px_rgb(var(--color-accent)/0.4)] transition-colors font-semibold";
36
- function LoginBlock({ props, emit }) {
38
+ function LoginBlock({ props, bindings, emit }) {
37
39
  const labels = { ...defaultLabels };
38
40
  const type = props.type ?? "login";
39
41
  const showSocial = props.showSocial ?? true;
@@ -41,6 +43,21 @@ function LoginBlock({ props, emit }) {
41
43
  const forgotPasswordHref = props.forgotPasswordHref ?? "/reset-password";
42
44
  const signUpHref = props.signUpHref ?? "/signup";
43
45
  const signInHref = props.signInHref ?? "/login";
46
+ const [boundEmail, setBoundEmail] = useBoundProp(props.email, bindings?.email);
47
+ const [localEmail, setLocalEmail] = useState("");
48
+ const isEmailBound = !!bindings?.email;
49
+ const email = isEmailBound ? boundEmail ?? "" : localEmail;
50
+ const setEmail = isEmailBound ? setBoundEmail : setLocalEmail;
51
+ const [boundPassword, setBoundPassword] = useBoundProp(props.password, bindings?.password);
52
+ const [localPassword, setLocalPassword] = useState("");
53
+ const isPasswordBound = !!bindings?.password;
54
+ const password = isPasswordBound ? boundPassword ?? "" : localPassword;
55
+ const setPassword = isPasswordBound ? setBoundPassword : setLocalPassword;
56
+ const [boundFullName, setBoundFullName] = useBoundProp(props.fullName, bindings?.fullName);
57
+ const [localFullName, setLocalFullName] = useState("");
58
+ const isFullNameBound = !!bindings?.fullName;
59
+ const fullName = isFullNameBound ? boundFullName ?? "" : localFullName;
60
+ const setFullName = isFullNameBound ? setBoundFullName : setLocalFullName;
44
61
  const resolvedTitle = type === "login" ? labels.loginTitle : labels.signupTitle;
45
62
  const resolvedDescription = type === "login" ? labels.loginDescription : labels.signupDescription;
46
63
  const resolvedButtonText = type === "login" ? labels.loginSubmit : labels.signupSubmit;
@@ -84,7 +101,9 @@ function LoginBlock({ props, emit }) {
84
101
  required: true,
85
102
  placeholder: labels.fullNamePlaceholder,
86
103
  autoComplete: "name",
87
- className: "border-border/50 focus:border-accent/50 transition-colors"
104
+ className: "border-border/50 focus:border-accent/50 transition-colors",
105
+ value: fullName,
106
+ onChange: (e) => setFullName(e.target.value)
88
107
  }
89
108
  )
90
109
  ] }),
@@ -101,7 +120,9 @@ function LoginBlock({ props, emit }) {
101
120
  autoCapitalize: "none",
102
121
  autoComplete: "email",
103
122
  autoCorrect: "off",
104
- className: "border-border/50 focus:border-accent/50 transition-colors"
123
+ className: "border-border/50 focus:border-accent/50 transition-colors",
124
+ value: email,
125
+ onChange: (e) => setEmail(e.target.value)
105
126
  }
106
127
  )
107
128
  ] }),
@@ -125,7 +146,9 @@ function LoginBlock({ props, emit }) {
125
146
  type: "password",
126
147
  required: true,
127
148
  autoComplete: type === "login" ? "current-password" : "new-password",
128
- className: "border-border/50 focus:border-accent/50 transition-colors"
149
+ className: "border-border/50 focus:border-accent/50 transition-colors",
150
+ value: password,
151
+ onChange: (e) => setPassword(e.target.value)
129
152
  }
130
153
  )
131
154
  ] }),
@@ -9,10 +9,12 @@ import { Button } from './chunk-7KIDDF3I.js';
9
9
  import { CheckIcon } from './chunk-CXACRCZ4.js';
10
10
  import { cn } from './chunk-QYZT24TS.js';
11
11
  import { useState } from 'react';
12
+ import { useBoundProp } from '@json-render/react';
12
13
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
14
 
14
15
  function ContactBlock({
15
16
  props,
17
+ bindings,
16
18
  emit
17
19
  }) {
18
20
  const title = props.title ?? "Get in touch";
@@ -22,9 +24,21 @@ function ContactBlock({
22
24
  const messagePlaceholder = props.messagePlaceholder ?? "Tell us what you need...";
23
25
  const successTitle = props.successTitle ?? "Message sent";
24
26
  const submitLabel = props.submitLabel ?? "Send message";
25
- const [name, setName] = useState("");
26
- const [email, setEmail] = useState("");
27
- const [message, setMessage] = useState("");
27
+ const [boundName, setBoundName] = useBoundProp(props.name, bindings?.name);
28
+ const [localName, setLocalName] = useState("");
29
+ const isNameBound = !!bindings?.name;
30
+ const name = isNameBound ? boundName ?? "" : localName;
31
+ const setName = isNameBound ? setBoundName : setLocalName;
32
+ const [boundEmail, setBoundEmail] = useBoundProp(props.email, bindings?.email);
33
+ const [localEmail, setLocalEmail] = useState("");
34
+ const isEmailBound = !!bindings?.email;
35
+ const email = isEmailBound ? boundEmail ?? "" : localEmail;
36
+ const setEmail = isEmailBound ? setBoundEmail : setLocalEmail;
37
+ const [boundMessage, setBoundMessage] = useBoundProp(props.message, bindings?.message);
38
+ const [localMessage, setLocalMessage] = useState("");
39
+ const isMessageBound = !!bindings?.message;
40
+ const message = isMessageBound ? boundMessage ?? "" : localMessage;
41
+ const setMessage = isMessageBound ? setBoundMessage : setLocalMessage;
28
42
  const [status, setStatus] = useState("idle");
29
43
  const setSafeTimeout = useSafeTimeout();
30
44
  const handleSubmit = async (e) => {
@@ -15,7 +15,8 @@ var blocksCrudDefinitions = {
15
15
  })
16
16
  ).nullable(),
17
17
  title: z.string().nullable(),
18
- description: z.string().nullable()
18
+ description: z.string().nullable(),
19
+ newKeyName: z.string().nullable()
19
20
  }),
20
21
  events: ["create", "revoke"],
21
22
  description: "API key management block with table display, create dialog, copy-once flow, and revoke functionality.",
@@ -25,18 +26,22 @@ var blocksCrudDefinitions = {
25
26
  { id: "key_2", name: "Staging API", prefix: "sk_test_3m...", createdAt: "2026-02-20T14:00:00Z", lastUsedAt: null, revokedAt: "2026-03-01T08:00:00Z" }
26
27
  ],
27
28
  title: "API Keys",
28
- description: "Manage your API keys for programmatic access."
29
+ description: "Manage your API keys for programmatic access.",
30
+ newKeyName: null
29
31
  }
30
32
  },
31
33
  CreateBlock: {
32
34
  props: z.object({
33
35
  title: z.string().nullable(),
34
36
  description: z.string().nullable(),
35
- submitLabel: z.string().nullable()
37
+ submitLabel: z.string().nullable(),
38
+ username: z.string().nullable(),
39
+ email: z.string().nullable(),
40
+ bio: z.string().nullable()
36
41
  }),
37
42
  events: ["submit"],
38
43
  description: "Profile creation form with username, email, and bio fields.",
39
- example: { title: "Create Your Profile", description: "Tell us a bit about yourself to get started.", submitLabel: "Create Profile" }
44
+ example: { title: "Create Your Profile", description: "Tell us a bit about yourself to get started.", submitLabel: "Create Profile", username: null, email: null, bio: null }
40
45
  },
41
46
  CrudListBlock: {
42
47
  props: z.object({
@@ -60,6 +65,7 @@ var blocksCrudDefinitions = {
60
65
  placeholder: z.string().nullable()
61
66
  })
62
67
  ).nullable(),
68
+ filterValue: z.string().nullable(),
63
69
  pagination: z.object({ page: z.number(), totalPages: z.number() }),
64
70
  errorMessage: z.string().nullable(),
65
71
  emptyTitle: z.string().nullable(),
@@ -84,6 +90,7 @@ var blocksCrudDefinitions = {
84
90
  ],
85
91
  selectedRowId: null,
86
92
  filterControls: null,
93
+ filterValue: null,
87
94
  pagination: { page: 1, totalPages: 4 },
88
95
  errorMessage: null,
89
96
  emptyTitle: null,
@@ -216,10 +223,13 @@ var blocksCrudDefinitions = {
216
223
  }
217
224
  },
218
225
  InviteUserModal: {
219
- props: z.object({}),
220
- events: ["invite", "invited"],
226
+ props: z.object({
227
+ email: z.string().nullable(),
228
+ role: z.enum(["admin", "member", "guest"]).nullable()
229
+ }),
230
+ events: ["submit"],
221
231
  description: "Self-contained invite teammate modal triggered by a button. Renders a dialog with email and role (admin/member/guest) fields, Zod validation, and async submission. Use inside team management UIs.",
222
- example: {}
232
+ example: { email: null, role: null }
223
233
  },
224
234
  KanbanBoard: {
225
235
  props: z.object({
@@ -1,4 +1,4 @@
1
- import { seedComponentDefinitions } from './chunk-4TK2PXMJ.js';
1
+ import { seedComponentDefinitions } from './chunk-CTVV6JS6.js';
2
2
  import { defineCatalog } from '@json-render/core';
3
3
  import { schema } from '@json-render/next/server';
4
4
  import { z } from 'zod';
@@ -15,7 +15,7 @@ var ROUTE_TREES = {
15
15
  root: "shell",
16
16
  elements: {
17
17
  shell: { type: "PageShell", props: { className: null }, children: ["auth"] },
18
- auth: { type: "AuthLayout", props: { mode: "login", error: null, labels: null, className: null } }
18
+ auth: { type: "AuthLayout", props: { mode: "login", error: null, labels: null, className: null }, on: { submit: { action: "noop" } } }
19
19
  }
20
20
  },
21
21
  "/dashboard": {
@@ -66,7 +66,7 @@ var ROUTE_TREES = {
66
66
  testimonials: { type: "TestimonialsBlock", props: { title: null, description: null, testimonials: null } },
67
67
  cta: { type: "CallToActionBlock", props: { title: null, description: null, primaryAction: null, secondaryAction: null } },
68
68
  faq: { type: "FAQBlock", props: { title: null, description: null, items: null }, on: { expand: { action: "noop" } } },
69
- newsletter: { type: "NewsletterBlock", props: { title: null, description: null }, on: { subscribe: { action: "noop" } } },
69
+ newsletter: { type: "NewsletterBlock", props: { title: null, description: null, email: null }, on: { subscribe: { action: "noop" } } },
70
70
  footer: { type: "FooterBlock", props: { brandDescription: null, brandName: null, socialLinks: null, newsletterPlaceholder: null, productLinks: null, companyLinks: null, legalLinks: null } }
71
71
  }
72
72
  },
@@ -152,7 +152,8 @@ var ROUTE_TREES = {
152
152
  type: "NewsletterBlock",
153
153
  props: {
154
154
  title: "Enjoyed this article?",
155
- description: "Get more design system insights delivered to your inbox."
155
+ description: "Get more design system insights delivered to your inbox.",
156
+ email: null
156
157
  },
157
158
  on: { subscribe: { action: "noop" } }
158
159
  },
@@ -195,7 +196,13 @@ var ROUTE_TREES = {
195
196
  useCaseOptions: null,
196
197
  reviewStepTitle: null,
197
198
  reviewHeading: null,
198
- reviewBody: null
199
+ reviewBody: null,
200
+ displayName: null,
201
+ organization: null,
202
+ bio: null,
203
+ framework: null,
204
+ teamSize: null,
205
+ useCase: null
199
206
  },
200
207
  on: { complete: { action: "noop" } }
201
208
  }
@@ -8,6 +8,7 @@ import { Button } from './chunk-7KIDDF3I.js';
8
8
  import { zodResolver } from '@hookform/resolvers/zod';
9
9
  import { useForm } from 'react-hook-form';
10
10
  import { z } from 'zod';
11
+ import { useBoundProp } from '@json-render/react';
11
12
  import { jsxs, jsx } from 'react/jsx-runtime';
12
13
 
13
14
  var profileFormSchema = z.object({
@@ -24,16 +25,27 @@ var profileFormSchema = z.object({
24
25
  var defaultFormValues = {
25
26
  bio: "I own a computer."
26
27
  };
27
- function CreateBlock({ props, emit }) {
28
+ function CreateBlock({ props, emit, bindings }) {
28
29
  const title = props.title ?? "Create Profile";
29
30
  const description = props.description ?? "Example of a complex form with Zod validation.";
30
31
  const submitLabel = props.submitLabel ?? "Update profile";
32
+ const [, setBoundUsername] = useBoundProp(props.username, bindings?.username);
33
+ const [, setBoundEmail] = useBoundProp(props.email, bindings?.email);
34
+ const [, setBoundBio] = useBoundProp(props.bio, bindings?.bio);
31
35
  const form = useForm({
32
36
  resolver: zodResolver(profileFormSchema),
33
- defaultValues: defaultFormValues,
37
+ defaultValues: {
38
+ ...defaultFormValues,
39
+ ...props.username ? { username: props.username } : {},
40
+ ...props.email ? { email: props.email } : {},
41
+ ...props.bio ? { bio: props.bio } : {}
42
+ },
34
43
  mode: "onChange"
35
44
  });
36
- function handleSubmit(_data) {
45
+ function handleSubmit(data) {
46
+ if (bindings?.username) setBoundUsername(data.username);
47
+ if (bindings?.email) setBoundEmail(data.email);
48
+ if (bindings?.bio) setBoundBio(data.bio);
37
49
  emit("submit");
38
50
  }
39
51
  return /* @__PURE__ */ jsxs(Card, { className: "w-full max-w-2xl mx-auto", children: [
@@ -9,7 +9,7 @@ import { textEffectsComponents } from './chunk-5B3GLRX3.js';
9
9
  import { actionComponents } from './chunk-GXUQFXT7.js';
10
10
  import { agentComponents } from './chunk-65CUE2WL.js';
11
11
  import { chartComponents } from './chunk-L55GVKLY.js';
12
- import { chatComponents } from './chunk-56TNQ2P4.js';
12
+ import { chatComponents } from './chunk-YMAEXGD2.js';
13
13
 
14
14
  // src/catalog/primitives/index.ts
15
15
  var primitiveComponents = {