@arcanewizards/timecode-toolbox 0.1.2 → 0.1.4

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.
@@ -13963,7 +13963,7 @@ function cnd(condition, truthyClassName, falseyClassName) {
13963
13963
  return condition ? truthyClassName : falseyClassName;
13964
13964
  }
13965
13965
 
13966
- // ../../packages/sigil/dist/chunk-E3VUC3Q4.js
13966
+ // ../../packages/sigil/dist/chunk-LDUYBGRY.js
13967
13967
  var import_react11 = require("react");
13968
13968
 
13969
13969
  // ../../node_modules/.pnpm/@arcanejs+toolkit-frontend@0.11.0/node_modules/@arcanejs/toolkit-frontend/dist/chunk-DK4BAXVE.mjs
@@ -14002,7 +14002,7 @@ var TRANSPARENCY_SVG = `
14002
14002
  `;
14003
14003
  var TRANSPARENCY_SVG_URI = `data:image/svg+xml,${encodeURIComponent(TRANSPARENCY_SVG)}`;
14004
14004
 
14005
- // ../../packages/sigil/dist/chunk-E3VUC3Q4.js
14005
+ // ../../packages/sigil/dist/chunk-LDUYBGRY.js
14006
14006
  var import_react12 = require("react");
14007
14007
  var import_jsx_runtime18 = require("react/jsx-runtime");
14008
14008
  var import_react13 = require("react");
