@nodaro/shared 3.18.0 → 3.19.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/index.cjs CHANGED
@@ -15686,9 +15686,31 @@ var PRESET_APPLY_CLEAR_KEYS = [
15686
15686
  "referenceRoles"
15687
15687
  ];
15688
15688
  var PROMPT_CONTENT_KEYS = ["prompt", "scenePrompt", "editPrompt", PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY];
15689
- function presetApplyClearKeys(presetData) {
15689
+ function presetApplyClearKeys(presetData, nodeType) {
15690
15690
  const ownsPromptContent = PROMPT_CONTENT_KEYS.some((k) => presetData[k] !== void 0);
15691
- return ownsPromptContent ? [...PRESET_APPLY_CLEAR_KEYS, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY] : PRESET_APPLY_CLEAR_KEYS;
15691
+ const base = ownsPromptContent ? [...PRESET_APPLY_CLEAR_KEYS, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY] : PRESET_APPLY_CLEAR_KEYS;
15692
+ const levers = presetLeverClearKeys(presetData, nodeType);
15693
+ return levers.length > 0 ? [...base, ...levers] : base;
15694
+ }
15695
+ var PRESET_LEVER_GROUPS = {
15696
+ "add-captions": [
15697
+ "look",
15698
+ "fontFamily",
15699
+ "fontWeight",
15700
+ "strokeColor",
15701
+ "strokeWidth",
15702
+ "highlightColor",
15703
+ "uppercase",
15704
+ "positionY",
15705
+ "animate",
15706
+ "maxWordsPerLine",
15707
+ "backgroundColor"
15708
+ ]
15709
+ };
15710
+ function presetLeverClearKeys(presetData, nodeType) {
15711
+ if (!nodeType || !Object.hasOwn(PRESET_LEVER_GROUPS, nodeType)) return [];
15712
+ if (!Object.values(presetData).some((v) => v !== void 0)) return [];
15713
+ return PRESET_LEVER_GROUPS[nodeType].filter((k) => presetData[k] === void 0);
15692
15714
  }
15693
15715
  var PRESET_EXCLUDED_KEYS = /* @__PURE__ */ new Set([
15694
15716
  "label",
@@ -21667,6 +21689,7 @@ exports.PLATFORM_SPECS = PLATFORM_SPECS;
21667
21689
  exports.PRESET_APPLY_CLEAR_KEYS = PRESET_APPLY_CLEAR_KEYS;
21668
21690
  exports.PRESET_EXCLUDED_KEYS = PRESET_EXCLUDED_KEYS;
21669
21691
  exports.PRESET_LABELS = PRESET_LABELS;
21692
+ exports.PRESET_LEVER_GROUPS = PRESET_LEVER_GROUPS;
21670
21693
  exports.PRESET_SETTING_KEYS = PRESET_SETTING_KEYS;
21671
21694
  exports.PRICING_DEFAULT_DURATION_SEC = PRICING_DEFAULT_DURATION_SEC;
21672
21695
  exports.PRICING_DEFAULT_RESOLUTION = PRICING_DEFAULT_RESOLUTION;
@@ -22456,6 +22479,7 @@ exports.presentTypes = presentTypes;
22456
22479
  exports.presetApplyClearKeys = presetApplyClearKeys;
22457
22480
  exports.presetDataMatches = presetDataMatches;
22458
22481
  exports.presetEntries = presetEntries;
22482
+ exports.presetLeverClearKeys = presetLeverClearKeys;
22459
22483
  exports.previewHorizonMs = previewHorizonMs;
22460
22484
  exports.pricedOutputDurationSec = pricedOutputDurationSec;
22461
22485
  exports.pricedVideoSelection = pricedVideoSelection;