@toriistudio/v0-playground 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -59,7 +59,7 @@ type ControlType = ({
59
59
  } & BaseControl) | ({
60
60
  type: "select";
61
61
  value: string;
62
- options: string[];
62
+ options: Record<string, any>;
63
63
  } & BaseControl) | ({
64
64
  type: "button";
65
65
  onClick?: () => void;
package/dist/index.d.ts CHANGED
@@ -59,7 +59,7 @@ type ControlType = ({
59
59
  } & BaseControl) | ({
60
60
  type: "select";
61
61
  value: string;
62
- options: string[];
62
+ options: Record<string, any>;
63
63
  } & BaseControl) | ({
64
64
  type: "button";
65
65
  onClick?: () => void;
package/dist/index.js CHANGED
@@ -671,7 +671,9 @@ var ControlPanel = () => {
671
671
  onValueChange: (val) => setValue(key, val),
672
672
  children: [
673
673
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectValue, { placeholder: "Select option" }) }),
674
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectContent, { children: control.options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectItem, { value: opt, children: opt }, opt)) })
674
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectContent, { children: Object.entries(control.options).map(
675
+ ([label, _val]) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SelectItem, { value: label, children: label }, label)
676
+ ) })
675
677
  ]
676
678
  }
677
679
  )
package/dist/index.mjs CHANGED
@@ -641,7 +641,9 @@ var ControlPanel = () => {
641
641
  onValueChange: (val) => setValue(key, val),
642
642
  children: [
643
643
  /* @__PURE__ */ jsx9(SelectTrigger, { children: /* @__PURE__ */ jsx9(SelectValue, { placeholder: "Select option" }) }),
644
- /* @__PURE__ */ jsx9(SelectContent, { children: control.options.map((opt) => /* @__PURE__ */ jsx9(SelectItem, { value: opt, children: opt }, opt)) })
644
+ /* @__PURE__ */ jsx9(SelectContent, { children: Object.entries(control.options).map(
645
+ ([label, _val]) => /* @__PURE__ */ jsx9(SelectItem, { value: label, children: label }, label)
646
+ ) })
645
647
  ]
646
648
  }
647
649
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toriistudio/v0-playground",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "V0 Playground",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",