ducjs 4.3.0 → 4.4.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/ducjs_wasi.wasm +0 -0
- package/dist/ducjs_wasm.js +1 -1
- package/dist/ducjs_wasm_bg.wasm +0 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/restore/restoreDataState.js +9 -2
- package/dist/thumbnails/lib/clientBundle.min.js +1179 -1010
- package/dist/thumbnails/lib/offscreen-model-thumbnail.js +4 -0
- package/dist/thumbnails/lib/parametricClip.js +37 -21
- package/dist/thumbnails/lib/parametricViewerState.js +15 -11
- package/dist/types/charter.types.d.ts +8 -0
- package/dist/utils/compactComponentRegistry.d.ts +63 -0
- package/dist/utils/compactComponentRegistry.js +180 -0
- package/dist/utils/modelMotion.d.ts +38 -0
- package/dist/utils/modelMotion.js +160 -0
- package/dist/utils/state/index.d.ts +2 -0
- package/dist/utils/state/index.js +11 -0
- package/dist/utils/viewerUpdateBatch.d.ts +11 -0
- package/dist/utils/viewerUpdateBatch.js +34 -0
- package/package.json +2 -2
package/dist/ducjs_wasi.wasm
CHANGED
|
Binary file
|
package/dist/ducjs_wasm.js
CHANGED
package/dist/ducjs_wasm_bg.wasm
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -11,3 +11,6 @@ export * from "./thumbnails/cameraPresets";
|
|
|
11
11
|
export * from "./thumbnails/lib";
|
|
12
12
|
export * as vc from "./version-control";
|
|
13
13
|
export { DucOpfsDocument, ensureWasm, getWasmBinary } from "./wasm";
|
|
14
|
+
export { readModelMotion, configureModelMotion, applyModelExplode } from "./utils/modelMotion";
|
|
15
|
+
export { withBatchedViewerUpdates } from "./utils/viewerUpdateBatch";
|
|
16
|
+
export { CompactComponentRegistry, installCompactComponentRegistry } from "./utils/compactComponentRegistry";
|
package/dist/index.js
CHANGED
|
@@ -11,3 +11,6 @@ export * from "./thumbnails/cameraPresets";
|
|
|
11
11
|
export * from "./thumbnails/lib";
|
|
12
12
|
export * as vc from "./version-control";
|
|
13
13
|
export { DucOpfsDocument, ensureWasm, getWasmBinary } from "./wasm";
|
|
14
|
+
export { readModelMotion, configureModelMotion, applyModelExplode } from "./utils/modelMotion";
|
|
15
|
+
export { withBatchedViewerUpdates } from "./utils/viewerUpdateBatch";
|
|
16
|
+
export { CompactComponentRegistry, installCompactComponentRegistry } from "./utils/compactComponentRegistry";
|
|
@@ -319,8 +319,8 @@ export const restoreCharter = (importedCharter) => {
|
|
|
319
319
|
return getDefaultCharter();
|
|
320
320
|
}
|
|
321
321
|
const obj = importedCharter;
|
|
322
|
-
const title =
|
|
323
|
-
if (
|
|
322
|
+
const title = obj.title;
|
|
323
|
+
if (typeof title !== "string") {
|
|
324
324
|
return getDefaultCharter();
|
|
325
325
|
}
|
|
326
326
|
const objective = typeof obj.objective === "string" ? obj.objective : "";
|
|
@@ -349,6 +349,13 @@ export const restoreCharter = (importedCharter) => {
|
|
|
349
349
|
description: typeof obj.description === "string" ? obj.description : undefined,
|
|
350
350
|
objective,
|
|
351
351
|
phase: rawPhase,
|
|
352
|
+
phaseHistory: (Array.isArray(obj.phaseHistory) ? obj.phaseHistory : []).flatMap(entry => {
|
|
353
|
+
if (!entry || !isValidString(entry.id) || !VALID_CHARTER_PHASES.includes(entry.previousPhase)
|
|
354
|
+
|| !VALID_CHARTER_PHASES.includes(entry.phase) || entry.previousPhase === entry.phase
|
|
355
|
+
|| !isFiniteNumber(entry.changedAt) || (entry.phase === "closed" && !isValidString(entry.closedReason)))
|
|
356
|
+
return [];
|
|
357
|
+
return [Object.assign({ id: entry.id, previousPhase: entry.previousPhase, phase: entry.phase, changedAt: entry.changedAt }, (entry.phase === "closed" ? { closedReason: entry.closedReason } : {}))];
|
|
358
|
+
}),
|
|
352
359
|
closedReason: typeof obj.closedReason === "string" ? obj.closedReason : undefined,
|
|
353
360
|
requirements,
|
|
354
361
|
constraints,
|