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.
Binary file
@@ -513,7 +513,7 @@ export function createDeltaChangeset(base_state, current_state) {
513
513
  * @returns {number}
514
514
  */
515
515
  export function getCurrentSchemaVersion() {
516
- return 4000002;
516
+ return 4000003;
517
517
  }
518
518
 
519
519
  /**
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 = isValidString(obj.title);
323
- if (!title) {
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,