partforge 0.113.0 → 0.115.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/types/part.d.ts CHANGED
@@ -58,7 +58,7 @@ export interface PartMeta {
58
58
  export type ControlKind = "slider" | "number" | "text" | "textarea";
59
59
 
60
60
  /** Every control type the panel can render. */
61
- export type ControlType = "slider" | "number" | "text" | "textarea" | "checkbox" | "select" | "radio";
61
+ export type ControlType = "slider" | "number" | "text" | "textarea" | "checkbox" | "select" | "radio" | "font" | "image" | "vector" | "custom";
62
62
 
63
63
  /** A declarative visibility condition, evaluated against raw parameters. */
64
64
  export type WhenCondition =
@@ -94,6 +94,15 @@ export interface PanelControlEntry {
94
94
  snap?: boolean;
95
95
  /** slider: [lo, hi] band drawn on the track; outside it the value box takes a warning tint. */
96
96
  recommended?: [number, number];
97
+ /**
98
+ * custom: the widget function. Called once per mount with a host object
99
+ * (see `CustomControlHost` in index.d.ts); draws into `host.el`. The key
100
+ * this control owns may hold a JSON value (arrays and plain objects of
101
+ * primitives, ≤16 KB, depth ≤8).
102
+ */
103
+ widget?: (host: import("./index.js").CustomControlHost) => import("./index.js").CustomControlInstance | void;
104
+ /** custom: further scalar params the widget may write besides `key`. */
105
+ keys?: string[];
97
106
  hidden?: boolean;
98
107
  when?: WhenCondition;
99
108
  whenFalse?: "disable";