@@ -14069,7 +14069,8 @@ var clsControlButton = ({
14069
14069
  touching,
14070
14070
  position,
14071
14071
  className,
14072
- primary
14072
+ primary,
14073
+ destructive
14073
14074
  }) => cn(
14074
14075
  `sigil-control-button`,
14075
14076
  cnd(variant === "border", `sigil-control-button-variant-border`),
@@ -14082,6 +14083,7 @@ var clsControlButton = ({
14082
14083
  cnd(active, `sigil-control-button-active`),
14083
14084
  cnd(touching && active, `sigil-control-button-active-touching`),
14084
14085
  cnd(primary, `sigil-control-button-primary`),
14086
+ cnd(destructive, `sigil-control-button-destructive`),
14085
14087
  clsControlPosition(position),
14086
14088
  className
14087
14089
  );
@@ -14099,6 +14101,7 @@ var ControlButtonFrame = (0, import_react12.forwardRef)(
14099
14101
  tooltipSide,
14100
14102
  position,
14101
14103
  primary,
14104
+ destructive,
14102
14105
  ...props
14103
14106
  }, ref) => {
14104
14107
  const btn = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
@@ -14114,6 +14117,7 @@ var ControlButtonFrame = (0, import_react12.forwardRef)(
14114
14117
  touching,
14115
14118
  position,
14116
14119
  primary,
14120
+ destructive,
14117
14121
  className
14118
14122
  }),
14119
14123
  children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { children: [
@@ -14223,7 +14227,7 @@ ControlParagraph.displayName = "ControlParagraph";
14223
14227
  var ControlLabel = (0, import_react13.forwardRef)(
14224
14228
  ({ className, disabled, nonMicro, position = "label", subgrid, ...props }, ref) => {
14225
14229
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
14226
- "div",
14230
+ "label",
14227
14231
  {
14228
14232
  ...props,
14229
14233
  ref,
@@ -14272,10 +14276,17 @@ var InputSpanningTitle = (0, import_react13.forwardRef)(({ className, position =
14272
14276
  ));
14273
14277
  InputSpanningTitle.displayName = "InputSpanningTitle";
14274
14278
  var ControlDialogButtons = (0, import_react14.forwardRef)(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
14275
- ControlButtonGroup,
14279
+ "div",
14276
14280
  {
14277
14281
  ref,
14278
- className: cn("control-grid-pos-row", className),
14282
+ className: cn(
14283
+ `
14284
+ flex items-stretch gap-1
14285
+ [&>button]:grow
14286
+ `,
14287
+ clsControlPosition("row"),
14288
+ className
14289
+ ),
14279
14290
  ...props,
14280
14291
  children
14281
14292
  }
@@ -14458,19 +14469,9 @@ var ControlSelect = ({
14458
14469
  }
14459
14470
  );
14460
14471
  };
14461
- var COLOR_OPTIONS = {
14462
- red: { label: "Red", value: "red" },
14463
- blue: { label: "Blue", value: "blue" },
14464
- teal: { label: "Teal", value: "teal" },
14465
- green: { label: "Green", value: "green" },
14466
- yellow: { label: "Yellow", value: "yellow" },
14467
- purple: { label: "Purple", value: "purple" },
14468
- orange: { label: "Orange", value: "orange" },
14469
- brown: { label: "Brown", value: "brown" },
14470
- gray: { label: "Gray", value: "gray" }
14471
- };
14472
- var ControlColorSelect = ({
14473
- color,
14472
+ var ControlColoredSelect = ({
14473
+ options,
14474
+ value,
14474
14475
  onChange,
14475
14476
  variant,
14476
14477
  position,
@@ -14478,13 +14479,13 @@ var ControlColorSelect = ({
14478
14479
  placeholder,
14479
14480
  ...props
14480
14481
  }) => {
14481
- const options = Object.values(COLOR_OPTIONS);
14482
- const selectedColor = sigilColorUsage(color || "gray");
14482
+ const selectedOption = options.find((option) => option.value === value);
14483
+ const selectedColor = sigilColorUsage(selectedOption?.color ?? "gray");
14483
14484
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
14484
14485
  ControlSelect,
14485
14486
  {
14486
14487
  options,
14487
- value: color,
14488
+ value,
14488
14489
  onChange,
14489
14490
  triggerButton: (option) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
14490
14491
  dist_exports2.Trigger,
@@ -14538,7 +14539,7 @@ var ControlColorSelect = ({
14538
14539
  {
14539
14540
  className: "",
14540
14541
  style: {
14541
- color: `var(--sigil-usage-${option.value}-foreground)`
14542
+ color: `var(--sigil-usage-${option.color}-foreground)`
14542
14543
  },
14543
14544
  children: option.label
14544
14545
  }
@@ -14550,6 +14551,31 @@ var ControlColorSelect = ({
14550
14551
  }
14551
14552
  );
14552
14553
  };
14554
+ var COLOR_OPTIONS = {
14555
+ red: { label: "Red", value: "red", color: "red" },
14556
+ blue: { label: "Blue", value: "blue", color: "blue" },
14557
+ teal: { label: "Teal", value: "teal", color: "teal" },
14558
+ green: { label: "Green", value: "green", color: "green" },
14559
+ yellow: { label: "Yellow", value: "yellow", color: "yellow" },
14560
+ purple: { label: "Purple", value: "purple", color: "purple" },
14561
+ orange: { label: "Orange", value: "orange", color: "orange" },
14562
+ brown: { label: "Brown", value: "brown", color: "brown" },
14563
+ gray: { label: "Gray", value: "gray", color: "gray" }
14564
+ };
14565
+ var COLOR_OPTIONS_ARRAY = Object.values(COLOR_OPTIONS);
14566
+ var ControlColorSelect = ({
14567
+ color,
14568
+ ...props
14569
+ }) => {
14570
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
14571
+ ControlColoredSelect,
14572
+ {
14573
+ options: COLOR_OPTIONS_ARRAY,
14574
+ value: color,
14575
+ ...props
14576
+ }
14577
+ );
14578
+ };
14553
14579
  var isDarkDialog = (variant) => variant === "dark" || variant === "dark-compact";
14554
14580
  var DialogContext = (0, import_react11.createContext)({
14555
14581
  createDialog: () => {
@@ -15582,6 +15608,7 @@ var createBrowserMediaSession = () => {
15582
15608
  };
15583
15609
  var createDefaultBrowserContext = (browser) => {
15584
15610
  const defaults = {
15611
+ appListenerChangesHandledExternally: false,
15585
15612
  openExternalLink: (url) => {
15586
15613
  window.open(url, "_blank", "noopener,noreferrer");
15587
15614
  },
@@ -15803,6 +15830,30 @@ var startSigilFrontend = ({
15803
15830
  return resolvedBrowser;
15804
15831
  };
15805
15832
 
15833
+ // ../../packages/sigil/dist/shared/config.js
15834
+ var APP_LISTENER_CONFIG = zod_default.object({
15835
+ port: zod_default.union([
15836
+ zod_default.number().int().min(1).max(65535),
15837
+ zod_default.object({
15838
+ from: zod_default.number().int().min(1).max(65535),
15839
+ to: zod_default.number().int().min(1).max(65535)
15840
+ }).refine((data) => data.to >= data.from, {
15841
+ message: '"to" must be greater than or equal to "from"'
15842
+ })
15843
+ ]),
15844
+ interface: zod_default.string().optional()
15845
+ });
15846
+ var ALL_APP_LISTENER_CONFIG = zod_default.record(
15847
+ zod_default.string(),
15848
+ APP_LISTENER_CONFIG
15849
+ );
15850
+ var portString = (port) => {
15851
+ if (typeof port === "number") {
15852
+ return port.toString();
15853
+ }
15854
+ return `${port.from}-${port.to}`;
15855
+ };
15856
+
15806
15857
  // src/components/proto.ts
15807
15858
  var NET_UTILS_GENERAL_TARGET_DEFINITION = zod_default.union([
15808
15859
  zod_default.object({
@@ -15880,6 +15931,7 @@ var OUTPUT_CONFIG = zod_default.object({
15880
15931
  link: INPUT_OR_GENERATOR_INSTANCE_ID.nullable()
15881
15932
  });
15882
15933
  var TOOLBOX_CONFIG = zod_default.object({
15934
+ appListener: APP_LISTENER_CONFIG.partial().optional(),
15883
15935
  inputs: zod_default.record(zod_default.string(), INPUT_CONFIG),
15884
15936
  generators: zod_default.record(zod_default.string(), GENERATOR_CONFIG),
15885
15937
  outputs: zod_default.record(zod_default.string(), OUTPUT_CONFIG),
@@ -15895,7 +15947,7 @@ var NAMESPACE = "timecode-toolbox";
15895
15947
  var isTimecodeToolboxComponent = (component) => component.namespace === NAMESPACE;
15896
15948
 
15897
15949
  // src/components/frontend/toolbox/root.tsx
15898
- var import_react42 = require("react");
15950
+ var import_react50 = require("react");
15899
15951
 
15900
15952
  // ../../packages/artnet/dist/chunk-J2HDMITA.js
15901
15953
  var ARTNET_PORT = 6454;
@@ -15940,7 +15992,9 @@ var STRINGS = {
15940
15992
  noChildren: "No inputs yet. Please add one using the buttons below.",
15941
15993
  addButton: (protocol) => `Add ${protocol}`,
15942
15994
  addDialog: (protocol) => `Add ${protocol} Input`,
15943
- editDialog: (protocol, name) => `Edit ${protocol} Input ${name}`
15995
+ editDialog: (protocol, name) => `Edit ${protocol} Input ${name}`,
15996
+ deleteDialog: `Delete input?`,
15997
+ deleteDialogDetails: `Are you sure you want to delete this input? This action cannot be undone.`
15944
15998
  },
15945
15999
  smtpeModes: {
15946
16000
  SMPTE: `SMPTE ${TIMECODE_FPS.SMPTE}FPS`,
@@ -15963,17 +16017,37 @@ var STRINGS = {
15963
16017
  clock: "Clock"
15964
16018
  },
15965
16019
  addDialog: (protocol) => `Add ${protocol} Generator`,
15966
- editDialog: (protocol, name) => `Edit ${protocol} Generator ${name}`
16020
+ editDialog: (protocol, name) => `Edit ${protocol} Generator ${name}`,
16021
+ deleteDialog: `Delete generator?`,
16022
+ deleteDialogDetails: `Are you sure you want to delete this generator? This action cannot be undone.`
15967
16023
  },
15968
16024
  outputs: {
15969
16025
  title: "OUTPUTS",
15970
16026
  noChildren: "No outputs yet. Please add one using the buttons below.",
15971
16027
  addButton: (protocol) => `Add ${protocol}`,
15972
16028
  addDialog: (protocol) => `Add ${protocol} Output`,
15973
- editDialog: (protocol, name) => `Edit ${protocol} Output ${name}`
16029
+ editDialog: (protocol, name) => `Edit ${protocol} Output ${name}`,
16030
+ deleteDialog: `Delete output?`,
16031
+ deleteDialogDetails: `Are you sure you want to delete this output? This action cannot be undone.`
15974
16032
  },
15975
16033
  settings: {
15976
- title: "Settings"
16034
+ title: "Settings",
16035
+ network: {
16036
+ appPortLabel: "Application Port",
16037
+ appInterfaceLabel: "Application Interface",
16038
+ anyInterface: "Any Interface",
16039
+ internalInterfaceUsed: (iface) => `Note: The interface ${iface} is only accessible from this device, which means that other devices will not be able to connect to Timecode Toolbox.`,
16040
+ appPortEnvOverride: (envPort) => `Note: The application port is currently set to ${envPort} via the PORT environment variable, and cannot be configured here.`,
16041
+ defaultPort: (port) => `Default: (${port})`,
16042
+ saveChanges: "Save Changes",
16043
+ saveWarning: {
16044
+ external: "When you hit Save, the UI will reload",
16045
+ internal: "When you hit Save, the app will attempt to reconnect using the new network settings, but may require you to adjust the URL manually."
16046
+ },
16047
+ invalidPortSingle: "Port numbers must be an integer between 1 and 65535",
16048
+ invalidPort: 'Please enter a valid port number or range (e.g. "1234" or "8000-8100")',
16049
+ invalidPortRange: 'The first port in a range must be less than or equal to the second port (e.g. "8000-8100")'
16050
+ }
15977
16051
  },
15978
16052
  controls: {
15979
16053
  play: "Play",
@@ -16895,7 +16969,7 @@ var DmxConnectionSettings = ({
16895
16969
  var OutputSettingsDialog = ({
16896
16970
  target,
16897
16971
  output,
16898
- close
16972
+ setDialogMode
16899
16973
  }) => {
16900
16974
  const { config, updateConfig } = (0, import_react32.useContext)(ConfigContext);
16901
16975
  const [newData, setNewData] = (0, import_react32.useState)({
@@ -16911,6 +16985,7 @@ var OutputSettingsDialog = ({
16911
16985
  },
16912
16986
  link: null
16913
16987
  });
16988
+ const close = (0, import_react32.useCallback)(() => setDialogMode(null), [setDialogMode]);
16914
16989
  const updateSettings = (0, import_react32.useCallback)(
16915
16990
  (change) => {
16916
16991
  if (target.type === "add") {
@@ -17041,10 +17116,25 @@ var OutputSettingsDialog = ({
17041
17116
  }
17042
17117
  }
17043
17118
  ),
17044
- resolvedTarget === "add" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(ControlDialogButtons, { children: [
17119
+ target.type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(ControlDialogButtons, { children: [
17045
17120
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ControlButton, { onClick: close, variant: "large", children: "Cancel" }),
17046
17121
  /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ControlButton, { onClick: addOutput, variant: "large", children: "Add Output" })
17047
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ControlDialogButtons, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ControlButton, { onClick: close, variant: "large", children: "Close" }) })
17122
+ ] }) : target.type === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(ControlDialogButtons, { children: [
17123
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
17124
+ ControlButton,
17125
+ {
17126
+ onClick: () => setDialogMode({
17127
+ section: { type: "outputs", output },
17128
+ target: { type: "delete", uuid: target.uuid }
17129
+ }),
17130
+ variant: "large",
17131
+ destructive: true,
17132
+ icon: "delete",
17133
+ children: "Delete"
17134
+ }
17135
+ ),
17136
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ControlButton, { onClick: close, variant: "large", children: "Close" })
17137
+ ] }) : null
17048
17138
  ]
17049
17139
  }
17050
17140
  ) });
@@ -17256,7 +17346,7 @@ var ClockSpecificSettings = ({
17256
17346
  var GeneratorSettingsDialog = ({
17257
17347
  target,
17258
17348
  generator,
17259
- close
17349
+ setDialogMode
17260
17350
  }) => {
17261
17351
  const { config, updateConfig } = (0, import_react33.useContext)(ConfigContext);
17262
17352
  const [newData, setNewData] = (0, import_react33.useState)({
@@ -17266,6 +17356,7 @@ var GeneratorSettingsDialog = ({
17266
17356
  speed: 1
17267
17357
  }
17268
17358
  });
17359
+ const close = (0, import_react33.useCallback)(() => setDialogMode(null), [setDialogMode]);
17269
17360
  const updateSettings = (0, import_react33.useCallback)(
17270
17361
  (change) => {
17271
17362
  if (target.type === "add") {
@@ -17373,10 +17464,25 @@ var GeneratorSettingsDialog = ({
17373
17464
  updateSettings: updateDefinition
17374
17465
  }
17375
17466
  ) : null,
17376
- resolvedTarget === "add" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(ControlDialogButtons, { children: [
17467
+ target.type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(ControlDialogButtons, { children: [
17377
17468
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ControlButton, { onClick: close, variant: "large", children: "Cancel" }),
17378
17469
  /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ControlButton, { onClick: addGenerator, variant: "large", children: "Add Generator" })
17379
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ControlDialogButtons, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ControlButton, { onClick: close, variant: "large", children: "Close" }) })
17470
+ ] }) : target.type === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(ControlDialogButtons, { children: [
17471
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
17472
+ ControlButton,
17473
+ {
17474
+ onClick: () => setDialogMode({
17475
+ section: { type: "generators", generator },
17476
+ target: { type: "delete", uuid: target.uuid }
17477
+ }),
17478
+ variant: "large",
17479
+ destructive: true,
17480
+ icon: "delete",
17481
+ children: "Delete"
17482
+ }
17483
+ ),
17484
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ControlButton, { onClick: close, variant: "large", children: "Close" })
17485
+ ] }) : null
17380
17486
  ]
17381
17487
  }
17382
17488
  ) });
@@ -17590,7 +17696,7 @@ var TCNetConnectionSettings = ({
17590
17696
  var InputSettingsDialog = ({
17591
17697
  target,
17592
17698
  input,
17593
- close
17699
+ setDialogMode
17594
17700
  }) => {
17595
17701
  const { config, updateConfig } = (0, import_react34.useContext)(ConfigContext);
17596
17702
  const [newData, setNewData] = (0, import_react34.useState)({
@@ -17605,6 +17711,7 @@ var InputSettingsDialog = ({
17605
17711
  iface: ""
17606
17712
  }
17607
17713
  });
17714
+ const close = (0, import_react34.useCallback)(() => setDialogMode(null), [setDialogMode]);
17608
17715
  const updateSettings = (0, import_react34.useCallback)(
17609
17716
  (change) => {
17610
17717
  if (target.type === "add") {
@@ -17741,10 +17848,25 @@ var InputSettingsDialog = ({
17741
17848
  }
17742
17849
  }
17743
17850
  ),
17744
- resolvedTarget === "add" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(ControlDialogButtons, { children: [
17851
+ target.type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(ControlDialogButtons, { children: [
17745
17852
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, { onClick: close, variant: "large", children: "Cancel" }),
17746
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, { onClick: addInput, variant: "large", children: "Add Input" })
17747
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlDialogButtons, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, { onClick: close, variant: "large", children: "Close" }) })
17853
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, { onClick: addInput, variant: "large", primary: true, children: "Add Input" })
17854
+ ] }) : target?.type === "edit" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(ControlDialogButtons, { children: [
17855
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
17856
+ ControlButton,
17857
+ {
17858
+ onClick: () => setDialogMode({
17859
+ section: { type: "inputs", input },
17860
+ target: { type: "delete", uuid: target.uuid }
17861
+ }),
17862
+ variant: "large",
17863
+ destructive: true,
17864
+ icon: "delete",
17865
+ children: "Delete"
17866
+ }
17867
+ ),
17868
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ControlButton, { onClick: close, variant: "large", children: "Close" })
17869
+ ] }) : null
17748
17870
  ]
17749
17871
  }
17750
17872
  ) });
@@ -17933,6 +18055,11 @@ var diffJson = (a, b) => {
17933
18055
  return { type: "value", after: b };
17934
18056
  };
17935
18057
 
18058
+ // src/components/frontend/toolbox/types.ts
18059
+ var isDeleteDialogMode = (mode) => {
18060
+ return mode?.target.type === "delete";
18061
+ };
18062
+
17936
18063
  // src/components/frontend/toolbox/settings.tsx
17937
18064
  var import_react37 = require("react");
17938
18065
 
@@ -18087,6 +18214,180 @@ var ENABLED_DISABLED_OPTIONS = [
18087
18214
  var DATE_FORMATTER = new Intl.DateTimeFormat(void 0, {
18088
18215
  timeStyle: "medium"
18089
18216
  });
18217
+ var AppPortConfig = () => {
18218
+ const { getNetworkInterfaces } = (0, import_react37.useContext)(NetworkContext);
18219
+ const [interfaces, setInterfaces] = (0, import_react37.useState)(null);
18220
+ const refreshInterfaces = (0, import_react37.useCallback)(() => {
18221
+ setInterfaces(null);
18222
+ getNetworkInterfaces().then((ifs) => setInterfaces(ifs));
18223
+ }, [getNetworkInterfaces]);
18224
+ (0, import_react37.useEffect)(() => {
18225
+ refreshInterfaces();
18226
+ }, [refreshInterfaces]);
18227
+ const { appListenerChangesHandledExternally } = useBrowserContext();
18228
+ const { network, config, updateConfig } = (0, import_react37.useContext)(ConfigContext);
18229
+ const [nextPort, setNextPort] = (0, import_react37.useState)(null);
18230
+ const [nextInterface, setNextInterface] = (0, import_react37.useState)(
18231
+ null
18232
+ );
18233
+ const iface = nextInterface ?? (config.appListener?.interface ? `specific:${config.appListener?.interface}` : "any");
18234
+ const port = nextPort ?? config.appListener?.port;
18235
+ const currentPortString = !port ? "" : typeof port === "string" ? port : portString(port);
18236
+ const hasNetworkChanges = nextPort !== null || nextInterface !== null;
18237
+ const nextUrlRef = (0, import_react37.useRef)(null);
18238
+ const validatedPort = (0, import_react37.useMemo)(() => {
18239
+ if (nextPort === null) {
18240
+ return { type: "unchanged" };
18241
+ }
18242
+ if (nextPort.trim() === "") {
18243
+ return { type: "empty" };
18244
+ }
18245
+ const portParts = nextPort.split("-").map((part) => parseInt(part.trim(), 10));
18246
+ if (portParts.length === 1) {
18247
+ const [singlePort] = portParts;
18248
+ if (!singlePort || isNaN(singlePort) || singlePort < 1 || singlePort > 65535) {
18249
+ return {
18250
+ type: "invalid",
18251
+ error: STRINGS.settings.network.invalidPortSingle
18252
+ };
18253
+ }
18254
+ return { type: "valid", port: singlePort };
18255
+ }
18256
+ if (portParts.length === 2) {
18257
+ const [from, to] = portParts;
18258
+ if (!from || isNaN(from) || from < 1 || from > 65535 || !to || isNaN(to) || to < 1 || to > 65535) {
18259
+ return {
18260
+ type: "invalid",
18261
+ error: STRINGS.settings.network.invalidPortSingle
18262
+ };
18263
+ } else if (from > to) {
18264
+ return {
18265
+ type: "invalid",
18266
+ error: STRINGS.settings.network.invalidPortRange
18267
+ };
18268
+ }
18269
+ return { type: "valid", port: { from, to } };
18270
+ }
18271
+ return { type: "invalid", error: STRINGS.settings.network.invalidPort };
18272
+ }, [nextPort]);
18273
+ const canSave = hasNetworkChanges && validatedPort?.type !== "invalid";
18274
+ const saveNetworkConfig = (0, import_react37.useCallback)(() => {
18275
+ if (validatedPort?.type === "invalid") {
18276
+ return;
18277
+ }
18278
+ const newPort = validatedPort;
18279
+ updateConfig((current) => {
18280
+ const config2 = {
18281
+ ...current,
18282
+ appListener: {
18283
+ port: newPort.type === "empty" ? void 0 : newPort.type === "valid" ? newPort.port : current.appListener?.port,
18284
+ interface: nextInterface === "any" ? void 0 : nextInterface ? nextInterface.replace("specific:", "") : current.appListener?.interface
18285
+ }
18286
+ };
18287
+ const nextUrl = new URL(window.location.href);
18288
+ if (config2.appListener?.interface) {
18289
+ nextUrl.hostname = interfaces?.[config2.appListener.interface]?.address ?? nextUrl.hostname;
18290
+ }
18291
+ const port2 = config2.appListener?.port ?? network.defaultPort;
18292
+ nextUrl.port = (typeof port2 === "number" ? port2 : port2.from).toString();
18293
+ nextUrlRef.current = nextUrl;
18294
+ return config2;
18295
+ });
18296
+ setNextPort(null);
18297
+ setNextInterface(null);
18298
+ }, [
18299
+ interfaces,
18300
+ nextInterface,
18301
+ validatedPort,
18302
+ updateConfig,
18303
+ network.defaultPort
18304
+ ]);
18305
+ (0, import_react37.useEffect)(() => {
18306
+ return () => {
18307
+ if (!appListenerChangesHandledExternally && nextUrlRef.current) {
18308
+ window.location.href = nextUrlRef.current.href;
18309
+ }
18310
+ };
18311
+ }, [appListenerChangesHandledExternally]);
18312
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
18313
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlLabel, { children: STRINGS.settings.network.appInterfaceLabel }),
18314
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
18315
+ ControlSelect,
18316
+ {
18317
+ value: iface,
18318
+ options: [
18319
+ { label: STRINGS.settings.network.anyInterface, value: "any" },
18320
+ ...!interfaces ? [] : Object.values(interfaces).map((iface2) => ({
18321
+ label: `${iface2.name} (${iface2.address})`,
18322
+ value: `specific:${iface2.name}`
18323
+ }))
18324
+ ],
18325
+ onChange: setNextInterface,
18326
+ position: "first",
18327
+ variant: "large",
18328
+ triggerClassName: cn("text-sigil-control")
18329
+ }
18330
+ ),
18331
+ iface && interfaces?.[iface]?.internal && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
18332
+ ControlDetails,
18333
+ {
18334
+ position: "second",
18335
+ className: "text-sigil-warning-foreground",
18336
+ children: STRINGS.settings.network.internalInterfaceUsed(iface)
18337
+ }
18338
+ ),
18339
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
18340
+ ControlButton,
18341
+ {
18342
+ onClick: refreshInterfaces,
18343
+ title: "Refresh Interfaces",
18344
+ position: "extra",
18345
+ variant: "large",
18346
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon2, { icon: "refresh", className: "text-arcane-normal" })
18347
+ }
18348
+ ),
18349
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlLabel, { children: STRINGS.settings.network.appPortLabel }),
18350
+ network.envPort ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlDetails, { position: "both", children: STRINGS.settings.network.appPortEnvOverride(network.envPort) }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
18351
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
18352
+ ControlInput,
18353
+ {
18354
+ value: currentPortString,
18355
+ onChange: setNextPort,
18356
+ placeholder: STRINGS.settings.network.defaultPort(
18357
+ portString(network.defaultPort)
18358
+ )
18359
+ }
18360
+ ),
18361
+ validatedPort.type === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
18362
+ ControlDetails,
18363
+ {
18364
+ position: "second",
18365
+ className: "text-sigil-error-foreground",
18366
+ children: validatedPort.error
18367
+ }
18368
+ )
18369
+ ] }),
18370
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
18371
+ ControlButton,
18372
+ {
18373
+ onClick: saveNetworkConfig,
18374
+ variant: "large",
18375
+ position: "first",
18376
+ disabled: !canSave,
18377
+ children: STRINGS.settings.network.saveChanges
18378
+ }
18379
+ ),
18380
+ hasNetworkChanges && appListenerChangesHandledExternally && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlDetails, { position: "second", children: STRINGS.settings.network.saveWarning.external }),
18381
+ hasNetworkChanges && !appListenerChangesHandledExternally && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
18382
+ ControlDetails,
18383
+ {
18384
+ position: "second",
18385
+ className: "text-sigil-warning-foreground",
18386
+ children: STRINGS.settings.network.saveWarning.internal
18387
+ }
18388
+ )
18389
+ ] });
18390
+ };
18090
18391
  var Settings = ({ setWindowMode }) => {
18091
18392
  const { preferences, updateBrowserPrefs } = useBrowserPreferences();
18092
18393
  const { config, updateConfig } = (0, import_react37.useContext)(ConfigContext);
@@ -18134,7 +18435,8 @@ var Settings = ({ setWindowMode }) => {
18134
18435
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlDetails, { children: STRINGS.updates.settingsDetails }),
18135
18436
  updates && "lastCheckedMillis" in updates && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ControlDetails, { children: STRINGS.updates.lastChecked(
18136
18437
  DATE_FORMATTER.format(updates.lastCheckedMillis)
18137
- ) })
18438
+ ) }),
18439
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AppPortConfig, {})
18138
18440
  ] })
