@arcanewizards/timecode-toolbox 0.1.1 → 0.1.3

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.
@@ -9873,9 +9873,6 @@ var useLongPressable2 = ({
9873
9873
  );
9874
9874
  };
9875
9875
 
9876
- // ../../packages/sigil/dist/chunk-H4U4Z4GM.js
9877
- var import_react11 = require("react");
9878
-
9879
9876
  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
9880
9877
  var external_exports = {};
9881
9878
  __export(external_exports, {
@@ -13920,7 +13917,7 @@ var NEVER = INVALID;
13920
13917
  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js
13921
13918
  var zod_default = external_exports;
13922
13919
 
13923
- // ../../packages/sigil/dist/chunk-H4U4Z4GM.js
13920
+ // ../../packages/sigil/dist/chunk-WYUGJOEB.js
13924
13921
  var SIGIL_COLOR = external_exports.enum([
13925
13922
  "purple",
13926
13923
  "blue",
@@ -13961,22 +13958,13 @@ var cssSigilColorUsageVariables = (prefix, usage) => cssVariables({
13961
13958
  [`--${prefix}-gradient-dark`]: usage.gradientDark
13962
13959
  });
13963
13960
  var cssHintColorVariables = (color) => cssSigilColorUsageVariables(`sigil-usage-hint`, sigilColorUsage(color));
13964
- var useRootHintVariables = (color) => {
13965
- (0, import_react11.useEffect)(() => {
13966
- const root = document.querySelector(".arcane-theme-root");
13967
- if (!root) return;
13968
- Object.entries(cssHintColorVariables(color)).forEach(([key, value]) => {
13969
- root.style.setProperty(key, value);
13970
- });
13971
- }, [color]);
13972
- };
13973
13961
  var cssVariables = (variables) => variables;
13974
13962
  function cnd(condition, truthyClassName, falseyClassName) {
13975
13963
  return condition ? truthyClassName : falseyClassName;
13976
13964
  }
13977
13965
 
13978
- // ../../packages/sigil/dist/chunk-HF7IIHPE.js
13979
- var import_react12 = require("react");
13966
+ // ../../packages/sigil/dist/chunk-E3VUC3Q4.js
13967
+ var import_react11 = require("react");
13980
13968
 
13981
13969
  // ../../node_modules/.pnpm/@arcanejs+toolkit-frontend@0.11.0/node_modules/@arcanejs/toolkit-frontend/dist/chunk-DK4BAXVE.mjs
13982
13970
  var import_jsx_runtime17 = require("react/jsx-runtime");
@@ -14014,16 +14002,16 @@ var TRANSPARENCY_SVG = `
14014
14002
  `;
14015
14003
  var TRANSPARENCY_SVG_URI = `data:image/svg+xml,${encodeURIComponent(TRANSPARENCY_SVG)}`;
14016
14004
 
14017
- // ../../packages/sigil/dist/chunk-HF7IIHPE.js
14018
- var import_react13 = require("react");
14005
+ // ../../packages/sigil/dist/chunk-E3VUC3Q4.js
14006
+ var import_react12 = require("react");
14019
14007
  var import_jsx_runtime18 = require("react/jsx-runtime");
14020
- var import_react14 = require("react");
14008
+ var import_react13 = require("react");
14021
14009
  var import_jsx_runtime19 = require("react/jsx-runtime");
14022
- var import_react15 = require("react");
14010
+ var import_react14 = require("react");
14023
14011
  var import_jsx_runtime20 = require("react/jsx-runtime");
14024
- var import_react16 = require("react");
14012
+ var import_react15 = require("react");
14025
14013
  var import_jsx_runtime21 = require("react/jsx-runtime");
14026
- var import_react17 = require("react");
14014
+ var import_react16 = require("react");
14027
14015
  var import_jsx_runtime22 = require("react/jsx-runtime");
14028
14016
  var import_jsx_runtime23 = require("react/jsx-runtime");
14029
14017
  var clsControlPosition = (position) => {
@@ -14097,7 +14085,7 @@ var clsControlButton = ({
14097
14085
  clsControlPosition(position),
14098
14086
  className
14099
14087
  );
14100
- var ControlButtonFrame = (0, import_react13.forwardRef)(
14088
+ var ControlButtonFrame = (0, import_react12.forwardRef)(
14101
14089
  ({
14102
14090
  children,
14103
14091
  className,
@@ -14145,7 +14133,7 @@ var ControlButtonFrame = (0, import_react13.forwardRef)(
14145
14133
  }
14146
14134
  );
14147
14135
  ControlButtonFrame.displayName = "ControlButtonFrame";
14148
- var ControlButton = (0, import_react13.forwardRef)(
14136
+ var ControlButton = (0, import_react12.forwardRef)(
14149
14137
  ({ onClick, disabled, ...props }, ref) => {
14150
14138
  const { handlers, touching } = usePressable2(onClick);
14151
14139
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -14161,12 +14149,12 @@ var ControlButton = (0, import_react13.forwardRef)(
14161
14149
  }
14162
14150
  );
14163
14151
  ControlButton.displayName = "ControlButton";
14164
- var CheckboxControlButton = (0, import_react13.forwardRef)(({ active, label, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ControlButton, { ...props, ref, active, children: [
14152
+ var CheckboxControlButton = (0, import_react12.forwardRef)(({ active, label, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(ControlButton, { ...props, ref, active, children: [
14165
14153
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon2, { icon: active ? "check_box" : "check_box_outline_blank" }),
14166
14154
  label
14167
14155
  ] }));
14168
14156
  CheckboxControlButton.displayName = "CheckboxControlButton";
14169
- var LongPressableControlButton = (0, import_react13.forwardRef)(({ active, disabled, onPress, onRelease, ...props }, ref) => {
14157
+ var LongPressableControlButton = (0, import_react12.forwardRef)(({ active, disabled, onPress, onRelease, ...props }, ref) => {
14170
14158
  const { handlers, touching } = useLongPressable2({ onPress, onRelease });
14171
14159
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14172
14160
  ControlButtonFrame,
@@ -14180,7 +14168,7 @@ var LongPressableControlButton = (0, import_react13.forwardRef)(({ active, disab
14180
14168
  );
14181
14169
  });
14182
14170
  LongPressableControlButton.displayName = "LongPressableControlButton";
14183
- var ControlButtonGroup = (0, import_react13.forwardRef)(({ children, className, position, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14171
+ var ControlButtonGroup = (0, import_react12.forwardRef)(({ children, className, position, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
14184
14172
  "div",
14185
14173
  {
14186
14174
  ...props,
@@ -14197,7 +14185,7 @@ var ControlButtonGroup = (0, import_react13.forwardRef)(({ children, className,
14197
14185
  }
14198
14186
  ));
14199
14187
  ControlButtonGroup.displayName = "ControlButtonGroup";
14200
- var ControlParagraph = (0, import_react14.forwardRef)(({ className, mode, position = "all", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14188
+ var ControlParagraph = (0, import_react13.forwardRef)(({ className, mode, position = "all", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14201
14189
  "p",
14202
14190
  {
14203
14191
  ...props,
@@ -14232,7 +14220,7 @@ var ControlParagraph = (0, import_react14.forwardRef)(({ className, mode, positi
14232
14220
  }
14233
14221
  ));
14234
14222
  ControlParagraph.displayName = "ControlParagraph";
14235
- var ControlLabel = (0, import_react14.forwardRef)(
14223
+ var ControlLabel = (0, import_react13.forwardRef)(
14236
14224
  ({ className, disabled, nonMicro, position = "label", subgrid, ...props }, ref) => {
14237
14225
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14238
14226
  "div",
@@ -14252,7 +14240,7 @@ var ControlLabel = (0, import_react14.forwardRef)(
14252
14240
  }
14253
14241
  );
14254
14242
  ControlLabel.displayName = "ControlLabel";
14255
- var ControlDetails = (0, import_react14.forwardRef)(
14243
+ var ControlDetails = (0, import_react13.forwardRef)(
14256
14244
  ({ align, className, position = "all", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14257
14245
  "div",
14258
14246
  {
@@ -14270,7 +14258,7 @@ var ControlDetails = (0, import_react14.forwardRef)(
14270
14258
  )
14271
14259
  );
14272
14260
  ControlDetails.displayName = "ControlDetails";
14273
- var InputSpanningTitle = (0, import_react14.forwardRef)(({ className, position = "row", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14261
+ var InputSpanningTitle = (0, import_react13.forwardRef)(({ className, position = "row", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14274
14262
  "div",
14275
14263
  {
14276
14264
  ...props,
@@ -14283,7 +14271,7 @@ var InputSpanningTitle = (0, import_react14.forwardRef)(({ className, position =
14283
14271
  }
14284
14272
  ));
14285
14273
  InputSpanningTitle.displayName = "InputSpanningTitle";
14286
- var ControlDialogButtons = (0, import_react15.forwardRef)(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14274
+ var ControlDialogButtons = (0, import_react14.forwardRef)(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14287
14275
  ControlButtonGroup,
14288
14276
  {
14289
14277
  ref,
@@ -14313,15 +14301,15 @@ var InputWithDelayedPropagation = ({
14313
14301
  inputRef: inputRefProp,
14314
14302
  ...props
14315
14303
  }) => {
14316
- const lastValue = (0, import_react16.useRef)(value);
14317
- const inputRef = (0, import_react16.useRef)(null);
14318
- (0, import_react16.useEffect)(() => {
14304
+ const lastValue = (0, import_react15.useRef)(value);
14305
+ const inputRef = (0, import_react15.useRef)(null);
14306
+ (0, import_react15.useEffect)(() => {
14319
14307
  if (inputRef.current && inputRef.current.value !== value) {
14320
14308
  inputRef.current.value = value;
14321
14309
  }
14322
14310
  lastValue.current = value;
14323
14311
  }, [value]);
14324
- const updateRef = (0, import_react16.useCallback)(
14312
+ const updateRef = (0, import_react15.useCallback)(
14325
14313
  (instance) => {
14326
14314
  inputRef.current = instance;
14327
14315
  if (inputRefProp) {
@@ -14331,7 +14319,7 @@ var InputWithDelayedPropagation = ({
14331
14319
  [inputRefProp]
14332
14320
  );
14333
14321
  const onBlurProp = props.onBlur;
14334
- const onBlur = (0, import_react16.useCallback)(
14322
+ const onBlur = (0, import_react15.useCallback)(
14335
14323
  (e) => {
14336
14324
  if (e.currentTarget.value !== lastValue.current) {
14337
14325
  onChange(e.currentTarget.value, false);
@@ -14341,7 +14329,7 @@ var InputWithDelayedPropagation = ({
14341
14329
  [onChange, onBlurProp]
14342
14330
  );
14343
14331
  const onKeyUpProp = props.onKeyUp;
14344
- const onKeyUp = (0, import_react16.useCallback)(
14332
+ const onKeyUp = (0, import_react15.useCallback)(
14345
14333
  (e) => {
14346
14334
  if ((e.key === "Enter" || e.key.startsWith("Arrow")) && e.currentTarget.value !== lastValue.current) {
14347
14335
  onChange(e.currentTarget.value, true);
@@ -14408,7 +14396,7 @@ var ControlSelect = ({
14408
14396
  triggerClassName: className
14409
14397
  }) => {
14410
14398
  const selectedOption = options.find((option2) => option2.value === value);
14411
- const onValueChange = (0, import_react17.useCallback)(
14399
+ const onValueChange = (0, import_react16.useCallback)(
14412
14400
  (val) => {
14413
14401
  const matchingOption = options.find(
14414
14402
  (option2) => (option2.value ?? NULL_VALUE) === val
@@ -14563,7 +14551,7 @@ var ControlColorSelect = ({
14563
14551
  );
14564
14552
  };
14565
14553
  var isDarkDialog = (variant) => variant === "dark" || variant === "dark-compact";
14566
- var DialogContext = (0, import_react12.createContext)({
14554
+ var DialogContext = (0, import_react11.createContext)({
14567
14555
  createDialog: () => {
14568
14556
  throw new Error("DialogContext not provided");
14569
14557
  },
@@ -14574,7 +14562,7 @@ var DialogContext = (0, import_react12.createContext)({
14574
14562
  throw new Error("DialogContext not provided");
14575
14563
  }
14576
14564
  });
14577
- var DialogTitle = (0, import_react12.forwardRef)(
14565
+ var DialogTitle = (0, import_react11.forwardRef)(
14578
14566
  ({ className, variant = "light", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
14579
14567
  "div",
14580
14568
  {
@@ -14592,7 +14580,7 @@ var DialogTitle = (0, import_react12.forwardRef)(
14592
14580
  )
14593
14581
  );
14594
14582
  DialogTitle.displayName = "DialogTitle";
14595
- var DialogButtons = (0, import_react12.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
14583
+ var DialogButtons = (0, import_react11.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
14596
14584
  "div",
14597
14585
  {
14598
14586
  ...props,
@@ -14608,8 +14596,8 @@ var Dialog = ({
14608
14596
  title,
14609
14597
  variant = "light"
14610
14598
  }) => {
14611
- const [dialogRef, setDialogRef] = (0, import_react12.useState)(null);
14612
- (0, import_react12.useEffect)(() => {
14599
+ const [dialogRef, setDialogRef] = (0, import_react11.useState)(null);
14600
+ (0, import_react11.useEffect)(() => {
14613
14601
  if (!dialogRef) return;
14614
14602
  dialogRef.showModal();
14615
14603
  }, [dialogRef]);
@@ -14668,27 +14656,27 @@ var Dialog = ({
14668
14656
  var isCoreComponent = (component) => component.namespace === "core";
14669
14657
 
14670
14658
  // ../../node_modules/.pnpm/@arcanejs+toolkit-frontend@0.11.0/node_modules/@arcanejs/toolkit-frontend/dist/components/index.mjs
14671
- var import_react18 = __toESM(require("react"), 1);
14672
- var import_react19 = require("react");
14659
+ var import_react17 = __toESM(require("react"), 1);
14660
+ var import_react18 = require("react");
14673
14661
  var import_jsx_runtime24 = require("react/jsx-runtime");
14662
+ var import_react19 = __toESM(require("react"), 1);
14674
14663
  var import_react20 = __toESM(require("react"), 1);
14675
- var import_react21 = __toESM(require("react"), 1);
14676
14664
  var import_jsx_runtime25 = require("react/jsx-runtime");
14677
14665
  var import_jsx_runtime26 = require("react/jsx-runtime");
14678
14666
  var import_jsx_runtime27 = require("react/jsx-runtime");
14679
14667
  var import_jsx_runtime28 = require("react/jsx-runtime");
14680
- var import_react22 = __toESM(require("react"), 1);
14668
+ var import_react21 = __toESM(require("react"), 1);
14681
14669
  var import_jsx_runtime29 = require("react/jsx-runtime");
14682
- var import_react23 = __toESM(require("react"), 1);
14670
+ var import_react22 = __toESM(require("react"), 1);
14683
14671
  var import_jsx_runtime30 = require("react/jsx-runtime");
14684
- var import_react24 = __toESM(require("react"), 1);
14672
+ var import_react23 = __toESM(require("react"), 1);
14685
14673
  var import_jsx_runtime31 = require("react/jsx-runtime");
14686
- var import_react25 = __toESM(require("react"), 1);
14674
+ var import_react24 = __toESM(require("react"), 1);
14687
14675
  var import_jsx_runtime32 = require("react/jsx-runtime");
14688
- var import_react26 = __toESM(require("react"), 1);
14676
+ var import_react25 = __toESM(require("react"), 1);
14689
14677
  var import_jsx_runtime33 = require("react/jsx-runtime");
14690
14678
  var import_jsx_runtime34 = require("react/jsx-runtime");
14691
- var StageContext = (0, import_react19.createContext)(
14679
+ var StageContext = (0, import_react18.createContext)(
14692
14680
  new Proxy({}, {
14693
14681
  get: () => {
14694
14682
  throw new Error("Missing StageContext.Provider");
@@ -14696,8 +14684,8 @@ var StageContext = (0, import_react19.createContext)(
14696
14684
  })
14697
14685
  );
14698
14686
  var Button = (props) => {
14699
- const { call } = import_react18.default.useContext(StageContext);
14700
- const [localState, setLocalState] = import_react18.default.useState(null);
14687
+ const { call } = import_react17.default.useContext(StageContext);
14688
+ const [localState, setLocalState] = import_react17.default.useState(null);
14701
14689
  const state = localState ?? props.info.state;
14702
14690
  const { touching, handlers } = usePressable(async () => {
14703
14691
  try {
@@ -14768,9 +14756,9 @@ function nextColor(currentColor) {
14768
14756
  return "dark";
14769
14757
  }
14770
14758
  }
14771
- var LastNestedColor = import_react21.default.createContext("dark");
14759
+ var LastNestedColor = import_react20.default.createContext("dark");
14772
14760
  var NestedContent = ({ className, children }) => {
14773
- const color = import_react21.default.useContext(LastNestedColor);
14761
+ const color = import_react20.default.useContext(LastNestedColor);
14774
14762
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
14775
14763
  "div",
14776
14764
  {
@@ -14786,7 +14774,7 @@ var NestedContent = ({ className, children }) => {
14786
14774
  );
14787
14775
  };
14788
14776
  NestedContent.displayName = "NestedContent";
14789
- var GroupStateContext = import_react20.default.createContext({
14777
+ var GroupStateContext = import_react19.default.createContext({
14790
14778
  isCollapsed: () => {
14791
14779
  throw new Error("missing GroupStateContext");
14792
14780
  },
@@ -14795,9 +14783,9 @@ var GroupStateContext = import_react20.default.createContext({
14795
14783
  }
14796
14784
  });
14797
14785
  var Group2 = ({ className, info }) => {
14798
- const groupState = (0, import_react20.useContext)(GroupStateContext);
14799
- const { renderComponent, sendMessage } = (0, import_react20.useContext)(StageContext);
14800
- const [editingTitle, setEditingTitle] = (0, import_react20.useState)(false);
14786
+ const groupState = (0, import_react19.useContext)(GroupStateContext);
14787
+ const { renderComponent, sendMessage } = (0, import_react19.useContext)(StageContext);
14788
+ const [editingTitle, setEditingTitle] = (0, import_react19.useState)(false);
14801
14789
  const children = /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
14802
14790
  "div",
14803
14791
  {
@@ -14988,16 +14976,16 @@ var getRelativeCursorPosition = (elem, pageX) => {
14988
14976
  return pageX - rect.left;
14989
14977
  };
14990
14978
  var SliderButton = ({ info, className }) => {
14991
- const { sendMessage } = import_react22.default.useContext(StageContext);
14992
- const [state, setState] = import_react22.default.useState({ state: "closed" });
14993
- const input = import_react22.default.useRef(null);
14979
+ const { sendMessage } = import_react21.default.useContext(StageContext);
14980
+ const [state, setState] = import_react21.default.useState({ state: "closed" });
14981
+ const input = import_react21.default.useRef(null);
14994
14982
  const displayValue = (value2) => {
14995
14983
  if (info.max === 1 && info.min === 0) {
14996
14984
  return `${Math.round(value2 * 100)}%`;
14997
14985
  }
14998
14986
  return NUMBER_FORMATTER.format(value2);
14999
14987
  };
15000
- const sendValue = (0, import_react22.useCallback)(
14988
+ const sendValue = (0, import_react21.useCallback)(
15001
14989
  (value2) => sendMessage?.({
15002
14990
  type: "component-message",
15003
14991
  namespace: "core",
@@ -15007,7 +14995,7 @@ var SliderButton = ({ info, className }) => {
15007
14995
  }),
15008
14996
  [sendMessage, info.key]
15009
14997
  );
15010
- const sanitizeValue = (0, import_react22.useCallback)(
14998
+ const sanitizeValue = (0, import_react21.useCallback)(
15011
14999
  (value2) => {
15012
15000
  const i = Math.round((value2 - info.min) / info.step);
15013
15001
  const v = i * info.step + info.min;
@@ -15015,13 +15003,13 @@ var SliderButton = ({ info, className }) => {
15015
15003
  },
15016
15004
  [info.min, info.max, info.step]
15017
15005
  );
15018
- const getNewValue = (0, import_react22.useCallback)(
15006
+ const getNewValue = (0, import_react21.useCallback)(
15019
15007
  (startValue, diff) => {
15020
15008
  return sanitizeValue((startValue || 0) + diff);
15021
15009
  },
15022
15010
  [sanitizeValue]
15023
15011
  );
15024
- const getCurrentInputValue = (0, import_react22.useCallback)(
15012
+ const getCurrentInputValue = (0, import_react21.useCallback)(
15025
15013
  (e) => {
15026
15014
  const float = parseFloat(e.currentTarget.value);
15027
15015
  return sanitizeValue(isNaN(float) ? info.value || 0 : float);
@@ -15209,9 +15197,9 @@ var SliderButton = ({ info, className }) => {
15209
15197
  );
15210
15198
  };
15211
15199
  var Switch = ({ className, info }) => {
15212
- const { sendMessage } = import_react23.default.useContext(StageContext);
15213
- const [touching, setTouching] = (0, import_react23.useState)(false);
15214
- const onClick = (0, import_react23.useMemo)(
15200
+ const { sendMessage } = import_react22.default.useContext(StageContext);
15201
+ const [touching, setTouching] = (0, import_react22.useState)(false);
15202
+ const onClick = (0, import_react22.useMemo)(
15215
15203
  () => () => {
15216
15204
  sendMessage?.({
15217
15205
  type: "component-message",
@@ -15222,14 +15210,14 @@ var Switch = ({ className, info }) => {
15222
15210
  },
15223
15211
  [sendMessage, info.key]
15224
15212
  );
15225
- const onTouchStart = (0, import_react23.useMemo)(
15213
+ const onTouchStart = (0, import_react22.useMemo)(
15226
15214
  () => (event) => {
15227
15215
  event.preventDefault();
15228
15216
  setTouching(true);
15229
15217
  },
15230
15218
  []
15231
15219
  );
15232
- const onTouchEnd = (0, import_react23.useMemo)(
15220
+ const onTouchEnd = (0, import_react22.useMemo)(
15233
15221
  () => (event) => {
15234
15222
  event.preventDefault();
15235
15223
  setTouching(false);
@@ -15327,9 +15315,9 @@ var Switch = ({ className, info }) => {
15327
15315
  );
15328
15316
  };
15329
15317
  var Tabs = (props) => {
15330
- const { renderComponent } = import_react24.default.useContext(StageContext);
15331
- const [touching, setTouching] = import_react24.default.useState(null);
15332
- const [currentTab, setCurrentTab] = import_react24.default.useState(0);
15318
+ const { renderComponent } = import_react23.default.useContext(StageContext);
15319
+ const [touching, setTouching] = import_react23.default.useState(null);
15320
+ const [currentTab, setCurrentTab] = import_react23.default.useState(0);
15333
15321
  const tab = props.info.tabs[currentTab];
15334
15322
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
15335
15323
  "div",
@@ -15380,9 +15368,9 @@ var Tabs = (props) => {
15380
15368
  );
15381
15369
  };
15382
15370
  var TextInput = ({ className, info }) => {
15383
- const { sendMessage } = import_react25.default.useContext(StageContext);
15384
- const ref = import_react25.default.useRef(null);
15385
- (0, import_react25.useEffect)(() => {
15371
+ const { sendMessage } = import_react24.default.useContext(StageContext);
15372
+ const ref = import_react24.default.useRef(null);
15373
+ (0, import_react24.useEffect)(() => {
15386
15374
  if (ref.current && ref.current.value !== info.value) {
15387
15375
  ref.current.value = info.value;
15388
15376
  }
@@ -15412,13 +15400,13 @@ var TextInput = ({ className, info }) => {
15412
15400
  };
15413
15401
  var Timeline = (props) => {
15414
15402
  const { className, info } = props;
15415
- const { timeDifferenceMs } = (0, import_react26.useContext)(StageContext);
15416
- const frameState = import_react26.default.useRef({
15403
+ const { timeDifferenceMs } = (0, import_react25.useContext)(StageContext);
15404
+ const frameState = import_react25.default.useRef({
15417
15405
  animationFrame: -1,
15418
15406
  state: null
15419
15407
  });
15420
- const [currentTimeMillis, setCurrentTimeMillis] = (0, import_react26.useState)(0);
15421
- (0, import_react26.useEffect)(() => {
15408
+ const [currentTimeMillis, setCurrentTimeMillis] = (0, import_react25.useState)(0);
15409
+ (0, import_react25.useEffect)(() => {
15422
15410
  frameState.current.state = info.state;
15423
15411
  const recalculateCurrentTimeMillis = () => {
15424
15412
  if (frameState.current.state !== info.state) {
@@ -15515,11 +15503,11 @@ var CORE_FRONTEND_COMPONENT_RENDERER = {
15515
15503
  };
15516
15504
 
15517
15505
  // ../../packages/sigil/dist/frontend.js
15506
+ var import_react26 = require("react");
15518
15507
  var import_react27 = require("react");
15519
- var import_react28 = require("react");
15520
15508
  var import_jsx_runtime35 = require("react/jsx-runtime");
15521
15509
  var import_jsx_runtime36 = require("react/jsx-runtime");
15522
- var import_react29 = require("react");
15510
+ var import_react28 = require("react");
15523
15511
  var import_jsx_runtime37 = require("react/jsx-runtime");
15524
15512
  var import_frontend = require("@arcanejs/toolkit/frontend");
15525
15513
  var import_jsx_runtime38 = require("react/jsx-runtime");
@@ -15611,7 +15599,7 @@ var createDefaultBrowserContext = (browser) => {
15611
15599
  ...browser
15612
15600
  };
15613
15601
  };
15614
- var BrowserContext = (0, import_react28.createContext)(
15602
+ var BrowserContext = (0, import_react27.createContext)(
15615
15603
  new Proxy({}, {
15616
15604
  get: () => {
15617
15605
  throw new Error("BrowserContext not provided.");
@@ -15624,16 +15612,16 @@ var BrowserContextProvider = ({
15624
15612
  }) => {
15625
15613
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BrowserContext.Provider, { value: browser, children });
15626
15614
  };
15627
- var useBrowserContext = () => (0, import_react28.useContext)(BrowserContext);
15615
+ var useBrowserContext = () => (0, import_react27.useContext)(BrowserContext);
15628
15616
  var AppRoot = ({
15629
15617
  info,
15630
15618
  browser
15631
15619
  }) => {
15632
15620
  const { child, lastLog } = info;
15633
- const { renderComponent, call } = (0, import_react27.useContext)(StageContext);
15634
- const [logs, setLogs] = (0, import_react27.useState)({ lastLog: -1, logs: [] });
15635
- const [debugMode, setDebugMode] = (0, import_react27.useState)(false);
15636
- (0, import_react27.useEffect)(() => {
15621
+ const { renderComponent, call } = (0, import_react26.useContext)(StageContext);
15622
+ const [logs, setLogs] = (0, import_react26.useState)({ lastLog: -1, logs: [] });
15623
+ const [debugMode, setDebugMode] = (0, import_react26.useState)(false);
15624
+ (0, import_react26.useEffect)(() => {
15637
15625
  if (!debugMode || !call) return;
15638
15626
  const lastLogId = logs.logs[logs.logs.length - 1]?.index ?? -1;
15639
15627
  call({
@@ -15650,7 +15638,7 @@ var AppRoot = ({
15650
15638
  });
15651
15639
  });
15652
15640
  }, [call, debugMode, info.key, lastLog, logs]);
15653
- const debuggerContext = (0, import_react27.useMemo)(
15641
+ const debuggerContext = (0, import_react26.useMemo)(
15654
15642
  () => ({
15655
15643
  logs: logs.logs,
15656
15644
  setDebugMode
@@ -15675,12 +15663,12 @@ Caused by: ${unwrapErrorStack(error.cause)}`;
15675
15663
  return stack;
15676
15664
  };
15677
15665
  var Debugger = ({ title, className }) => {
15678
- const scrollRef = (0, import_react29.useRef)(null);
15679
- const shouldScrollToBottom = (0, import_react29.useRef)(true);
15666
+ const scrollRef = (0, import_react28.useRef)(null);
15667
+ const shouldScrollToBottom = (0, import_react28.useRef)(true);
15680
15668
  const { openDevTools } = useBrowserContext();
15681
15669
  const { setDebugMode, logs } = useDebuggerContext();
15682
15670
  const system = useSystemInformation();
15683
- (0, import_react29.useEffect)(() => {
15671
+ (0, import_react28.useEffect)(() => {
15684
15672
  setDebugMode(true);
15685
15673
  return () => {
15686
15674
  setDebugMode(false);
@@ -15691,19 +15679,19 @@ var Debugger = ({ title, className }) => {
15691
15679
  const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;
15692
15680
  shouldScrollToBottom.current = scrollTop + clientHeight >= scrollHeight - 10;
15693
15681
  };
15694
- const scrollToBottomIfRequired = (0, import_react29.useCallback)(() => {
15682
+ const scrollToBottomIfRequired = (0, import_react28.useCallback)(() => {
15695
15683
  if (shouldScrollToBottom.current && scrollRef.current) {
15696
15684
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
15697
15685
  }
15698
15686
  }, []);
15699
- (0, import_react29.useEffect)(scrollToBottomIfRequired, [logs, scrollToBottomIfRequired]);
15700
- (0, import_react29.useEffect)(() => {
15687
+ (0, import_react28.useEffect)(scrollToBottomIfRequired, [logs, scrollToBottomIfRequired]);
15688
+ (0, import_react28.useEffect)(() => {
15701
15689
  window.addEventListener("resize", scrollToBottomIfRequired);
15702
15690
  return () => {
15703
15691
  window.removeEventListener("resize", scrollToBottomIfRequired);
15704
15692
  };
15705
15693
  }, [scrollToBottomIfRequired]);
15706
- const exportLogs = (0, import_react29.useCallback)(() => {
15694
+ const exportLogs = (0, import_react28.useCallback)(() => {
15707
15695
  const logText = JSON.stringify({ system, logs }, null, 2);
15708
15696
  const blob = new Blob([logText], { type: "application/json" });
15709
15697
  const url = URL.createObjectURL(blob);
@@ -15713,7 +15701,7 @@ var Debugger = ({ title, className }) => {
15713
15701
  link.click();
15714
15702
  URL.revokeObjectURL(url);
15715
15703
  }, [system, logs]);
15716
- const handleRequestScrollToBottom = (0, import_react29.useCallback)(() => {
15704
+ const handleRequestScrollToBottom = (0, import_react28.useCallback)(() => {
15717
15705
  shouldScrollToBottom.current = true;
15718
15706
  scrollToBottomIfRequired();
15719
15707
  }, [scrollToBottomIfRequired]);
@@ -16011,7 +15999,7 @@ var STRINGS = {
16011
15999
  };
16012
16000
 
16013
16001
  // src/components/frontend/toolbox/outputs.tsx
16014
- var import_react33 = require("react");
16002
+ var import_react32 = require("react");
16015
16003
 
16016
16004
  // src/components/frontend/toolbox/util.tsx
16017
16005
  var import_jsx_runtime39 = require("react/jsx-runtime");
@@ -16050,31 +16038,31 @@ function displayMillis(totalMilliseconds) {
16050
16038
  }
16051
16039
 
16052
16040
  // src/components/frontend/toolbox/context.tsx
16053
- var import_react30 = require("react");
16054
- var ConfigContext = (0, import_react30.createContext)(
16041
+ var import_react29 = require("react");
16042
+ var ConfigContext = (0, import_react29.createContext)(
16055
16043
  new Proxy({}, {
16056
16044
  get() {
16057
16045
  throw new Error("ConfigContext not initialized");
16058
16046
  }
16059
16047
  })
16060
16048
  );
16061
- var ApplicationStateContext = (0, import_react30.createContext)(
16049
+ var ApplicationStateContext = (0, import_react29.createContext)(
16062
16050
  new Proxy({}, {
16063
16051
  get() {
16064
16052
  throw new Error("ApplicationStateContext not initialized");
16065
16053
  }
16066
16054
  })
16067
16055
  );
16068
- var useApplicationState = () => (0, import_react30.useContext)(ApplicationStateContext);
16069
- var ApplicationHandlersContext = (0, import_react30.createContext)(
16056
+ var useApplicationState = () => (0, import_react29.useContext)(ApplicationStateContext);
16057
+ var ApplicationHandlersContext = (0, import_react29.createContext)(
16070
16058
  new Proxy({}, {
16071
16059
  get() {
16072
16060
  throw new Error("ApplicationHandlersContext not initialized");
16073
16061
  }
16074
16062
  })
16075
16063
  );
16076
- var useApplicationHandlers = () => (0, import_react30.useContext)(ApplicationHandlersContext);
16077
- var NetworkContext = (0, import_react30.createContext)(
16064
+ var useApplicationHandlers = () => (0, import_react29.useContext)(ApplicationHandlersContext);
16065
+ var NetworkContext = (0, import_react29.createContext)(
16078
16066
  new Proxy({}, {
16079
16067
  get() {
16080
16068
  throw new Error("NetworkContext not initialized");
@@ -16083,19 +16071,19 @@ var NetworkContext = (0, import_react30.createContext)(
16083
16071
  );
16084
16072
 
16085
16073
  // src/components/frontend/toolbox/core/timecode-display.tsx
16086
- var import_react32 = require("react");
16074
+ var import_react31 = require("react");
16087
16075
 
16088
16076
  // src/components/frontend/toolbox/core/size-aware-div.tsx
16089
- var import_react31 = require("react");
16077
+ var import_react30 = require("react");
16090
16078
  var import_jsx_runtime40 = require("react/jsx-runtime");
16091
16079
  var SizeAwareDiv = ({
16092
16080
  children,
16093
16081
  style,
16094
16082
  ...rest
16095
16083
  }) => {
16096
- const [div, setDiv] = (0, import_react31.useState)(null);
16097
- const [rect, setRect] = (0, import_react31.useState)(null);
16098
- (0, import_react31.useEffect)(() => {
16084
+ const [div, setDiv] = (0, import_react30.useState)(null);
16085
+ const [rect, setRect] = (0, import_react30.useState)(null);
16086
+ (0, import_react30.useEffect)(() => {
16099
16087
  if (!div) {
16100
16088
  return;
16101
16089
  }
@@ -16236,9 +16224,9 @@ var ActiveTimecodeText = ({
16236
16224
  effectiveStartTimeMillis,
16237
16225
  speed
16238
16226
  }) => {
16239
- const [millis, setMillis] = (0, import_react32.useState)(0);
16240
- const { timeDifferenceMs } = (0, import_react32.useContext)(StageContext);
16241
- (0, import_react32.useEffect)(() => {
16227
+ const [millis, setMillis] = (0, import_react31.useState)(0);
16228
+ const { timeDifferenceMs } = (0, import_react31.useContext)(StageContext);
16229
+ (0, import_react31.useEffect)(() => {
16242
16230
  let animationFrame = null;
16243
16231
  const updateMillis = () => {
16244
16232
  const newMillis = (Date.now() - (timeDifferenceMs ?? 0) - effectiveStartTimeMillis) * speed;
@@ -16255,9 +16243,9 @@ var ActiveTimecodeText = ({
16255
16243
  return displayMillis(millis);
16256
16244
  };
16257
16245
  var Timeline2 = ({ state, totalTime }) => {
16258
- const [millis, setMillis] = (0, import_react32.useState)(0);
16259
- const { timeDifferenceMs } = (0, import_react32.useContext)(StageContext);
16260
- (0, import_react32.useEffect)(() => {
16246
+ const [millis, setMillis] = (0, import_react31.useState)(0);
16247
+ const { timeDifferenceMs } = (0, import_react31.useContext)(StageContext);
16248
+ (0, import_react31.useEffect)(() => {
16261
16249
  if (state.state === "none") {
16262
16250
  setMillis(0);
16263
16251
  return;
@@ -16297,32 +16285,32 @@ var TimecodeDisplay = ({
16297
16285
  }) => {
16298
16286
  const { handlers, callHandler } = useApplicationHandlers();
16299
16287
  const hooks = id && getTreeValue(handlers, id);
16300
- const play = (0, import_react32.useCallback)(() => {
16288
+ const play = (0, import_react31.useCallback)(() => {
16301
16289
  if (id) {
16302
16290
  callHandler({ handler: "play", path: id, args: [] });
16303
16291
  }
16304
16292
  }, [callHandler, id]);
16305
- const pause = (0, import_react32.useCallback)(() => {
16293
+ const pause = (0, import_react31.useCallback)(() => {
16306
16294
  if (id) {
16307
16295
  callHandler({ handler: "pause", path: id, args: [] });
16308
16296
  }
16309
16297
  }, [callHandler, id]);
16310
- const back5seconds = (0, import_react32.useCallback)(() => {
16298
+ const back5seconds = (0, import_react31.useCallback)(() => {
16311
16299
  if (id) {
16312
16300
  callHandler({ handler: "seekRelative", path: id, args: [-5e3] });
16313
16301
  }
16314
16302
  }, [callHandler, id]);
16315
- const forward5seconds = (0, import_react32.useCallback)(() => {
16303
+ const forward5seconds = (0, import_react31.useCallback)(() => {
16316
16304
  if (id) {
16317
16305
  callHandler({ handler: "seekRelative", path: id, args: [5e3] });
16318
16306
  }
16319
16307
  }, [callHandler, id]);
16320
- const beginning = (0, import_react32.useCallback)(() => {
16308
+ const beginning = (0, import_react31.useCallback)(() => {
16321
16309
  if (id) {
16322
16310
  callHandler({ handler: "beginning", path: id, args: [] });
16323
16311
  }
16324
16312
  }, [callHandler, id]);
16325
- const toggle = (0, import_react32.useCallback)(() => {
16313
+ const toggle = (0, import_react31.useCallback)(() => {
16326
16314
  if (hooks?.play && hooks?.pause) {
16327
16315
  if (state.state === "none" || state.state === "stopped") {
16328
16316
  play();
@@ -16482,7 +16470,7 @@ var TimecodeTreeDisplay = ({
16482
16470
  assignToOutput
16483
16471
  }) => {
16484
16472
  const { openNewWidow } = useBrowserContext();
16485
- const openInNewWindow = (0, import_react32.useCallback)(() => {
16473
+ const openInNewWindow = (0, import_react31.useCallback)(() => {
16486
16474
  if (id) {
16487
16475
  openNewWidow(withUrlFragment({ values: { tc: id } }).href, {
16488
16476
  canUseExisting: false,
@@ -16570,9 +16558,9 @@ var TimecodeTreeDisplay = ({
16570
16558
  var FullscreenTimecodeDisplay = ({
16571
16559
  id
16572
16560
  }) => {
16573
- const { config } = (0, import_react32.useContext)(ConfigContext);
16574
- const applicationState = (0, import_react32.useContext)(ApplicationStateContext);
16575
- const timecode = (0, import_react32.useMemo)(() => {
16561
+ const { config } = (0, import_react31.useContext)(ConfigContext);
16562
+ const applicationState = (0, import_react31.useContext)(ApplicationStateContext);
16563
+ const timecode = (0, import_react31.useMemo)(() => {
16576
16564
  if (isInputInstanceId(id) || isGeneratorInstanceId(id)) {
16577
16565
  return getTimecodeInstance(applicationState, id);
16578
16566
  } else {
@@ -16586,7 +16574,7 @@ var FullscreenTimecodeDisplay = ({
16586
16574
  );
16587
16575
  }
16588
16576
  }, [applicationState, id, config.outputs]);
16589
- const instanceConfig = (0, import_react32.useMemo)(() => {
16577
+ const instanceConfig = (0, import_react31.useMemo)(() => {
16590
16578
  if (isInputInstanceId(id)) {
16591
16579
  const c = config.inputs[id[1]];
16592
16580
  if (!c) {
@@ -16760,14 +16748,14 @@ var DmxConnectionSettings = ({
16760
16748
  data,
16761
16749
  updateSettings
16762
16750
  }) => {
16763
- const { commitChanges } = (0, import_react33.useContext)(ChangeCommitContext);
16764
- const { getNetworkInterfaces } = (0, import_react33.useContext)(NetworkContext);
16765
- const [interfaces, setInterfaces] = (0, import_react33.useState)(null);
16766
- const refreshInterfaces = (0, import_react33.useCallback)(() => {
16751
+ const { commitChanges } = (0, import_react32.useContext)(ChangeCommitContext);
16752
+ const { getNetworkInterfaces } = (0, import_react32.useContext)(NetworkContext);
16753
+ const [interfaces, setInterfaces] = (0, import_react32.useState)(null);
16754
+ const refreshInterfaces = (0, import_react32.useCallback)(() => {
16767
16755
  setInterfaces(null);
16768
16756
  getNetworkInterfaces().then((ifs) => setInterfaces(ifs));
16769
16757
  }, [getNetworkInterfaces]);
16770
- (0, import_react33.useEffect)(() => {
16758
+ (0, import_react32.useEffect)(() => {
16771
16759
  refreshInterfaces();
16772
16760
  }, [refreshInterfaces]);
16773
16761
  if (data.type !== "artnet") {
@@ -16909,8 +16897,8 @@ var OutputSettingsDialog = ({
16909
16897
  output,
16910
16898
  close
16911
16899
  }) => {
16912
- const { config, updateConfig } = (0, import_react33.useContext)(ConfigContext);
16913
- const [newData, setNewData] = (0, import_react33.useState)({
16900
+ const { config, updateConfig } = (0, import_react32.useContext)(ConfigContext);
16901
+ const [newData, setNewData] = (0, import_react32.useState)({
16914
16902
  name: "",
16915
16903
  enabled: true,
16916
16904
  definition: {
@@ -16923,7 +16911,7 @@ var OutputSettingsDialog = ({
16923
16911
  },
16924
16912
  link: null
16925
16913
  });
16926
- const updateSettings = (0, import_react33.useCallback)(
16914
+ const updateSettings = (0, import_react32.useCallback)(
16927
16915
  (change) => {
16928
16916
  if (target.type === "add") {
16929
16917
  setNewData(change);
@@ -16945,7 +16933,7 @@ var OutputSettingsDialog = ({
16945
16933
  },
16946
16934
  [target, updateConfig]
16947
16935
  );
16948
- const updateDefinition = (0, import_react33.useCallback)(
16936
+ const updateDefinition = (0, import_react32.useCallback)(
16949
16937
  (change) => {
16950
16938
  updateSettings((current) => ({
16951
16939
  ...current,
@@ -16954,7 +16942,7 @@ var OutputSettingsDialog = ({
16954
16942
  },
16955
16943
  [updateSettings]
16956
16944
  );
16957
- const addOutput = (0, import_react33.useCallback)(() => {
16945
+ const addOutput = (0, import_react32.useCallback)(() => {
16958
16946
  updateConfig((current) => {
16959
16947
  return {
16960
16948
  ...current,
@@ -16968,7 +16956,7 @@ var OutputSettingsDialog = ({
16968
16956
  }, [newData, close, updateConfig]);
16969
16957
  const resolvedTarget = target.type === "add" ? "add" : config.outputs?.[target.uuid];
16970
16958
  const data = resolvedTarget === "add" ? newData : resolvedTarget;
16971
- const commitChanges = (0, import_react33.useCallback)(() => {
16959
+ const commitChanges = (0, import_react32.useCallback)(() => {
16972
16960
  if (target.type === "add") {
16973
16961
  addOutput();
16974
16962
  } else {
@@ -17069,8 +17057,8 @@ var OutputDisplay = ({
17069
17057
  setAssignToOutput
17070
17058
  }) => {
17071
17059
  const applicationState = useApplicationState();
17072
- const { updateConfig } = (0, import_react33.useContext)(ConfigContext);
17073
- const clearLink = (0, import_react33.useCallback)(() => {
17060
+ const { updateConfig } = (0, import_react32.useContext)(ConfigContext);
17061
+ const clearLink = (0, import_react32.useCallback)(() => {
17074
17062
  updateConfig((current) => {
17075
17063
  const currentOutput = current.outputs?.[uuid];
17076
17064
  if (!currentOutput) {
@@ -17089,15 +17077,15 @@ var OutputDisplay = ({
17089
17077
  });
17090
17078
  setAssignToOutput(null);
17091
17079
  }, [updateConfig, uuid, setAssignToOutput]);
17092
- const linkCallback = (0, import_react33.useCallback)(
17080
+ const linkCallback = (0, import_react32.useCallback)(
17093
17081
  () => setAssignToOutput((current) => current === uuid ? null : uuid),
17094
17082
  [uuid, setAssignToOutput]
17095
17083
  );
17096
- const timecode = (0, import_react33.useMemo)(() => {
17084
+ const timecode = (0, import_react32.useMemo)(() => {
17097
17085
  const tc = config.link && getTimecodeInstance(applicationState, config.link);
17098
17086
  return augmentUpstreamTimecodeWithOutputMetadata(tc, config);
17099
17087
  }, [applicationState, config]);
17100
- const toggleEnabled = (0, import_react33.useCallback)(() => {
17088
+ const toggleEnabled = (0, import_react32.useCallback)(() => {
17101
17089
  updateConfig((current) => {
17102
17090
  const existing = current.outputs?.[uuid];
17103
17091
  if (!existing) {
@@ -17189,7 +17177,7 @@ var OutputsSection = ({
17189
17177
  assignToOutput,
17190
17178
  setAssignToOutput
17191
17179
  }) => {
17192
- const { config } = (0, import_react33.useContext)(ConfigContext);
17180
+ const { config } = (0, import_react32.useContext)(ConfigContext);
17193
17181
  return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
17194
17182
  PrimaryToolboxSection,
17195
17183
  {
@@ -17229,13 +17217,13 @@ var OutputsSection = ({
17229
17217
  };
17230
17218
 
17231
17219
  // src/components/frontend/toolbox/generators.tsx
17232
- var import_react34 = require("react");
17220
+ var import_react33 = require("react");
17233
17221
  var import_jsx_runtime44 = require("react/jsx-runtime");
17234
17222
  var ClockSpecificSettings = ({
17235
17223
  data,
17236
17224
  updateSettings
17237
17225
  }) => {
17238
- const { commitChanges } = (0, import_react34.useContext)(ChangeCommitContext);
17226
+ const { commitChanges } = (0, import_react33.useContext)(ChangeCommitContext);
17239
17227
  if (data.type !== "clock") {
17240
17228
  return null;
17241
17229
  }
@@ -17270,15 +17258,15 @@ var GeneratorSettingsDialog = ({
17270
17258
  generator,
17271
17259
  close
17272
17260
  }) => {
17273
- const { config, updateConfig } = (0, import_react34.useContext)(ConfigContext);
17274
- const [newData, setNewData] = (0, import_react34.useState)({
17261
+ const { config, updateConfig } = (0, import_react33.useContext)(ConfigContext);
17262
+ const [newData, setNewData] = (0, import_react33.useState)({
17275
17263
  name: "",
17276
17264
  definition: {
17277
17265
  type: generator,
17278
17266
  speed: 1
17279
17267
  }
17280
17268
  });
17281
- const updateSettings = (0, import_react34.useCallback)(
17269
+ const updateSettings = (0, import_react33.useCallback)(
17282
17270
  (change) => {
17283
17271
  if (target.type === "add") {
17284
17272
  setNewData(change);
@@ -17300,7 +17288,7 @@ var GeneratorSettingsDialog = ({
17300
17288
  },
17301
17289
  [target, updateConfig]
17302
17290
  );
17303
- const updateDefinition = (0, import_react34.useCallback)(
17291
+ const updateDefinition = (0, import_react33.useCallback)(
17304
17292
  (change) => {
17305
17293
  updateSettings((current) => ({
17306
17294
  ...current,
@@ -17309,7 +17297,7 @@ var GeneratorSettingsDialog = ({
17309
17297
  },
17310
17298
  [updateSettings]
17311
17299
  );
17312
- const addGenerator = (0, import_react34.useCallback)(() => {
17300
+ const addGenerator = (0, import_react33.useCallback)(() => {
17313
17301
  updateConfig((current) => {
17314
17302
  return {
17315
17303
  ...current,
@@ -17323,7 +17311,7 @@ var GeneratorSettingsDialog = ({
17323
17311
  }, [newData, close, updateConfig]);
17324
17312
  const resolvedTarget = target.type === "add" ? "add" : config.generators?.[target.uuid];
17325
17313
  const data = resolvedTarget === "add" ? newData : resolvedTarget;
17326
- const commitChanges = (0, import_react34.useCallback)(() => {
17314
+ const commitChanges = (0, import_react33.useCallback)(() => {
17327
17315
  if (target.type === "add") {
17328
17316
  addGenerator();
17329
17317
  } else {
@@ -17434,7 +17422,7 @@ var GeneratorsSection = ({
17434
17422
  setDialogMode,
17435
17423
  assignToOutput
17436
17424
  }) => {
17437
- const { config } = (0, import_react34.useContext)(ConfigContext);
17425
+ const { config } = (0, import_react33.useContext)(ConfigContext);
17438
17426
  return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
17439
17427
  PrimaryToolboxSection,
17440
17428
  {
@@ -17473,20 +17461,20 @@ var GeneratorsSection = ({
17473
17461
  };
17474
17462
 
17475
17463
  // src/components/frontend/toolbox/inputs.tsx
17476
- var import_react35 = require("react");
17464
+ var import_react34 = require("react");
17477
17465
  var import_jsx_runtime45 = require("react/jsx-runtime");
17478
17466
  var DmxConnectionSettings2 = ({
17479
17467
  data,
17480
17468
  updateSettings
17481
17469
  }) => {
17482
- const { commitChanges } = (0, import_react35.useContext)(ChangeCommitContext);
17483
- const { getNetworkInterfaces } = (0, import_react35.useContext)(NetworkContext);
17484
- const [interfaces, setInterfaces] = (0, import_react35.useState)(null);
17485
- const refreshInterfaces = (0, import_react35.useCallback)(() => {
17470
+ const { commitChanges } = (0, import_react34.useContext)(ChangeCommitContext);
17471
+ const { getNetworkInterfaces } = (0, import_react34.useContext)(NetworkContext);
17472
+ const [interfaces, setInterfaces] = (0, import_react34.useState)(null);
17473
+ const refreshInterfaces = (0, import_react34.useCallback)(() => {
17486
17474
  setInterfaces(null);
17487
17475
  getNetworkInterfaces().then((ifs) => setInterfaces(ifs));
17488
17476
  }, [getNetworkInterfaces]);
17489
- (0, import_react35.useEffect)(() => {
17477
+ (0, import_react34.useEffect)(() => {
17490
17478
  refreshInterfaces();
17491
17479
  }, [refreshInterfaces]);
17492
17480
  if (data.type !== "artnet") {
@@ -17553,13 +17541,13 @@ var TCNetConnectionSettings = ({
17553
17541
  data,
17554
17542
  updateSettings
17555
17543
  }) => {
17556
- const { getNetworkInterfaces } = (0, import_react35.useContext)(NetworkContext);
17557
- const [interfaces, setInterfaces] = (0, import_react35.useState)(null);
17558
- const refreshInterfaces = (0, import_react35.useCallback)(() => {
17544
+ const { getNetworkInterfaces } = (0, import_react34.useContext)(NetworkContext);
17545
+ const [interfaces, setInterfaces] = (0, import_react34.useState)(null);
17546
+ const refreshInterfaces = (0, import_react34.useCallback)(() => {
17559
17547
  setInterfaces(null);
17560
17548
  getNetworkInterfaces().then((ifs) => setInterfaces(ifs));
17561
17549
  }, [getNetworkInterfaces]);
17562
- (0, import_react35.useEffect)(() => {
17550
+ (0, import_react34.useEffect)(() => {
17563
17551
  refreshInterfaces();
17564
17552
  }, [refreshInterfaces]);
17565
17553
  if (data.type !== "tcnet") {
@@ -17604,8 +17592,8 @@ var InputSettingsDialog = ({
17604
17592
  input,
17605
17593
  close
17606
17594
  }) => {
17607
- const { config, updateConfig } = (0, import_react35.useContext)(ConfigContext);
17608
- const [newData, setNewData] = (0, import_react35.useState)({
17595
+ const { config, updateConfig } = (0, import_react34.useContext)(ConfigContext);
17596
+ const [newData, setNewData] = (0, import_react34.useState)({
17609
17597
  name: "",
17610
17598
  enabled: true,
17611
17599
  definition: input === "artnet" ? {
@@ -17617,7 +17605,7 @@ var InputSettingsDialog = ({
17617
17605
  iface: ""
17618
17606
  }
17619
17607
  });
17620
- const updateSettings = (0, import_react35.useCallback)(
17608
+ const updateSettings = (0, import_react34.useCallback)(
17621
17609
  (change) => {
17622
17610
  if (target.type === "add") {
17623
17611
  setNewData(change);
@@ -17639,7 +17627,7 @@ var InputSettingsDialog = ({
17639
17627
  },
17640
17628
  [target, updateConfig]
17641
17629
  );
17642
- const updateDefinition = (0, import_react35.useCallback)(
17630
+ const updateDefinition = (0, import_react34.useCallback)(
17643
17631
  (change) => {
17644
17632
  updateSettings((current) => ({
17645
17633
  ...current,
@@ -17648,7 +17636,7 @@ var InputSettingsDialog = ({
17648
17636
  },
17649
17637
  [updateSettings]
17650
17638
  );
17651
- const addInput = (0, import_react35.useCallback)(() => {
17639
+ const addInput = (0, import_react34.useCallback)(() => {
17652
17640
  updateConfig((current) => {
17653
17641
  return {
17654
17642
  ...current,
@@ -17662,7 +17650,7 @@ var InputSettingsDialog = ({
17662
17650
  }, [newData, close, updateConfig]);
17663
17651
  const resolvedTarget = target.type === "add" ? "add" : config.inputs?.[target.uuid];
17664
17652
  const data = resolvedTarget === "add" ? newData : resolvedTarget;
17665
- const commitChanges = (0, import_react35.useCallback)(() => {
17653
+ const commitChanges = (0, import_react34.useCallback)(() => {
17666
17654
  if (target.type === "add") {
17667
17655
  addInput();
17668
17656
  } else {
@@ -17767,10 +17755,10 @@ var InputDisplay = ({
17767
17755
  setDialogMode,
17768
17756
  assignToOutput
17769
17757
  }) => {
17770
- const { updateConfig } = (0, import_react35.useContext)(ConfigContext);
17758
+ const { updateConfig } = (0, import_react34.useContext)(ConfigContext);
17771
17759
  const { inputs } = useApplicationState();
17772
17760
  const state = inputs[uuid];
17773
- const toggleEnabled = (0, import_react35.useCallback)(() => {
17761
+ const toggleEnabled = (0, import_react34.useCallback)(() => {
17774
17762
  updateConfig((current) => {
17775
17763
  const existing = current.inputs?.[uuid];
17776
17764
  if (!existing) {
@@ -17829,7 +17817,7 @@ var InputsSection = ({
17829
17817
  setDialogMode,
17830
17818
  assignToOutput
17831
17819
  }) => {
17832
- const { config } = (0, import_react35.useContext)(ConfigContext);
17820
+ const { config } = (0, import_react34.useContext)(ConfigContext);
17833
17821
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17834
17822
  PrimaryToolboxSection,
17835
17823
  {
@@ -17946,26 +17934,26 @@ var diffJson = (a, b) => {
17946
17934
  };
17947
17935
 
17948
17936
  // src/components/frontend/toolbox/settings.tsx
17949
- var import_react38 = require("react");
17937
+ var import_react37 = require("react");
17950
17938
 
17951
17939
  // ../../packages/sigil/dist/frontend/appearance.js
17952
- var import_react36 = require("react");
17940
+ var import_react35 = require("react");
17953
17941
  var import_jsx_runtime46 = require("react/jsx-runtime");
17954
17942
  var AppearanceSwitcher = ({
17955
17943
  color,
17956
17944
  onColorChange
17957
17945
  }) => {
17958
17946
  const { colorSchemePreference, setColorSchemePreference } = useColorSchemePreferences();
17959
- const selectDarkMode = (0, import_react36.useCallback)(() => {
17947
+ const selectDarkMode = (0, import_react35.useCallback)(() => {
17960
17948
  setColorSchemePreference("dark");
17961
17949
  }, [setColorSchemePreference]);
17962
- const selectLightMode = (0, import_react36.useCallback)(() => {
17950
+ const selectLightMode = (0, import_react35.useCallback)(() => {
17963
17951
  setColorSchemePreference("light");
17964
17952
  }, [setColorSchemePreference]);
17965
- const selectSystemMode = (0, import_react36.useCallback)(() => {
17953
+ const selectSystemMode = (0, import_react35.useCallback)(() => {
17966
17954
  setColorSchemePreference("auto");
17967
17955
  }, [setColorSchemePreference]);
17968
- const updateHintColor = (0, import_react36.useCallback)(
17956
+ const updateHintColor = (0, import_react35.useCallback)(
17969
17957
  (color2) => {
17970
17958
  if (onColorChange) {
17971
17959
  onColorChange(color2);
@@ -18025,9 +18013,9 @@ var AppearanceSwitcher = ({
18025
18013
  };
18026
18014
 
18027
18015
  // ../../packages/sigil/dist/frontend/preferences.js
18028
- var import_react37 = require("react");
18016
+ var import_react36 = require("react");
18029
18017
  var createBrowserPreferencesHook = (def) => () => {
18030
- const [preferences, setPreference] = (0, import_react37.useState)(() => {
18018
+ const [preferences, setPreference] = (0, import_react36.useState)(() => {
18031
18019
  const stored = window.localStorage.getItem(def.key);
18032
18020
  if (stored) {
18033
18021
  try {
@@ -18048,7 +18036,7 @@ var createBrowserPreferencesHook = (def) => () => {
18048
18036
  })
18049
18037
  );
18050
18038
  };
18051
- (0, import_react37.useEffect)(() => {
18039
+ (0, import_react36.useEffect)(() => {
18052
18040
  const onStorageChange = (event) => {
18053
18041
  if (event.key === def.key) {
18054
18042
  const newValue = event.newValue;
@@ -18101,7 +18089,7 @@ var DATE_FORMATTER = new Intl.DateTimeFormat(void 0, {
18101
18089
  });
18102
18090
  var Settings = ({ setWindowMode }) => {
18103
18091
  const { preferences, updateBrowserPrefs } = useBrowserPreferences();
18104
- const { config, updateConfig } = (0, import_react38.useContext)(ConfigContext);
18092
+ const { config, updateConfig } = (0, import_react37.useContext)(ConfigContext);
18105
18093
  const { updates } = useApplicationState();
18106
18094
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex grow flex-col", children: [
18107
18095
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ToolbarWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(ToolbarRow, { children: [
@@ -18519,6 +18507,18 @@ var Footer = ({ openLicenseDetails }) => {
18519
18507
  );
18520
18508
  };
18521
18509
 
18510
+ // ../../packages/sigil/dist/frontend/styling.hooks.js
18511
+ var import_react38 = require("react");
18512
+ var useRootHintVariables = (color) => {
18513
+ (0, import_react38.useEffect)(() => {
18514
+ const root = document.querySelector(".arcane-theme-root");
18515
+ if (!root) return;
18516
+ Object.entries(cssHintColorVariables(color)).forEach(([key, value]) => {
18517
+ root.style.setProperty(key, value);
18518
+ });
18519
+ }, [color]);
18520
+ };
18521
+
18522
18522
  // src/components/frontend/toolbox/core/layout.tsx
18523
18523
  var import_jsx_runtime50 = require("react/jsx-runtime");
18524
18524
  var Layout = ({