@apliteni/apliteni-ui 0.190.0 → 0.194.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -482,7 +482,7 @@ function placeTip(host, mark, tip, placement = "top") {
482
482
  const view = host.ownerDocument.documentElement;
483
483
  const declared = parseFloat(getComputedStyle(tip).getPropertyValue("--ui-tip-gap"));
484
484
  const gap = Number.isFinite(declared) ? declared : TIP_GAP;
485
- const clip = { top: 0, left: 0, right: view.clientWidth, bottom: view.clientHeight };
485
+ const clip = { top: TIP_GAP, left: TIP_GAP, right: view.clientWidth - TIP_GAP, bottom: view.clientHeight - TIP_GAP };
486
486
  const layered = typeof tip.showPopover === "function" && tip.matches(":popover-open");
487
487
  for (let el = host; el && el !== host.ownerDocument.body; el = el.parentElement) {
488
488
  const style = getComputedStyle(el);
@@ -769,8 +769,13 @@ function ContextRow({ caption, delta, basisId }) {
769
769
  const own = delta.basis || "";
770
770
  return /* @__PURE__ */ jsxs8("dd", { className: "ui-stat__delta", "aria-describedby": !own && basisId ? basisId : void 0, children: [
771
771
  lead,
772
- /* @__PURE__ */ jsx12(Icon, { name: GLYPH[dir] }),
773
- delta.tooltip ? /* @__PURE__ */ jsx12(Tooltip, { text: delta.tooltip, children: /* @__PURE__ */ jsx12("span", { className: "ui-stat__change", children: delta.value }) }) : /* @__PURE__ */ jsx12("span", { className: "ui-stat__change", children: delta.value }),
772
+ delta.tooltip ? /* @__PURE__ */ jsxs8(Tooltip, { text: delta.tooltip, children: [
773
+ /* @__PURE__ */ jsx12(Icon, { name: GLYPH[dir] }),
774
+ /* @__PURE__ */ jsx12("span", { className: "ui-stat__change", children: delta.value })
775
+ ] }) : /* @__PURE__ */ jsxs8(Fragment4, { children: [
776
+ /* @__PURE__ */ jsx12(Icon, { name: GLYPH[dir] }),
777
+ /* @__PURE__ */ jsx12("span", { className: "ui-stat__change", children: delta.value })
778
+ ] }),
774
779
  own ? /* @__PURE__ */ jsxs8(Fragment4, { children: [
775
780
  " ",
776
781
  /* @__PURE__ */ jsx12("span", { className: "ui-stat__basis", children: own })
@@ -4113,21 +4118,115 @@ function Timeline({ events, className, ...rest }) {
4113
4118
  )) });
4114
4119
  }
4115
4120
 
4121
+ // src/Wizard.tsx
4122
+ import { useEffect as useEffect16, useId as useId13, useRef as useRef19, useState as useState15 } from "react";
4123
+ import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
4124
+ var words = { done: "Done", current: "Current", blocked: "Blocked", todo: "To do" };
4125
+ var working = (steps) => (steps.find((step) => step.state === "current" || step.state === "blocked") ?? steps[steps.length - 1]).id;
4126
+ function Mark({ state }) {
4127
+ return /* @__PURE__ */ jsxs30("span", { "aria-hidden": "true", className: `ui-wizard__mark ui-wizard__mark--${state}`, children: [
4128
+ state === "done" && /* @__PURE__ */ jsx34(Icon, { name: "check" }),
4129
+ state === "blocked" && /* @__PURE__ */ jsx34(Icon, { name: "circleAlert" })
4130
+ ] });
4131
+ }
4132
+ function Wizard({ label, steps, final, open, onOpenChange, className }) {
4133
+ const uid = useId13();
4134
+ const ready = steps.every((step) => step.state === "done");
4135
+ const finalId = final.id ?? "final";
4136
+ const all = [...steps, { id: finalId, label: final.label, state: final.done ? "done" : ready ? "current" : "todo", content: final.content }];
4137
+ const target = working(all);
4138
+ const [own, setOwn] = useState15(target);
4139
+ const shown = open ?? own;
4140
+ const list = useRef19(null);
4141
+ const button = (id) => list.current?.querySelector(`[data-step="${CSS.escape(id)}"]`) ?? null;
4142
+ const held = typeof document !== "undefined" && Boolean(list.current?.contains(document.activeElement));
4143
+ const last = useRef19(target);
4144
+ useEffect16(() => {
4145
+ const active = document.activeElement;
4146
+ const lost = active === document.body || active === null;
4147
+ if (last.current !== target) {
4148
+ last.current = target;
4149
+ if (open === void 0) setOwn(target);
4150
+ onOpenChange?.(target);
4151
+ if (lost || list.current?.contains(active)) button(target)?.focus();
4152
+ } else if (held && lost) button(shown)?.focus();
4153
+ });
4154
+ const choose = (id) => {
4155
+ if (open === void 0) setOwn(id);
4156
+ onOpenChange?.(id);
4157
+ };
4158
+ const move = (event, index) => {
4159
+ const next = { ArrowDown: (index + 1) % all.length, ArrowUp: (index + all.length - 1) % all.length, Home: 0, End: all.length - 1 }[event.key];
4160
+ if (next === void 0) return;
4161
+ event.preventDefault();
4162
+ button(all[next].id)?.focus();
4163
+ };
4164
+ const position = all.find((step) => step.state === "current" || step.state === "blocked")?.id;
4165
+ return /* @__PURE__ */ jsx34("ol", { ref: list, role: "list", "aria-label": label, className: ["ui-wizard", className].filter(Boolean).join(" "), children: all.map((step, index) => {
4166
+ const isFinal = index === all.length - 1;
4167
+ const panel = `${uid}-panel-${index}`;
4168
+ const head = `${uid}-step-${index}`;
4169
+ return /* @__PURE__ */ jsxs30("li", { className: `ui-wizard__item ui-wizard__item--${step.state}`, children: [
4170
+ /* @__PURE__ */ jsxs30(
4171
+ "button",
4172
+ {
4173
+ type: "button",
4174
+ id: head,
4175
+ "data-step": step.id,
4176
+ className: `ui-nav__item ui-wizard__step${shown === step.id ? " is-active" : ""}`,
4177
+ "aria-label": `${index + 1}. ${step.label}, ${words[step.state]}, step ${index + 1} of ${all.length}`,
4178
+ "aria-expanded": shown === step.id,
4179
+ "aria-controls": panel,
4180
+ "aria-current": position === step.id ? "step" : void 0,
4181
+ onClick: () => choose(step.id),
4182
+ onKeyDown: (event) => move(event, index),
4183
+ children: [
4184
+ /* @__PURE__ */ jsx34(Mark, { state: step.state }),
4185
+ /* @__PURE__ */ jsxs30("span", { className: "ui-wizard__text", children: [
4186
+ /* @__PURE__ */ jsxs30("span", { className: "ui-wizard__name", children: [
4187
+ index + 1,
4188
+ ". ",
4189
+ step.label
4190
+ ] }),
4191
+ " ",
4192
+ /* @__PURE__ */ jsx34("span", { className: "ui-wizard__state", children: words[step.state] })
4193
+ ] })
4194
+ ]
4195
+ }
4196
+ ),
4197
+ /* @__PURE__ */ jsx34("div", { id: panel, role: "region", "aria-labelledby": head, className: "ui-wizard__panel", hidden: shown !== step.id, children: step.content }),
4198
+ isFinal && !final.done && /* @__PURE__ */ jsxs30("div", { className: "ui-wizard__final", children: [
4199
+ !ready && /* @__PURE__ */ jsx34("p", { id: `${uid}-reason`, className: "ui-wizard__reason", children: final.reason }),
4200
+ /* @__PURE__ */ jsx34(
4201
+ Button,
4202
+ {
4203
+ variant: ready ? "primary" : "outline",
4204
+ disabled: !ready,
4205
+ "aria-describedby": ready ? void 0 : `${uid}-reason`,
4206
+ onClick: final.onAction,
4207
+ children: final.action
4208
+ }
4209
+ )
4210
+ ] })
4211
+ ] }, step.id);
4212
+ }) });
4213
+ }
4214
+
4116
4215
  // src/Field.tsx
4117
- import { forwardRef as forwardRef8, useEffect as useEffect16, useId as useId13, useRef as useRef19, useState as useState15 } from "react";
4216
+ import { forwardRef as forwardRef8, useEffect as useEffect17, useId as useId14, useRef as useRef20, useState as useState16 } from "react";
4118
4217
  import { esc, icon as icon5 } from "@apliteni/apliteni-ui";
4119
- import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
4218
+ import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
4120
4219
  function messages(id, hint, error) {
4121
4220
  return [error && `${id}-error`, hint && `${id}-hint`].filter(Boolean).join(" ") || void 0;
4122
4221
  }
4123
4222
  function Frame({ id, labelId, label, hint, error, required, children }) {
4124
- return /* @__PURE__ */ jsxs30("div", { className: "ui-field", children: [
4125
- /* @__PURE__ */ jsxs30("label", { className: "ui-field__label", id: labelId, htmlFor: id, children: [
4223
+ return /* @__PURE__ */ jsxs31("div", { className: "ui-field", children: [
4224
+ /* @__PURE__ */ jsxs31("label", { className: "ui-field__label", id: labelId, htmlFor: id, children: [
4126
4225
  label,
4127
- required && /* @__PURE__ */ jsx34("span", { className: "ui-field__req", "aria-hidden": "true", children: "*" })
4226
+ required && /* @__PURE__ */ jsx35("span", { className: "ui-field__req", "aria-hidden": "true", children: "*" })
4128
4227
  ] }),
4129
4228
  children,
4130
- error && /* @__PURE__ */ jsx34(
4229
+ error && /* @__PURE__ */ jsx35(
4131
4230
  "div",
4132
4231
  {
4133
4232
  id: `${id}-error`,
@@ -4136,23 +4235,23 @@ function Frame({ id, labelId, label, hint, error, required, children }) {
4136
4235
  dangerouslySetInnerHTML: { __html: icon5("alert") + esc(error) }
4137
4236
  }
4138
4237
  ),
4139
- hint && /* @__PURE__ */ jsx34("div", { id: `${id}-hint`, className: "ui-field__hint", children: hint })
4238
+ hint && /* @__PURE__ */ jsx35("div", { id: `${id}-hint`, className: "ui-field__hint", children: hint })
4140
4239
  ] });
4141
4240
  }
4142
4241
  function wiring(id, hint, error) {
4143
4242
  return { id, "aria-describedby": messages(id, hint, error), "aria-invalid": error ? true : void 0 };
4144
4243
  }
4145
4244
  function Field({ id: suppliedId, label, hint, error, required, children }) {
4146
- const generatedId = useId13();
4245
+ const generatedId = useId14();
4147
4246
  const id = suppliedId ?? generatedId;
4148
4247
  const labelId = `${id}-label`;
4149
- return /* @__PURE__ */ jsx34(Frame, { ...{ id, labelId, label, hint, error, required }, children: /* @__PURE__ */ jsx34(FieldContext.Provider, { value: { id, labelId, label }, children: children({ ...wiring(id, hint, error), required }) }) });
4248
+ return /* @__PURE__ */ jsx35(Frame, { ...{ id, labelId, label, hint, error, required }, children: /* @__PURE__ */ jsx35(FieldContext.Provider, { value: { id, labelId, label }, children: children({ ...wiring(id, hint, error), required }) }) });
4150
4249
  }
4151
4250
  var TextField = forwardRef8(function TextField2({ label, hint, error, required, type = "text", unit, icon: glyph2, className = "", ...props }, ref) {
4152
- const id = useId13();
4251
+ const id = useId14();
4153
4252
  const hasUnit = type === "number" && !!unit;
4154
4253
  const describedBy = [messages(id, hint, error), hasUnit ? `${id}-unit` : ""].filter(Boolean).join(" ") || void 0;
4155
- const control = /* @__PURE__ */ jsx34(
4254
+ const control = /* @__PURE__ */ jsx35(
4156
4255
  "input",
4157
4256
  {
4158
4257
  ref,
@@ -4165,19 +4264,19 @@ var TextField = forwardRef8(function TextField2({ label, hint, error, required,
4165
4264
  className: `ui-input${error ? " is-invalid" : ""} ${className}`
4166
4265
  }
4167
4266
  );
4168
- const unitSpan = hasUnit ? /* @__PURE__ */ jsx34("span", { id: `${id}-unit`, className: "ui-field-number__unit", children: unit }) : null;
4169
- return /* @__PURE__ */ jsx34(Frame, { ...{ id, label, hint, error, required }, children: glyph2 ? /* @__PURE__ */ jsxs30("div", { className: `ui-input-group${hasUnit ? " ui-field-number" : ""}`, children: [
4170
- /* @__PURE__ */ jsx34("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon5(glyph2) } }),
4267
+ const unitSpan = hasUnit ? /* @__PURE__ */ jsx35("span", { id: `${id}-unit`, className: "ui-field-number__unit", children: unit }) : null;
4268
+ return /* @__PURE__ */ jsx35(Frame, { ...{ id, label, hint, error, required }, children: glyph2 ? /* @__PURE__ */ jsxs31("div", { className: `ui-input-group${hasUnit ? " ui-field-number" : ""}`, children: [
4269
+ /* @__PURE__ */ jsx35("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon5(glyph2) } }),
4171
4270
  control,
4172
4271
  unitSpan
4173
- ] }) : hasUnit ? /* @__PURE__ */ jsxs30("div", { className: "ui-field-number", children: [
4272
+ ] }) : hasUnit ? /* @__PURE__ */ jsxs31("div", { className: "ui-field-number", children: [
4174
4273
  control,
4175
4274
  unitSpan
4176
4275
  ] }) : control });
4177
4276
  });
4178
4277
  function TextArea({ label, hint, error, required, className = "", ...props }) {
4179
- const id = useId13();
4180
- return /* @__PURE__ */ jsx34(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx34(
4278
+ const id = useId14();
4279
+ return /* @__PURE__ */ jsx35(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx35(
4181
4280
  "textarea",
4182
4281
  {
4183
4282
  rows: 4,
@@ -4189,8 +4288,8 @@ function TextArea({ label, hint, error, required, className = "", ...props }) {
4189
4288
  ) });
4190
4289
  }
4191
4290
  function SelectField({ label, hint, error, required, className = "", children, ...props }) {
4192
- const id = useId13();
4193
- return /* @__PURE__ */ jsx34(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx34(
4291
+ const id = useId14();
4292
+ return /* @__PURE__ */ jsx35(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsx35(
4194
4293
  "select",
4195
4294
  {
4196
4295
  ...props,
@@ -4202,11 +4301,11 @@ function SelectField({ label, hint, error, required, className = "", children, .
4202
4301
  ) });
4203
4302
  }
4204
4303
  function FileField({ label, hint, error, required, disabled, onFileChange, className = "", ...props }) {
4205
- const id = useId13();
4206
- const input = useRef19(null);
4207
- const [file, setFile] = useState15(null);
4208
- const [dragging, setDragging] = useState15(false);
4209
- useEffect16(() => {
4304
+ const id = useId14();
4305
+ const input = useRef20(null);
4306
+ const [file, setFile] = useState16(null);
4307
+ const [dragging, setDragging] = useState16(false);
4308
+ useEffect17(() => {
4210
4309
  const form = input.current?.form;
4211
4310
  const reset = () => {
4212
4311
  setFile(null);
@@ -4219,7 +4318,7 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
4219
4318
  setFile(next);
4220
4319
  onFileChange?.(next);
4221
4320
  };
4222
- return /* @__PURE__ */ jsx34(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsxs30(
4321
+ return /* @__PURE__ */ jsx35(Frame, { ...{ id, label, hint, error, required }, children: /* @__PURE__ */ jsxs31(
4223
4322
  "div",
4224
4323
  {
4225
4324
  className: `ui-file${dragging && !disabled ? " is-dragging" : ""}${file ? " has-file" : ""}${error ? " is-invalid" : ""}${disabled ? " is-disabled" : ""}`,
@@ -4240,12 +4339,12 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
4240
4339
  update(transfer.files[0]);
4241
4340
  },
4242
4341
  children: [
4243
- /* @__PURE__ */ jsx34("span", { className: "ui-file__glyph", children: /* @__PURE__ */ jsx34(Icon, { name: "upload" }) }),
4244
- /* @__PURE__ */ jsx34("div", { "aria-live": "polite", children: file ? file.name : "Drop a file here" }),
4245
- /* @__PURE__ */ jsx34("div", { children: "or choose one from your device" }),
4246
- /* @__PURE__ */ jsxs30("span", { className: "ui-file__choose", children: [
4247
- /* @__PURE__ */ jsx34("span", { className: "ui-btn ui-btn--secondary ui-btn--sm", "aria-hidden": "true", "aria-disabled": disabled || void 0, children: file ? "Replace file" : "Choose file" }),
4248
- /* @__PURE__ */ jsx34(
4342
+ /* @__PURE__ */ jsx35("span", { className: "ui-file__glyph", children: /* @__PURE__ */ jsx35(Icon, { name: "upload" }) }),
4343
+ /* @__PURE__ */ jsx35("div", { "aria-live": "polite", children: file ? file.name : "Drop a file here" }),
4344
+ /* @__PURE__ */ jsx35("div", { children: "or choose one from your device" }),
4345
+ /* @__PURE__ */ jsxs31("span", { className: "ui-file__choose", children: [
4346
+ /* @__PURE__ */ jsx35("span", { className: "ui-btn ui-btn--secondary ui-btn--sm", "aria-hidden": "true", "aria-disabled": disabled || void 0, children: file ? "Replace file" : "Choose file" }),
4347
+ /* @__PURE__ */ jsx35(
4249
4348
  "input",
4250
4349
  {
4251
4350
  ...props,
@@ -4265,11 +4364,11 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
4265
4364
  }
4266
4365
 
4267
4366
  // src/FileDrop.tsx
4268
- import { useRef as useRef20, useState as useState16 } from "react";
4367
+ import { useRef as useRef21, useState as useState17 } from "react";
4269
4368
 
4270
4369
  // src/EmptyState.tsx
4271
4370
  import { icon as kitIcon3, illo } from "@apliteni/apliteni-ui";
4272
- import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
4371
+ import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
4273
4372
  var cases = {
4274
4373
  "first-run": { title: "Nothing needs you yet", sub: "New items will appear here when they need your attention.", icon: "check" },
4275
4374
  "no-matches": { title: "No results in this view", sub: "Try another search or clear your filters.", icon: "search" },
@@ -4282,16 +4381,16 @@ function EmptyState({ variant = "first-run", title, sub, icon: icon9, art, actio
4282
4381
  const guidance = sub ?? preset.sub;
4283
4382
  const glyph2 = icon9 ?? preset.icon;
4284
4383
  const Title = [2, 3, 4, 5, 6].includes(level) ? `h${level}` : "div";
4285
- return /* @__PURE__ */ jsxs31("div", { className: ["ui-empty", className].filter(Boolean).join(" "), children: [
4286
- art ? typeof art === "string" ? /* @__PURE__ */ jsx35("div", { className: "ui-empty__art", dangerouslySetInnerHTML: { __html: /<svg/.test(art) ? art : illo(art) } }) : /* @__PURE__ */ jsx35("div", { className: "ui-empty__art", "aria-hidden": "true", children: art }) : glyph2 ? /* @__PURE__ */ jsx35("div", { className: "ui-empty__icon", dangerouslySetInnerHTML: { __html: kitIcon3(glyph2) } }) : null,
4287
- heading && /* @__PURE__ */ jsx35(Title, { className: "ui-empty__title", children: heading }),
4288
- guidance && /* @__PURE__ */ jsx35("div", { className: "ui-empty__sub", children: guidance }),
4289
- actions && /* @__PURE__ */ jsx35("div", { className: "ui-empty__actions", children: actions })
4384
+ return /* @__PURE__ */ jsxs32("div", { className: ["ui-empty", className].filter(Boolean).join(" "), children: [
4385
+ art ? typeof art === "string" ? /* @__PURE__ */ jsx36("div", { className: "ui-empty__art", dangerouslySetInnerHTML: { __html: /<svg/.test(art) ? art : illo(art) } }) : /* @__PURE__ */ jsx36("div", { className: "ui-empty__art", "aria-hidden": "true", children: art }) : glyph2 ? /* @__PURE__ */ jsx36("div", { className: "ui-empty__icon", dangerouslySetInnerHTML: { __html: kitIcon3(glyph2) } }) : null,
4386
+ heading && /* @__PURE__ */ jsx36(Title, { className: "ui-empty__title", children: heading }),
4387
+ guidance && /* @__PURE__ */ jsx36("div", { className: "ui-empty__sub", children: guidance }),
4388
+ actions && /* @__PURE__ */ jsx36("div", { className: "ui-empty__actions", children: actions })
4290
4389
  ] });
4291
4390
  }
4292
4391
 
4293
4392
  // src/FileDrop.tsx
4294
- import { Fragment as Fragment17, jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
4393
+ import { Fragment as Fragment17, jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
4295
4394
  var MARKS = {
4296
4395
  uploading: "clock",
4297
4396
  done: "circleCheck",
@@ -4327,8 +4426,8 @@ function FileDrop({
4327
4426
  children,
4328
4427
  className
4329
4428
  }) {
4330
- const input = useRef20(null);
4331
- const [over, setOver] = useState16(false);
4429
+ const input = useRef21(null);
4430
+ const [over, setOver] = useState17(false);
4332
4431
  const status = file?.status ?? "uploading";
4333
4432
  const word = status === "error" ? file?.error ?? WORDS.error : file?.state ?? WORDS[status];
4334
4433
  const [stem, ext] = splitName(file?.name ?? "");
@@ -4344,7 +4443,7 @@ function FileDrop({
4344
4443
  const pick = () => {
4345
4444
  if (!disabled) input.current?.click();
4346
4445
  };
4347
- const picker = /* @__PURE__ */ jsx36(
4446
+ const picker = /* @__PURE__ */ jsx37(
4348
4447
  "input",
4349
4448
  {
4350
4449
  ref: input,
@@ -4377,20 +4476,20 @@ function FileDrop({
4377
4476
  take(Array.from(event.dataTransfer.files));
4378
4477
  }
4379
4478
  };
4380
- if (title !== void 0) return /* @__PURE__ */ jsxs32(
4479
+ if (title !== void 0) return /* @__PURE__ */ jsxs33(
4381
4480
  "div",
4382
4481
  {
4383
4482
  className: cx7("ui-drop", "ui-drop--area", showTarget && "is-dragging", disabled && "is-disabled", className),
4384
4483
  onClick: pick,
4385
4484
  ...drag,
4386
4485
  children: [
4387
- /* @__PURE__ */ jsx36(
4486
+ /* @__PURE__ */ jsx37(
4388
4487
  EmptyState,
4389
4488
  {
4390
4489
  icon: "upload",
4391
4490
  title,
4392
4491
  sub: note ?? "",
4393
- actions: /* @__PURE__ */ jsx36(
4492
+ actions: /* @__PURE__ */ jsx37(
4394
4493
  Button,
4395
4494
  {
4396
4495
  variant: "primary",
@@ -4410,28 +4509,28 @@ function FileDrop({
4410
4509
  ]
4411
4510
  }
4412
4511
  );
4413
- return /* @__PURE__ */ jsxs32("div", { className: cx7("ui-drop", disabled && "is-disabled", className), ...drag, children: [
4512
+ return /* @__PURE__ */ jsxs33("div", { className: cx7("ui-drop", disabled && "is-disabled", className), ...drag, children: [
4414
4513
  children,
4415
- /* @__PURE__ */ jsxs32("div", { className: "ui-drop__row", children: [
4416
- file ? /* @__PURE__ */ jsxs32("div", { className: cx7("ui-drop__file", status === "error" && "ui-drop__file--failed"), children: [
4417
- /* @__PURE__ */ jsxs32("div", { className: "ui-drop__line", children: [
4418
- /* @__PURE__ */ jsxs32("span", { className: "ui-drop__name", title: file.name, children: [
4419
- /* @__PURE__ */ jsx36("span", { className: "ui-drop__stem", children: stem }),
4420
- /* @__PURE__ */ jsx36("span", { className: "ui-drop__ext", children: ext })
4514
+ /* @__PURE__ */ jsxs33("div", { className: "ui-drop__row", children: [
4515
+ file ? /* @__PURE__ */ jsxs33("div", { className: cx7("ui-drop__file", status === "error" && "ui-drop__file--failed"), children: [
4516
+ /* @__PURE__ */ jsxs33("div", { className: "ui-drop__line", children: [
4517
+ /* @__PURE__ */ jsxs33("span", { className: "ui-drop__name", title: file.name, children: [
4518
+ /* @__PURE__ */ jsx37("span", { className: "ui-drop__stem", children: stem }),
4519
+ /* @__PURE__ */ jsx37("span", { className: "ui-drop__ext", children: ext })
4421
4520
  ] }),
4422
- showSize && /* @__PURE__ */ jsx36("span", { className: "ui-drop__size", children: file.size }),
4423
- showWord && /* @__PURE__ */ jsxs32(
4521
+ showSize && /* @__PURE__ */ jsx37("span", { className: "ui-drop__size", children: file.size }),
4522
+ showWord && /* @__PURE__ */ jsxs33(
4424
4523
  "span",
4425
4524
  {
4426
4525
  className: cx7("ui-drop__state", status === "error" && "ui-drop__error"),
4427
4526
  role: status === "error" ? "alert" : void 0,
4428
4527
  children: [
4429
- /* @__PURE__ */ jsx36(Icon, { name: MARKS[status] }),
4430
- /* @__PURE__ */ jsx36("span", { className: "ui-drop__word", title: word, children: word })
4528
+ /* @__PURE__ */ jsx37(Icon, { name: MARKS[status] }),
4529
+ /* @__PURE__ */ jsx37("span", { className: "ui-drop__word", title: word, children: word })
4431
4530
  ]
4432
4531
  }
4433
4532
  ),
4434
- hasBar && /* @__PURE__ */ jsx36(
4533
+ hasBar && /* @__PURE__ */ jsx37(
4435
4534
  "span",
4436
4535
  {
4437
4536
  className: "ui-drop__bar",
@@ -4440,13 +4539,13 @@ function FileDrop({
4440
4539
  "aria-valuenow": file.progress,
4441
4540
  "aria-valuemin": 0,
4442
4541
  "aria-valuemax": 100,
4443
- children: /* @__PURE__ */ jsx36("span", { style: { width: `${file.progress}%` } })
4542
+ children: /* @__PURE__ */ jsx37("span", { style: { width: `${file.progress}%` } })
4444
4543
  }
4445
4544
  )
4446
4545
  ] }),
4447
- (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs32("span", { className: "ui-drop__actions", children: [
4448
- status === "error" && onRetry && /* @__PURE__ */ jsx36(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
4449
- onRemove && /* @__PURE__ */ jsx36(
4546
+ (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs33("span", { className: "ui-drop__actions", children: [
4547
+ status === "error" && onRetry && /* @__PURE__ */ jsx37(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
4548
+ onRemove && /* @__PURE__ */ jsx37(
4450
4549
  Button,
4451
4550
  {
4452
4551
  variant: "ghost",
@@ -4457,8 +4556,8 @@ function FileDrop({
4457
4556
  }
4458
4557
  )
4459
4558
  ] })
4460
- ] }) : /* @__PURE__ */ jsxs32(Fragment17, { children: [
4461
- /* @__PURE__ */ jsx36(
4559
+ ] }) : /* @__PURE__ */ jsxs33(Fragment17, { children: [
4560
+ /* @__PURE__ */ jsx37(
4462
4561
  Button,
4463
4562
  {
4464
4563
  size: "sm",
@@ -4468,22 +4567,22 @@ function FileDrop({
4468
4567
  children: label
4469
4568
  }
4470
4569
  ),
4471
- note && /* @__PURE__ */ jsx36("p", { className: "ui-drop__note", children: note })
4570
+ note && /* @__PURE__ */ jsx37("p", { className: "ui-drop__note", children: note })
4472
4571
  ] }),
4473
4572
  picker
4474
4573
  ] }),
4475
- showTarget && /* @__PURE__ */ jsx36("div", { className: "ui-drop__target", "aria-hidden": "true", children: dropLabel })
4574
+ showTarget && /* @__PURE__ */ jsx37("div", { className: "ui-drop__target", "aria-hidden": "true", children: dropLabel })
4476
4575
  ] });
4477
4576
  }
4478
4577
 
4479
4578
  // src/SearchField.tsx
4480
4579
  import { forwardRef as forwardRef9 } from "react";
4481
4580
  import { icon as icon6 } from "@apliteni/apliteni-ui";
4482
- import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
4581
+ import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
4483
4582
  var SearchField = forwardRef9(function SearchField2({ ariaLabel, size, width, className, ...props }, ref) {
4484
- return /* @__PURE__ */ jsxs33("div", { className: "ui-input-group", style: width ? { width, flex: "none" } : void 0, children: [
4485
- /* @__PURE__ */ jsx37("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon6("search") } }),
4486
- /* @__PURE__ */ jsx37(
4583
+ return /* @__PURE__ */ jsxs34("div", { className: "ui-input-group", style: width ? { width, flex: "none" } : void 0, children: [
4584
+ /* @__PURE__ */ jsx38("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon6("search") } }),
4585
+ /* @__PURE__ */ jsx38(
4487
4586
  "input",
4488
4587
  {
4489
4588
  ref,
@@ -4497,7 +4596,7 @@ var SearchField = forwardRef9(function SearchField2({ ariaLabel, size, width, cl
4497
4596
  });
4498
4597
 
4499
4598
  // src/Toast.tsx
4500
- import { createContext as createContext4, useCallback as useCallback7, useContext as useContext4, useEffect as useEffect17, useLayoutEffect as useLayoutEffect4, useRef as useRef21, useState as useState17 } from "react";
4599
+ import { createContext as createContext4, useCallback as useCallback7, useContext as useContext4, useEffect as useEffect18, useLayoutEffect as useLayoutEffect4, useRef as useRef22, useState as useState18 } from "react";
4501
4600
  import { createPortal as createPortal6 } from "react-dom";
4502
4601
 
4503
4602
  // src/lib/toast-stack.ts
@@ -4607,7 +4706,7 @@ function watchToastPile(stack2) {
4607
4706
  }
4608
4707
 
4609
4708
  // src/Toast.tsx
4610
- import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
4709
+ import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
4611
4710
  var Context = createContext4(null);
4612
4711
  var PileHoldContext = createContext4(false);
4613
4712
  var glyphs = { success: "circleCheck", danger: "circleX", warn: "circleAlert", info: "info", neutral: "bolt" };
@@ -4617,24 +4716,24 @@ function useToast() {
4617
4716
  return push;
4618
4717
  }
4619
4718
  function Notice({ notice, remove }) {
4620
- const root = useRef21(null);
4621
- const [leaving2, setLeaving] = useState17(false);
4622
- const dismissed = useRef21(false);
4623
- const [hovered, setHovered] = useState17(false);
4624
- const [focused, setFocused] = useState17(false);
4719
+ const root = useRef22(null);
4720
+ const [leaving2, setLeaving] = useState18(false);
4721
+ const dismissed = useRef22(false);
4722
+ const [hovered, setHovered] = useState18(false);
4723
+ const [focused, setFocused] = useState18(false);
4625
4724
  const pileHeld = useContext4(PileHoldContext);
4626
4725
  const paused = hovered || focused || pileHeld;
4627
4726
  const tone2 = notice.tone ?? "success";
4628
4727
  const timed = !notice.action && notice.timer !== false && notice.timer !== 0;
4629
4728
  const duration = typeof notice.timer === "number" ? notice.timer * 1e3 : 5e3;
4630
- const remaining = useRef21(duration);
4729
+ const remaining = useRef22(duration);
4631
4730
  const dismiss = useCallback7(() => {
4632
4731
  if (dismissed.current) return;
4633
4732
  dismissed.current = true;
4634
4733
  if (typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches) remove();
4635
4734
  else setLeaving(true);
4636
4735
  }, [remove]);
4637
- useEffect17(() => {
4736
+ useEffect18(() => {
4638
4737
  if (leaving2) {
4639
4738
  const element = root.current;
4640
4739
  const finish = (event) => {
@@ -4648,7 +4747,7 @@ function Notice({ notice, remove }) {
4648
4747
  };
4649
4748
  }
4650
4749
  }, [leaving2, remove]);
4651
- useEffect17(() => {
4750
+ useEffect18(() => {
4652
4751
  if (leaving2 || !timed || paused) return;
4653
4752
  const started = Date.now();
4654
4753
  const timer = setTimeout(dismiss, remaining.current);
@@ -4657,7 +4756,7 @@ function Notice({ notice, remove }) {
4657
4756
  remaining.current = Math.max(0, remaining.current - (Date.now() - started));
4658
4757
  };
4659
4758
  }, [dismiss, leaving2, paused, timed]);
4660
- return /* @__PURE__ */ jsxs34(
4759
+ return /* @__PURE__ */ jsxs35(
4661
4760
  "div",
4662
4761
  {
4663
4762
  ref: root,
@@ -4671,12 +4770,12 @@ function Notice({ notice, remove }) {
4671
4770
  if (!event.currentTarget.contains(event.relatedTarget)) setFocused(false);
4672
4771
  },
4673
4772
  children: [
4674
- /* @__PURE__ */ jsx38("span", { className: "ui-toast__icon", children: /* @__PURE__ */ jsx38(Icon, { name: glyphs[tone2] }) }),
4675
- /* @__PURE__ */ jsxs34("div", { className: "ui-toast__body", children: [
4676
- /* @__PURE__ */ jsx38("div", { className: "ui-toast__title", children: notice.title }),
4677
- !notice.compact && notice.text && /* @__PURE__ */ jsx38("div", { className: "ui-toast__text", children: notice.text })
4773
+ /* @__PURE__ */ jsx39("span", { className: "ui-toast__icon", children: /* @__PURE__ */ jsx39(Icon, { name: glyphs[tone2] }) }),
4774
+ /* @__PURE__ */ jsxs35("div", { className: "ui-toast__body", children: [
4775
+ /* @__PURE__ */ jsx39("div", { className: "ui-toast__title", children: notice.title }),
4776
+ !notice.compact && notice.text && /* @__PURE__ */ jsx39("div", { className: "ui-toast__text", children: notice.text })
4678
4777
  ] }),
4679
- notice.action && /* @__PURE__ */ jsx38(
4778
+ notice.action && /* @__PURE__ */ jsx39(
4680
4779
  "button",
4681
4780
  {
4682
4781
  type: "button",
@@ -4691,8 +4790,8 @@ function Notice({ notice, remove }) {
4691
4790
  children: notice.action.label
4692
4791
  }
4693
4792
  ),
4694
- notice.dismissible !== false && /* @__PURE__ */ jsx38("button", { type: "button", className: "ui-toast__close", "aria-label": "Dismiss", disabled: leaving2, onClick: dismiss, children: /* @__PURE__ */ jsx38(Icon, { name: "x" }) }),
4695
- timed && /* @__PURE__ */ jsx38(
4793
+ notice.dismissible !== false && /* @__PURE__ */ jsx39("button", { type: "button", className: "ui-toast__close", "aria-label": "Dismiss", disabled: leaving2, onClick: dismiss, children: /* @__PURE__ */ jsx39(Icon, { name: "x" }) }),
4794
+ timed && /* @__PURE__ */ jsx39(
4696
4795
  "span",
4697
4796
  {
4698
4797
  className: "ui-toast__timer is-running",
@@ -4736,11 +4835,11 @@ function usePile(stack2, piled, count) {
4736
4835
  }, [stack2, piled, count]);
4737
4836
  }
4738
4837
  function Toast({ children, collapse = false }) {
4739
- const [entries, setEntries] = useState17([]);
4740
- const [pileHovered, setPileHovered] = useState17(false);
4741
- const [pileFocused, setPileFocused] = useState17(false);
4742
- const nextId = useRef21(0);
4743
- const stack2 = useRef21(null);
4838
+ const [entries, setEntries] = useState18([]);
4839
+ const [pileHovered, setPileHovered] = useState18(false);
4840
+ const [pileFocused, setPileFocused] = useState18(false);
4841
+ const nextId = useRef22(0);
4842
+ const stack2 = useRef22(null);
4744
4843
  const push = useCallback7((notice) => {
4745
4844
  const id = nextId.current++;
4746
4845
  const remove = () => setEntries((current) => current.filter((entry) => entry.id !== id));
@@ -4753,10 +4852,10 @@ function Toast({ children, collapse = false }) {
4753
4852
  const leavePileFocus = (event) => {
4754
4853
  if (!event.currentTarget.contains(event.relatedTarget)) setPileFocused(false);
4755
4854
  };
4756
- return /* @__PURE__ */ jsxs34(Context.Provider, { value: push, children: [
4855
+ return /* @__PURE__ */ jsxs35(Context.Provider, { value: push, children: [
4757
4856
  children,
4758
4857
  typeof document !== "undefined" && createPortal6(
4759
- /* @__PURE__ */ jsx38(
4858
+ /* @__PURE__ */ jsx39(
4760
4859
  "div",
4761
4860
  {
4762
4861
  className: `ui-toast-stack rx-toast-stack${piled ? " ui-toast-stack--collapsed" : ""}`,
@@ -4768,7 +4867,7 @@ function Toast({ children, collapse = false }) {
4768
4867
  onMouseLeave: () => setPileHovered(false),
4769
4868
  onFocus: () => setPileFocused(true),
4770
4869
  onBlur: leavePileFocus,
4771
- children: /* @__PURE__ */ jsx38(PileHoldContext.Provider, { value: pileHeld, children: entries.map((entry) => /* @__PURE__ */ jsx38(Notice, { notice: entry.notice, remove: entry.remove }, entry.id)) })
4870
+ children: /* @__PURE__ */ jsx39(PileHoldContext.Provider, { value: pileHeld, children: entries.map((entry) => /* @__PURE__ */ jsx39(Notice, { notice: entry.notice, remove: entry.remove }, entry.id)) })
4772
4871
  }
4773
4872
  ),
4774
4873
  document.body
@@ -4777,7 +4876,7 @@ function Toast({ children, collapse = false }) {
4777
4876
  }
4778
4877
 
4779
4878
  // src/AppShell.tsx
4780
- import { useEffect as useEffect19, useId as useId14, useMemo as useMemo5, useRef as useRef23, useState as useState19 } from "react";
4879
+ import { useEffect as useEffect20, useId as useId15, useMemo as useMemo5, useRef as useRef24, useState as useState20 } from "react";
4781
4880
  import { prism } from "@apliteni/apliteni-ui";
4782
4881
 
4783
4882
  // src/lib/palette-hotkey.ts
@@ -4807,14 +4906,14 @@ function storeRailCollapsed(collapsed) {
4807
4906
  }
4808
4907
 
4809
4908
  // src/AccountMenu.tsx
4810
- import { useEffect as useEffect18, useRef as useRef22, useState as useState18 } from "react";
4909
+ import { useEffect as useEffect19, useRef as useRef23, useState as useState19 } from "react";
4811
4910
  import { createPortal as createPortal7 } from "react-dom";
4812
4911
  import { icon as icon7, themeIcon as themeIcon2, transitionMs as transitionMs3 } from "@apliteni/apliteni-ui";
4813
4912
 
4814
4913
  // src/ThemeToggle.tsx
4815
4914
  import { useSyncExternalStore } from "react";
4816
4915
  import { themeIcon } from "@apliteni/apliteni-ui";
4817
- import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
4916
+ import { jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
4818
4917
  var STORAGE_KEY = "apliteni-strategy-theme";
4819
4918
  var CHOICE_EVENT = "apliteni-theme-choice";
4820
4919
  var THEME_INIT_SCRIPT = `(()=>{let t;try{t=localStorage.getItem('apliteni-strategy-theme')}catch{}document.documentElement.setAttribute('data-theme',t==='dark'||t==='light'?t:window.matchMedia?.('(prefers-color-scheme: light)').matches?'light':'dark')})()`;
@@ -4877,10 +4976,10 @@ function useThemeChoice() {
4877
4976
  }
4878
4977
  function ThemeToggle({ labelled = false }) {
4879
4978
  const { theme, label, name, toggle } = useThemeChoice();
4880
- const button = /* @__PURE__ */ jsx39("button", { type: "button", className: "toggle", "aria-label": name, title: name, onClick: toggle, children: /* @__PURE__ */ jsx39("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon(theme) } }) });
4881
- return labelled ? /* @__PURE__ */ jsxs35("span", { className: "ui-theme-toggle", children: [
4979
+ const button = /* @__PURE__ */ jsx40("button", { type: "button", className: "toggle", "aria-label": name, title: name, onClick: toggle, children: /* @__PURE__ */ jsx40("span", { className: "ic", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: themeIcon(theme) } }) });
4980
+ return labelled ? /* @__PURE__ */ jsxs36("span", { className: "ui-theme-toggle", children: [
4882
4981
  button,
4883
- /* @__PURE__ */ jsxs35("span", { children: [
4982
+ /* @__PURE__ */ jsxs36("span", { children: [
4884
4983
  label,
4885
4984
  " theme"
4886
4985
  ] })
@@ -4888,18 +4987,18 @@ function ThemeToggle({ labelled = false }) {
4888
4987
  }
4889
4988
 
4890
4989
  // src/AccountMenu.tsx
4891
- import { Fragment as Fragment18, jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
4990
+ import { Fragment as Fragment18, jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
4892
4991
  var THEMES = [["auto", "Auto"], ["light", "Light"], ["dark", "Dark"]];
4893
- var glyph = (svg, className) => /* @__PURE__ */ jsx40("span", { className, "aria-hidden": "true", dangerouslySetInnerHTML: { __html: svg } });
4992
+ var glyph = (svg, className) => /* @__PURE__ */ jsx41("span", { className, "aria-hidden": "true", dangerouslySetInnerHTML: { __html: svg } });
4894
4993
  function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4895
4994
  const theme = useThemeChoice();
4896
- const [open, setOpen] = useState18(false);
4897
- const [sub, setSub] = useState18(false);
4898
- const block = useRef22(null);
4899
- const themeRow = useRef22(null);
4900
- const list = useRef22(null);
4901
- const flyout = useRef22(null);
4902
- const refocus = useRef22(false);
4995
+ const [open, setOpen] = useState19(false);
4996
+ const [sub, setSub] = useState19(false);
4997
+ const block = useRef23(null);
4998
+ const themeRow = useRef23(null);
4999
+ const list = useRef23(null);
5000
+ const flyout = useRef23(null);
5001
+ const refocus = useRef23(false);
4903
5002
  const close = () => {
4904
5003
  refocus.current = true;
4905
5004
  setSub(false);
@@ -4929,7 +5028,7 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4929
5028
  clearTimeout(landed);
4930
5029
  };
4931
5030
  }, [sub, inPlace]);
4932
- useEffect18(() => {
5031
+ useEffect19(() => {
4933
5032
  if (!open || !away) return;
4934
5033
  const gone = () => {
4935
5034
  if (block.current?.getClientRects().length) return;
@@ -4942,7 +5041,7 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4942
5041
  window.addEventListener("resize", gone);
4943
5042
  return () => window.removeEventListener("resize", gone);
4944
5043
  }, [open, away]);
4945
- useEffect18(() => {
5044
+ useEffect19(() => {
4946
5045
  if (sub) list.current?.querySelector('[role="menuitemradio"]')?.focus();
4947
5046
  else if (refocus.current) {
4948
5047
  refocus.current = false;
@@ -4963,7 +5062,7 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4963
5062
  e.preventDefault();
4964
5063
  e.stopPropagation();
4965
5064
  };
4966
- const choices = /* @__PURE__ */ jsxs36(
5065
+ const choices = /* @__PURE__ */ jsxs37(
4967
5066
  "div",
4968
5067
  {
4969
5068
  ref: list,
@@ -4973,11 +5072,11 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4973
5072
  onKeyDown: subKeys,
4974
5073
  onClick: (e) => e.stopPropagation(),
4975
5074
  children: [
4976
- inPlace && /* @__PURE__ */ jsxs36("div", { role: "menuitem", tabIndex: -1, className: "ui-dropdown__item", "aria-label": "Back from Theme", onClick: close, children: [
5075
+ inPlace && /* @__PURE__ */ jsxs37("div", { role: "menuitem", tabIndex: -1, className: "ui-dropdown__item", "aria-label": "Back from Theme", onClick: close, children: [
4977
5076
  glyph(icon7("chevronLeft"), "ui-dropdown__ic"),
4978
- /* @__PURE__ */ jsx40("span", { className: "ui-dropdown__main", children: /* @__PURE__ */ jsx40("span", { className: "ui-dropdown__label", children: "Theme" }) })
5077
+ /* @__PURE__ */ jsx41("span", { className: "ui-dropdown__main", children: /* @__PURE__ */ jsx41("span", { className: "ui-dropdown__label", children: "Theme" }) })
4979
5078
  ] }),
4980
- THEMES.map(([value, label]) => /* @__PURE__ */ jsxs36(
5079
+ THEMES.map(([value, label]) => /* @__PURE__ */ jsxs37(
4981
5080
  "div",
4982
5081
  {
4983
5082
  role: "menuitemradio",
@@ -4990,7 +5089,7 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4990
5089
  },
4991
5090
  children: [
4992
5091
  glyph(themeIcon2(value), "ui-dropdown__ic"),
4993
- /* @__PURE__ */ jsx40("span", { className: "ui-dropdown__main", children: /* @__PURE__ */ jsx40("span", { className: "ui-dropdown__label", children: label }) }),
5092
+ /* @__PURE__ */ jsx41("span", { className: "ui-dropdown__main", children: /* @__PURE__ */ jsx41("span", { className: "ui-dropdown__label", children: label }) }),
4994
5093
  glyph(icon7("check"), "ui-dropdown__tick")
4995
5094
  ]
4996
5095
  },
@@ -4999,7 +5098,7 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4999
5098
  ]
5000
5099
  }
5001
5100
  );
5002
- return /* @__PURE__ */ jsx40("div", { ref: block, className: "ui-app__user", children: /* @__PURE__ */ jsx40(
5101
+ return /* @__PURE__ */ jsx41("div", { ref: block, className: "ui-app__user", children: /* @__PURE__ */ jsx41(
5003
5102
  Dropdown,
5004
5103
  {
5005
5104
  variant: "menu",
@@ -5013,17 +5112,17 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
5013
5112
  setOpen(next);
5014
5113
  if (!next) setSub(false);
5015
5114
  },
5016
- triggerContent: /* @__PURE__ */ jsxs36(Fragment18, { children: [
5017
- /* @__PURE__ */ jsx40("span", { className: "ui-sr", children: `Signed in as ${account.name}, ${account.email}` }),
5018
- /* @__PURE__ */ jsx40("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx40(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) }),
5019
- /* @__PURE__ */ jsxs36("span", { className: "ui-app__who", "aria-hidden": "true", children: [
5020
- /* @__PURE__ */ jsx40("b", { children: account.name }),
5021
- /* @__PURE__ */ jsx40("span", { children: account.email })
5115
+ triggerContent: /* @__PURE__ */ jsxs37(Fragment18, { children: [
5116
+ /* @__PURE__ */ jsx41("span", { className: "ui-sr", children: `Signed in as ${account.name}, ${account.email}` }),
5117
+ /* @__PURE__ */ jsx41("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx41(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) }),
5118
+ /* @__PURE__ */ jsxs37("span", { className: "ui-app__who", "aria-hidden": "true", children: [
5119
+ /* @__PURE__ */ jsx41("b", { children: account.name }),
5120
+ /* @__PURE__ */ jsx41("span", { children: account.email })
5022
5121
  ] })
5023
5122
  ] }),
5024
5123
  items: [...items, ...withTheme ? [{ label: "Theme", value: "theme" }, "---"] : [], { label: "Sign out", value: "sign-out", icon: "logout", danger: true }],
5025
- row: (item, props) => item.value === "theme" ? /* @__PURE__ */ jsxs36(Fragment18, { children: [
5026
- /* @__PURE__ */ jsxs36(
5124
+ row: (item, props) => item.value === "theme" ? /* @__PURE__ */ jsxs37(Fragment18, { children: [
5125
+ /* @__PURE__ */ jsxs37(
5027
5126
  "div",
5028
5127
  {
5029
5128
  ...props,
@@ -5040,13 +5139,13 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
5040
5139
  },
5041
5140
  children: [
5042
5141
  glyph(themeIcon2(theme.theme), "ui-dropdown__ic"),
5043
- /* @__PURE__ */ jsx40("span", { className: "ui-dropdown__main", children: /* @__PURE__ */ jsx40("span", { className: "ui-dropdown__label", children: "Theme" }) }),
5044
- /* @__PURE__ */ jsx40("span", { className: "ui-dropdown__aside", children: theme.label }),
5142
+ /* @__PURE__ */ jsx41("span", { className: "ui-dropdown__main", children: /* @__PURE__ */ jsx41("span", { className: "ui-dropdown__label", children: "Theme" }) }),
5143
+ /* @__PURE__ */ jsx41("span", { className: "ui-dropdown__aside", children: theme.label }),
5045
5144
  glyph(icon7("chevronRight"), "ui-dropdown__more")
5046
5145
  ]
5047
5146
  }
5048
5147
  ),
5049
- sub && (inPlace ? choices : createPortal7(/* @__PURE__ */ jsx40(
5148
+ sub && (inPlace ? choices : createPortal7(/* @__PURE__ */ jsx41(
5050
5149
  "div",
5051
5150
  {
5052
5151
  ref: flyout,
@@ -5054,14 +5153,14 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
5054
5153
  children: choices
5055
5154
  }
5056
5155
  ), document.body))
5057
- ] }) : props.href ? /* @__PURE__ */ jsx40("a", { ...props }) : /* @__PURE__ */ jsx40("div", { ...props }),
5156
+ ] }) : props.href ? /* @__PURE__ */ jsx41("a", { ...props }) : /* @__PURE__ */ jsx41("div", { ...props }),
5058
5157
  onSelect
5059
5158
  }
5060
5159
  ) });
5061
5160
  }
5062
5161
 
5063
5162
  // src/AppShell.tsx
5064
- import { Fragment as Fragment19, jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
5163
+ import { Fragment as Fragment19, jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
5065
5164
  var path = (value) => value.split(/[?#]/)[0].replace(/\/+$/, "") || "/";
5066
5165
  function AppShell({
5067
5166
  sections,
@@ -5091,12 +5190,12 @@ function AppShell({
5091
5190
  onNavigate,
5092
5191
  renderLink
5093
5192
  }) {
5094
- const uid = useId14();
5095
- const [collapsed, setCollapsed] = useState19(defaultCollapsed);
5096
- const [search, setSearch] = useState19(false);
5097
- const [menu, setMenu] = useState19(false);
5098
- const menuButton = useRef23(null);
5099
- const menuBody = useRef23(null);
5193
+ const uid = useId15();
5194
+ const [collapsed, setCollapsed] = useState20(defaultCollapsed);
5195
+ const [search, setSearch] = useState20(false);
5196
+ const [menu, setMenu] = useState20(false);
5197
+ const menuButton = useRef24(null);
5198
+ const menuBody = useRef24(null);
5100
5199
  const firstRow = useMemo5(() => ({ get current() {
5101
5200
  return menuBody.current?.querySelector(".ui-nav__item") ?? null;
5102
5201
  } }), []);
@@ -5104,14 +5203,14 @@ function AppShell({
5104
5203
  const links = rows.flatMap((row2) => row2.items?.length ? row2.items : [row2]);
5105
5204
  const current = path(pathname);
5106
5205
  const active = links.filter((link) => current === path(link.href) || path(link.href) !== "/" && current.startsWith(`${path(link.href)}/`)).sort((a, b) => path(b.href).length - path(a.href).length)[0];
5107
- useEffect19(() => {
5206
+ useEffect20(() => {
5108
5207
  setCollapsed(railCollapsed() ?? defaultCollapsed);
5109
5208
  }, [defaultCollapsed]);
5110
- useEffect19(() => {
5209
+ useEffect20(() => {
5111
5210
  setMenu(false);
5112
5211
  setSearch(false);
5113
5212
  }, [pathname]);
5114
- useEffect19(() => {
5213
+ useEffect20(() => {
5115
5214
  if (!menu) return;
5116
5215
  const grown = () => {
5117
5216
  const button = menuButton.current;
@@ -5120,7 +5219,7 @@ function AppShell({
5120
5219
  window.addEventListener("resize", grown);
5121
5220
  return () => window.removeEventListener("resize", grown);
5122
5221
  }, [menu]);
5123
- useEffect19(() => {
5222
+ useEffect20(() => {
5124
5223
  if (layout === "rail") return;
5125
5224
  const hotkey = (event) => {
5126
5225
  if (!(event.metaKey || event.ctrlKey) || event.altKey || event.shiftKey || event.key.toLowerCase() !== "k") return;
@@ -5139,7 +5238,7 @@ function AppShell({
5139
5238
  };
5140
5239
  const row = ({ href, label, icon: icon9, count }) => ({ id: href, href, label, icon: icon9, badge: layout === "rail" ? void 0 : count });
5141
5240
  const nav = groups ? groups.map((group) => ({ label: group.label, items: group.sections.map(row) })) : [{ items: sections.map((section) => ({ ...row(section), items: section.items?.map(row) })) }];
5142
- const sidebar = (label) => /* @__PURE__ */ jsx41(
5241
+ const sidebar = (label) => /* @__PURE__ */ jsx42(
5143
5242
  SidebarNav,
5144
5243
  {
5145
5244
  "aria-label": label,
@@ -5151,22 +5250,23 @@ function AppShell({
5151
5250
  const linkProps = { ...props, onClick: (event) => {
5152
5251
  if (!event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey) setMenu(false);
5153
5252
  } };
5154
- return renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx41("a", { ...linkProps });
5253
+ return renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx42("a", { ...linkProps });
5155
5254
  }
5156
5255
  }
5157
5256
  );
5158
5257
  const foldLabel = collapsed ? "Expand sidebar" : "Collapse sidebar";
5159
5258
  const navigable = links.length > 1 || Boolean(back);
5160
- const lockup = /* @__PURE__ */ jsxs37("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
5161
- brand ?? /* @__PURE__ */ jsx41("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
5162
- /* @__PURE__ */ jsx41("span", { children: word })
5259
+ const bandTitle = width === "full" && layout === "topbar" && navigable && title != null;
5260
+ const lockup = /* @__PURE__ */ jsxs38("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
5261
+ brand ?? /* @__PURE__ */ jsx42("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
5262
+ /* @__PURE__ */ jsx42("span", { children: word })
5163
5263
  ] });
5164
5264
  const ownItems = accountItems.map(({ label, icon: icon9, href }, i) => ({ label, icon: icon9, href, value: `item-${i}` }));
5165
5265
  const pick = (value) => {
5166
5266
  if (value === "sign-out") onSignOut();
5167
5267
  else accountItems[Number(String(value).slice(5))]?.onSelect?.();
5168
5268
  };
5169
- const accountBlock = (withTheme = false, inPlace = false) => /* @__PURE__ */ jsx41(
5269
+ const accountBlock = (withTheme = false, inPlace = false) => /* @__PURE__ */ jsx42(
5170
5270
  AccountMenu,
5171
5271
  {
5172
5272
  account,
@@ -5177,10 +5277,10 @@ function AppShell({
5177
5277
  away: menuButton
5178
5278
  }
5179
5279
  );
5180
- const headSlot = layout === "topbar" && headControl && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__head-control", children: headControl });
5181
- const foldControl = /* @__PURE__ */ jsxs37("div", { className: "ui-app__fold-row", children: [
5280
+ const headSlot = layout === "topbar" && headControl && /* @__PURE__ */ jsx42("div", { className: "ui-react-app__head-control", children: headControl });
5281
+ const foldControl = /* @__PURE__ */ jsxs38("div", { className: "ui-app__fold-row", children: [
5182
5282
  headSlot,
5183
- /* @__PURE__ */ jsxs37(
5283
+ /* @__PURE__ */ jsxs38(
5184
5284
  "button",
5185
5285
  {
5186
5286
  type: "button",
@@ -5189,37 +5289,37 @@ function AppShell({
5189
5289
  "aria-label": foldLabel,
5190
5290
  onClick: fold,
5191
5291
  children: [
5192
- /* @__PURE__ */ jsx41("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs37("svg", { className: "ui-icon", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
5193
- /* @__PURE__ */ jsx41("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
5194
- /* @__PURE__ */ jsx41("path", { className: "ui-app__fold-seam", d: "M9 3v18" }),
5195
- /* @__PURE__ */ jsx41("path", { className: "ui-app__fold-arrow", d: "m16 15-3-3 3-3" })
5292
+ /* @__PURE__ */ jsx42("span", { className: "ui-nav__ic", children: /* @__PURE__ */ jsxs38("svg", { className: "ui-icon", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
5293
+ /* @__PURE__ */ jsx42("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
5294
+ /* @__PURE__ */ jsx42("path", { className: "ui-app__fold-seam", d: "M9 3v18" }),
5295
+ /* @__PURE__ */ jsx42("path", { className: "ui-app__fold-arrow", d: "m16 15-3-3 3-3" })
5196
5296
  ] }) }),
5197
- /* @__PURE__ */ jsx41("span", { className: "ui-nav__label", children: foldLabel })
5297
+ /* @__PURE__ */ jsx42("span", { className: "ui-nav__label", children: foldLabel })
5198
5298
  ]
5199
5299
  }
5200
5300
  )
5201
5301
  ] });
5202
- const page = /* @__PURE__ */ jsxs37("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
5203
- back && /* @__PURE__ */ jsx41(BackLink, { ...back }),
5204
- title != null && (tools ? /* @__PURE__ */ jsxs37("div", { className: "ui-app__title-row", children: [
5205
- /* @__PURE__ */ jsx41("h1", { children: title }),
5206
- /* @__PURE__ */ jsx41("div", { className: "ui-app__tools", children: tools })
5207
- ] }) : /* @__PURE__ */ jsx41("h1", { children: title })),
5208
- lede && /* @__PURE__ */ jsx41("p", { className: "ui-app__sub", children: lede }),
5209
- actions && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__actions", children: actions }),
5210
- /* @__PURE__ */ jsx41("div", { className: "ui-app__body", children })
5302
+ const page = /* @__PURE__ */ jsxs38("main", { className: `ui-app__main${width === "centered" ? "" : ` ui-app__main--${width}`}`, children: [
5303
+ back && /* @__PURE__ */ jsx42(BackLink, { ...back }),
5304
+ title != null && !bandTitle && (tools ? /* @__PURE__ */ jsxs38("div", { className: "ui-app__title-row", children: [
5305
+ /* @__PURE__ */ jsx42("h1", { children: title }),
5306
+ /* @__PURE__ */ jsx42("div", { className: "ui-app__tools", children: tools })
5307
+ ] }) : /* @__PURE__ */ jsx42("h1", { children: title })),
5308
+ lede && /* @__PURE__ */ jsx42("p", { className: "ui-app__sub", children: lede }),
5309
+ actions && /* @__PURE__ */ jsx42("div", { className: "ui-react-app__actions", children: actions }),
5310
+ /* @__PURE__ */ jsx42("div", { className: "ui-app__body", children })
5211
5311
  ] });
5212
- if (layout === "rail") return /* @__PURE__ */ jsxs37("div", { className: `ui-app ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
5213
- /* @__PURE__ */ jsxs37("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
5214
- /* @__PURE__ */ jsxs37("div", { className: "ui-app__head", children: [
5312
+ if (layout === "rail") return /* @__PURE__ */ jsxs38("div", { className: `ui-app ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
5313
+ /* @__PURE__ */ jsxs38("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
5314
+ /* @__PURE__ */ jsxs38("div", { className: "ui-app__head", children: [
5215
5315
  lockup,
5216
5316
  foldControl
5217
5317
  ] }),
5218
5318
  sidebar("Sections"),
5219
5319
  accountBlock()
5220
5320
  ] }),
5221
- /* @__PURE__ */ jsxs37("header", { className: "ui-app__bar ui-app__bar--phone", children: [
5222
- /* @__PURE__ */ jsx41(
5321
+ /* @__PURE__ */ jsxs38("header", { className: "ui-app__bar ui-app__bar--phone", children: [
5322
+ /* @__PURE__ */ jsx42(
5223
5323
  Button,
5224
5324
  {
5225
5325
  ref: menuButton,
@@ -5233,10 +5333,10 @@ function AppShell({
5233
5333
  onClick: () => setMenu(true)
5234
5334
  }
5235
5335
  ),
5236
- /* @__PURE__ */ jsx41("a", { className: "ui-app__brand ui-app__brand--band", href: brandHref, "aria-label": word, children: brand ?? /* @__PURE__ */ jsx41("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(`${uid}-band`, 24) } }) })
5336
+ /* @__PURE__ */ jsx42("a", { className: "ui-app__brand ui-app__brand--band", href: brandHref, "aria-label": word, children: brand ?? /* @__PURE__ */ jsx42("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(`${uid}-band`, 24) } }) })
5237
5337
  ] }),
5238
5338
  page,
5239
- /* @__PURE__ */ jsx41(
5339
+ /* @__PURE__ */ jsx42(
5240
5340
  Drawer,
5241
5341
  {
5242
5342
  open: menu,
@@ -5244,16 +5344,16 @@ function AppShell({
5244
5344
  title: word,
5245
5345
  side: drawerSide ?? "left",
5246
5346
  size: "sm",
5247
- footer: /* @__PURE__ */ jsx41("div", { className: "ui-app__drawer", children: accountBlock() }),
5248
- children: /* @__PURE__ */ jsx41("div", { className: "ui-app__drawer", children: sidebar("Menu sections") })
5347
+ footer: /* @__PURE__ */ jsx42("div", { className: "ui-app__drawer", children: accountBlock() }),
5348
+ children: /* @__PURE__ */ jsx42("div", { className: "ui-app__drawer", children: sidebar("Menu sections") })
5249
5349
  }
5250
5350
  )
5251
5351
  ] });
5252
- const ends = bandActions && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__band-actions", children: bandActions });
5253
- const control = bandControl && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__control", inert: collapsed, children: bandControl });
5254
- return /* @__PURE__ */ jsxs37("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
5255
- navigable && /* @__PURE__ */ jsxs37("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
5256
- /* @__PURE__ */ jsxs37("div", { className: "ui-app__head", children: [
5352
+ const ends = bandActions && /* @__PURE__ */ jsx42("div", { className: "ui-react-app__band-actions", children: bandActions });
5353
+ const control = bandControl && /* @__PURE__ */ jsx42("div", { className: "ui-react-app__control", inert: collapsed, children: bandControl });
5354
+ return /* @__PURE__ */ jsxs38("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
5355
+ navigable && /* @__PURE__ */ jsxs38("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
5356
+ /* @__PURE__ */ jsxs38("div", { className: "ui-app__head", children: [
5257
5357
  lockup,
5258
5358
  foldControl
5259
5359
  ] }),
@@ -5261,20 +5361,23 @@ function AppShell({
5261
5361
  sidebar("Sections"),
5262
5362
  accountBlock(true)
5263
5363
  ] }),
5264
- /* @__PURE__ */ jsxs37("div", { className: "ui-app__well", children: [
5265
- /* @__PURE__ */ jsxs37("header", { className: "ui-app__bar", children: [
5266
- navigable ? /* @__PURE__ */ jsxs37(Fragment19, { children: [
5267
- /* @__PURE__ */ jsx41("a", { className: "ui-app__brand ui-app__brand--band", href: brandHref, "aria-label": word, children: brand ?? /* @__PURE__ */ jsx41("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(`${uid}-band`, 24) } }) }),
5268
- /* @__PURE__ */ jsx41("span", { className: "ui-react-app__title", "aria-hidden": "true", children: title })
5364
+ /* @__PURE__ */ jsxs38("div", { className: "ui-app__well", children: [
5365
+ /* @__PURE__ */ jsxs38("header", { className: "ui-app__bar", children: [
5366
+ navigable ? /* @__PURE__ */ jsxs38(Fragment19, { children: [
5367
+ /* @__PURE__ */ jsx42("a", { className: "ui-app__brand ui-app__brand--band", href: brandHref, "aria-label": word, children: brand ?? /* @__PURE__ */ jsx42("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(`${uid}-band`, 24) } }) }),
5368
+ bandTitle ? /* @__PURE__ */ jsxs38(Fragment19, { children: [
5369
+ /* @__PURE__ */ jsx42("h1", { className: "ui-react-app__title ui-react-app__title--page", children: title }),
5370
+ tools && /* @__PURE__ */ jsx42("div", { className: "ui-app__tools ui-react-app__band-tools", children: tools })
5371
+ ] }) : /* @__PURE__ */ jsx42("span", { className: "ui-react-app__title", "aria-hidden": "true", children: title })
5269
5372
  ] }) : lockup,
5270
- /* @__PURE__ */ jsxs37("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
5271
- /* @__PURE__ */ jsx41("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx41(Icon, { name: "search" }) }),
5272
- /* @__PURE__ */ jsx41("span", { className: "ui-app__search-txt", children: searchLabel }),
5273
- /* @__PURE__ */ jsx41("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
5373
+ /* @__PURE__ */ jsxs38("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
5374
+ /* @__PURE__ */ jsx42("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx42(Icon, { name: "search" }) }),
5375
+ /* @__PURE__ */ jsx42("span", { className: "ui-app__search-txt", children: searchLabel }),
5376
+ /* @__PURE__ */ jsx42("kbd", { className: "ui-cmdk__key", children: paletteHotkey() })
5274
5377
  ] }),
5275
- /* @__PURE__ */ jsx41("span", { className: "ui-app__bar-gap" }),
5378
+ /* @__PURE__ */ jsx42("span", { className: "ui-app__bar-gap" }),
5276
5379
  navigable && ends,
5277
- navigable ? /* @__PURE__ */ jsx41(
5380
+ navigable ? /* @__PURE__ */ jsx42(
5278
5381
  Button,
5279
5382
  {
5280
5383
  ref: menuButton,
@@ -5287,12 +5390,12 @@ function AppShell({
5287
5390
  "aria-expanded": menu,
5288
5391
  onClick: () => setMenu(true)
5289
5392
  }
5290
- ) : /* @__PURE__ */ jsxs37(Fragment19, { children: [
5291
- bandControl && /* @__PURE__ */ jsx41("span", { className: "ui-react-app__band-control", children: bandControl }),
5292
- headControl && /* @__PURE__ */ jsx41("span", { className: "ui-react-app__band-control", children: headControl }),
5393
+ ) : /* @__PURE__ */ jsxs38(Fragment19, { children: [
5394
+ bandControl && /* @__PURE__ */ jsx42("span", { className: "ui-react-app__band-control", children: bandControl }),
5395
+ headControl && /* @__PURE__ */ jsx42("span", { className: "ui-react-app__band-control", children: headControl }),
5293
5396
  ends,
5294
- /* @__PURE__ */ jsx41(ThemeToggle, {}),
5295
- /* @__PURE__ */ jsx41("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx41(
5397
+ /* @__PURE__ */ jsx42(ThemeToggle, {}),
5398
+ /* @__PURE__ */ jsx42("div", { className: "ui-app__user ui-app__user--bar", children: /* @__PURE__ */ jsx42(
5296
5399
  Dropdown,
5297
5400
  {
5298
5401
  variant: "menu",
@@ -5301,13 +5404,13 @@ function AppShell({
5301
5404
  title: `Signed in as ${account.name}, ${account.email}`,
5302
5405
  triggerClass: "ui-app__user-trigger",
5303
5406
  panelClass: "ui-app__user-panel",
5304
- triggerContent: /* @__PURE__ */ jsxs37(Fragment19, { children: [
5305
- /* @__PURE__ */ jsx41("span", { className: "ui-sr", children: `Signed in as ${account.name}, ${account.email}` }),
5306
- /* @__PURE__ */ jsx41("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx41(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) })
5407
+ triggerContent: /* @__PURE__ */ jsxs38(Fragment19, { children: [
5408
+ /* @__PURE__ */ jsx42("span", { className: "ui-sr", children: `Signed in as ${account.name}, ${account.email}` }),
5409
+ /* @__PURE__ */ jsx42("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx42(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) })
5307
5410
  ] }),
5308
- header: /* @__PURE__ */ jsxs37("div", { className: "ui-dropdown__head", children: [
5309
- /* @__PURE__ */ jsx41("b", { children: account.name }),
5310
- /* @__PURE__ */ jsx41("span", { children: account.email })
5411
+ header: /* @__PURE__ */ jsxs38("div", { className: "ui-dropdown__head", children: [
5412
+ /* @__PURE__ */ jsx42("b", { children: account.name }),
5413
+ /* @__PURE__ */ jsx42("span", { children: account.email })
5311
5414
  ] }),
5312
5415
  items: [...ownItems, { label: "Sign out", value: "sign-out", icon: "logout", danger: true }],
5313
5416
  onSelect: pick
@@ -5317,7 +5420,7 @@ function AppShell({
5317
5420
  ] }),
5318
5421
  page
5319
5422
  ] }),
5320
- navigable && /* @__PURE__ */ jsx41(
5423
+ navigable && /* @__PURE__ */ jsx42(
5321
5424
  Drawer,
5322
5425
  {
5323
5426
  open: menu,
@@ -5327,47 +5430,127 @@ function AppShell({
5327
5430
  size: "sm",
5328
5431
  initialFocusRef: firstRow,
5329
5432
  headerActions: headSlot,
5330
- footer: /* @__PURE__ */ jsx41("div", { className: "ui-app__drawer", children: accountBlock(true, true) }),
5331
- children: /* @__PURE__ */ jsxs37("div", { className: "ui-react-app__menu", ref: menuBody, children: [
5332
- bandControl && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__control", children: bandControl }),
5433
+ footer: /* @__PURE__ */ jsx42("div", { className: "ui-app__drawer", children: accountBlock(true, true) }),
5434
+ children: /* @__PURE__ */ jsxs38("div", { className: "ui-react-app__menu", ref: menuBody, children: [
5435
+ bandControl && /* @__PURE__ */ jsx42("div", { className: "ui-react-app__control", children: bandControl }),
5333
5436
  sidebar("Menu sections")
5334
5437
  ] })
5335
5438
  }
5336
5439
  ),
5337
- /* @__PURE__ */ jsx41(CommandPalette, { ...palette ?? { groups: groups ? groups.map((group) => ({ label: group.label, items: group.sections.map(({ href, label, icon: icon9 }) => ({ id: href, href, label, icon: icon9 })) })) : [{ items: sections.flatMap((section) => section.items?.length ? section.items.map(({ href, label, icon: icon9 }) => ({ id: href, href, label, icon: icon9 ?? section.icon, description: section.label })) : [{ id: section.href, href: section.href, label: section.label, icon: section.icon }]) }] }, onNavigate: palette?.onNavigate ?? onNavigate, open: search, onClose: () => setSearch(false) })
5440
+ /* @__PURE__ */ jsx42(CommandPalette, { ...palette ?? { groups: groups ? groups.map((group) => ({ label: group.label, items: group.sections.map(({ href, label, icon: icon9 }) => ({ id: href, href, label, icon: icon9 })) })) : [{ items: sections.flatMap((section) => section.items?.length ? section.items.map(({ href, label, icon: icon9 }) => ({ id: href, href, label, icon: icon9 ?? section.icon, description: section.label })) : [{ id: section.href, href: section.href, label: section.label, icon: section.icon }]) }] }, onNavigate: palette?.onNavigate ?? onNavigate, open: search, onClose: () => setSearch(false) })
5338
5441
  ] });
5339
5442
  }
5340
5443
 
5341
5444
  // src/AuthShell.tsx
5342
5445
  import { forwardRef as forwardRef10 } from "react";
5343
- import { jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
5446
+ import { jsx as jsx43, jsxs as jsxs39 } from "react/jsx-runtime";
5344
5447
  var AuthShell = forwardRef10(function AuthShell2({ brand, children, split, tagline, brandAbove, className, ...rest }, ref) {
5345
5448
  const cls = ["ui-auth", split && "ui-auth--split", brandAbove && "ui-auth--brand-above", className].filter(Boolean).join(" ");
5346
5449
  if (!split && brandAbove) {
5347
- return /* @__PURE__ */ jsxs38("div", { ...rest, ref, className: cls, children: [
5348
- /* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
5349
- /* @__PURE__ */ jsx42("div", { className: "ui-auth__card", children })
5450
+ return /* @__PURE__ */ jsxs39("div", { ...rest, ref, className: cls, children: [
5451
+ /* @__PURE__ */ jsx43("div", { className: "ui-auth__brand", children: brand }),
5452
+ /* @__PURE__ */ jsx43("div", { className: "ui-auth__card", children })
5350
5453
  ] });
5351
5454
  }
5352
5455
  if (!split) {
5353
- return /* @__PURE__ */ jsx42("div", { ...rest, ref, className: cls, children: /* @__PURE__ */ jsxs38("div", { className: "ui-auth__card", children: [
5354
- /* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
5456
+ return /* @__PURE__ */ jsx43("div", { ...rest, ref, className: cls, children: /* @__PURE__ */ jsxs39("div", { className: "ui-auth__card", children: [
5457
+ /* @__PURE__ */ jsx43("div", { className: "ui-auth__brand", children: brand }),
5355
5458
  children
5356
5459
  ] }) });
5357
5460
  }
5358
- return /* @__PURE__ */ jsxs38("div", { ...rest, ref, className: cls, children: [
5359
- /* @__PURE__ */ jsxs38("aside", { className: "ui-auth__brand-pane", children: [
5360
- /* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
5361
- tagline && /* @__PURE__ */ jsx42("p", { className: "ui-auth__tagline", children: tagline })
5461
+ return /* @__PURE__ */ jsxs39("div", { ...rest, ref, className: cls, children: [
5462
+ /* @__PURE__ */ jsxs39("aside", { className: "ui-auth__brand-pane", children: [
5463
+ /* @__PURE__ */ jsx43("div", { className: "ui-auth__brand", children: brand }),
5464
+ tagline && /* @__PURE__ */ jsx43("p", { className: "ui-auth__tagline", children: tagline })
5362
5465
  ] }),
5363
- /* @__PURE__ */ jsx42("div", { className: "ui-auth__pane", children })
5466
+ /* @__PURE__ */ jsx43("div", { className: "ui-auth__pane", children })
5364
5467
  ] });
5365
5468
  });
5366
5469
 
5470
+ // src/ThreeColumnPage.tsx
5471
+ import { useEffect as useEffect21, useId as useId16, useRef as useRef25, useState as useState21 } from "react";
5472
+ import { playEntrance as playEntrance3 } from "@apliteni/apliteni-ui/motion";
5473
+ import { jsx as jsx44, jsxs as jsxs40 } from "react/jsx-runtime";
5474
+ var order = ["nav", "steps", "work"];
5475
+ function ThreeColumnPage({
5476
+ title,
5477
+ tools,
5478
+ nav,
5479
+ steps,
5480
+ work,
5481
+ view,
5482
+ defaultView = "steps",
5483
+ onViewChange,
5484
+ viewsLabel = "Page columns",
5485
+ className
5486
+ }) {
5487
+ const uid = useId16();
5488
+ const [own, setOwn] = useState21(defaultView);
5489
+ const shown = view ?? own;
5490
+ const areas = { nav, steps, work };
5491
+ const root = useRef25(null);
5492
+ const moved = useRef25(null);
5493
+ useEffect21(() => {
5494
+ if (moved.current !== shown) return;
5495
+ moved.current = null;
5496
+ const opened = root.current?.querySelector(`[data-area="${shown}"]`);
5497
+ playEntrance3(opened);
5498
+ const heading = opened?.querySelector(":scope > h2");
5499
+ heading?.focus({ preventScroll: true });
5500
+ heading?.scrollIntoView?.({ block: "nearest" });
5501
+ }, [shown]);
5502
+ const choose = (next) => {
5503
+ moved.current = next;
5504
+ if (view === void 0) setOwn(next);
5505
+ onViewChange?.(next);
5506
+ if (next === shown) {
5507
+ moved.current = null;
5508
+ root.current?.querySelector(`[data-area="${next}"] > h2`)?.focus();
5509
+ }
5510
+ };
5511
+ const area = (key) => /* @__PURE__ */ jsxs40(
5512
+ "section",
5513
+ {
5514
+ "data-area": key,
5515
+ className: `ui-columns__area ui-columns__area--${key}`,
5516
+ "aria-labelledby": `${uid}-${key}`,
5517
+ children: [
5518
+ /* @__PURE__ */ jsx44("h2", { id: `${uid}-${key}`, className: "ui-card__title", tabIndex: -1, children: areas[key].title }),
5519
+ areas[key].children
5520
+ ]
5521
+ },
5522
+ key
5523
+ );
5524
+ return /* @__PURE__ */ jsxs40("div", { ref: root, className: ["ui-columns", className].filter(Boolean).join(" "), "data-view": shown, children: [
5525
+ /* @__PURE__ */ jsxs40("div", { className: "ui-columns__flow", children: [
5526
+ /* @__PURE__ */ jsxs40("div", { className: "ui-columns__head", children: [
5527
+ title && /* @__PURE__ */ jsx44("h1", { children: title }),
5528
+ tools && /* @__PURE__ */ jsx44("div", { className: "ui-app__tools", children: tools }),
5529
+ /* @__PURE__ */ jsx44("div", { role: "group", "aria-label": viewsLabel, className: "ui-nav ui-columns__views", children: order.map((key) => /* @__PURE__ */ jsx44(
5530
+ "button",
5531
+ {
5532
+ type: "button",
5533
+ "aria-pressed": shown === key,
5534
+ className: `ui-nav__item${shown === key ? " is-active" : ""}`,
5535
+ onClick: () => choose(key),
5536
+ children: areas[key].link
5537
+ },
5538
+ key
5539
+ )) })
5540
+ ] }),
5541
+ /* @__PURE__ */ jsxs40("div", { className: "ui-columns__pair", children: [
5542
+ area("nav"),
5543
+ area("steps")
5544
+ ] })
5545
+ ] }),
5546
+ area("work")
5547
+ ] });
5548
+ }
5549
+
5367
5550
  // src/Footer.tsx
5368
- import { useId as useId15 } from "react";
5551
+ import { useId as useId17 } from "react";
5369
5552
  import { prism as prism2, safeUrl as safeUrl5 } from "@apliteni/apliteni-ui";
5370
- import { jsx as jsx43, jsxs as jsxs39 } from "react/jsx-runtime";
5553
+ import { jsx as jsx45, jsxs as jsxs41 } from "react/jsx-runtime";
5371
5554
  var SOCIAL_GLYPHS = {
5372
5555
  github: '<path d="M12 2a10 10 0 0 0-3.16 19.49c.5.09.68-.22.68-.48v-1.7c-2.78.6-3.37-1.34-3.37-1.34-.45-1.16-1.11-1.47-1.11-1.47-.9-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.9 1.53 2.34 1.09 2.91.83.09-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.94 0-1.09.39-1.98 1.03-2.68-.1-.25-.45-1.27.1-2.64 0 0 .84-.27 2.75 1.02a9.5 9.5 0 0 1 5 0c1.91-1.29 2.75-1.02 2.75-1.02.55 1.37.2 2.39.1 2.64.64.7 1.03 1.59 1.03 2.68 0 3.84-2.34 4.68-4.57 4.93.36.31.68.92.68 1.85v2.74c0 .27.18.58.69.48A10 10 0 0 0 12 2z"/>',
5373
5556
  x: '<path d="M4 3h4.5l4 5.5L17.5 3H21l-6.5 8.5L21 21h-4.5l-4.3-5.9L7 21H3.5l6.8-8.9z"/>',
@@ -5376,10 +5559,10 @@ var SOCIAL_GLYPHS = {
5376
5559
  };
5377
5560
  var escapeText = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
5378
5561
  function Legal({ legal, legalLinks, switcher }) {
5379
- return /* @__PURE__ */ jsxs39("div", { className: "ui-footer__bar", children: [
5380
- /* @__PURE__ */ jsx43("span", { className: "ui-footer__legal", children: legal }),
5381
- legalLinks && legalLinks.length > 0 && /* @__PURE__ */ jsx43("nav", { className: "ui-footer__legal-links", "aria-label": "Legal", children: legalLinks.map(({ label, href: to }) => /* @__PURE__ */ jsx43("a", { href: safeUrl5(to ?? "#"), children: label }, label)) }),
5382
- switcher ? /* @__PURE__ */ jsx43("div", { className: "ui-footer__switcher", children: switcher }) : null
5562
+ return /* @__PURE__ */ jsxs41("div", { className: "ui-footer__bar", children: [
5563
+ /* @__PURE__ */ jsx45("span", { className: "ui-footer__legal", children: legal }),
5564
+ legalLinks && legalLinks.length > 0 && /* @__PURE__ */ jsx45("nav", { className: "ui-footer__legal-links", "aria-label": "Legal", children: legalLinks.map(({ label, href: to }) => /* @__PURE__ */ jsx45("a", { href: safeUrl5(to ?? "#"), children: label }, label)) }),
5565
+ switcher ? /* @__PURE__ */ jsx45("div", { className: "ui-footer__switcher", children: switcher }) : null
5383
5566
  ] });
5384
5567
  }
5385
5568
  function Footer({
@@ -5397,14 +5580,14 @@ function Footer({
5397
5580
  className,
5398
5581
  ...rest
5399
5582
  }) {
5400
- const uid = useId15();
5583
+ const uid = useId17();
5401
5584
  const cls = ["ui-footer", `ui-footer--${variant}`, className].filter(Boolean).join(" ");
5402
- const bar = /* @__PURE__ */ jsx43(Legal, { legal, legalLinks, switcher });
5585
+ const bar = /* @__PURE__ */ jsx45(Legal, { legal, legalLinks, switcher });
5403
5586
  if (variant !== "full") {
5404
- return /* @__PURE__ */ jsx43("footer", { ...rest, className: cls, role: "contentinfo", children: /* @__PURE__ */ jsx43("div", { className: "ui-footer__in", children: bar }) });
5587
+ return /* @__PURE__ */ jsx45("footer", { ...rest, className: cls, role: "contentinfo", children: /* @__PURE__ */ jsx45("div", { className: "ui-footer__in", children: bar }) });
5405
5588
  }
5406
5589
  const mark = prism2(uid.replace(/:/g, ""), 22);
5407
- const lockup = brand ?? /* @__PURE__ */ jsx43(
5590
+ const lockup = brand ?? /* @__PURE__ */ jsx45(
5408
5591
  "a",
5409
5592
  {
5410
5593
  className: "brand",
@@ -5413,21 +5596,21 @@ function Footer({
5413
5596
  dangerouslySetInnerHTML: { __html: `${mark}<span>${escapeText(word)}</span>` }
5414
5597
  }
5415
5598
  );
5416
- return /* @__PURE__ */ jsx43("footer", { ...rest, className: cls, role: "contentinfo", children: /* @__PURE__ */ jsxs39("div", { className: "ui-footer__in", children: [
5417
- /* @__PURE__ */ jsxs39("div", { className: "ui-footer__top", children: [
5418
- brand !== false && /* @__PURE__ */ jsxs39("div", { className: "ui-footer__brand", children: [
5599
+ return /* @__PURE__ */ jsx45("footer", { ...rest, className: cls, role: "contentinfo", children: /* @__PURE__ */ jsxs41("div", { className: "ui-footer__in", children: [
5600
+ /* @__PURE__ */ jsxs41("div", { className: "ui-footer__top", children: [
5601
+ brand !== false && /* @__PURE__ */ jsxs41("div", { className: "ui-footer__brand", children: [
5419
5602
  lockup,
5420
- tagline && /* @__PURE__ */ jsx43("p", { className: "ui-footer__tagline", children: tagline }),
5421
- social.length > 0 && /* @__PURE__ */ jsx43("div", { className: "ui-footer__socials", children: social.map(({ label, href: to, icon: icon9 = "github" }) => {
5603
+ tagline && /* @__PURE__ */ jsx45("p", { className: "ui-footer__tagline", children: tagline }),
5604
+ social.length > 0 && /* @__PURE__ */ jsx45("div", { className: "ui-footer__socials", children: social.map(({ label, href: to, icon: icon9 = "github" }) => {
5422
5605
  const markup = SOCIAL_GLYPHS[icon9];
5423
5606
  const fill = icon9 === "mail" ? "none" : "currentColor";
5424
5607
  const viewBox = icon9 === "linkedin" ? "0 0 448 512" : "0 0 24 24";
5425
- return /* @__PURE__ */ jsx43("a", { className: "ui-footer__social", href: safeUrl5(to ?? "#"), "aria-label": label, children: /* @__PURE__ */ jsx43("svg", { viewBox, fill, "aria-hidden": "true", dangerouslySetInnerHTML: { __html: markup } }) }, label);
5608
+ return /* @__PURE__ */ jsx45("a", { className: "ui-footer__social", href: safeUrl5(to ?? "#"), "aria-label": label, children: /* @__PURE__ */ jsx45("svg", { viewBox, fill, "aria-hidden": "true", dangerouslySetInnerHTML: { __html: markup } }) }, label);
5426
5609
  }) })
5427
5610
  ] }),
5428
- (links || columns.length > 0) && /* @__PURE__ */ jsx43("nav", { className: "ui-footer__nav", "aria-label": "Footer", children: links ?? columns.map(({ title, links: columnLinks }, i) => /* @__PURE__ */ jsxs39("div", { className: "ui-footer__col", children: [
5429
- title && /* @__PURE__ */ jsx43("h2", { className: "ui-footer__col-title", children: title }),
5430
- /* @__PURE__ */ jsx43("ul", { className: "ui-footer__links", children: columnLinks.map(({ label, href: to, target }) => /* @__PURE__ */ jsx43("li", { children: /* @__PURE__ */ jsx43("a", { href: safeUrl5(to ?? "#"), target, rel: target ? "noreferrer" : void 0, children: label }) }, label)) })
5611
+ (links || columns.length > 0) && /* @__PURE__ */ jsx45("nav", { className: "ui-footer__nav", "aria-label": "Footer", children: links ?? columns.map(({ title, links: columnLinks }, i) => /* @__PURE__ */ jsxs41("div", { className: "ui-footer__col", children: [
5612
+ title && /* @__PURE__ */ jsx45("h2", { className: "ui-footer__col-title", children: title }),
5613
+ /* @__PURE__ */ jsx45("ul", { className: "ui-footer__links", children: columnLinks.map(({ label, href: to, target }) => /* @__PURE__ */ jsx45("li", { children: /* @__PURE__ */ jsx45("a", { href: safeUrl5(to ?? "#"), target, rel: target ? "noreferrer" : void 0, children: label }) }, label)) })
5431
5614
  ] }, title ?? i)) })
5432
5615
  ] }),
5433
5616
  bar
@@ -5435,32 +5618,32 @@ function Footer({
5435
5618
  }
5436
5619
 
5437
5620
  // src/ThemeChoice.tsx
5438
- import { useId as useId16 } from "react";
5439
- import { jsx as jsx44, jsxs as jsxs40 } from "react/jsx-runtime";
5621
+ import { useId as useId18 } from "react";
5622
+ import { jsx as jsx46, jsxs as jsxs42 } from "react/jsx-runtime";
5440
5623
  var OPTIONS = [
5441
5624
  { value: "auto", name: "System" },
5442
5625
  { value: "light", name: "Light" },
5443
5626
  { value: "dark", name: "Dark" }
5444
5627
  ];
5445
- var Scene = ({ theme }) => /* @__PURE__ */ jsxs40("span", { className: `ui-theme-choice__scene ui-theme-choice__scene--${theme}`, children: [
5446
- /* @__PURE__ */ jsxs40("span", { className: "ui-theme-choice__rail", children: [
5447
- /* @__PURE__ */ jsx44("span", {}),
5448
- /* @__PURE__ */ jsx44("span", {}),
5449
- /* @__PURE__ */ jsx44("span", {})
5628
+ var Scene = ({ theme }) => /* @__PURE__ */ jsxs42("span", { className: `ui-theme-choice__scene ui-theme-choice__scene--${theme}`, children: [
5629
+ /* @__PURE__ */ jsxs42("span", { className: "ui-theme-choice__rail", children: [
5630
+ /* @__PURE__ */ jsx46("span", {}),
5631
+ /* @__PURE__ */ jsx46("span", {}),
5632
+ /* @__PURE__ */ jsx46("span", {})
5450
5633
  ] }),
5451
- /* @__PURE__ */ jsxs40("span", { className: "ui-theme-choice__main", children: [
5452
- /* @__PURE__ */ jsx44("span", { className: "ui-theme-choice__title" }),
5453
- /* @__PURE__ */ jsxs40("span", { className: "ui-theme-choice__card", children: [
5454
- /* @__PURE__ */ jsx44("span", {}),
5455
- /* @__PURE__ */ jsx44("span", {})
5634
+ /* @__PURE__ */ jsxs42("span", { className: "ui-theme-choice__main", children: [
5635
+ /* @__PURE__ */ jsx46("span", { className: "ui-theme-choice__title" }),
5636
+ /* @__PURE__ */ jsxs42("span", { className: "ui-theme-choice__card", children: [
5637
+ /* @__PURE__ */ jsx46("span", {}),
5638
+ /* @__PURE__ */ jsx46("span", {})
5456
5639
  ] })
5457
5640
  ] })
5458
5641
  ] });
5459
5642
  function ThemeChoice({ label = "Theme" }) {
5460
5643
  const { theme, set } = useThemeChoice();
5461
- const name = useId16();
5462
- return /* @__PURE__ */ jsx44("div", { className: "ui-theme-choice", role: "radiogroup", "aria-label": label, children: OPTIONS.map(({ value, name: text2 }) => /* @__PURE__ */ jsxs40("label", { className: "ui-theme-choice__option", children: [
5463
- /* @__PURE__ */ jsx44(
5644
+ const name = useId18();
5645
+ return /* @__PURE__ */ jsx46("div", { className: "ui-theme-choice", role: "radiogroup", "aria-label": label, children: OPTIONS.map(({ value, name: text2 }) => /* @__PURE__ */ jsxs42("label", { className: "ui-theme-choice__option", children: [
5646
+ /* @__PURE__ */ jsx46(
5464
5647
  "input",
5465
5648
  {
5466
5649
  type: "radio",
@@ -5471,20 +5654,20 @@ function ThemeChoice({ label = "Theme" }) {
5471
5654
  onChange: () => set(value)
5472
5655
  }
5473
5656
  ),
5474
- /* @__PURE__ */ jsxs40("span", { className: "ui-theme-choice__pic", "aria-hidden": "true", children: [
5475
- value === "dark" ? /* @__PURE__ */ jsx44(Scene, { theme: "dark" }) : /* @__PURE__ */ jsx44(Scene, { theme: "light" }),
5476
- value === "auto" && /* @__PURE__ */ jsx44(Scene, { theme: "dark" })
5657
+ /* @__PURE__ */ jsxs42("span", { className: "ui-theme-choice__pic", "aria-hidden": "true", children: [
5658
+ value === "dark" ? /* @__PURE__ */ jsx46(Scene, { theme: "dark" }) : /* @__PURE__ */ jsx46(Scene, { theme: "light" }),
5659
+ value === "auto" && /* @__PURE__ */ jsx46(Scene, { theme: "dark" })
5477
5660
  ] }),
5478
- /* @__PURE__ */ jsx44("span", { className: "ui-theme-choice__name", children: text2 })
5661
+ /* @__PURE__ */ jsx46("span", { className: "ui-theme-choice__name", children: text2 })
5479
5662
  ] }, value)) });
5480
5663
  }
5481
5664
 
5482
5665
  // src/Success.tsx
5483
- import { forwardRef as forwardRef11, useEffect as useEffect20, useRef as useRef24, useState as useState20 } from "react";
5484
- import { jsx as jsx45, jsxs as jsxs41 } from "react/jsx-runtime";
5666
+ import { forwardRef as forwardRef11, useEffect as useEffect22, useRef as useRef26, useState as useState22 } from "react";
5667
+ import { jsx as jsx47, jsxs as jsxs43 } from "react/jsx-runtime";
5485
5668
  var SuccessCheck = forwardRef11(function SuccessCheck2({ variant = "line", className, ...rest }, ref) {
5486
5669
  const circled = variant === "circled";
5487
- return /* @__PURE__ */ jsxs41(
5670
+ return /* @__PURE__ */ jsxs43(
5488
5671
  "svg",
5489
5672
  {
5490
5673
  ...rest,
@@ -5496,18 +5679,18 @@ var SuccessCheck = forwardRef11(function SuccessCheck2({ variant = "line", class
5496
5679
  "aria-hidden": "true",
5497
5680
  focusable: "false",
5498
5681
  children: [
5499
- circled && /* @__PURE__ */ jsx45("path", { className: "ui-sx__circle", d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
5500
- /* @__PURE__ */ jsx45("path", { className: "ui-sx__tick", d: circled ? "M22 4L12 14.01l-3-3" : "M20 6L9 17l-5-5" })
5682
+ circled && /* @__PURE__ */ jsx47("path", { className: "ui-sx__circle", d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
5683
+ /* @__PURE__ */ jsx47("path", { className: "ui-sx__tick", d: circled ? "M22 4L12 14.01l-3-3" : "M20 6L9 17l-5-5" })
5501
5684
  ]
5502
5685
  }
5503
5686
  );
5504
5687
  });
5505
5688
  var SuccessPanel = forwardRef11(function SuccessPanel2({ title = "Done", sub, check = "line", className, ...rest }, ref) {
5506
5689
  const circled = check === "circled";
5507
- return /* @__PURE__ */ jsxs41("div", { ...rest, ref, className: ["ui-success", className].filter(Boolean).join(" "), children: [
5508
- /* @__PURE__ */ jsx45("div", { className: ["ui-success__check", circled && "ui-success__check--circled"].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx45(SuccessCheck, { variant: circled ? "circled" : "line" }) }),
5509
- /* @__PURE__ */ jsx45("div", { className: "ui-success__title", children: title }),
5510
- sub && /* @__PURE__ */ jsx45("div", { className: "ui-success__sub", children: sub })
5690
+ return /* @__PURE__ */ jsxs43("div", { ...rest, ref, className: ["ui-success", className].filter(Boolean).join(" "), children: [
5691
+ /* @__PURE__ */ jsx47("div", { className: ["ui-success__check", circled && "ui-success__check--circled"].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx47(SuccessCheck, { variant: circled ? "circled" : "line" }) }),
5692
+ /* @__PURE__ */ jsx47("div", { className: "ui-success__title", children: title }),
5693
+ sub && /* @__PURE__ */ jsx47("div", { className: "ui-success__sub", children: sub })
5511
5694
  ] });
5512
5695
  });
5513
5696
  var pieces = [
@@ -5527,12 +5710,12 @@ var pieces = [
5527
5710
  [80, 0.36, -20, "c", 1.05]
5528
5711
  ];
5529
5712
  function Countdown({ seconds, label = "Redirecting", onDone }) {
5530
- const [remaining, setRemaining] = useState20(seconds);
5531
- const callback = useRef24(onDone);
5532
- useEffect20(() => {
5713
+ const [remaining, setRemaining] = useState22(seconds);
5714
+ const callback = useRef26(onDone);
5715
+ useEffect22(() => {
5533
5716
  callback.current = onDone;
5534
5717
  }, [onDone]);
5535
- useEffect20(() => {
5718
+ useEffect22(() => {
5536
5719
  let count = seconds;
5537
5720
  const timer = setInterval(() => {
5538
5721
  count -= 1;
@@ -5544,12 +5727,12 @@ function Countdown({ seconds, label = "Redirecting", onDone }) {
5544
5727
  }, 1e3);
5545
5728
  return () => clearInterval(timer);
5546
5729
  }, [seconds]);
5547
- return /* @__PURE__ */ jsxs41("div", { className: "ui-sx__count", "data-sx-count": "", style: { "--sx-secs": `${seconds}s` }, children: [
5548
- /* @__PURE__ */ jsx45("span", { className: "ui-sx__count-ring", "aria-hidden": "true" }),
5549
- /* @__PURE__ */ jsxs41("span", { className: "ui-sx__count-text", children: [
5730
+ return /* @__PURE__ */ jsxs43("div", { className: "ui-sx__count", "data-sx-count": "", style: { "--sx-secs": `${seconds}s` }, children: [
5731
+ /* @__PURE__ */ jsx47("span", { className: "ui-sx__count-ring", "aria-hidden": "true" }),
5732
+ /* @__PURE__ */ jsxs43("span", { className: "ui-sx__count-text", children: [
5550
5733
  label,
5551
5734
  " in ",
5552
- /* @__PURE__ */ jsx45("b", { "data-sx-num": "", children: remaining }),
5735
+ /* @__PURE__ */ jsx47("b", { "data-sx-num": "", children: remaining }),
5553
5736
  "s"
5554
5737
  ] })
5555
5738
  ] });
@@ -5576,7 +5759,7 @@ var Success = forwardRef11(function Success2({
5576
5759
  const seconds = countdown?.seconds;
5577
5760
  const duration = seconds != null && Number.isFinite(seconds) && seconds >= 1 ? Math.floor(seconds) : 5;
5578
5761
  const mark = check === "circled" ? "circled" : "line";
5579
- return /* @__PURE__ */ jsxs41(
5762
+ return /* @__PURE__ */ jsxs43(
5580
5763
  "div",
5581
5764
  {
5582
5765
  role: "status",
@@ -5585,16 +5768,16 @@ var Success = forwardRef11(function Success2({
5585
5768
  ref,
5586
5769
  className: ["ui-sx", `ui-sx--${layout}`, `ui-sx--check-${mark}`, confetti && "ui-sx--confetti", className].filter(Boolean).join(" "),
5587
5770
  children: [
5588
- confetti && /* @__PURE__ */ jsx45("div", { className: "ui-sx__confetti", "aria-hidden": "true", children: pieces.map(
5589
- ([x, d, r, t, s], index) => /* @__PURE__ */ jsx45("i", { className: `ui-sx__piece ui-sx__piece--${t}`, style: { left: `${x}%`, "--sx-d": `${d}s`, "--sx-r": `${r}deg`, "--sx-s": s } }, index)
5771
+ confetti && /* @__PURE__ */ jsx47("div", { className: "ui-sx__confetti", "aria-hidden": "true", children: pieces.map(
5772
+ ([x, d, r, t, s], index) => /* @__PURE__ */ jsx47("i", { className: `ui-sx__piece ui-sx__piece--${t}`, style: { left: `${x}%`, "--sx-d": `${d}s`, "--sx-r": `${r}deg`, "--sx-s": s } }, index)
5590
5773
  ) }),
5591
- /* @__PURE__ */ jsxs41("div", { className: "ui-sx__inner", children: [
5592
- /* @__PURE__ */ jsx45("div", { className: "ui-sx__visual", children: /* @__PURE__ */ jsx45(SuccessCheck, { variant: mark }) }),
5593
- /* @__PURE__ */ jsxs41("div", { className: "ui-sx__content", children: [
5594
- /* @__PURE__ */ jsx45(Heading, { className: "ui-sx__title", children: title }),
5595
- body && /* @__PURE__ */ jsx45("p", { className: "ui-sx__body", children: body }),
5596
- hasActions && /* @__PURE__ */ jsx45("div", { className: "ui-sx__actions", children: actions }),
5597
- countdown && /* @__PURE__ */ jsx45(Countdown, { seconds: duration, label: countdown.label, onDone: onCountdownEnd }, duration)
5774
+ /* @__PURE__ */ jsxs43("div", { className: "ui-sx__inner", children: [
5775
+ /* @__PURE__ */ jsx47("div", { className: "ui-sx__visual", children: /* @__PURE__ */ jsx47(SuccessCheck, { variant: mark }) }),
5776
+ /* @__PURE__ */ jsxs43("div", { className: "ui-sx__content", children: [
5777
+ /* @__PURE__ */ jsx47(Heading, { className: "ui-sx__title", children: title }),
5778
+ body && /* @__PURE__ */ jsx47("p", { className: "ui-sx__body", children: body }),
5779
+ hasActions && /* @__PURE__ */ jsx47("div", { className: "ui-sx__actions", children: actions }),
5780
+ countdown && /* @__PURE__ */ jsx47(Countdown, { seconds: duration, label: countdown.label, onDone: onCountdownEnd }, duration)
5598
5781
  ] })
5599
5782
  ] })
5600
5783
  ]
@@ -5606,18 +5789,18 @@ var Success = forwardRef11(function Success2({
5606
5789
  import {
5607
5790
  useCallback as useCallback8,
5608
5791
  useContext as useContext5,
5609
- useEffect as useEffect21,
5610
- useId as useId17,
5792
+ useEffect as useEffect23,
5793
+ useId as useId19,
5611
5794
  useLayoutEffect as useLayoutEffect5,
5612
5795
  useMemo as useMemo6,
5613
- useRef as useRef25,
5614
- useState as useState21
5796
+ useRef as useRef27,
5797
+ useState as useState23
5615
5798
  } from "react";
5616
5799
  import { createPortal as createPortal8 } from "react-dom";
5617
5800
  import { CHART_FLOOR, bridgeWalk, chartScale, pointTarget } from "@apliteni/apliteni-ui";
5618
5801
 
5619
5802
  // src/chart-looks.tsx
5620
- import { Fragment as Fragment20, jsx as jsx46, jsxs as jsxs42 } from "react/jsx-runtime";
5803
+ import { Fragment as Fragment20, jsx as jsx48, jsxs as jsxs44 } from "react/jsx-runtime";
5621
5804
  var LOOK_DEFAULT = {
5622
5805
  line: "thin",
5623
5806
  area: "stacked",
@@ -5839,7 +6022,7 @@ function linesDrawing(g, open) {
5839
6022
  const [a, b] = [run[0], run[run.length - 1]];
5840
6023
  return `M${px(centre(a))} ${px(y(layer.from[a]))}L${px(centre(a))} ${px(y(at(layer, a)))}${run.slice(0, -1).map((i) => bend(k, i)).join("")}L${px(centre(b))} ${px(y(layer.from[b]))}Z`;
5841
6024
  }).join("");
5842
- return d && /* @__PURE__ */ jsx46(
6025
+ return d && /* @__PURE__ */ jsx48(
5843
6026
  "path",
5844
6027
  {
5845
6028
  className: cx8("ui-chart__area", tone(layer.tone)),
@@ -5849,7 +6032,7 @@ function linesDrawing(g, open) {
5849
6032
  `fill-${layer.id}`
5850
6033
  );
5851
6034
  }
5852
- return /* @__PURE__ */ jsx46(
6035
+ return /* @__PURE__ */ jsx48(
5853
6036
  "path",
5854
6037
  {
5855
6038
  className: cx8(look.share ? "ui-chart__segment" : "ui-chart__area", tone(layer.tone)),
@@ -5859,7 +6042,7 @@ function linesDrawing(g, open) {
5859
6042
  `fill-${layer.id}`
5860
6043
  );
5861
6044
  });
5862
- const edges = curves ? look.layers.flatMap((layer, k) => layer.to.slice(1).map((_, i) => finite(layer, i) && finite(layer, i + 1) ? /* @__PURE__ */ jsx46(
6045
+ const edges = curves ? look.layers.flatMap((layer, k) => layer.to.slice(1).map((_, i) => finite(layer, i) && finite(layer, i + 1) ? /* @__PURE__ */ jsx48(
5863
6046
  "path",
5864
6047
  {
5865
6048
  className: cx8(
@@ -5870,7 +6053,7 @@ function linesDrawing(g, open) {
5870
6053
  d: `M${px(centre(i))} ${px(y(at(layer, i)))}${bend(k, i)}`
5871
6054
  },
5872
6055
  `edge-${layer.id}-${i}`
5873
- ) : null)) : !look.share && look.layers.flatMap((layer) => layer.to.slice(1).map((_, k) => finite(layer, k) && finite(layer, k + 1) ? /* @__PURE__ */ jsx46(
6056
+ ) : null)) : !look.share && look.layers.flatMap((layer) => layer.to.slice(1).map((_, k) => finite(layer, k) && finite(layer, k + 1) ? /* @__PURE__ */ jsx48(
5874
6057
  "line",
5875
6058
  {
5876
6059
  className: cx8(
@@ -5892,7 +6075,7 @@ function linesDrawing(g, open) {
5892
6075
  const shown = i === open || points || lonely && !look.share;
5893
6076
  if (!shown || look.share && i !== open) return null;
5894
6077
  if (look.share && layer !== look.layers[look.layers.length - 1]) return null;
5895
- return /* @__PURE__ */ jsx46(
6078
+ return /* @__PURE__ */ jsx48(
5896
6079
  "circle",
5897
6080
  {
5898
6081
  className: cx8("ui-chart__dot", tone(layer.tone)),
@@ -5920,8 +6103,8 @@ function linesDrawing(g, open) {
5920
6103
  base = at2 + Math.max(drop, fall + gap + ascent);
5921
6104
  }
5922
6105
  }
5923
- return /* @__PURE__ */ jsxs42("g", { children: [
5924
- /* @__PURE__ */ jsx46(
6106
+ return /* @__PURE__ */ jsxs44("g", { children: [
6107
+ /* @__PURE__ */ jsx48(
5925
6108
  "circle",
5926
6109
  {
5927
6110
  className: cx8("ui-chart__dot", tone(layer.tone)),
@@ -5930,7 +6113,7 @@ function linesDrawing(g, open) {
5930
6113
  r: "4"
5931
6114
  }
5932
6115
  ),
5933
- /* @__PURE__ */ jsx46(
6116
+ /* @__PURE__ */ jsx48(
5934
6117
  "text",
5935
6118
  {
5936
6119
  className: "ui-chart__text ui-chart__text--strong",
@@ -5942,8 +6125,8 @@ function linesDrawing(g, open) {
5942
6125
  )
5943
6126
  ] }, `end-${layer.id}`);
5944
6127
  });
5945
- return /* @__PURE__ */ jsxs42(Fragment20, { children: [
5946
- ramps.some(Boolean) && /* @__PURE__ */ jsx46("defs", { children: ramps.map((ramp) => ramp && /* @__PURE__ */ jsxs42(
6128
+ return /* @__PURE__ */ jsxs44(Fragment20, { children: [
6129
+ ramps.some(Boolean) && /* @__PURE__ */ jsx48("defs", { children: ramps.map((ramp) => ramp && /* @__PURE__ */ jsxs44(
5947
6130
  "linearGradient",
5948
6131
  {
5949
6132
  id: ramp.id,
@@ -5954,14 +6137,14 @@ function linesDrawing(g, open) {
5954
6137
  y1: px(y(ramp.lo)),
5955
6138
  y2: px(y(ramp.hi)),
5956
6139
  children: [
5957
- /* @__PURE__ */ jsx46("stop", { className: curves ? "ui-chart__wash-floor" : "ui-chart__fade-base", offset: "0" }),
5958
- /* @__PURE__ */ jsx46("stop", { className: curves ? "ui-chart__wash-top" : "ui-chart__fade-end", offset: "1" })
6140
+ /* @__PURE__ */ jsx48("stop", { className: curves ? "ui-chart__wash-floor" : "ui-chart__fade-base", offset: "0" }),
6141
+ /* @__PURE__ */ jsx48("stop", { className: curves ? "ui-chart__wash-top" : "ui-chart__fade-end", offset: "1" })
5959
6142
  ]
5960
6143
  },
5961
6144
  ramp.id
5962
6145
  )) }),
5963
6146
  fills,
5964
- open !== null && /* @__PURE__ */ jsx46(
6147
+ open !== null && /* @__PURE__ */ jsx48(
5965
6148
  "line",
5966
6149
  {
5967
6150
  className: "ui-chart__cross",
@@ -5986,7 +6169,7 @@ function columnsDrawing(g) {
5986
6169
  const y1 = y(layer.to[i]);
5987
6170
  const x = centre(i) - w / 2;
5988
6171
  const d = layer === filled[filled.length - 1] ? topRounded(x, y1, w, y0 - y1, 4) : square(x, y1, w, y0 - y1);
5989
- return /* @__PURE__ */ jsx46(
6172
+ return /* @__PURE__ */ jsx48(
5990
6173
  "path",
5991
6174
  {
5992
6175
  className: cx8("ui-chart__segment", tone(layer.tone), label.estimated && "is-estimated"),
@@ -6001,10 +6184,10 @@ function rowsDrawing(g, pick) {
6001
6184
  const { look, labels, format, formatAxis, scale } = g;
6002
6185
  const rows = rowsOf(g);
6003
6186
  const bottom = rows.row * labels.length;
6004
- return /* @__PURE__ */ jsxs42(Fragment20, { children: [
6005
- pick !== null && pick >= 0 && pick < labels.length && /* @__PURE__ */ jsx46("rect", { className: "ui-chart__band", x: "0", width: px(rows.w), y: px(pick * rows.row), height: px(rows.row) }),
6006
- scale.ticks.map((tick) => /* @__PURE__ */ jsxs42("g", { children: [
6007
- /* @__PURE__ */ jsx46(
6187
+ return /* @__PURE__ */ jsxs44(Fragment20, { children: [
6188
+ pick !== null && pick >= 0 && pick < labels.length && /* @__PURE__ */ jsx48("rect", { className: "ui-chart__band", x: "0", width: px(rows.w), y: px(pick * rows.row), height: px(rows.row) }),
6189
+ scale.ticks.map((tick) => /* @__PURE__ */ jsxs44("g", { children: [
6190
+ /* @__PURE__ */ jsx48(
6008
6191
  "line",
6009
6192
  {
6010
6193
  className: tick === 0 ? "ui-chart__zero" : "ui-chart__grid",
@@ -6014,7 +6197,7 @@ function rowsDrawing(g, pick) {
6014
6197
  y2: px(bottom)
6015
6198
  }
6016
6199
  ),
6017
- /* @__PURE__ */ jsx46(
6200
+ /* @__PURE__ */ jsx48(
6018
6201
  "text",
6019
6202
  {
6020
6203
  className: "ui-chart__caption",
@@ -6029,8 +6212,8 @@ function rowsDrawing(g, pick) {
6029
6212
  labels.map((label, i) => {
6030
6213
  const top = rows.top(i);
6031
6214
  const filled = look.layers.filter((l) => l.to[i] > l.from[i]);
6032
- return /* @__PURE__ */ jsxs42("g", { children: [
6033
- /* @__PURE__ */ jsx46(
6215
+ return /* @__PURE__ */ jsxs44("g", { children: [
6216
+ /* @__PURE__ */ jsx48(
6034
6217
  "text",
6035
6218
  {
6036
6219
  className: "ui-chart__caption",
@@ -6045,7 +6228,7 @@ function rowsDrawing(g, pick) {
6045
6228
  const x0 = rows.x(layer.from[i]);
6046
6229
  const x1 = rows.x(layer.to[i]);
6047
6230
  const d = layer === filled[filled.length - 1] ? rightRounded(x0, top, x1 - x0, ROW_BAR, 4) : square(x0, top, x1 - x0, ROW_BAR);
6048
- return /* @__PURE__ */ jsx46(
6231
+ return /* @__PURE__ */ jsx48(
6049
6232
  "path",
6050
6233
  {
6051
6234
  d,
@@ -6054,7 +6237,7 @@ function rowsDrawing(g, pick) {
6054
6237
  `seg-${layer.id}`
6055
6238
  );
6056
6239
  }),
6057
- /* @__PURE__ */ jsx46(
6240
+ /* @__PURE__ */ jsx48(
6058
6241
  "text",
6059
6242
  {
6060
6243
  className: "ui-chart__text",
@@ -6072,8 +6255,8 @@ function ringDrawing(g) {
6072
6255
  const { look, format } = g;
6073
6256
  const ring = ringOf(g);
6074
6257
  const total = look.totals[0];
6075
- return /* @__PURE__ */ jsxs42(Fragment20, { children: [
6076
- look.layers.filter((s) => s.to[0] > s.from[0]).map((slice) => /* @__PURE__ */ jsx46(
6258
+ return /* @__PURE__ */ jsxs44(Fragment20, { children: [
6259
+ look.layers.filter((s) => s.to[0] > s.from[0]).map((slice) => /* @__PURE__ */ jsx48(
6077
6260
  "path",
6078
6261
  {
6079
6262
  className: cx8("ui-chart__segment", tone(slice.tone)),
@@ -6081,42 +6264,42 @@ function ringDrawing(g) {
6081
6264
  },
6082
6265
  `slice-${slice.id}`
6083
6266
  )),
6084
- look.look === "thin" && /* @__PURE__ */ jsxs42("g", { "aria-hidden": "true", children: [
6085
- /* @__PURE__ */ jsx46("text", { className: "ui-chart__total", textAnchor: "middle", x: px(ring.x), y: px(ring.y + 2), children: format(total) }),
6086
- /* @__PURE__ */ jsx46("text", { className: "ui-chart__caption", textAnchor: "middle", x: px(ring.x), y: px(ring.y + 22), children: look.totalLabel })
6267
+ look.look === "thin" && /* @__PURE__ */ jsxs44("g", { "aria-hidden": "true", children: [
6268
+ /* @__PURE__ */ jsx48("text", { className: "ui-chart__total", textAnchor: "middle", x: px(ring.x), y: px(ring.y + 2), children: format(total) }),
6269
+ /* @__PURE__ */ jsx48("text", { className: "ui-chart__caption", textAnchor: "middle", x: px(ring.x), y: px(ring.y + 22), children: look.totalLabel })
6087
6270
  ] }),
6088
6271
  look.look === "labels" && look.layers.filter((s) => s.to[0] > s.from[0]).map((slice) => {
6089
6272
  const mid = angle((slice.from[0] + slice.to[0]) / 2);
6090
6273
  const x = ring.x + (ring.r + 14) * Math.cos(mid);
6091
6274
  const y = ring.y + (ring.r + 14) * Math.sin(mid);
6092
6275
  const anchor = Math.cos(mid) >= 0 ? "start" : "end";
6093
- return /* @__PURE__ */ jsxs42("g", { "aria-hidden": "true", children: [
6094
- /* @__PURE__ */ jsx46("text", { className: "ui-chart__text ui-chart__text--strong", textAnchor: anchor, x: px(x), y: px(y - 2), children: slice.name }),
6095
- /* @__PURE__ */ jsx46("text", { className: "ui-chart__text", textAnchor: anchor, x: px(x), y: px(y + 13), children: `${format(slice.values[0])} ${pct(slice.to[0] - slice.from[0])}` })
6276
+ return /* @__PURE__ */ jsxs44("g", { "aria-hidden": "true", children: [
6277
+ /* @__PURE__ */ jsx48("text", { className: "ui-chart__text ui-chart__text--strong", textAnchor: anchor, x: px(x), y: px(y - 2), children: slice.name }),
6278
+ /* @__PURE__ */ jsx48("text", { className: "ui-chart__text", textAnchor: anchor, x: px(x), y: px(y + 13), children: `${format(slice.values[0])} ${pct(slice.to[0] - slice.from[0])}` })
6096
6279
  ] }, `label-${slice.id}`);
6097
6280
  })
6098
6281
  ] });
6099
6282
  }
6100
6283
  function Shares({ look, format, swatch }) {
6101
6284
  const total = look.totals[0];
6102
- return /* @__PURE__ */ jsxs42("ul", { className: "ui-chart__shares", "aria-hidden": "true", children: [
6103
- look.layers.map((slice) => /* @__PURE__ */ jsxs42("li", { className: tone(slice.tone), children: [
6285
+ return /* @__PURE__ */ jsxs44("ul", { className: "ui-chart__shares", "aria-hidden": "true", children: [
6286
+ look.layers.map((slice) => /* @__PURE__ */ jsxs44("li", { className: tone(slice.tone), children: [
6104
6287
  swatch,
6105
- /* @__PURE__ */ jsx46("span", { children: slice.name }),
6106
- /* @__PURE__ */ jsx46("span", { className: "ui-chart__shares-value", children: format(slice.values[0]) }),
6107
- /* @__PURE__ */ jsx46("span", { className: "ui-chart__shares-pct", children: total > 0 ? pct(slice.to[0] - slice.from[0]) : MISSING })
6288
+ /* @__PURE__ */ jsx48("span", { children: slice.name }),
6289
+ /* @__PURE__ */ jsx48("span", { className: "ui-chart__shares-value", children: format(slice.values[0]) }),
6290
+ /* @__PURE__ */ jsx48("span", { className: "ui-chart__shares-pct", children: total > 0 ? pct(slice.to[0] - slice.from[0]) : MISSING })
6108
6291
  ] }, slice.id)),
6109
- /* @__PURE__ */ jsxs42("li", { className: "ui-chart__shares-total", children: [
6110
- /* @__PURE__ */ jsx46("span", {}),
6111
- /* @__PURE__ */ jsx46("span", { children: look.totalLabel }),
6112
- /* @__PURE__ */ jsx46("span", { className: "ui-chart__shares-value", children: format(total) }),
6113
- /* @__PURE__ */ jsx46("span", { className: "ui-chart__shares-pct", children: "100%" })
6292
+ /* @__PURE__ */ jsxs44("li", { className: "ui-chart__shares-total", children: [
6293
+ /* @__PURE__ */ jsx48("span", {}),
6294
+ /* @__PURE__ */ jsx48("span", { children: look.totalLabel }),
6295
+ /* @__PURE__ */ jsx48("span", { className: "ui-chart__shares-value", children: format(total) }),
6296
+ /* @__PURE__ */ jsx48("span", { className: "ui-chart__shares-pct", children: "100%" })
6114
6297
  ] })
6115
6298
  ] });
6116
6299
  }
6117
6300
 
6118
6301
  // src/Chart.tsx
6119
- import { Fragment as Fragment21, jsx as jsx47, jsxs as jsxs43 } from "react/jsx-runtime";
6302
+ import { Fragment as Fragment21, jsx as jsx49, jsxs as jsxs45 } from "react/jsx-runtime";
6120
6303
  function placeChartTip(mark, tip) {
6121
6304
  const rect = mark.getBoundingClientRect();
6122
6305
  const view = tip.ownerDocument.documentElement;
@@ -6186,8 +6369,8 @@ function barPath(m, corner = m.w / 2) {
6186
6369
  return `M${px2(x)} ${px2(roundBottom ? bottom - r : bottom)}V${px2(roundTop ? top + r : top)}` + (roundTop ? `${arc2(r, -r, 1)}h${px2(w - r * 2)}${arc2(r, r, 1)}` : `h${px2(w)}`) + `V${px2(roundBottom ? bottom - r : bottom)}` + (roundBottom ? `${arc2(-r, r, 1)}h${px2(-(w - r * 2))}${arc2(-r, -r, 1)}` : `h${px2(-w)}`) + "z";
6187
6370
  }
6188
6371
  function useTapFloor() {
6189
- const [floor, setFloor] = useState21(TARGET);
6190
- useEffect21(() => {
6372
+ const [floor, setFloor] = useState23(TARGET);
6373
+ useEffect23(() => {
6191
6374
  const query = typeof window === "undefined" ? null : window.matchMedia?.(`(max-width: ${PHONE_MAX2}px) and (pointer: coarse)`);
6192
6375
  if (!query) return;
6193
6376
  const read = () => setFloor(query.matches ? TAP_FLOOR : TARGET);
@@ -6198,9 +6381,9 @@ function useTapFloor() {
6198
6381
  return floor;
6199
6382
  }
6200
6383
  function useTextWidth(host) {
6201
- const [face, setFace] = useState21(null);
6202
- const [loaded, setLoaded] = useState21(0);
6203
- useEffect21(() => {
6384
+ const [face, setFace] = useState23(null);
6385
+ const [loaded, setLoaded] = useState23(0);
6386
+ useEffect23(() => {
6204
6387
  const el = host.current;
6205
6388
  if (!el || typeof OffscreenCanvas === "undefined") return;
6206
6389
  const style = getComputedStyle(el);
@@ -6428,9 +6611,9 @@ function donutFrame(look, slices, totalLabel, format) {
6428
6611
  }
6429
6612
  function KeyMark({ shape }) {
6430
6613
  if (shape === "line") {
6431
- return /* @__PURE__ */ jsx47("svg", { className: "ui-chart__key-mark", width: "18", height: "12", viewBox: "0 0 18 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx47("path", { className: "ui-chart__key-line", d: "M1 9 L6 5 L12 7 L17 3" }) });
6614
+ return /* @__PURE__ */ jsx49("svg", { className: "ui-chart__key-mark", width: "18", height: "12", viewBox: "0 0 18 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx49("path", { className: "ui-chart__key-line", d: "M1 9 L6 5 L12 7 L17 3" }) });
6432
6615
  }
6433
- return /* @__PURE__ */ jsx47("svg", { className: "ui-chart__key-mark", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: shape === "fill" ? /* @__PURE__ */ jsx47("rect", { className: "ui-chart__key-swatch", x: "1", y: "1", width: "10", height: "10", rx: "2.5" }) : /* @__PURE__ */ jsx47(
6616
+ return /* @__PURE__ */ jsx49("svg", { className: "ui-chart__key-mark", width: "12", height: "12", viewBox: "0 0 12 12", "aria-hidden": "true", children: shape === "fill" ? /* @__PURE__ */ jsx49("rect", { className: "ui-chart__key-swatch", x: "1", y: "1", width: "10", height: "10", rx: "2.5" }) : /* @__PURE__ */ jsx49(
6434
6617
  "path",
6435
6618
  {
6436
6619
  className: "ui-chart__key-swatch",
@@ -6457,32 +6640,32 @@ function Chart(props) {
6457
6640
  const showValues = fit && "values" in props && props.values === true;
6458
6641
  const plotHeight = height ?? HEIGHT[variant];
6459
6642
  const showTable = table ?? !spark;
6460
- const [view, setView] = useState21("chart");
6643
+ const [view, setView] = useState23("chart");
6461
6644
  const asTable = showTable && view === "table";
6462
- const uid = useId17().replace(/[^\w-]/g, "");
6463
- const frameEl = useRef25(null);
6645
+ const uid = useId19().replace(/[^\w-]/g, "");
6646
+ const frameEl = useRef27(null);
6464
6647
  const card = useContext5(CardTools);
6465
6648
  const claim = card?.claim;
6466
6649
  useLayoutEffect5(() => showTable && claim ? claim(uid) : void 0, [showTable, claim, uid]);
6467
6650
  const toCard = showTable && card?.owner === uid ? card.slot : null;
6468
- const scroller = useRef25(null);
6469
- const plot = useRef25(null);
6470
- const tipEl = useRef25(null);
6471
- const svgEl = useRef25(null);
6472
- const ignoreMouseUntil = useRef25(0);
6473
- const touchMoved = useRef25(false);
6474
- const dismissed = useRef25(null);
6475
- const opening = useRef25(false);
6476
- const pointerFocus = useRef25(false);
6651
+ const scroller = useRef27(null);
6652
+ const plot = useRef27(null);
6653
+ const tipEl = useRef27(null);
6654
+ const svgEl = useRef27(null);
6655
+ const ignoreMouseUntil = useRef27(0);
6656
+ const touchMoved = useRef27(false);
6657
+ const dismissed = useRef27(null);
6658
+ const opening = useRef27(false);
6659
+ const pointerFocus = useRef27(false);
6477
6660
  const floor = useTapFloor();
6478
6661
  const textWidth = useTextWidth(frameEl);
6479
- const [width, setWidth] = useState21(0);
6480
- const [boxWidth, setBoxWidth] = useState21(0);
6481
- const [overflows, setOverflows] = useState21(false);
6482
- const [openId, setOpenId] = useState21(null);
6483
- const [rawCursor, setCursor] = useState21(0);
6484
- const [said, setSaid] = useState21("");
6485
- const [ownPick, setOwnPick] = useState21(null);
6662
+ const [width, setWidth] = useState23(0);
6663
+ const [boxWidth, setBoxWidth] = useState23(0);
6664
+ const [overflows, setOverflows] = useState23(false);
6665
+ const [openId, setOpenId] = useState23(null);
6666
+ const [rawCursor, setCursor] = useState23(0);
6667
+ const [said, setSaid] = useState23("");
6668
+ const [ownPick, setOwnPick] = useState23(null);
6486
6669
  const pick = selected === void 0 ? ownPick : selected;
6487
6670
  const topLayer = typeof HTMLElement !== "undefined" && typeof HTMLElement.prototype.showPopover === "function";
6488
6671
  const steps = props.variant === "bridge" ? props.steps : void 0;
@@ -6630,7 +6813,7 @@ function Chart(props) {
6630
6813
  const fades = useMemo6(() => new Map(marks.filter((m) => m.kind === "bar").map(fadeFor).filter((f) => f !== null).map((f) => [f.id, f])), [marks, fadeFor]);
6631
6814
  const lead = useCallback8((column) => marks.find((m) => m.column === column), [marks]);
6632
6815
  const open = openId ? byId.get(openId) : void 0;
6633
- useEffect21(() => {
6816
+ useEffect23(() => {
6634
6817
  const el = plot.current;
6635
6818
  const box2 = scroller.current;
6636
6819
  if (!el || !box2) return;
@@ -6666,7 +6849,7 @@ function Chart(props) {
6666
6849
  if (layered) placeChartTip(anchor2, tip);
6667
6850
  else placeTip(frameEl.current, anchor2, tip);
6668
6851
  }, [openId, plotWidth, plotHeight, topLayer]);
6669
- useEffect21(() => {
6852
+ useEffect23(() => {
6670
6853
  if (!openId) return;
6671
6854
  const doc = frameEl.current?.ownerDocument;
6672
6855
  const view2 = doc?.defaultView;
@@ -6753,11 +6936,11 @@ function Chart(props) {
6753
6936
  };
6754
6937
  const hitBand = (band) => band === "up" ? { y: PAD, h: Math.max(zero - PAD, TARGET) } : band === "down" ? { y: zero, h: Math.max(plotHeight - PAD - zero, TARGET) } : { y: PAD, h: Math.max(plotHeight - PAD * 2, TARGET) };
6755
6938
  const legendFirst = !(look?.variant === "donut" && look.look !== "labels");
6756
- const legend = keyed && !asTable && keys.length > 0 && !(look?.variant === "donut" && look.look === "table") && /* @__PURE__ */ jsx47("ul", { className: "ui-chart__legend", children: keys.map((key) => /* @__PURE__ */ jsxs43("li", { className: cx9("ui-chart__key", `ui-chart__tone--${key.tone}`), children: [
6757
- /* @__PURE__ */ jsx47(KeyMark, { shape: key.shape }),
6939
+ const legend = keyed && !asTable && keys.length > 0 && !(look?.variant === "donut" && look.look === "table") && /* @__PURE__ */ jsx49("ul", { className: "ui-chart__legend", children: keys.map((key) => /* @__PURE__ */ jsxs45("li", { className: cx9("ui-chart__key", `ui-chart__tone--${key.tone}`), children: [
6940
+ /* @__PURE__ */ jsx49(KeyMark, { shape: key.shape }),
6758
6941
  key.name
6759
6942
  ] }, key.id)) });
6760
- const viewSwitch = showTable && /* @__PURE__ */ jsx47(
6943
+ const viewSwitch = showTable && /* @__PURE__ */ jsx49(
6761
6944
  Segmented,
6762
6945
  {
6763
6946
  size: "sm",
@@ -6780,7 +6963,7 @@ function Chart(props) {
6780
6963
  return centre(i) - half < 0 ? "is-start" : centre(i) + half > plotWidth ? "is-end" : null;
6781
6964
  };
6782
6965
  const groupX = groupFrom >= 0 ? Math.min(Math.max(groupFrom * colWidth, 1), plotWidth - 1) : 0;
6783
- return /* @__PURE__ */ jsxs43(
6966
+ return /* @__PURE__ */ jsxs45(
6784
6967
  "div",
6785
6968
  {
6786
6969
  className: cx9(
@@ -6800,11 +6983,11 @@ function Chart(props) {
6800
6983
  },
6801
6984
  children: [
6802
6985
  toCard && createPortal8(viewSwitch, toCard),
6803
- (showTable && !toCard || legendFirst && legend) && /* @__PURE__ */ jsxs43("div", { className: "ui-chart__head", children: [
6986
+ (showTable && !toCard || legendFirst && legend) && /* @__PURE__ */ jsxs45("div", { className: "ui-chart__head", children: [
6804
6987
  legendFirst && legend,
6805
6988
  !toCard && viewSwitch
6806
6989
  ] }),
6807
- /* @__PURE__ */ jsxs43(
6990
+ /* @__PURE__ */ jsxs45(
6808
6991
  "div",
6809
6992
  {
6810
6993
  ref: frameEl,
@@ -6832,8 +7015,8 @@ function Chart(props) {
6832
7015
  setSaid("");
6833
7016
  },
6834
7017
  children: [
6835
- !spark && columnsLayout && scale.ticks.length > 0 && /* @__PURE__ */ jsx47("div", { className: "ui-chart__axis", "aria-hidden": "true", children: [...scale.ticks].reverse().map((tick) => /* @__PURE__ */ jsx47("span", { className: "ui-chart__tick", children: axisFormat(tick) }, tick)) }),
6836
- /* @__PURE__ */ jsx47(
7018
+ !spark && columnsLayout && scale.ticks.length > 0 && /* @__PURE__ */ jsx49("div", { className: "ui-chart__axis", "aria-hidden": "true", children: [...scale.ticks].reverse().map((tick) => /* @__PURE__ */ jsx49("span", { className: "ui-chart__tick", children: axisFormat(tick) }, tick)) }),
7019
+ /* @__PURE__ */ jsx49(
6837
7020
  "div",
6838
7021
  {
6839
7022
  ref: scroller,
@@ -6849,8 +7032,8 @@ function Chart(props) {
6849
7032
  if (mark.right <= view2.left || mark.left >= view2.right) setOpenId(null);
6850
7033
  else placeTip(frameEl.current, anchor2, tipEl.current);
6851
7034
  },
6852
- children: /* @__PURE__ */ jsxs43("div", { ref: plot, className: "ui-chart__plot", children: [
6853
- /* @__PURE__ */ jsxs43(
7035
+ children: /* @__PURE__ */ jsxs45("div", { ref: plot, className: "ui-chart__plot", children: [
7036
+ /* @__PURE__ */ jsxs45(
6854
7037
  "svg",
6855
7038
  {
6856
7039
  ref: svgEl,
@@ -6912,7 +7095,7 @@ function Chart(props) {
6912
7095
  announce(mark.column, selectable ? mark.column : pick);
6913
7096
  },
6914
7097
  children: [
6915
- !spark && columnsLayout && pick !== null && pick >= 0 && pick < count && /* @__PURE__ */ jsx47(
7098
+ !spark && columnsLayout && pick !== null && pick >= 0 && pick < count && /* @__PURE__ */ jsx49(
6916
7099
  "rect",
6917
7100
  {
6918
7101
  className: "ui-chart__band",
@@ -6925,7 +7108,7 @@ function Chart(props) {
6925
7108
  frame.links && frame.bars.slice(0, -1).map((bar, i) => {
6926
7109
  const from = byId.get(bar.id);
6927
7110
  const to = byId.get(frame.bars[i + 1].id);
6928
- return from && to ? /* @__PURE__ */ jsx47(
7111
+ return from && to ? /* @__PURE__ */ jsx49(
6929
7112
  "line",
6930
7113
  {
6931
7114
  className: "ui-chart__carry",
@@ -6937,7 +7120,7 @@ function Chart(props) {
6937
7120
  `carry-${bar.id}`
6938
7121
  ) : null;
6939
7122
  }),
6940
- !spark && columnsLayout && scale.ticks.filter((tick) => tick !== 0).map((tick) => /* @__PURE__ */ jsx47(
7123
+ !spark && columnsLayout && scale.ticks.filter((tick) => tick !== 0).map((tick) => /* @__PURE__ */ jsx49(
6941
7124
  "line",
6942
7125
  {
6943
7126
  className: "ui-chart__grid",
@@ -6948,7 +7131,7 @@ function Chart(props) {
6948
7131
  },
6949
7132
  `grid-${tick}`
6950
7133
  )),
6951
- !spark && columnsLayout && scale.ticks.includes(0) && /* @__PURE__ */ jsx47(
7134
+ !spark && columnsLayout && scale.ticks.includes(0) && /* @__PURE__ */ jsx49(
6952
7135
  "line",
6953
7136
  {
6954
7137
  className: "ui-chart__zero",
@@ -6958,8 +7141,8 @@ function Chart(props) {
6958
7141
  y2: px2(y(0))
6959
7142
  }
6960
7143
  ),
6961
- groupFrom >= 0 && /* @__PURE__ */ jsxs43(Fragment21, { children: [
6962
- /* @__PURE__ */ jsx47(
7144
+ groupFrom >= 0 && /* @__PURE__ */ jsxs45(Fragment21, { children: [
7145
+ /* @__PURE__ */ jsx49(
6963
7146
  "line",
6964
7147
  {
6965
7148
  className: "ui-chart__boundary",
@@ -6969,7 +7152,7 @@ function Chart(props) {
6969
7152
  y2: px2(plotHeight - PAD)
6970
7153
  }
6971
7154
  ),
6972
- /* @__PURE__ */ jsx47(
7155
+ /* @__PURE__ */ jsx49(
6973
7156
  "text",
6974
7157
  {
6975
7158
  className: "ui-chart__text ui-chart__group",
@@ -6979,7 +7162,7 @@ function Chart(props) {
6979
7162
  }
6980
7163
  )
6981
7164
  ] }),
6982
- fades.size > 0 && /* @__PURE__ */ jsx47("defs", { children: [...fades.values()].map((fade) => /* @__PURE__ */ jsxs43(
7165
+ fades.size > 0 && /* @__PURE__ */ jsx49("defs", { children: [...fades.values()].map((fade) => /* @__PURE__ */ jsxs45(
6983
7166
  "linearGradient",
6984
7167
  {
6985
7168
  id: fade.id,
@@ -6989,15 +7172,15 @@ function Chart(props) {
6989
7172
  y1: fade.up ? "1" : "0",
6990
7173
  y2: fade.up ? "0" : "1",
6991
7174
  children: [
6992
- /* @__PURE__ */ jsx47("stop", { className: "ui-chart__fade-base", offset: "0" }),
6993
- /* @__PURE__ */ jsx47("stop", { className: "ui-chart__fade-end", offset: "1" })
7175
+ /* @__PURE__ */ jsx49("stop", { className: "ui-chart__fade-base", offset: "0" }),
7176
+ /* @__PURE__ */ jsx49("stop", { className: "ui-chart__fade-end", offset: "1" })
6994
7177
  ]
6995
7178
  },
6996
7179
  fade.id
6997
7180
  )) }),
6998
7181
  marks.filter((m) => m.kind === "bar").map((mark) => {
6999
7182
  const fade = fadeFor(mark);
7000
- return /* @__PURE__ */ jsx47(
7183
+ return /* @__PURE__ */ jsx49(
7001
7184
  "path",
7002
7185
  {
7003
7186
  className: cx9(
@@ -7014,7 +7197,7 @@ function Chart(props) {
7014
7197
  marks.filter((m) => m.kind === "bar" && printed.has(m.id)).map((mark) => {
7015
7198
  const text2 = formatAxis(mark.value);
7016
7199
  const below = under.has(mark.id);
7017
- return /* @__PURE__ */ jsx47(
7200
+ return /* @__PURE__ */ jsx49(
7018
7201
  "text",
7019
7202
  {
7020
7203
  className: cx9("ui-chart__text", "ui-chart__value", below && "ui-chart__value--below"),
@@ -7026,7 +7209,7 @@ function Chart(props) {
7026
7209
  );
7027
7210
  }),
7028
7211
  ["casing", "stroke"].map((layer) => lines.flatMap(
7029
- (line) => line.values.slice(1).map((value, i) => Number.isFinite(value) && Number.isFinite(line.values[i]) ? /* @__PURE__ */ jsx47(
7212
+ (line) => line.values.slice(1).map((value, i) => Number.isFinite(value) && Number.isFinite(line.values[i]) ? /* @__PURE__ */ jsx49(
7030
7213
  "line",
7031
7214
  {
7032
7215
  className: layer === "casing" ? "ui-chart__line-casing" : cx9(
@@ -7042,7 +7225,7 @@ function Chart(props) {
7042
7225
  `${line.id}-${layer}-${i}`
7043
7226
  ) : null)
7044
7227
  )),
7045
- lines.flatMap((line) => line.values.map((value, i) => Number.isFinite(value) && !Number.isFinite(line.values[i - 1]) && !Number.isFinite(line.values[i + 1]) ? /* @__PURE__ */ jsx47(
7228
+ lines.flatMap((line) => line.values.map((value, i) => Number.isFinite(value) && !Number.isFinite(line.values[i - 1]) && !Number.isFinite(line.values[i + 1]) ? /* @__PURE__ */ jsx49(
7046
7229
  "circle",
7047
7230
  {
7048
7231
  className: cx9("ui-chart__isolated", `ui-chart__tone--${line.tone}`),
@@ -7053,8 +7236,8 @@ function Chart(props) {
7053
7236
  `isolated-${line.id}-${i}`
7054
7237
  ) : null)),
7055
7238
  geometry && lookDrawing(geometry, open?.column ?? null, pick),
7056
- marks.map((mark) => /* @__PURE__ */ jsxs43("g", { "data-mark": mark.id, children: [
7057
- mark.hitPath ? /* @__PURE__ */ jsx47("path", { className: "ui-chart__hit", d: mark.hitPath }) : mark.kind === "bar" ? /* @__PURE__ */ jsx47(
7239
+ marks.map((mark) => /* @__PURE__ */ jsxs45("g", { "data-mark": mark.id, children: [
7240
+ mark.hitPath ? /* @__PURE__ */ jsx49("path", { className: "ui-chart__hit", d: mark.hitPath }) : mark.kind === "bar" ? /* @__PURE__ */ jsx49(
7058
7241
  "rect",
7059
7242
  {
7060
7243
  className: "ui-chart__hit",
@@ -7063,7 +7246,7 @@ function Chart(props) {
7063
7246
  y: px2(hitBand(mark.band).y),
7064
7247
  height: px2(hitBand(mark.band).h)
7065
7248
  }
7066
- ) : /* @__PURE__ */ jsx47(
7249
+ ) : /* @__PURE__ */ jsx49(
7067
7250
  "rect",
7068
7251
  {
7069
7252
  className: "ui-chart__hit",
@@ -7073,7 +7256,7 @@ function Chart(props) {
7073
7256
  height: px2(mark.hit?.h ?? TARGET)
7074
7257
  }
7075
7258
  ),
7076
- /* @__PURE__ */ jsx47(
7259
+ /* @__PURE__ */ jsx49(
7077
7260
  "rect",
7078
7261
  {
7079
7262
  "data-anchor": mark.id,
@@ -7088,8 +7271,8 @@ function Chart(props) {
7088
7271
  ]
7089
7272
  }
7090
7273
  ),
7091
- look?.variant === "donut" && look.look === "table" && /* @__PURE__ */ jsx47(Shares, { look, format, swatch: /* @__PURE__ */ jsx47(KeyMark, { shape: "fill" }) }),
7092
- !spark && columnsLayout && /* @__PURE__ */ jsx47("div", { className: cx9("ui-chart__periods", every > 1 && "ui-chart__periods--step"), "aria-hidden": "true", children: columns.map((column, i) => /* @__PURE__ */ jsx47(
7274
+ look?.variant === "donut" && look.look === "table" && /* @__PURE__ */ jsx49(Shares, { look, format, swatch: /* @__PURE__ */ jsx49(KeyMark, { shape: "fill" }) }),
7275
+ !spark && columnsLayout && /* @__PURE__ */ jsx49("div", { className: cx9("ui-chart__periods", every > 1 && "ui-chart__periods--step"), "aria-hidden": "true", children: columns.map((column, i) => /* @__PURE__ */ jsx49(
7093
7276
  "span",
7094
7277
  {
7095
7278
  className: cx9("ui-chart__period", pick === i && "is-selected", every > 1 && edgeOf(i)),
@@ -7100,46 +7283,46 @@ function Chart(props) {
7100
7283
  ] })
7101
7284
  }
7102
7285
  ),
7103
- /* @__PURE__ */ jsx47("span", { ref: tipEl, ...topLayer && { popover: "manual" }, className: cx9("ui-tip", openId && "is-open"), role: open ? "tooltip" : void 0, children: open && /* @__PURE__ */ jsxs43(Fragment21, { children: [
7104
- /* @__PURE__ */ jsx47("span", { className: "ui-tip__label", children: spark || look ? columns[open.column]?.label : `${open.name}, ${columns[open.column]?.label}` }),
7105
- open.rows ? /* @__PURE__ */ jsxs43(Fragment21, { children: [
7106
- open.rows.map((row) => /* @__PURE__ */ jsxs43("span", { className: "ui-tip__value ui-chart__row", children: [
7107
- /* @__PURE__ */ jsxs43("span", { className: cx9("ui-chart__key", `ui-chart__tone--${row.tone}`), children: [
7108
- /* @__PURE__ */ jsx47(KeyMark, { shape: row.shape }),
7286
+ /* @__PURE__ */ jsx49("span", { ref: tipEl, ...topLayer && { popover: "manual" }, className: cx9("ui-tip", openId && "is-open"), role: open ? "tooltip" : void 0, children: open && /* @__PURE__ */ jsxs45(Fragment21, { children: [
7287
+ /* @__PURE__ */ jsx49("span", { className: "ui-tip__label", children: spark || look ? columns[open.column]?.label : `${open.name}, ${columns[open.column]?.label}` }),
7288
+ open.rows ? /* @__PURE__ */ jsxs45(Fragment21, { children: [
7289
+ open.rows.map((row) => /* @__PURE__ */ jsxs45("span", { className: "ui-tip__value ui-chart__row", children: [
7290
+ /* @__PURE__ */ jsxs45("span", { className: cx9("ui-chart__key", `ui-chart__tone--${row.tone}`), children: [
7291
+ /* @__PURE__ */ jsx49(KeyMark, { shape: row.shape }),
7109
7292
  row.name
7110
7293
  ] }),
7111
- /* @__PURE__ */ jsx47("span", { children: row.text })
7294
+ /* @__PURE__ */ jsx49("span", { children: row.text })
7112
7295
  ] }, row.name)),
7113
- open.total && /* @__PURE__ */ jsxs43("span", { className: "ui-tip__value ui-chart__row", children: [
7114
- /* @__PURE__ */ jsx47("span", { children: totalLabel }),
7115
- /* @__PURE__ */ jsx47("span", { children: open.total })
7296
+ open.total && /* @__PURE__ */ jsxs45("span", { className: "ui-tip__value ui-chart__row", children: [
7297
+ /* @__PURE__ */ jsx49("span", { children: totalLabel }),
7298
+ /* @__PURE__ */ jsx49("span", { children: open.total })
7116
7299
  ] })
7117
- ] }) : /* @__PURE__ */ jsx47("span", { className: "ui-tip__value", children: format(open.value) }),
7118
- (stateOf(columns[open.column]) || open.detail) && /* @__PURE__ */ jsx47("span", { className: "ui-tip__detail", children: stateOf(columns[open.column]) || open.detail })
7300
+ ] }) : /* @__PURE__ */ jsx49("span", { className: "ui-tip__value", children: format(open.value) }),
7301
+ (stateOf(columns[open.column]) || open.detail) && /* @__PURE__ */ jsx49("span", { className: "ui-tip__detail", children: stateOf(columns[open.column]) || open.detail })
7119
7302
  ] }) })
7120
7303
  ]
7121
7304
  }
7122
7305
  ),
7123
7306
  !legendFirst && legend,
7124
- /* @__PURE__ */ jsx47("div", { className: "ui-sr", role: "status", children: said }),
7125
- asTable && /* @__PURE__ */ jsx47("div", { className: "ui-chart__data", children: /* @__PURE__ */ jsx47(
7307
+ /* @__PURE__ */ jsx49("div", { className: "ui-sr", role: "status", children: said }),
7308
+ asTable && /* @__PURE__ */ jsx49("div", { className: "ui-chart__data", children: /* @__PURE__ */ jsx49(
7126
7309
  "div",
7127
7310
  {
7128
7311
  className: "ui-table-scroll",
7129
7312
  role: "region",
7130
7313
  tabIndex: 0,
7131
7314
  "aria-label": `${title}, as a table. Scroll for more columns.`,
7132
- children: /* @__PURE__ */ jsxs43("table", { className: "ui-table", "aria-label": title, children: [
7133
- /* @__PURE__ */ jsx47("thead", { children: /* @__PURE__ */ jsx47("tr", { children: tableHead.map((head, i) => /* @__PURE__ */ jsx47("th", { scope: "col", className: cx9(i > 0 && "ui-table__num"), children: head }, head)) }) }),
7134
- /* @__PURE__ */ jsx47("tbody", { children: tableRows.map((row, i) => /* @__PURE__ */ jsxs43("tr", { "aria-current": pick === i ? true : void 0, children: [
7135
- /* @__PURE__ */ jsxs43("th", { scope: "row", children: [
7315
+ children: /* @__PURE__ */ jsxs45("table", { className: "ui-table", "aria-label": title, children: [
7316
+ /* @__PURE__ */ jsx49("thead", { children: /* @__PURE__ */ jsx49("tr", { children: tableHead.map((head, i) => /* @__PURE__ */ jsx49("th", { scope: "col", className: cx9(i > 0 && "ui-table__num"), children: head }, head)) }) }),
7317
+ /* @__PURE__ */ jsx49("tbody", { children: tableRows.map((row, i) => /* @__PURE__ */ jsxs45("tr", { "aria-current": pick === i ? true : void 0, children: [
7318
+ /* @__PURE__ */ jsxs45("th", { scope: "row", children: [
7136
7319
  row.column.label,
7137
- row.column.estimated && /* @__PURE__ */ jsxs43(Fragment21, { children: [
7320
+ row.column.estimated && /* @__PURE__ */ jsxs45(Fragment21, { children: [
7138
7321
  " ",
7139
- /* @__PURE__ */ jsx47("span", { className: "ui-chart__state", children: stateOf(row.column) })
7322
+ /* @__PURE__ */ jsx49("span", { className: "ui-chart__state", children: stateOf(row.column) })
7140
7323
  ] })
7141
7324
  ] }),
7142
- row.cells.map((cell, j) => /* @__PURE__ */ jsx47("td", { className: "ui-table__num", children: cell }, tableHead[j + 1]))
7325
+ row.cells.map((cell, j) => /* @__PURE__ */ jsx49("td", { className: "ui-table__num", children: cell }, tableHead[j + 1]))
7143
7326
  ] }, `${row.column.label}-${i}`)) })
7144
7327
  ] })
7145
7328
  }
@@ -7152,7 +7335,7 @@ function Chart(props) {
7152
7335
  // src/AccentPicker.tsx
7153
7336
  import { forwardRef as forwardRef12 } from "react";
7154
7337
  import { ACCENTS, accentSwatchStyle } from "@apliteni/apliteni-ui";
7155
- import { jsx as jsx48 } from "react/jsx-runtime";
7338
+ import { jsx as jsx50 } from "react/jsx-runtime";
7156
7339
  var AccentPicker = forwardRef12(function AccentPicker2({
7157
7340
  value,
7158
7341
  onChange,
@@ -7161,7 +7344,7 @@ var AccentPicker = forwardRef12(function AccentPicker2({
7161
7344
  "aria-label": label = "Accent",
7162
7345
  ...rest
7163
7346
  }, ref) {
7164
- return /* @__PURE__ */ jsx48(
7347
+ return /* @__PURE__ */ jsx50(
7165
7348
  "div",
7166
7349
  {
7167
7350
  ...rest,
@@ -7172,7 +7355,7 @@ var AccentPicker = forwardRef12(function AccentPicker2({
7172
7355
  "aria-label": label,
7173
7356
  children: options.map((accent) => {
7174
7357
  const title = accent.charAt(0).toUpperCase() + accent.slice(1);
7175
- return /* @__PURE__ */ jsx48(
7358
+ return /* @__PURE__ */ jsx50(
7176
7359
  "button",
7177
7360
  {
7178
7361
  type: "button",
@@ -7193,7 +7376,7 @@ var AccentPicker = forwardRef12(function AccentPicker2({
7193
7376
  // src/TopBar.tsx
7194
7377
  import { Fragment as Fragment22 } from "react";
7195
7378
  import { prism as prism3, safeUrl as safeUrl6, icon as icon8, ACCOUNT_NAV } from "@apliteni/apliteni-ui";
7196
- import { Fragment as Fragment23, jsx as jsx49, jsxs as jsxs44 } from "react/jsx-runtime";
7379
+ import { Fragment as Fragment23, jsx as jsx51, jsxs as jsxs46 } from "react/jsx-runtime";
7197
7380
  function TopBar({
7198
7381
  brand,
7199
7382
  word = "Strategy",
@@ -7205,20 +7388,20 @@ function TopBar({
7205
7388
  className,
7206
7389
  ...rest
7207
7390
  }) {
7208
- return /* @__PURE__ */ jsx49("header", { ...rest, className: ["topbar", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs44("div", { className: "topbar__in", children: [
7209
- brand ?? /* @__PURE__ */ jsxs44("a", { className: "brand", href: safeUrl6(brandHref), "aria-label": `Apliteni ${word}`, children: [
7210
- /* @__PURE__ */ jsx49("span", { "aria-hidden": "true", dangerouslySetInnerHTML: { __html: prism3("tb-mark", 22) } }),
7211
- /* @__PURE__ */ jsx49("span", { children: word })
7391
+ return /* @__PURE__ */ jsx51("header", { ...rest, className: ["topbar", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs46("div", { className: "topbar__in", children: [
7392
+ brand ?? /* @__PURE__ */ jsxs46("a", { className: "brand", href: safeUrl6(brandHref), "aria-label": `Apliteni ${word}`, children: [
7393
+ /* @__PURE__ */ jsx51("span", { "aria-hidden": "true", dangerouslySetInnerHTML: { __html: prism3("tb-mark", 22) } }),
7394
+ /* @__PURE__ */ jsx51("span", { children: word })
7212
7395
  ] }),
7213
7396
  view,
7214
- /* @__PURE__ */ jsx49("span", { className: "spacer" }),
7397
+ /* @__PURE__ */ jsx51("span", { className: "spacer" }),
7215
7398
  version,
7216
7399
  theme,
7217
7400
  account
7218
7401
  ] }) });
7219
7402
  }
7220
7403
  function ViewSwitch({ items, active, label = "View", renderLink }) {
7221
- return /* @__PURE__ */ jsx49("div", { className: "dtsw on", role: "group", "aria-label": label, children: items.map((item) => {
7404
+ return /* @__PURE__ */ jsx51("div", { className: "dtsw on", role: "group", "aria-label": label, children: items.map((item) => {
7222
7405
  const current = item.id === active;
7223
7406
  const linkProps = {
7224
7407
  className: current ? "cur" : void 0,
@@ -7227,13 +7410,13 @@ function ViewSwitch({ items, active, label = "View", renderLink }) {
7227
7410
  "aria-current": current ? "page" : void 0,
7228
7411
  children: item.label
7229
7412
  };
7230
- return /* @__PURE__ */ jsx49(Fragment22, { children: renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx49("a", { ...linkProps }) }, item.id);
7413
+ return /* @__PURE__ */ jsx51(Fragment22, { children: renderLink ? renderLink(item, linkProps) : /* @__PURE__ */ jsx51("a", { ...linkProps }) }, item.id);
7231
7414
  }) });
7232
7415
  }
7233
7416
  var BADGE = { live: "Live", archive: "Archive" };
7234
7417
  function VersionSwitcher({ versions, value, onChange, label = "Version", defaultOpen }) {
7235
7418
  const current = versions.find((v) => v.value === value);
7236
- return /* @__PURE__ */ jsx49("div", { className: "vsw", children: /* @__PURE__ */ jsx49(
7419
+ return /* @__PURE__ */ jsx51("div", { className: "vsw", children: /* @__PURE__ */ jsx51(
7237
7420
  Dropdown,
7238
7421
  {
7239
7422
  variant: "select",
@@ -7244,9 +7427,9 @@ function VersionSwitcher({ versions, value, onChange, label = "Version", default
7244
7427
  chevron: false,
7245
7428
  defaultOpen,
7246
7429
  ariaLabel: `${label} \u2014 ${current?.label ?? ""}`,
7247
- triggerContent: /* @__PURE__ */ jsxs44(Fragment23, { children: [
7248
- /* @__PURE__ */ jsx49("span", { className: "cur", children: current?.label }),
7249
- /* @__PURE__ */ jsx49("span", { className: "car", "aria-hidden": "true" })
7430
+ triggerContent: /* @__PURE__ */ jsxs46(Fragment23, { children: [
7431
+ /* @__PURE__ */ jsx51("span", { className: "cur", children: current?.label }),
7432
+ /* @__PURE__ */ jsx51("span", { className: "car", "aria-hidden": "true" })
7250
7433
  ] }),
7251
7434
  items: versions.map((v) => ({
7252
7435
  label: v.label,
@@ -7254,10 +7437,10 @@ function VersionSwitcher({ versions, value, onChange, label = "Version", default
7254
7437
  badge: BADGE[v.badge ?? "archive"],
7255
7438
  selected: v.value === value
7256
7439
  })),
7257
- row: (item, props) => /* @__PURE__ */ jsxs44("div", { ...props, className: `${props.className} vopt`, children: [
7258
- /* @__PURE__ */ jsx49("span", { className: "vname", children: item.label }),
7259
- /* @__PURE__ */ jsx49("span", { className: `vbadge ${item.badge === "Live" ? "live" : "arch"}`, children: String(item.badge) }),
7260
- /* @__PURE__ */ jsx49("span", { className: "vtick", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon8("check") } })
7440
+ row: (item, props) => /* @__PURE__ */ jsxs46("div", { ...props, className: `${props.className} vopt`, children: [
7441
+ /* @__PURE__ */ jsx51("span", { className: "vname", children: item.label }),
7442
+ /* @__PURE__ */ jsx51("span", { className: `vbadge ${item.badge === "Live" ? "live" : "arch"}`, children: String(item.badge) }),
7443
+ /* @__PURE__ */ jsx51("span", { className: "vtick", "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon8("check") } })
7261
7444
  ] }),
7262
7445
  onSelect: (picked) => {
7263
7446
  if (picked != null) onChange?.(String(picked));
@@ -7286,7 +7469,7 @@ function AccountMenu2({
7286
7469
  defaultOpen
7287
7470
  }) {
7288
7471
  const mark = initialsOf(name, email);
7289
- return /* @__PURE__ */ jsx49("div", { className: "acct on", children: /* @__PURE__ */ jsx49(
7472
+ return /* @__PURE__ */ jsx51("div", { className: "acct on", children: /* @__PURE__ */ jsx51(
7290
7473
  Dropdown,
7291
7474
  {
7292
7475
  variant: "menu",
@@ -7297,22 +7480,22 @@ function AccountMenu2({
7297
7480
  defaultOpen,
7298
7481
  ariaLabel: "Account",
7299
7482
  triggerContent: mark,
7300
- header: /* @__PURE__ */ jsxs44("div", { className: "ahead", children: [
7301
- /* @__PURE__ */ jsx49("span", { className: "avatar", children: mark }),
7302
- /* @__PURE__ */ jsxs44("span", { className: "aw", children: [
7303
- /* @__PURE__ */ jsx49("span", { className: "anm", children: name }),
7304
- /* @__PURE__ */ jsx49("span", { className: "aem", title: email, children: email })
7483
+ header: /* @__PURE__ */ jsxs46("div", { className: "ahead", children: [
7484
+ /* @__PURE__ */ jsx51("span", { className: "avatar", children: mark }),
7485
+ /* @__PURE__ */ jsxs46("span", { className: "aw", children: [
7486
+ /* @__PURE__ */ jsx51("span", { className: "anm", children: name }),
7487
+ /* @__PURE__ */ jsx51("span", { className: "aem", title: email, children: email })
7305
7488
  ] })
7306
7489
  ] }),
7307
7490
  items: [...items, "---", { label: "Sign out", icon: "logout", value: "sign-out", href: signOutHref }],
7308
- row: (item, props) => /* @__PURE__ */ jsxs44(
7491
+ row: (item, props) => /* @__PURE__ */ jsxs46(
7309
7492
  "a",
7310
7493
  {
7311
7494
  ...props,
7312
7495
  href: item.disabled ? void 0 : item.href ? safeUrl6(item.href) : item.value === "sign-out" && onSignOut ? void 0 : safeUrl6(item.value === "sign-out" ? "#logout" : `#${item.value}`),
7313
7496
  className: [props.className, !item.disabled && item.value === current && "cur", item.value === "sign-out" && "aout"].filter(Boolean).join(" "),
7314
7497
  children: [
7315
- item.icon && /* @__PURE__ */ jsx49("span", { "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon8(item.icon) } }),
7498
+ item.icon && /* @__PURE__ */ jsx51("span", { "aria-hidden": "true", dangerouslySetInnerHTML: { __html: icon8(item.icon) } }),
7316
7499
  item.label
7317
7500
  ]
7318
7501
  }
@@ -7389,12 +7572,14 @@ export {
7389
7572
  TextField,
7390
7573
  ThemeChoice,
7391
7574
  ThemeToggle,
7575
+ ThreeColumnPage,
7392
7576
  Timeline,
7393
7577
  Toast,
7394
7578
  Tooltip,
7395
7579
  TopBar,
7396
7580
  VersionSwitcher,
7397
7581
  ViewSwitch,
7582
+ Wizard,
7398
7583
  sortTableRows,
7399
7584
  useToast
7400
7585
  };