18139
18441
  }
18140
18442
  )
@@ -18531,7 +18833,7 @@ var Layout = ({
18531
18833
  const { connection, reconnect } = (0, import_react39.useContext)(StageContext);
18532
18834
  const { preferences } = useBrowserPreferences();
18533
18835
  useRootHintVariables(preferences.color);
18534
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex h-screen flex-col", children: [
18836
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex h-dvh flex-col", children: [
18535
18837
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ToolbarWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(ToolbarRow, { children: [
18536
18838
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
18537
18839
  "div",
@@ -18710,71 +19012,666 @@ var UpdateBanner = () => {
18710
19012
  return null;
18711
19013
  };
18712
19014
 
18713
- // src/components/frontend/toolbox/root.tsx
19015
+ // ../../packages/sigil/src/frontend/controls/dialogs.tsx
19016
+ var import_react49 = require("react");
19017
+
19018
+ // ../../packages/sigil/src/frontend/dialogs.tsx
19019
+ var import_react48 = require("react");
19020
+
19021
+ // ../../packages/sigil/src/frontend/controls/buttons.tsx
19022
+ var import_react44 = require("react");
19023
+
19024
+ // ../../packages/sigil/src/frontend/styling.ts
19025
+ var SIGIL_COLOR2 = external_exports.enum([
19026
+ "purple",
19027
+ "blue",
19028
+ "teal",
19029
+ "red",
19030
+ "green",
19031
+ "yellow",
19032
+ "brown",
19033
+ "orange",
19034
+ "gray"
19035
+ ]);
19036
+ function cnd2(condition, truthyClassName, falseyClassName) {
19037
+ return condition ? truthyClassName : falseyClassName;
19038
+ }
19039
+
19040
+ // ../../packages/sigil/src/frontend/tooltip.tsx
19041
+ var import_react42 = require("react");
18714
19042
  var import_jsx_runtime53 = require("react/jsx-runtime");
18715
- var ToolboxRoot = ({ info }) => {
18716
- const { config } = info;
18717
- const { sendMessage, call } = (0, import_react42.useContext)(StageContext);
18718
- const [dialogMode, setDialogMode] = (0, import_react42.useState)(null);
18719
- const [assignToOutput, setAssignToOutput] = (0, import_react42.useState)(null);
18720
- (0, import_react42.useEffect)(() => {
18721
- if (assignToOutput) {
18722
- const onEscape = (e) => {
18723
- if (e.key === "Escape") {
18724
- setAssignToOutput(null);
19043
+ var Content4 = (0, import_react42.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
19044
+ dist_exports4.Content,
19045
+ {
19046
+ ...props,
19047
+ ref,
19048
+ className: cn(
19049
+ `
19050
+ relative z-sigil-tooltip rounded-sigil-control
19051
+ bg-sigil-usage-hint-background px-1 py-0.5 leading-[1.5]
19052
+ text-sigil-usage-hint-text shadow-sigil-box
19053
+ `,
19054
+ className
19055
+ )
19056
+ }
19057
+ ));
19058
+ Content4.displayName = "Content";
19059
+ var Arrow4 = (0, import_react42.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
19060
+ dist_exports4.Arrow,
19061
+ {
19062
+ ...props,
19063
+ ref,
19064
+ className: cn(
19065
+ "fill-sigil-usage-hint-background drop-shadow-sigil-tooltip-arrow",
19066
+ className
19067
+ )
19068
+ }
19069
+ ));
19070
+ Arrow4.displayName = "Arrow";
19071
+ var TooltipBoundaryContext2 = (0, import_react42.createContext)(null);
19072
+ var TooltipWrapper2 = ({
19073
+ tooltip,
19074
+ children,
19075
+ side = "top"
19076
+ }) => {
19077
+ const boundary = (0, import_react42.useContext)(TooltipBoundaryContext2);
19078
+ if (!tooltip) {
19079
+ return children;
19080
+ }
19081
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(dist_exports4.Root, { children: [
19082
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(dist_exports4.Trigger, { asChild: true, children }),
19083
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
19084
+ Content4,
19085
+ {
19086
+ side,
19087
+ align: "center",
19088
+ sideOffset: 5,
19089
+ alignOffset: 0,
19090
+ collisionBoundary: boundary ? [boundary] : [],
19091
+ collisionPadding: 10,
19092
+ children: [
19093
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Arrow4, {}),
19094
+ tooltip
19095
+ ]
19096
+ }
19097
+ )
19098
+ ] });
19099
+ };
19100
+
19101
+ // ../../packages/sigil/src/frontend/input.ts
19102
+ var import_react43 = require("react");
19103
+ var usePressable3 = (click) => {
19104
+ const [touching, setTouching] = (0, import_react43.useState)(false);
19105
+ return {
19106
+ touching,
19107
+ handlers: {
19108
+ onClick: click,
19109
+ onTouchStart: () => {
19110
+ setTouching(true);
19111
+ },
19112
+ onTouchMove: () => {
19113
+ setTouching(false);
19114
+ },
19115
+ onTouchEnd: (event) => {
19116
+ if (touching) {
19117
+ event.preventDefault();
19118
+ setTouching(false);
19119
+ click(event);
18725
19120
  }
18726
- };
18727
- window.addEventListener("keydown", onEscape);
18728
- return () => {
18729
- window.removeEventListener("keydown", onEscape);
18730
- };
19121
+ }
18731
19122
  }
18732
- }, [assignToOutput]);
18733
- const updateConfig = (0, import_react42.useCallback)(
18734
- (change) => {
18735
- const diff = diffJson(config, change(config));
18736
- sendMessage?.({
18737
- type: "component-message",
18738
- namespace: "timecode-toolbox",
18739
- component: "toolbox-root",
18740
- componentKey: info.key,
18741
- action: "update-config",
18742
- diff
18743
- });
18744
- },
18745
- [sendMessage, info.key, config]
18746
- );
18747
- const configContext = (0, import_react42.useMemo)(
19123
+ };
19124
+ };
19125
+ var useLongPressable3 = ({
19126
+ onPress,
19127
+ onRelease
19128
+ }) => {
19129
+ const [touching, setTouching] = (0, import_react43.useState)(false);
19130
+ return (0, import_react43.useMemo)(
18748
19131
  () => ({
18749
- config,
18750
- updateConfig
18751
- }),
18752
- [config, updateConfig]
18753
- );
18754
- const closeDialog = (0, import_react42.useCallback)(() => setDialogMode(null), []);
18755
- const getNetworkInterfaces = (0, import_react42.useCallback)(async () => {
18756
- if (!call) {
18757
- throw new Error("No call function available");
18758
- }
18759
- return call({
18760
- namespace: "timecode-toolbox",
18761
- type: "component-call",
18762
- componentKey: info.key,
18763
- action: "toolbox-root-get-network-interfaces"
18764
- });
18765
- }, [call, info.key]);
18766
- const networkContextValue = (0, import_react42.useMemo)(() => {
18767
- return {
18768
- getNetworkInterfaces
18769
- };
18770
- }, [getNetworkInterfaces]);
18771
- const assignToOutputCallback = (0, import_react42.useMemo)(() => {
18772
- if (!assignToOutput) {
18773
- return null;
18774
- }
18775
- const outputUuid = assignToOutput;
18776
- return (id) => {
18777
- updateConfig((current) => {
19132
+ touching,
19133
+ handlers: {
19134
+ onTouchStart: () => {
19135
+ setTouching(true);
19136
+ onPress();
19137
+ },
19138
+ onMouseDown: () => {
19139
+ setTouching(true);
19140
+ onPress();
19141
+ },
19142
+ onMouseUp: () => {
19143
+ setTouching(false);
19144
+ onRelease();
19145
+ },
19146
+ onTouchMove: () => {
19147
+ setTouching(false);
19148
+ onRelease();
19149
+ },
19150
+ onTouchEnd: (event) => {
19151
+ if (touching) {
19152
+ event.preventDefault();
19153
+ setTouching(false);
19154
+ onRelease();
19155
+ }
19156
+ }
19157
+ }
19158
+ }),
19159
+ [touching, onRelease, onPress]
19160
+ );
19161
+ };
19162
+
19163
+ // ../../packages/sigil/src/frontend/controls/utils.ts
19164
+ var clsControlPosition2 = (position) => {
19165
+ if (!position) return void 0;
19166
+ switch (position) {
19167
+ case "row":
19168
+ return "control-grid-pos-row";
19169
+ case "label":
19170
+ return "control-grid-pos-label";
19171
+ case "first":
19172
+ return "control-grid-pos-first";
19173
+ case "second":
19174
+ return "control-grid-pos-second";
19175
+ case "both":
19176
+ return "control-grid-pos-both";
19177
+ case "all":
19178
+ return "control-grid-pos-all";
19179
+ case "extra":
19180
+ return "control-grid-pos-extra";
19181
+ }
19182
+ };
19183
+ var clsControlSubgridPosition2 = (position, subgrid) => {
19184
+ if (!subgrid) return void 0;
19185
+ switch (position) {
19186
+ case "label":
19187
+ return "col-[1/span_1]";
19188
+ case "first":
19189
+ return "col-[2/span_1]";
19190
+ case "second":
19191
+ return "col-[3/span_1]";
19192
+ }
19193
+ };
19194
+
19195
+ // ../../packages/sigil/src/frontend/controls/buttons.tsx
19196
+ var import_jsx_runtime54 = require("react/jsx-runtime");
19197
+ var clsControlButton2 = ({
19198
+ variant,
19199
+ active,
19200
+ touching,
19201
+ position,
19202
+ className,
19203
+ primary,
19204
+ destructive
19205
+ }) => cn(
19206
+ `sigil-control-button`,
19207
+ cnd2(variant === "border", `sigil-control-button-variant-border`),
19208
+ cnd2(variant === "large", `sigil-control-button-variant-large`),
19209
+ cnd2(variant === "properties", `sigil-control-button-variant-properties`),
19210
+ cnd2(variant === "table-row", `sigil-control-button-variant-table-row`),
19211
+ cnd2(variant === "toolbar", `sigil-control-button-variant-toolbar`),
19212
+ cnd2(variant === "titlebar", `sigil-control-button-variant-titlebar`),
19213
+ cnd2(touching, `sigil-control-button-touching`),
19214
+ cnd2(active, `sigil-control-button-active`),
19215
+ cnd2(touching && active, `sigil-control-button-active-touching`),
19216
+ cnd2(primary, `sigil-control-button-primary`),
19217
+ cnd2(destructive, `sigil-control-button-destructive`),
19218
+ clsControlPosition2(position),
19219
+ className
19220
+ );
19221
+ var ControlButtonFrame2 = (0, import_react44.forwardRef)(
19222
+ ({
19223
+ children,
19224
+ className,
19225
+ type,
19226
+ variant = "toolbar",
19227
+ icon,
19228
+ active,
19229
+ touching,
19230
+ disabled,
19231
+ title,
19232
+ tooltipSide,
19233
+ position,
19234
+ primary,
19235
+ destructive,
19236
+ ...props
19237
+ }, ref) => {
19238
+ const btn = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
19239
+ "button",
19240
+ {
19241
+ ...props,
19242
+ ref,
19243
+ type: type ?? "button",
19244
+ disabled,
19245
+ className: clsControlButton2({
19246
+ variant,
19247
+ active,
19248
+ touching,
19249
+ position,
19250
+ primary,
19251
+ destructive,
19252
+ className
19253
+ }),
19254
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { children: [
19255
+ icon && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
19256
+ Icon2,
19257
+ {
19258
+ icon,
19259
+ className: cn(cnd2(children, "text-[120%]", "text-[150%]"))
19260
+ }
19261
+ ),
19262
+ children
19263
+ ] })
19264
+ }
19265
+ );
19266
+ if (!title) return btn;
19267
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TooltipWrapper2, { tooltip: title, side: tooltipSide, children: btn });
19268
+ }
19269
+ );
19270
+ ControlButtonFrame2.displayName = "ControlButtonFrame";
19271
+ var ControlButton2 = (0, import_react44.forwardRef)(
19272
+ ({ onClick, disabled, ...props }, ref) => {
19273
+ const { handlers, touching } = usePressable3(onClick);
19274
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
19275
+ ControlButtonFrame2,
19276
+ {
19277
+ ...props,
19278
+ ref,
19279
+ disabled,
19280
+ touching,
19281
+ ...!disabled ? handlers : {}
19282
+ }
19283
+ );
19284
+ }
19285
+ );
19286
+ ControlButton2.displayName = "ControlButton";
19287
+ var CheckboxControlButton2 = (0, import_react44.forwardRef)(({ active, label, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(ControlButton2, { ...props, ref, active, children: [
19288
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon2, { icon: active ? "check_box" : "check_box_outline_blank" }),
19289
+ label
19290
+ ] }));
19291
+ CheckboxControlButton2.displayName = "CheckboxControlButton";
19292
+ var LongPressableControlButton2 = (0, import_react44.forwardRef)(({ active, disabled, onPress, onRelease, ...props }, ref) => {
19293
+ const { handlers, touching } = useLongPressable3({ onPress, onRelease });
19294
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
19295
+ ControlButtonFrame2,
19296
+ {
19297
+ ...props,
19298
+ ref,
19299
+ active: active || touching,
19300
+ disabled,
19301
+ ...!disabled ? handlers : {}
19302
+ }
19303
+ );
19304
+ });
19305
+ LongPressableControlButton2.displayName = "LongPressableControlButton";
19306
+ var ControlButtonGroup2 = (0, import_react44.forwardRef)(({ children, className, position, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
19307
+ "div",
19308
+ {
19309
+ ...props,
19310
+ ref,
19311
+ className: cn(
19312
+ `
19313
+ flex items-stretch gap-sigil-control-gap
19314
+ [&>button]:grow
19315
+ `,
19316
+ clsControlPosition2(position),
19317
+ className
19318
+ ),
19319
+ children
19320
+ }
19321
+ ));
19322
+ ControlButtonGroup2.displayName = "ControlButtonGroup";
19323
+
19324
+ // ../../packages/sigil/src/frontend/controls/content.tsx
19325
+ var import_react45 = require("react");
19326
+ var import_jsx_runtime55 = require("react/jsx-runtime");
19327
+ var ControlParagraph2 = (0, import_react45.forwardRef)(({ className, mode, position = "all", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
19328
+ "p",
19329
+ {
19330
+ ...props,
19331
+ ref,
19332
+ className: cn(
19333
+ "border border-transparent",
19334
+ clsControlPosition2(position),
19335
+ cnd2(
19336
+ mode === "success",
19337
+ `
19338
+ border-sigil-usage-green-dimmed-border
19339
+ bg-sigil-usage-green-dimmed-background p-1 text-sigil-usage-green-text
19340
+ `
19341
+ ),
19342
+ cnd2(
19343
+ mode === "warning",
19344
+ `
19345
+ border-sigil-usage-yellow-dimmed-border
19346
+ bg-sigil-usage-yellow-dimmed-background p-1
19347
+ text-sigil-usage-yellow-text
19348
+ `
19349
+ ),
19350
+ cnd2(
19351
+ mode === "error",
19352
+ `
19353
+ border-sigil-usage-red-dimmed-border
19354
+ bg-sigil-usage-red-dimmed-background p-1 text-sigil-usage-red-text
19355
+ `
19356
+ ),
19357
+ className
19358
+ )
19359
+ }
19360
+ ));
19361
+ ControlParagraph2.displayName = "ControlParagraph";
19362
+ var ControlLabel2 = (0, import_react45.forwardRef)(
19363
+ ({ className, disabled, nonMicro, position = "label", subgrid, ...props }, ref) => {
19364
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
19365
+ "label",
19366
+ {
19367
+ ...props,
19368
+ ref,
19369
+ className: cn(
19370
+ "flex items-center justify-end gap-0.6 p-0.6",
19371
+ clsControlPosition2(position),
19372
+ cnd2(nonMicro, "max-[550px]:hidden"),
19373
+ cnd2(disabled, "opacity-50"),
19374
+ clsControlSubgridPosition2(position, subgrid),
19375
+ className
19376
+ )
19377
+ }
19378
+ );
19379
+ }
19380
+ );
19381
+ ControlLabel2.displayName = "ControlLabel";
19382
+ var ControlDetails2 = (0, import_react45.forwardRef)(
19383
+ ({ align, className, position = "all", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
19384
+ "div",
19385
+ {
19386
+ ...props,
19387
+ ref,
19388
+ className: cn(
19389
+ "flex items-center px-0.3 text-sigil-foreground-muted",
19390
+ clsControlPosition2(position),
19391
+ cnd2(align === "start", "justify-start"),
19392
+ cnd2(align === "center", "justify-center"),
19393
+ cnd2(align === "end", "justify-end"),
19394
+ className
19395
+ )
19396
+ }
19397
+ )
19398
+ );
19399
+ ControlDetails2.displayName = "ControlDetails";
19400
+ var InputSpanningTitle2 = (0, import_react45.forwardRef)(({ className, position = "row", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
19401
+ "div",
19402
+ {
19403
+ ...props,
19404
+ ref,
19405
+ className: cn(
19406
+ "truncate p-0.6 text-center text-[0.8rem] font-bold",
19407
+ clsControlPosition2(position),
19408
+ className
19409
+ )
19410
+ }
19411
+ ));
19412
+ InputSpanningTitle2.displayName = "InputSpanningTitle";
19413
+
19414
+ // ../../packages/sigil/src/frontend/controls/input.tsx
19415
+ var import_react46 = require("react");
19416
+ var import_jsx_runtime56 = require("react/jsx-runtime");
19417
+
19418
+ // ../../packages/sigil/src/frontend/controls/select.tsx
19419
+ var import_react47 = require("react");
19420
+ var import_jsx_runtime57 = require("react/jsx-runtime");
19421
+ var COLOR_OPTIONS2 = {
19422
+ red: { label: "Red", value: "red", color: "red" },
19423
+ blue: { label: "Blue", value: "blue", color: "blue" },
19424
+ teal: { label: "Teal", value: "teal", color: "teal" },
19425
+ green: { label: "Green", value: "green", color: "green" },
19426
+ yellow: { label: "Yellow", value: "yellow", color: "yellow" },
19427
+ purple: { label: "Purple", value: "purple", color: "purple" },
19428
+ orange: { label: "Orange", value: "orange", color: "orange" },
19429
+ brown: { label: "Brown", value: "brown", color: "brown" },
19430
+ gray: { label: "Gray", value: "gray", color: "gray" }
19431
+ };
19432
+ var COLOR_OPTIONS_ARRAY2 = Object.values(COLOR_OPTIONS2);
19433
+
19434
+ // ../../packages/sigil/src/frontend/dialogs.tsx
19435
+ var import_jsx_runtime58 = require("react/jsx-runtime");
19436
+ var isDarkDialog2 = (variant) => variant === "dark" || variant === "dark-compact";
19437
+ var DialogContext2 = (0, import_react48.createContext)({
19438
+ createDialog: () => {
19439
+ throw new Error("DialogContext not provided");
19440
+ },
19441
+ displayMessage: () => {
19442
+ throw new Error("DialogContext not provided");
19443
+ },
19444
+ displayError: () => {
19445
+ throw new Error("DialogContext not provided");
19446
+ }
19447
+ });
19448
+ var DialogTitle2 = (0, import_react48.forwardRef)(
19449
+ ({ className, variant = "light", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
19450
+ "div",
19451
+ {
19452
+ ...props,
19453
+ ref,
19454
+ className: cn(
19455
+ `
19456
+ flex items-center justify-center gap-0.6 border-b border-sigil-border
19457
+ p-arcane font-bold
19458
+ `,
19459
+ cnd2(isDarkDialog2(variant), "bg-sigil-bg-light", "bg-sigil-bg-dark"),
19460
+ className
19461
+ )
19462
+ }
19463
+ )
19464
+ );
19465
+ DialogTitle2.displayName = "DialogTitle";
19466
+ var DialogButtons2 = (0, import_react48.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
19467
+ "div",
19468
+ {
19469
+ ...props,
19470
+ ref,
19471
+ className: cn("mt-arcane flex justify-end gap-0.6", className)
19472
+ }
19473
+ ));
19474
+ DialogButtons2.displayName = "DialogButtons";
19475
+ var Dialog2 = ({
19476
+ children,
19477
+ dialogClosed,
19478
+ closable = true,
19479
+ title,
19480
+ variant = "light"
19481
+ }) => {
19482
+ const [dialogRef, setDialogRef] = (0, import_react48.useState)(null);
19483
+ (0, import_react48.useEffect)(() => {
19484
+ if (!dialogRef) return;
19485
+ dialogRef.showModal();
19486
+ }, [dialogRef]);
19487
+ const close = () => dialogRef?.close();
19488
+ const onClose = (event) => {
19489
+ if (closable) {
19490
+ dialogClosed();
19491
+ return;
19492
+ }
19493
+ event.preventDefault();
19494
+ event.currentTarget.showModal();
19495
+ };
19496
+ const onMouseDown = (event) => {
19497
+ if (event.target === event.currentTarget) {
19498
+ close();
19499
+ }
19500
+ };
19501
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
19502
+ "dialog",
19503
+ {
19504
+ ref: setDialogRef,
19505
+ onMouseDown,
19506
+ onClose,
19507
+ className: cn(
19508
+ `
19509
+ max-w-[80vw] min-w-[10vw] border-none p-0 text-sigil-dialog-foreground
19510
+ outline-none backdrop-sigil-dialog
19511
+ `,
19512
+ cnd2(isDarkDialog2(variant), "bg-sigil-bg-dark", "bg-sigil-bg-light")
19513
+ ),
19514
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "border border-sigil-border", children: [
19515
+ title && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DialogTitle2, { variant, children: title }),
19516
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
19517
+ "div",
19518
+ {
19519
+ className: cn(
19520
+ "text-sigil-foreground",
19521
+ cnd2(
19522
+ variant === "light-compact" || variant === "dark-compact",
19523
+ "p-0"
19524
+ ),
19525
+ cnd2(
19526
+ variant !== "light-compact" && variant !== "dark-compact",
19527
+ "p-arcane"
19528
+ )
19529
+ ),
19530
+ children
19531
+ }
19532
+ )
19533
+ ] })
19534
+ }
19535
+ );
19536
+ };
19537
+
19538
+ // ../../packages/sigil/src/frontend/controls/dialogs.tsx
19539
+ var import_jsx_runtime59 = require("react/jsx-runtime");
19540
+ var ControlDialogButtons2 = (0, import_react49.forwardRef)(({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
19541
+ "div",
19542
+ {
19543
+ ref,
19544
+ className: cn(
19545
+ `
19546
+ flex items-stretch gap-1
19547
+ [&>button]:grow
19548
+ `,
19549
+ clsControlPosition2("row"),
19550
+ className
19551
+ ),
19552
+ ...props,
19553
+ children
19554
+ }
19555
+ ));
19556
+ var ControlDialog2 = ({
19557
+ children,
19558
+ large,
19559
+ ...props
19560
+ }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Dialog2, { ...props, variant: "dark", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
19561
+ "div",
19562
+ {
19563
+ className: cn(
19564
+ "gap-1 bg-sigil-bg-dark select-none",
19565
+ cnd2(large, "control-grid-large", "control-grid")
19566
+ ),
19567
+ children
19568
+ }
19569
+ ) });
19570
+
19571
+ // src/components/frontend/toolbox/root.tsx
19572
+ var import_jsx_runtime60 = require("react/jsx-runtime");
19573
+ var DeleteConfirmationDialog = ({ dialogMode, setDialogMode }) => {
19574
+ const { updateConfig } = (0, import_react50.useContext)(ConfigContext);
19575
+ const deleteTarget = (0, import_react50.useCallback)(() => {
19576
+ updateConfig((current) => {
19577
+ return {
19578
+ ...current,
19579
+ [dialogMode.section.type]: Object.fromEntries(
19580
+ Object.entries(current[dialogMode.section.type]).filter(
19581
+ ([uuid]) => uuid !== dialogMode.target.uuid
19582
+ )
19583
+ )
19584
+ };
19585
+ });
19586
+ setDialogMode(null);
19587
+ }, [updateConfig, dialogMode, setDialogMode]);
19588
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
19589
+ ControlDialog2,
19590
+ {
19591
+ dialogClosed: () => setDialogMode(null),
19592
+ title: STRINGS[dialogMode.section.type].deleteDialog,
19593
+ children: [
19594
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ControlDetails, { position: "row", children: STRINGS[dialogMode.section.type].deleteDialogDetails }),
19595
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(ControlDialogButtons2, { children: [
19596
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ControlButton, { onClick: () => setDialogMode(null), variant: "large", children: "Cancel" }),
19597
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
19598
+ ControlButton,
19599
+ {
19600
+ onClick: deleteTarget,
19601
+ variant: "large",
19602
+ destructive: true,
19603
+ icon: "delete",
19604
+ children: "Delete"
19605
+ }
19606
+ )
19607
+ ] })
19608
+ ]
19609
+ }
19610
+ );
19611
+ };
19612
+ var ToolboxRoot = ({ info }) => {
19613
+ const { config } = info;
19614
+ const { sendMessage, call } = (0, import_react50.useContext)(StageContext);
19615
+ const [dialogMode, setDialogMode] = (0, import_react50.useState)(null);
19616
+ const [assignToOutput, setAssignToOutput] = (0, import_react50.useState)(null);
19617
+ (0, import_react50.useEffect)(() => {
19618
+ if (assignToOutput) {
19619
+ const onEscape = (e) => {
19620
+ if (e.key === "Escape") {
19621
+ setAssignToOutput(null);
19622
+ }
19623
+ };
19624
+ window.addEventListener("keydown", onEscape);
19625
+ return () => {
19626
+ window.removeEventListener("keydown", onEscape);
19627
+ };
19628
+ }
19629
+ }, [assignToOutput]);
19630
+ const updateConfig = (0, import_react50.useCallback)(
19631
+ (change) => {
19632
+ const diff = diffJson(config, change(config));
19633
+ sendMessage?.({
19634
+ type: "component-message",
19635
+ namespace: "timecode-toolbox",
19636
+ component: "toolbox-root",
19637
+ componentKey: info.key,
19638
+ action: "update-config",
19639
+ diff
19640
+ });
19641
+ },
19642
+ [sendMessage, info.key, config]
19643
+ );
19644
+ const configContext = (0, import_react50.useMemo)(
19645
+ () => ({
19646
+ config,
19647
+ network: info.network,
19648
+ updateConfig
19649
+ }),
19650
+ [config, info.network, updateConfig]
19651
+ );
19652
+ const getNetworkInterfaces = (0, import_react50.useCallback)(async () => {
19653
+ if (!call) {
19654
+ throw new Error("No call function available");
19655
+ }
19656
+ return call({
19657
+ namespace: "timecode-toolbox",
19658
+ type: "component-call",
19659
+ componentKey: info.key,
19660
+ action: "toolbox-root-get-network-interfaces"
19661
+ });
19662
+ }, [call, info.key]);
19663
+ const networkContextValue = (0, import_react50.useMemo)(() => {
19664
+ return {
19665
+ getNetworkInterfaces
19666
+ };
19667
+ }, [getNetworkInterfaces]);
19668
+ const assignToOutputCallback = (0, import_react50.useMemo)(() => {
19669
+ if (!assignToOutput) {
19670
+ return null;
19671
+ }
19672
+ const outputUuid = assignToOutput;
19673
+ return (id) => {
19674
+ updateConfig((current) => {
18778
19675
  const output = current.outputs[outputUuid];
18779
19676
  if (!output) {
18780
19677
  return current;
@@ -18793,7 +19690,7 @@ var ToolboxRoot = ({ info }) => {
18793
19690
  setAssignToOutput(null);
18794
19691
  };
18795
19692
  }, [assignToOutput, updateConfig]);
18796
- const callHandler = (0, import_react42.useCallback)(
19693
+ const callHandler = (0, import_react50.useCallback)(
18797
19694
  async ({ path, handler, args }) => {
18798
19695
  if (!call) {
18799
19696
  throw new Error("No call function available");
@@ -18810,26 +19707,26 @@ var ToolboxRoot = ({ info }) => {
18810
19707
  },
18811
19708
  [call, info.key]
18812
19709
  );
18813
- const handlers = (0, import_react42.useMemo)(
19710
+ const handlers = (0, import_react50.useMemo)(
18814
19711
  () => ({
18815
19712
  handlers: info.handlers,
18816
19713
  callHandler
18817
19714
  }),
18818
19715
  [info.handlers, callHandler]
18819
19716
  );
18820
- const windowedTimecodeId = (0, import_react42.useMemo)(
19717
+ const windowedTimecodeId = (0, import_react50.useMemo)(
18821
19718
  () => getFragmentValue("tc", TIMECODE_INSTANCE_ID),
18822
19719
  []
18823
19720
  );
18824
- const root = (0, import_react42.useMemo)(
18825
- () => windowedTimecodeId ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Layout, { modes: null, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FullscreenTimecodeDisplay, { id: windowedTimecodeId }) }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
18826
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
19721
+ const root = (0, import_react50.useMemo)(
19722
+ () => windowedTimecodeId ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Layout, { modes: null, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(FullscreenTimecodeDisplay, { id: windowedTimecodeId }) }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
19723
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
18827
19724
  Layout,
18828
19725
  {
18829
19726
  footer: true,
18830
19727
  modes: {
18831
19728
  license: {
18832
- child: (setWindowMode) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
19729
+ child: (setWindowMode) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
18833
19730
  License,
18834
19731
  {
18835
19732
  license: info.license,
@@ -18840,39 +19737,39 @@ var ToolboxRoot = ({ info }) => {
18840
19737
  title: STRINGS.license
18841
19738
  },
18842
19739
  settings: {
18843
- child: (setWindowMode) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Settings, { setWindowMode }),
19740
+ child: (setWindowMode) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Settings, { setWindowMode }),
18844
19741
  icon: "settings",
18845
19742
  title: STRINGS.settings.title
18846
19743
  },
18847
19744
  debug: {
18848
- child: () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Debugger, { title: STRINGS.debugger, className: "size-full" }),
19745
+ child: () => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Debugger, { title: STRINGS.debugger, className: "size-full" }),
18849
19746
  icon: "bug_report",
18850
19747
  title: STRINGS.debugger
18851
19748
  }
18852
19749
  },
18853
19750
  licenseMode: "license",
18854
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
18855
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(UpdateBanner, {}),
18856
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
19751
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
19752
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(UpdateBanner, {}),
19753
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
18857
19754
  "div",
18858
19755
  {
18859
19756
  className: "\n flex h-0 grow flex-col gap-px overflow-y-auto bg-sigil-border\n scrollbar-sigil\n ",
18860
19757
  children: [
18861
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
19758
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
18862
19759
  InputsSection,
18863
19760
  {
18864
19761
  setDialogMode,
18865
19762
  assignToOutput: assignToOutputCallback
18866
19763
  }
18867
19764
  ),
18868
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
19765
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
18869
19766
  GeneratorsSection,
18870
19767
  {
18871
19768
  setDialogMode,
18872
19769
  assignToOutput: assignToOutputCallback
18873
19770
  }
18874
19771
  ),
18875
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
19772
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
18876
19773
  OutputsSection,
18877
19774
  {
18878
19775
  setDialogMode,
@@ -18886,45 +19783,52 @@ var ToolboxRoot = ({ info }) => {
18886
19783
  ] })
18887
19784
  }
18888
19785
  ),
18889
- dialogMode?.section.type === "inputs" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
18890
- InputSettingsDialog,
18891
- {
18892
- close: closeDialog,
18893
- input: dialogMode.section.input,
18894
- target: dialogMode.target
18895
- }
18896
- ),
18897
- dialogMode?.section.type === "generators" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
18898
- GeneratorSettingsDialog,
18899
- {
18900
- close: closeDialog,
18901
- generator: dialogMode.section.generator,
18902
- target: dialogMode.target
18903
- }
18904
- ),
18905
- dialogMode?.section.type === "outputs" && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
18906
- OutputSettingsDialog,
19786
+ isDeleteDialogMode(dialogMode) ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
19787
+ DeleteConfirmationDialog,
18907
19788
  {
18908
- close: closeDialog,
18909
- output: dialogMode.section.output,
18910
- target: dialogMode.target
19789
+ dialogMode,
19790
+ setDialogMode
18911
19791
  }
18912
- )
19792
+ ) : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
19793
+ dialogMode?.section.type === "inputs" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
19794
+ InputSettingsDialog,
19795
+ {
19796
+ setDialogMode,
19797
+ input: dialogMode.section.input,
19798
+ target: dialogMode.target
19799
+ }
19800
+ ),
19801
+ dialogMode?.section.type === "generators" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
19802
+ GeneratorSettingsDialog,
19803
+ {
19804
+ setDialogMode,
19805
+ generator: dialogMode.section.generator,
19806
+ target: dialogMode.target
19807
+ }
19808
+ ),
19809
+ dialogMode?.section.type === "outputs" && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
19810
+ OutputSettingsDialog,
19811
+ {
19812
+ setDialogMode,
19813
+ output: dialogMode.section.output,
19814
+ target: dialogMode.target
19815
+ }
19816
+ )
19817
+ ] })
18913
19818
  ] }),
