@vivix-labs/dashboard-projects 1.0.0-beta.17 → 1.0.0-beta.19
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/client-code.js +92 -37
- package/package.json +1 -1
package/dist/client-code.js
CHANGED
|
@@ -79,14 +79,24 @@ var projectData = z2.object({
|
|
|
79
79
|
aspectRatio: z2.string().nullable().default(null),
|
|
80
80
|
projectType: projectType.optional(),
|
|
81
81
|
coverRef: versionRef.nullable().default(null),
|
|
82
|
-
briefRef: z2.object({ storeId: z2.uuid(), objectId: z2.uuid() }).strict().nullable().
|
|
82
|
+
briefRef: z2.object({ storeId: z2.uuid(), objectId: z2.uuid() }).strict().nullable().optional().transform(() => void 0),
|
|
83
83
|
tags
|
|
84
84
|
}).strict();
|
|
85
85
|
var assetData = z2.object({
|
|
86
86
|
projectId: z2.uuid(),
|
|
87
87
|
name: z2.string().trim().min(1).max(200),
|
|
88
88
|
kind,
|
|
89
|
-
purpose: z2.enum([
|
|
89
|
+
purpose: z2.enum([
|
|
90
|
+
"reference",
|
|
91
|
+
"script",
|
|
92
|
+
"shot",
|
|
93
|
+
"music",
|
|
94
|
+
"voice",
|
|
95
|
+
"speech",
|
|
96
|
+
"subtitle",
|
|
97
|
+
"final",
|
|
98
|
+
"other"
|
|
99
|
+
]).default("other"),
|
|
90
100
|
origin: z2.enum(["upload", "library", "generated", "authored"]),
|
|
91
101
|
orderKey: z2.number().int().nullable().default(null),
|
|
92
102
|
tags,
|
|
@@ -94,26 +104,26 @@ var assetData = z2.object({
|
|
|
94
104
|
sourceRef: versionRef.nullable().default(null),
|
|
95
105
|
adoptedVersionId: z2.uuid().nullable().default(null)
|
|
96
106
|
}).strict();
|
|
97
|
-
var
|
|
98
|
-
z2.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
startMs: z2.number().int().nonnegative(),
|
|
102
|
-
endMs: z2.number().int().nonnegative()
|
|
103
|
-
}).strict()
|
|
104
|
-
]);
|
|
105
|
-
var generationInput = z2.object({
|
|
107
|
+
var storedAssetData = assetData.extend({
|
|
108
|
+
purpose: z2.union([assetData.shape.purpose, z2.literal("speech")])
|
|
109
|
+
});
|
|
110
|
+
var generationFields = z2.object({
|
|
106
111
|
targetAssetId: z2.uuid().optional(),
|
|
107
112
|
taskName: z2.string().trim().min(1).max(200).optional(),
|
|
108
|
-
context: z2.record(z2.string().min(1).max(64), z2.string().min(1).max(200)).
|
|
113
|
+
context: z2.record(z2.string().min(1).max(64), z2.string().min(1).max(200)).describe(
|
|
114
|
+
"Owning-domain binding stored with the task. Short drama passes { episodeId, shotId } so the finished take attaches to that shot; production.generateShot sets it automatically."
|
|
115
|
+
).optional(),
|
|
109
116
|
expectedRevision: z2.number().int().positive().optional(),
|
|
110
117
|
newAsset: z2.object({
|
|
111
118
|
name: z2.string().trim().min(1).max(200),
|
|
112
|
-
kind: z2.enum(["image", "video", "audio"])
|
|
119
|
+
kind: z2.enum(["image", "video", "audio"]),
|
|
120
|
+
purpose: assetData.shape.purpose.unwrap().optional(),
|
|
121
|
+
tags: tags.unwrap().optional()
|
|
113
122
|
}).strict().optional(),
|
|
114
123
|
modelId: z2.string().min(1),
|
|
115
124
|
capabilityId: z2.string().min(1),
|
|
116
|
-
prompt: z2.string().max(32e3),
|
|
125
|
+
prompt: z2.string().max(32e3).optional(),
|
|
126
|
+
voiceRef: versionRef.optional(),
|
|
117
127
|
parameters: z2.record(z2.string(), z2.unknown()).default({}),
|
|
118
128
|
outputCount: z2.number().int().min(1).max(100).default(1),
|
|
119
129
|
inputs: z2.array(
|
|
@@ -127,10 +137,14 @@ var generationInput = z2.object({
|
|
|
127
137
|
baseVersionId: z2.uuid().optional(),
|
|
128
138
|
changeRequest: z2.string().trim().min(1).max(4e3).optional(),
|
|
129
139
|
preserveRequest: z2.string().max(4e3).default(""),
|
|
130
|
-
anchor:
|
|
140
|
+
anchor: z2.object({ kind: z2.literal("whole") }).strict().optional().describe("Deprecated whole-version selection."),
|
|
131
141
|
retryOfTaskId: z2.uuid().optional(),
|
|
132
142
|
acknowledgeUnknown: z2.boolean().optional()
|
|
133
143
|
}).strict();
|
|
144
|
+
var generationInput = generationFields.refine(
|
|
145
|
+
(input) => input.prompt !== void 0 || ["voice.clone", "voice.create"].includes(input.capabilityId),
|
|
146
|
+
{ path: ["prompt"], message: "A prompt is required for this operation." }
|
|
147
|
+
).transform((input) => ({ ...input, prompt: input.prompt ?? "" }));
|
|
134
148
|
var projectSettingsInput = z2.object({
|
|
135
149
|
projectId: z2.uuid(),
|
|
136
150
|
expectedRevision: z2.number().int().positive(),
|
|
@@ -141,11 +155,51 @@ var projectSettingsInput = z2.object({
|
|
|
141
155
|
coverRef: projectData.shape.coverRef.unwrap()
|
|
142
156
|
}).partial().strict()
|
|
143
157
|
}).strict();
|
|
158
|
+
function generationReceiptPredecessors() {
|
|
159
|
+
const legacy = generationFields.omit({ voiceRef: true }).extend({
|
|
160
|
+
prompt: generationFields.shape.prompt.unwrap(),
|
|
161
|
+
newAsset: generationFields.shape.newAsset.unwrap().omit({ purpose: true, tags: true }).optional(),
|
|
162
|
+
anchor: z2.discriminatedUnion("kind", [
|
|
163
|
+
z2.object({ kind: z2.literal("whole") }).strict(),
|
|
164
|
+
z2.object({
|
|
165
|
+
kind: z2.literal("timeRange"),
|
|
166
|
+
startMs: z2.number().int().nonnegative(),
|
|
167
|
+
endMs: z2.number().int().nonnegative()
|
|
168
|
+
}).strict()
|
|
169
|
+
]).default({ kind: "whole" })
|
|
170
|
+
});
|
|
171
|
+
const voice = legacy.extend({
|
|
172
|
+
prompt: legacy.shape.prompt.optional(),
|
|
173
|
+
voiceRef: versionRef.optional()
|
|
174
|
+
}).refine(
|
|
175
|
+
(input) => input.prompt !== void 0 || ["voice.clone", "voice.create"].includes(input.capabilityId)
|
|
176
|
+
).transform((input) => ({ ...input, prompt: input.prompt ?? "" }));
|
|
177
|
+
return [
|
|
178
|
+
{
|
|
179
|
+
packageVersion: "1.0.0-beta.19",
|
|
180
|
+
packageIntegrity: "e70b5c3b91d551bbd73c0b181eadbe92e71b66fbc6a642004184740a14bd4c06",
|
|
181
|
+
input: legacy
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
packageVersion: "1.0.0-beta.20",
|
|
185
|
+
packageIntegrity: "febb0e966d82d98555beab936e2d735dab3cc98d6101d19e8b692c1ebe0dbe8a",
|
|
186
|
+
input: voice
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
packageVersion: "1.0.0-beta.22",
|
|
190
|
+
packageIntegrity: "6fefdd978b7441df8598373da79d22d945587c8656de4e92b64cb615eec30afb",
|
|
191
|
+
input: voice
|
|
192
|
+
},
|
|
193
|
+
// The non-voice beta.22 branch used the original required prompt schema.
|
|
194
|
+
{ packageVersion: "1.0.0-beta.22", input: legacy }
|
|
195
|
+
];
|
|
196
|
+
}
|
|
144
197
|
var generationSubmitOperation = defineOperation({
|
|
145
198
|
id: "generation.submit",
|
|
146
199
|
title: "Generate",
|
|
147
|
-
description: "Submit one media generation without approval, retaining its paid request identity.",
|
|
200
|
+
description: "Submit one media generation without approval, retaining its paid request identity. Pass context with the owning domain identifiers; without it the output is only stored in the media library.",
|
|
148
201
|
input: generationInput,
|
|
202
|
+
receiptPredecessors: generationReceiptPredecessors,
|
|
149
203
|
output: z2.any(),
|
|
150
204
|
effects: ["write", "paid"],
|
|
151
205
|
confirm: "none"
|
|
@@ -365,7 +419,7 @@ var iconGeometry = {
|
|
|
365
419
|
slot: 24
|
|
366
420
|
}
|
|
367
421
|
};
|
|
368
|
-
function Icon({ name, size }) {
|
|
422
|
+
function Icon({ name, size, iconSet }) {
|
|
369
423
|
const geometry = iconGeometry[name];
|
|
370
424
|
const style = {
|
|
371
425
|
...geometry && {
|
|
@@ -375,10 +429,10 @@ function Icon({ name, size }) {
|
|
|
375
429
|
},
|
|
376
430
|
...size === void 0 ? {} : { "--vx-icon-size": `${size}px` }
|
|
377
431
|
};
|
|
378
|
-
if (name === "relationships" || name === "color-adjust" || name === "speed") {
|
|
379
|
-
return _jsx("svg", { "aria-hidden": "true", className: "vx-icon", "data-icon": name, style, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: name === "color-adjust" ? _jsxs(_Fragment, { children: [_jsx("path", { d: "M3 5h3m4 0h7M3 10h8m4 0h2M3 15h3m4 0h7" }), _jsx("circle", { cx: "8", cy: "5", r: "2" }), _jsx("circle", { cx: "13", cy: "10", r: "2" }), _jsx("circle", { cx: "8", cy: "15", r: "2" })] }) : name === "speed" ? _jsxs(_Fragment, { children: [_jsx("path", { d: "M4 16a8 8 0 1 1 12 0M10 3v2M3 10h2m10 0h2M5 5l1.4 1.4M10 12l4-5" }), _jsx("circle", { cx: "10", cy: "12", r: "1.5" })] }) : _jsxs(_Fragment, { children: [_jsx("path", { d: "M8.5 6.3 5 11.7M11.5 6.3 15 11.7M6.5 14.5h7" }), _jsx("circle", { cx: "10", cy: "4", r: "2.5" }), _jsx("circle", { cx: "4", cy: "14.5", r: "2.5" }), _jsx("circle", { cx: "16", cy: "14.5", r: "2.5" })] }) });
|
|
432
|
+
if (name === "menu" || name === "relationships" || name === "color-adjust" || name === "speed") {
|
|
433
|
+
return _jsx("svg", { "aria-hidden": "true", className: "vx-icon", "data-icon": name, "data-icon-set": iconSet === "chat" ? "chat" : void 0, style, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: name === "menu" ? _jsx("path", { d: "M3 5h14M3 10h14M3 15h14" }) : name === "color-adjust" ? _jsxs(_Fragment, { children: [_jsx("path", { d: "M3 5h3m4 0h7M3 10h8m4 0h2M3 15h3m4 0h7" }), _jsx("circle", { cx: "8", cy: "5", r: "2" }), _jsx("circle", { cx: "13", cy: "10", r: "2" }), _jsx("circle", { cx: "8", cy: "15", r: "2" })] }) : name === "speed" ? _jsxs(_Fragment, { children: [_jsx("path", { d: "M4 16a8 8 0 1 1 12 0M10 3v2M3 10h2m10 0h2M5 5l1.4 1.4M10 12l4-5" }), _jsx("circle", { cx: "10", cy: "12", r: "1.5" })] }) : _jsxs(_Fragment, { children: [_jsx("path", { d: "M8.5 6.3 5 11.7M11.5 6.3 15 11.7M6.5 14.5h7" }), _jsx("circle", { cx: "10", cy: "4", r: "2.5" }), _jsx("circle", { cx: "4", cy: "14.5", r: "2.5" }), _jsx("circle", { cx: "16", cy: "14.5", r: "2.5" })] }) });
|
|
380
434
|
}
|
|
381
|
-
return _jsx("span", { "aria-hidden": "true", className: "vx-icon", "data-icon": name, style });
|
|
435
|
+
return _jsx("span", { "aria-hidden": "true", className: "vx-icon", "data-icon": name, "data-icon-set": iconSet === "chat" ? "chat" : void 0, style });
|
|
382
436
|
}
|
|
383
437
|
|
|
384
438
|
// packages/ui-system/dist/button-variants.js
|
|
@@ -457,19 +511,20 @@ function SegmentedControl({ label, items, value, onValueChange, size = "medium",
|
|
|
457
511
|
|
|
458
512
|
// packages/ui-system/dist/input.js
|
|
459
513
|
import { jsx as _jsx5, jsxs as _jsxs4 } from "react/jsx-runtime";
|
|
514
|
+
import { useEffect, useState as useState2 } from "react";
|
|
460
515
|
function TextInput({ label, value, onValueChange, size = "medium", appearance = "default", placeholder, ...props }) {
|
|
461
516
|
return _jsxs4("label", { className: "vx-field", "data-size": size, "data-appearance": appearance, children: [_jsx5("span", { children: label }), _jsx5("input", { ...props, type: "text", placeholder: placeholder ?? (props.readOnly ? void 0 : "Enter text"), value, onChange: (event) => onValueChange(event.currentTarget.value) })] });
|
|
462
517
|
}
|
|
463
518
|
|
|
464
519
|
// packages/ui-system/dist/dialog.js
|
|
465
520
|
import { jsx as _jsx6, jsxs as _jsxs5, Fragment as _Fragment2 } from "react/jsx-runtime";
|
|
466
|
-
import { useId as useId2, useLayoutEffect, useRef, useState as
|
|
521
|
+
import { useId as useId2, useLayoutEffect, useRef, useState as useState3 } from "react";
|
|
467
522
|
import { createPortal } from "react-dom";
|
|
468
523
|
|
|
469
524
|
// packages/ui-system/dist/dialog-surface.js
|
|
470
525
|
var overlayOpeningEvent = "vx-overlay-opening";
|
|
471
|
-
function outerDialogDocument(
|
|
472
|
-
const source =
|
|
526
|
+
function outerDialogDocument(anchor) {
|
|
527
|
+
const source = anchor.ownerDocument;
|
|
473
528
|
try {
|
|
474
529
|
const target = source.defaultView?.top?.document;
|
|
475
530
|
return target && target !== source ? target : void 0;
|
|
@@ -477,9 +532,9 @@ function outerDialogDocument(anchor2) {
|
|
|
477
532
|
return void 0;
|
|
478
533
|
}
|
|
479
534
|
}
|
|
480
|
-
function createDialogSurface(
|
|
481
|
-
const source =
|
|
482
|
-
const target = outerDialogDocument(
|
|
535
|
+
function createDialogSurface(anchor) {
|
|
536
|
+
const source = anchor.ownerDocument;
|
|
537
|
+
const target = outerDialogDocument(anchor);
|
|
483
538
|
if (!target)
|
|
484
539
|
return void 0;
|
|
485
540
|
const host = target.createElement("div");
|
|
@@ -495,19 +550,19 @@ function createDialogSurface(anchor2) {
|
|
|
495
550
|
clone.setAttribute("href", original.href);
|
|
496
551
|
shadow.append(clone);
|
|
497
552
|
}
|
|
498
|
-
const theme =
|
|
553
|
+
const theme = anchor.closest("[data-vx-theme]");
|
|
499
554
|
const root = target.createElement("div");
|
|
500
555
|
root.dataset.vxTheme = theme?.dataset.vxTheme ?? "light";
|
|
501
556
|
root.className = theme?.className ?? "";
|
|
502
557
|
root.style.display = "contents";
|
|
503
|
-
const style = source.defaultView.getComputedStyle(
|
|
558
|
+
const style = source.defaultView.getComputedStyle(anchor);
|
|
504
559
|
for (const name of style)
|
|
505
560
|
if (name.startsWith("--"))
|
|
506
561
|
root.style.setProperty(name, style.getPropertyValue(name));
|
|
507
562
|
shadow.append(root);
|
|
508
563
|
let container = root;
|
|
509
564
|
const ancestors = [];
|
|
510
|
-
for (let parent =
|
|
565
|
+
for (let parent = anchor.parentElement; parent && parent !== theme; parent = parent.parentElement)
|
|
511
566
|
ancestors.unshift(parent);
|
|
512
567
|
for (const original of ancestors) {
|
|
513
568
|
const wrapper = target.createElement("div");
|
|
@@ -524,16 +579,16 @@ function createDialogSurface(anchor2) {
|
|
|
524
579
|
}
|
|
525
580
|
|
|
526
581
|
// packages/ui-system/dist/dialog.js
|
|
527
|
-
function Dialog({ title, open, onOpenChange, children, actions, className, inlineWhenClosed = false, variant = "default", closeOnEscape = true, focusTitleOnOpen = variant === "welcome" }) {
|
|
582
|
+
function Dialog({ title, titleBadge, open, onOpenChange, children, actions, className, inlineWhenClosed = false, variant = "default", closeOnEscape = true, focusTitleOnOpen = variant === "welcome" }) {
|
|
528
583
|
const ref = useRef(null);
|
|
529
|
-
const
|
|
530
|
-
const [surface, setSurface] =
|
|
584
|
+
const anchor = useRef(null);
|
|
585
|
+
const [surface, setSurface] = useState3();
|
|
531
586
|
const heading = useId2();
|
|
532
587
|
useLayoutEffect(() => {
|
|
533
|
-
if (inlineWhenClosed || !open || !
|
|
588
|
+
if (inlineWhenClosed || !open || !anchor.current)
|
|
534
589
|
return;
|
|
535
|
-
const mounted = createDialogSurface(
|
|
536
|
-
const active =
|
|
590
|
+
const mounted = createDialogSurface(anchor.current);
|
|
591
|
+
const active = anchor.current.getRootNode().activeElement;
|
|
537
592
|
setSurface(mounted?.root ?? null);
|
|
538
593
|
return () => {
|
|
539
594
|
mounted?.dispose();
|
|
@@ -575,8 +630,8 @@ function Dialog({ title, open, onOpenChange, children, actions, className, inlin
|
|
|
575
630
|
}, onClose: (event) => {
|
|
576
631
|
if (open && event.currentTarget.isConnected && !event.currentTarget.open)
|
|
577
632
|
onOpenChange(false);
|
|
578
|
-
}, children: [_jsxs5("header", { hidden: inlineWhenClosed && !open, children: [_jsx6("h2", { id: heading, tabIndex: focusTitleOnOpen ? -1 : void 0, autoFocus: focusTitleOnOpen, children: title }), !welcome && closeButton] }), _jsx6("div", { className: "vx-dialog-body", children }), (actions || welcome) && _jsxs5("footer", { hidden: inlineWhenClosed && !open, children: [actions, welcome && closeButton] })] });
|
|
579
|
-
return _jsxs5(_Fragment2, { children: [_jsx6("span", { ref:
|
|
633
|
+
}, children: [_jsxs5("header", { hidden: inlineWhenClosed && !open, children: [_jsx6("h2", { id: heading, tabIndex: focusTitleOnOpen ? -1 : void 0, autoFocus: focusTitleOnOpen, children: title }), titleBadge, !welcome && closeButton] }), _jsx6("div", { className: "vx-dialog-body", children }), (actions || welcome) && _jsxs5("footer", { hidden: inlineWhenClosed && !open, children: [actions, welcome && closeButton] })] });
|
|
634
|
+
return _jsxs5(_Fragment2, { children: [_jsx6("span", { ref: anchor, hidden: true }), (open || inlineWhenClosed) && (surface ? createPortal(dialog, surface) : dialog)] });
|
|
580
635
|
}
|
|
581
636
|
|
|
582
637
|
// packages/dashboard-projects/src/create-project-dialog.tsx
|