lumiverse-spindle-types 0.5.6 → 0.5.8
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/package.json +1 -1
- package/src/api.ts +40 -1
- package/src/index.ts +5 -0
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -638,6 +638,13 @@ export interface ChatChangedPayloadDTO {
|
|
|
638
638
|
|
|
639
639
|
// ─── User Preset DTOs ───────────────────────────────────────────────────
|
|
640
640
|
|
|
641
|
+
/** Option entry for `select` and `multiselect` prompt variables. */
|
|
642
|
+
export interface PromptVariableOptionDTO {
|
|
643
|
+
id: string;
|
|
644
|
+
label: string;
|
|
645
|
+
value: string;
|
|
646
|
+
}
|
|
647
|
+
|
|
641
648
|
export type PromptVariableDefDTO =
|
|
642
649
|
| {
|
|
643
650
|
id: string;
|
|
@@ -677,9 +684,41 @@ export type PromptVariableDefDTO =
|
|
|
677
684
|
max: number;
|
|
678
685
|
step?: number;
|
|
679
686
|
description?: string;
|
|
687
|
+
}
|
|
688
|
+
| {
|
|
689
|
+
id: string;
|
|
690
|
+
name: string;
|
|
691
|
+
label: string;
|
|
692
|
+
type: "select";
|
|
693
|
+
/** Stored selection: an option id. */
|
|
694
|
+
defaultValue: string;
|
|
695
|
+
options: PromptVariableOptionDTO[];
|
|
696
|
+
description?: string;
|
|
697
|
+
}
|
|
698
|
+
| {
|
|
699
|
+
id: string;
|
|
700
|
+
name: string;
|
|
701
|
+
label: string;
|
|
702
|
+
type: "switch";
|
|
703
|
+
/** 0 (off) or 1 (on). */
|
|
704
|
+
defaultValue: 0 | 1;
|
|
705
|
+
description?: string;
|
|
706
|
+
}
|
|
707
|
+
| {
|
|
708
|
+
id: string;
|
|
709
|
+
name: string;
|
|
710
|
+
label: string;
|
|
711
|
+
type: "multiselect";
|
|
712
|
+
/** Stored selection: array of option ids. */
|
|
713
|
+
defaultValue: string[];
|
|
714
|
+
options: PromptVariableOptionDTO[];
|
|
715
|
+
/** String inserted between joined option values. Defaults to two newlines. */
|
|
716
|
+
separator?: string;
|
|
717
|
+
description?: string;
|
|
680
718
|
};
|
|
681
719
|
|
|
682
|
-
export type
|
|
720
|
+
export type PromptVariableTypeDTO = PromptVariableDefDTO["type"];
|
|
721
|
+
export type PromptVariableValueDTO = string | number | string[];
|
|
683
722
|
export type PromptVariableValuesDTO = Record<string, Record<string, PromptVariableValueDTO>>;
|
|
684
723
|
export type PromptBlockRoleDTO = "system" | "user" | "assistant" | "user_append" | "assistant_append";
|
|
685
724
|
export type PromptBlockPositionDTO = "pre_history" | "post_history" | "in_history";
|
package/src/index.ts
CHANGED
|
@@ -44,7 +44,9 @@ export type {
|
|
|
44
44
|
ChatUpdateDTO,
|
|
45
45
|
ChatSwitchedPayloadDTO,
|
|
46
46
|
ChatChangedPayloadDTO,
|
|
47
|
+
PromptVariableOptionDTO,
|
|
47
48
|
PromptVariableDefDTO,
|
|
49
|
+
PromptVariableTypeDTO,
|
|
48
50
|
PromptVariableValueDTO,
|
|
49
51
|
PromptVariableValuesDTO,
|
|
50
52
|
PromptBlockRoleDTO,
|
|
@@ -227,6 +229,9 @@ export type {
|
|
|
227
229
|
SpindleNumericInputHandle,
|
|
228
230
|
SpindleNumberStepperOptions,
|
|
229
231
|
SpindleNumberStepperHandle,
|
|
232
|
+
SpindleRangeSliderFormat,
|
|
233
|
+
SpindleRangeSliderOptions,
|
|
234
|
+
SpindleRangeSliderHandle,
|
|
230
235
|
SpindleCheckboxOptions,
|
|
231
236
|
SpindleCheckboxHandle,
|
|
232
237
|
SpindleSwitchOptions,
|