18914
19819
  [
18915
19820
  assignToOutput,
18916
19821
  assignToOutputCallback,
18917
- closeDialog,
18918
19822
  dialogMode,
18919
19823
  windowedTimecodeId,
18920
19824
  info.license
18921
19825
  ]
18922
19826
  );
18923
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ConfigContext.Provider, { value: configContext, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(NetworkContext.Provider, { value: networkContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ApplicationStateContext.Provider, { value: info.state, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ApplicationHandlersContext.Provider, { value: handlers, children: root }) }) }) });
19827
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ConfigContext.Provider, { value: configContext, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(NetworkContext.Provider, { value: networkContextValue, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ApplicationStateContext.Provider, { value: info.state, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ApplicationHandlersContext.Provider, { value: handlers, children: root }) }) }) });
18924
19828
  };
18925
19829
 
18926
19830
  // src/components/frontend/index.tsx
18927
- var import_jsx_runtime54 = require("react/jsx-runtime");
19831
+ var import_jsx_runtime61 = require("react/jsx-runtime");
18928
19832
  var timecodeToolboxFrontendComponents = () => ({
18929
19833
  namespace: NAMESPACE,
18930
19834
  render: (info) => {
@@ -18933,9 +19837,9 @@ var timecodeToolboxFrontendComponents = () => ({
18933
19837
  }
18934
19838
  switch (info.component) {
18935
19839
  case "toolbox-root":
18936
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(ToolboxRoot, { info });
19840
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ToolboxRoot, { info });
18937
19841
  case "license-gate":
18938
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(LicenseGate, { info });
19842
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(LicenseGate, { info });
18939
19843
  }
18940
19844
  }
18941
19845
  });
@@ -18943,10 +19847,11 @@ var startTimecodeToolboxServerFrontend = (browser) => {
18943
19847
  startSigilFrontend({
18944
19848
  browser,
18945
19849
  appRenderers: [timecodeToolboxFrontendComponents()],
18946
- loadingState: () => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { style: { width: "100%", textAlign: "center", padding: "2rem" }, children: "Loading Toolbox..." })
19850
+ loadingState: () => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { style: { width: "100%", textAlign: "center", padding: "2rem" }, children: "Loading Toolbox..." })
18947
19851
  });
18948
19852
  };
18949
19853
  window.startTimecodeToolboxServerFrontend = startTimecodeToolboxServerFrontend;
19854
+ window.createBrowserMediaSession = createBrowserMediaSession;
18950
19855
  // Annotate the CommonJS export names for ESM import in node:
18951
19856
  0 && (module.exports = {
18952
19857
  startTimecodeToolboxServerFrontend,