@apliteni/apliteni-ui 0.193.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.
@@ -4118,21 +4118,115 @@ function Timeline({ events, className, ...rest }) {
4118
4118
  )) });
4119
4119
  }
4120
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
+
4121
4215
  // src/Field.tsx
4122
- 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";
4123
4217
  import { esc, icon as icon5 } from "@apliteni/apliteni-ui";
4124
- import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
4218
+ import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
4125
4219
  function messages(id, hint, error) {
4126
4220
  return [error && `${id}-error`, hint && `${id}-hint`].filter(Boolean).join(" ") || void 0;
4127
4221
  }
4128
4222
  function Frame({ id, labelId, label, hint, error, required, children }) {
4129
- return /* @__PURE__ */ jsxs30("div", { className: "ui-field", children: [
4130
- /* @__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: [
4131
4225
  label,
4132
- 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: "*" })
4133
4227
  ] }),
4134
4228
  children,
4135
- error && /* @__PURE__ */ jsx34(
4229
+ error && /* @__PURE__ */ jsx35(
4136
4230
  "div",
4137
4231
  {
4138
4232
  id: `${id}-error`,
@@ -4141,23 +4235,23 @@ function Frame({ id, labelId, label, hint, error, required, children }) {
4141
4235
  dangerouslySetInnerHTML: { __html: icon5("alert") + esc(error) }
4142
4236
  }
4143
4237
  ),
4144
- 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 })
4145
4239
  ] });
4146
4240
  }
4147
4241
  function wiring(id, hint, error) {
4148
4242
  return { id, "aria-describedby": messages(id, hint, error), "aria-invalid": error ? true : void 0 };
4149
4243
  }
4150
4244
  function Field({ id: suppliedId, label, hint, error, required, children }) {
4151
- const generatedId = useId13();
4245
+ const generatedId = useId14();
4152
4246
  const id = suppliedId ?? generatedId;
4153
4247
  const labelId = `${id}-label`;
4154
- 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 }) }) });
4155
4249
  }
4156
4250
  var TextField = forwardRef8(function TextField2({ label, hint, error, required, type = "text", unit, icon: glyph2, className = "", ...props }, ref) {
4157
- const id = useId13();
4251
+ const id = useId14();
4158
4252
  const hasUnit = type === "number" && !!unit;
4159
4253
  const describedBy = [messages(id, hint, error), hasUnit ? `${id}-unit` : ""].filter(Boolean).join(" ") || void 0;
4160
- const control = /* @__PURE__ */ jsx34(
4254
+ const control = /* @__PURE__ */ jsx35(
4161
4255
  "input",
4162
4256
  {
4163
4257
  ref,
@@ -4170,19 +4264,19 @@ var TextField = forwardRef8(function TextField2({ label, hint, error, required,
4170
4264
  className: `ui-input${error ? " is-invalid" : ""} ${className}`
4171
4265
  }
4172
4266
  );
4173
- const unitSpan = hasUnit ? /* @__PURE__ */ jsx34("span", { id: `${id}-unit`, className: "ui-field-number__unit", children: unit }) : null;
4174
- return /* @__PURE__ */ jsx34(Frame, { ...{ id, label, hint, error, required }, children: glyph2 ? /* @__PURE__ */ jsxs30("div", { className: `ui-input-group${hasUnit ? " ui-field-number" : ""}`, children: [
4175
- /* @__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) } }),
4176
4270
  control,
4177
4271
  unitSpan
4178
- ] }) : hasUnit ? /* @__PURE__ */ jsxs30("div", { className: "ui-field-number", children: [
4272
+ ] }) : hasUnit ? /* @__PURE__ */ jsxs31("div", { className: "ui-field-number", children: [
4179
4273
  control,
4180
4274
  unitSpan
4181
4275
  ] }) : control });
4182
4276
  });
4183
4277
  function TextArea({ label, hint, error, required, className = "", ...props }) {
4184
- const id = useId13();
4185
- 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(
4186
4280
  "textarea",
4187
4281
  {
4188
4282
  rows: 4,
@@ -4194,8 +4288,8 @@ function TextArea({ label, hint, error, required, className = "", ...props }) {
4194
4288
  ) });
4195
4289
  }
4196
4290
  function SelectField({ label, hint, error, required, className = "", children, ...props }) {
4197
- const id = useId13();
4198
- 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(
4199
4293
  "select",
4200
4294
  {
4201
4295
  ...props,
@@ -4207,11 +4301,11 @@ function SelectField({ label, hint, error, required, className = "", children, .
4207
4301
  ) });
4208
4302
  }
4209
4303
  function FileField({ label, hint, error, required, disabled, onFileChange, className = "", ...props }) {
4210
- const id = useId13();
4211
- const input = useRef19(null);
4212
- const [file, setFile] = useState15(null);
4213
- const [dragging, setDragging] = useState15(false);
4214
- useEffect16(() => {
4304
+ const id = useId14();
4305
+ const input = useRef20(null);
4306
+ const [file, setFile] = useState16(null);
4307
+ const [dragging, setDragging] = useState16(false);
4308
+ useEffect17(() => {
4215
4309
  const form = input.current?.form;
4216
4310
  const reset = () => {
4217
4311
  setFile(null);
@@ -4224,7 +4318,7 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
4224
4318
  setFile(next);
4225
4319
  onFileChange?.(next);
4226
4320
  };
4227
- 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(
4228
4322
  "div",
4229
4323
  {
4230
4324
  className: `ui-file${dragging && !disabled ? " is-dragging" : ""}${file ? " has-file" : ""}${error ? " is-invalid" : ""}${disabled ? " is-disabled" : ""}`,
@@ -4245,12 +4339,12 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
4245
4339
  update(transfer.files[0]);
4246
4340
  },
4247
4341
  children: [
4248
- /* @__PURE__ */ jsx34("span", { className: "ui-file__glyph", children: /* @__PURE__ */ jsx34(Icon, { name: "upload" }) }),
4249
- /* @__PURE__ */ jsx34("div", { "aria-live": "polite", children: file ? file.name : "Drop a file here" }),
4250
- /* @__PURE__ */ jsx34("div", { children: "or choose one from your device" }),
4251
- /* @__PURE__ */ jsxs30("span", { className: "ui-file__choose", children: [
4252
- /* @__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" }),
4253
- /* @__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(
4254
4348
  "input",
4255
4349
  {
4256
4350
  ...props,
@@ -4270,11 +4364,11 @@ function FileField({ label, hint, error, required, disabled, onFileChange, class
4270
4364
  }
4271
4365
 
4272
4366
  // src/FileDrop.tsx
4273
- import { useRef as useRef20, useState as useState16 } from "react";
4367
+ import { useRef as useRef21, useState as useState17 } from "react";
4274
4368
 
4275
4369
  // src/EmptyState.tsx
4276
4370
  import { icon as kitIcon3, illo } from "@apliteni/apliteni-ui";
4277
- import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
4371
+ import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
4278
4372
  var cases = {
4279
4373
  "first-run": { title: "Nothing needs you yet", sub: "New items will appear here when they need your attention.", icon: "check" },
4280
4374
  "no-matches": { title: "No results in this view", sub: "Try another search or clear your filters.", icon: "search" },
@@ -4287,16 +4381,16 @@ function EmptyState({ variant = "first-run", title, sub, icon: icon9, art, actio
4287
4381
  const guidance = sub ?? preset.sub;
4288
4382
  const glyph2 = icon9 ?? preset.icon;
4289
4383
  const Title = [2, 3, 4, 5, 6].includes(level) ? `h${level}` : "div";
4290
- return /* @__PURE__ */ jsxs31("div", { className: ["ui-empty", className].filter(Boolean).join(" "), children: [
4291
- 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,
4292
- heading && /* @__PURE__ */ jsx35(Title, { className: "ui-empty__title", children: heading }),
4293
- guidance && /* @__PURE__ */ jsx35("div", { className: "ui-empty__sub", children: guidance }),
4294
- 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 })
4295
4389
  ] });
4296
4390
  }
4297
4391
 
4298
4392
  // src/FileDrop.tsx
4299
- 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";
4300
4394
  var MARKS = {
4301
4395
  uploading: "clock",
4302
4396
  done: "circleCheck",
@@ -4332,8 +4426,8 @@ function FileDrop({
4332
4426
  children,
4333
4427
  className
4334
4428
  }) {
4335
- const input = useRef20(null);
4336
- const [over, setOver] = useState16(false);
4429
+ const input = useRef21(null);
4430
+ const [over, setOver] = useState17(false);
4337
4431
  const status = file?.status ?? "uploading";
4338
4432
  const word = status === "error" ? file?.error ?? WORDS.error : file?.state ?? WORDS[status];
4339
4433
  const [stem, ext] = splitName(file?.name ?? "");
@@ -4349,7 +4443,7 @@ function FileDrop({
4349
4443
  const pick = () => {
4350
4444
  if (!disabled) input.current?.click();
4351
4445
  };
4352
- const picker = /* @__PURE__ */ jsx36(
4446
+ const picker = /* @__PURE__ */ jsx37(
4353
4447
  "input",
4354
4448
  {
4355
4449
  ref: input,
@@ -4382,20 +4476,20 @@ function FileDrop({
4382
4476
  take(Array.from(event.dataTransfer.files));
4383
4477
  }
4384
4478
  };
4385
- if (title !== void 0) return /* @__PURE__ */ jsxs32(
4479
+ if (title !== void 0) return /* @__PURE__ */ jsxs33(
4386
4480
  "div",
4387
4481
  {
4388
4482
  className: cx7("ui-drop", "ui-drop--area", showTarget && "is-dragging", disabled && "is-disabled", className),
4389
4483
  onClick: pick,
4390
4484
  ...drag,
4391
4485
  children: [
4392
- /* @__PURE__ */ jsx36(
4486
+ /* @__PURE__ */ jsx37(
4393
4487
  EmptyState,
4394
4488
  {
4395
4489
  icon: "upload",
4396
4490
  title,
4397
4491
  sub: note ?? "",
4398
- actions: /* @__PURE__ */ jsx36(
4492
+ actions: /* @__PURE__ */ jsx37(
4399
4493
  Button,
4400
4494
  {
4401
4495
  variant: "primary",
@@ -4415,28 +4509,28 @@ function FileDrop({
4415
4509
  ]
4416
4510
  }
4417
4511
  );
4418
- 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: [
4419
4513
  children,
4420
- /* @__PURE__ */ jsxs32("div", { className: "ui-drop__row", children: [
4421
- file ? /* @__PURE__ */ jsxs32("div", { className: cx7("ui-drop__file", status === "error" && "ui-drop__file--failed"), children: [
4422
- /* @__PURE__ */ jsxs32("div", { className: "ui-drop__line", children: [
4423
- /* @__PURE__ */ jsxs32("span", { className: "ui-drop__name", title: file.name, children: [
4424
- /* @__PURE__ */ jsx36("span", { className: "ui-drop__stem", children: stem }),
4425
- /* @__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 })
4426
4520
  ] }),
4427
- showSize && /* @__PURE__ */ jsx36("span", { className: "ui-drop__size", children: file.size }),
4428
- showWord && /* @__PURE__ */ jsxs32(
4521
+ showSize && /* @__PURE__ */ jsx37("span", { className: "ui-drop__size", children: file.size }),
4522
+ showWord && /* @__PURE__ */ jsxs33(
4429
4523
  "span",
4430
4524
  {
4431
4525
  className: cx7("ui-drop__state", status === "error" && "ui-drop__error"),
4432
4526
  role: status === "error" ? "alert" : void 0,
4433
4527
  children: [
4434
- /* @__PURE__ */ jsx36(Icon, { name: MARKS[status] }),
4435
- /* @__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 })
4436
4530
  ]
4437
4531
  }
4438
4532
  ),
4439
- hasBar && /* @__PURE__ */ jsx36(
4533
+ hasBar && /* @__PURE__ */ jsx37(
4440
4534
  "span",
4441
4535
  {
4442
4536
  className: "ui-drop__bar",
@@ -4445,13 +4539,13 @@ function FileDrop({
4445
4539
  "aria-valuenow": file.progress,
4446
4540
  "aria-valuemin": 0,
4447
4541
  "aria-valuemax": 100,
4448
- children: /* @__PURE__ */ jsx36("span", { style: { width: `${file.progress}%` } })
4542
+ children: /* @__PURE__ */ jsx37("span", { style: { width: `${file.progress}%` } })
4449
4543
  }
4450
4544
  )
4451
4545
  ] }),
4452
- (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs32("span", { className: "ui-drop__actions", children: [
4453
- status === "error" && onRetry && /* @__PURE__ */ jsx36(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
4454
- 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(
4455
4549
  Button,
4456
4550
  {
4457
4551
  variant: "ghost",
@@ -4462,8 +4556,8 @@ function FileDrop({
4462
4556
  }
4463
4557
  )
4464
4558
  ] })
4465
- ] }) : /* @__PURE__ */ jsxs32(Fragment17, { children: [
4466
- /* @__PURE__ */ jsx36(
4559
+ ] }) : /* @__PURE__ */ jsxs33(Fragment17, { children: [
4560
+ /* @__PURE__ */ jsx37(
4467
4561
  Button,
4468
4562
  {
4469
4563
  size: "sm",
@@ -4473,22 +4567,22 @@ function FileDrop({
4473
4567
  children: label
4474
4568
  }
4475
4569
  ),
4476
- note && /* @__PURE__ */ jsx36("p", { className: "ui-drop__note", children: note })
4570
+ note && /* @__PURE__ */ jsx37("p", { className: "ui-drop__note", children: note })
4477
4571
  ] }),
4478
4572
  picker
4479
4573
  ] }),
4480
- 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 })
4481
4575
  ] });
4482
4576
  }
4483
4577
 
4484
4578
  // src/SearchField.tsx
4485
4579
  import { forwardRef as forwardRef9 } from "react";
4486
4580
  import { icon as icon6 } from "@apliteni/apliteni-ui";
4487
- import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
4581
+ import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
4488
4582
  var SearchField = forwardRef9(function SearchField2({ ariaLabel, size, width, className, ...props }, ref) {
4489
- return /* @__PURE__ */ jsxs33("div", { className: "ui-input-group", style: width ? { width, flex: "none" } : void 0, children: [
4490
- /* @__PURE__ */ jsx37("span", { className: "ui-input-group__icon", dangerouslySetInnerHTML: { __html: icon6("search") } }),
4491
- /* @__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(
4492
4586
  "input",
4493
4587
  {
4494
4588
  ref,
@@ -4502,7 +4596,7 @@ var SearchField = forwardRef9(function SearchField2({ ariaLabel, size, width, cl
4502
4596
  });
4503
4597
 
4504
4598
  // src/Toast.tsx
4505
- 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";
4506
4600
  import { createPortal as createPortal6 } from "react-dom";
4507
4601
 
4508
4602
  // src/lib/toast-stack.ts
@@ -4612,7 +4706,7 @@ function watchToastPile(stack2) {
4612
4706
  }
4613
4707
 
4614
4708
  // src/Toast.tsx
4615
- import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
4709
+ import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
4616
4710
  var Context = createContext4(null);
4617
4711
  var PileHoldContext = createContext4(false);
4618
4712
  var glyphs = { success: "circleCheck", danger: "circleX", warn: "circleAlert", info: "info", neutral: "bolt" };
@@ -4622,24 +4716,24 @@ function useToast() {
4622
4716
  return push;
4623
4717
  }
4624
4718
  function Notice({ notice, remove }) {
4625
- const root = useRef21(null);
4626
- const [leaving2, setLeaving] = useState17(false);
4627
- const dismissed = useRef21(false);
4628
- const [hovered, setHovered] = useState17(false);
4629
- 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);
4630
4724
  const pileHeld = useContext4(PileHoldContext);
4631
4725
  const paused = hovered || focused || pileHeld;
4632
4726
  const tone2 = notice.tone ?? "success";
4633
4727
  const timed = !notice.action && notice.timer !== false && notice.timer !== 0;
4634
4728
  const duration = typeof notice.timer === "number" ? notice.timer * 1e3 : 5e3;
4635
- const remaining = useRef21(duration);
4729
+ const remaining = useRef22(duration);
4636
4730
  const dismiss = useCallback7(() => {
4637
4731
  if (dismissed.current) return;
4638
4732
  dismissed.current = true;
4639
4733
  if (typeof matchMedia === "function" && matchMedia("(prefers-reduced-motion: reduce)").matches) remove();
4640
4734
  else setLeaving(true);
4641
4735
  }, [remove]);
4642
- useEffect17(() => {
4736
+ useEffect18(() => {
4643
4737
  if (leaving2) {
4644
4738
  const element = root.current;
4645
4739
  const finish = (event) => {
@@ -4653,7 +4747,7 @@ function Notice({ notice, remove }) {
4653
4747
  };
4654
4748
  }
4655
4749
  }, [leaving2, remove]);
4656
- useEffect17(() => {
4750
+ useEffect18(() => {
4657
4751
  if (leaving2 || !timed || paused) return;
4658
4752
  const started = Date.now();
4659
4753
  const timer = setTimeout(dismiss, remaining.current);
@@ -4662,7 +4756,7 @@ function Notice({ notice, remove }) {
4662
4756
  remaining.current = Math.max(0, remaining.current - (Date.now() - started));
4663
4757
  };
4664
4758
  }, [dismiss, leaving2, paused, timed]);
4665
- return /* @__PURE__ */ jsxs34(
4759
+ return /* @__PURE__ */ jsxs35(
4666
4760
  "div",
4667
4761
  {
4668
4762
  ref: root,
@@ -4676,12 +4770,12 @@ function Notice({ notice, remove }) {
4676
4770
  if (!event.currentTarget.contains(event.relatedTarget)) setFocused(false);
4677
4771
  },
4678
4772
  children: [
4679
- /* @__PURE__ */ jsx38("span", { className: "ui-toast__icon", children: /* @__PURE__ */ jsx38(Icon, { name: glyphs[tone2] }) }),
4680
- /* @__PURE__ */ jsxs34("div", { className: "ui-toast__body", children: [
4681
- /* @__PURE__ */ jsx38("div", { className: "ui-toast__title", children: notice.title }),
4682
- !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 })
4683
4777
  ] }),
4684
- notice.action && /* @__PURE__ */ jsx38(
4778
+ notice.action && /* @__PURE__ */ jsx39(
4685
4779
  "button",
4686
4780
  {
4687
4781
  type: "button",
@@ -4696,8 +4790,8 @@ function Notice({ notice, remove }) {
4696
4790
  children: notice.action.label
4697
4791
  }
4698
4792
  ),
4699
- 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" }) }),
4700
- 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(
4701
4795
  "span",
4702
4796
  {
4703
4797
  className: "ui-toast__timer is-running",
@@ -4741,11 +4835,11 @@ function usePile(stack2, piled, count) {
4741
4835
  }, [stack2, piled, count]);
4742
4836
  }
4743
4837
  function Toast({ children, collapse = false }) {
4744
- const [entries, setEntries] = useState17([]);
4745
- const [pileHovered, setPileHovered] = useState17(false);
4746
- const [pileFocused, setPileFocused] = useState17(false);
4747
- const nextId = useRef21(0);
4748
- 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);
4749
4843
  const push = useCallback7((notice) => {
4750
4844
  const id = nextId.current++;
4751
4845
  const remove = () => setEntries((current) => current.filter((entry) => entry.id !== id));
@@ -4758,10 +4852,10 @@ function Toast({ children, collapse = false }) {
4758
4852
  const leavePileFocus = (event) => {
4759
4853
  if (!event.currentTarget.contains(event.relatedTarget)) setPileFocused(false);
4760
4854
  };
4761
- return /* @__PURE__ */ jsxs34(Context.Provider, { value: push, children: [
4855
+ return /* @__PURE__ */ jsxs35(Context.Provider, { value: push, children: [
4762
4856
  children,
4763
4857
  typeof document !== "undefined" && createPortal6(
4764
- /* @__PURE__ */ jsx38(
4858
+ /* @__PURE__ */ jsx39(
4765
4859
  "div",
4766
4860
  {
4767
4861
  className: `ui-toast-stack rx-toast-stack${piled ? " ui-toast-stack--collapsed" : ""}`,
@@ -4773,7 +4867,7 @@ function Toast({ children, collapse = false }) {
4773
4867
  onMouseLeave: () => setPileHovered(false),
4774
4868
  onFocus: () => setPileFocused(true),
4775
4869
  onBlur: leavePileFocus,
4776
- 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)) })
4777
4871
  }
4778
4872
  ),
4779
4873
  document.body
@@ -4782,7 +4876,7 @@ function Toast({ children, collapse = false }) {
4782
4876
  }
4783
4877
 
4784
4878
  // src/AppShell.tsx
4785
- 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";
4786
4880
  import { prism } from "@apliteni/apliteni-ui";
4787
4881
 
4788
4882
  // src/lib/palette-hotkey.ts
@@ -4812,14 +4906,14 @@ function storeRailCollapsed(collapsed) {
4812
4906
  }
4813
4907
 
4814
4908
  // src/AccountMenu.tsx
4815
- 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";
4816
4910
  import { createPortal as createPortal7 } from "react-dom";
4817
4911
  import { icon as icon7, themeIcon as themeIcon2, transitionMs as transitionMs3 } from "@apliteni/apliteni-ui";
4818
4912
 
4819
4913
  // src/ThemeToggle.tsx
4820
4914
  import { useSyncExternalStore } from "react";
4821
4915
  import { themeIcon } from "@apliteni/apliteni-ui";
4822
- import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
4916
+ import { jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
4823
4917
  var STORAGE_KEY = "apliteni-strategy-theme";
4824
4918
  var CHOICE_EVENT = "apliteni-theme-choice";
4825
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')})()`;
@@ -4882,10 +4976,10 @@ function useThemeChoice() {
4882
4976
  }
4883
4977
  function ThemeToggle({ labelled = false }) {
4884
4978
  const { theme, label, name, toggle } = useThemeChoice();
4885
- 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) } }) });
4886
- 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: [
4887
4981
  button,
4888
- /* @__PURE__ */ jsxs35("span", { children: [
4982
+ /* @__PURE__ */ jsxs36("span", { children: [
4889
4983
  label,
4890
4984
  " theme"
4891
4985
  ] })
@@ -4893,18 +4987,18 @@ function ThemeToggle({ labelled = false }) {
4893
4987
  }
4894
4988
 
4895
4989
  // src/AccountMenu.tsx
4896
- 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";
4897
4991
  var THEMES = [["auto", "Auto"], ["light", "Light"], ["dark", "Dark"]];
4898
- 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 } });
4899
4993
  function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4900
4994
  const theme = useThemeChoice();
4901
- const [open, setOpen] = useState18(false);
4902
- const [sub, setSub] = useState18(false);
4903
- const block = useRef22(null);
4904
- const themeRow = useRef22(null);
4905
- const list = useRef22(null);
4906
- const flyout = useRef22(null);
4907
- 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);
4908
5002
  const close = () => {
4909
5003
  refocus.current = true;
4910
5004
  setSub(false);
@@ -4934,7 +5028,7 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4934
5028
  clearTimeout(landed);
4935
5029
  };
4936
5030
  }, [sub, inPlace]);
4937
- useEffect18(() => {
5031
+ useEffect19(() => {
4938
5032
  if (!open || !away) return;
4939
5033
  const gone = () => {
4940
5034
  if (block.current?.getClientRects().length) return;
@@ -4947,7 +5041,7 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4947
5041
  window.addEventListener("resize", gone);
4948
5042
  return () => window.removeEventListener("resize", gone);
4949
5043
  }, [open, away]);
4950
- useEffect18(() => {
5044
+ useEffect19(() => {
4951
5045
  if (sub) list.current?.querySelector('[role="menuitemradio"]')?.focus();
4952
5046
  else if (refocus.current) {
4953
5047
  refocus.current = false;
@@ -4968,7 +5062,7 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4968
5062
  e.preventDefault();
4969
5063
  e.stopPropagation();
4970
5064
  };
4971
- const choices = /* @__PURE__ */ jsxs36(
5065
+ const choices = /* @__PURE__ */ jsxs37(
4972
5066
  "div",
4973
5067
  {
4974
5068
  ref: list,
@@ -4978,11 +5072,11 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4978
5072
  onKeyDown: subKeys,
4979
5073
  onClick: (e) => e.stopPropagation(),
4980
5074
  children: [
4981
- 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: [
4982
5076
  glyph(icon7("chevronLeft"), "ui-dropdown__ic"),
4983
- /* @__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" }) })
4984
5078
  ] }),
4985
- THEMES.map(([value, label]) => /* @__PURE__ */ jsxs36(
5079
+ THEMES.map(([value, label]) => /* @__PURE__ */ jsxs37(
4986
5080
  "div",
4987
5081
  {
4988
5082
  role: "menuitemradio",
@@ -4995,7 +5089,7 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
4995
5089
  },
4996
5090
  children: [
4997
5091
  glyph(themeIcon2(value), "ui-dropdown__ic"),
4998
- /* @__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 }) }),
4999
5093
  glyph(icon7("check"), "ui-dropdown__tick")
5000
5094
  ]
5001
5095
  },
@@ -5004,7 +5098,7 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
5004
5098
  ]
5005
5099
  }
5006
5100
  );
5007
- 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(
5008
5102
  Dropdown,
5009
5103
  {
5010
5104
  variant: "menu",
@@ -5018,17 +5112,17 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
5018
5112
  setOpen(next);
5019
5113
  if (!next) setSub(false);
5020
5114
  },
5021
- triggerContent: /* @__PURE__ */ jsxs36(Fragment18, { children: [
5022
- /* @__PURE__ */ jsx40("span", { className: "ui-sr", children: `Signed in as ${account.name}, ${account.email}` }),
5023
- /* @__PURE__ */ jsx40("span", { className: "ui-app__av", "aria-hidden": "true", children: /* @__PURE__ */ jsx40(Avatar, { personKey: account.email || account.name, name: account.name, size: 32 }) }),
5024
- /* @__PURE__ */ jsxs36("span", { className: "ui-app__who", "aria-hidden": "true", children: [
5025
- /* @__PURE__ */ jsx40("b", { children: account.name }),
5026
- /* @__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 })
5027
5121
  ] })
5028
5122
  ] }),
5029
5123
  items: [...items, ...withTheme ? [{ label: "Theme", value: "theme" }, "---"] : [], { label: "Sign out", value: "sign-out", icon: "logout", danger: true }],
5030
- row: (item, props) => item.value === "theme" ? /* @__PURE__ */ jsxs36(Fragment18, { children: [
5031
- /* @__PURE__ */ jsxs36(
5124
+ row: (item, props) => item.value === "theme" ? /* @__PURE__ */ jsxs37(Fragment18, { children: [
5125
+ /* @__PURE__ */ jsxs37(
5032
5126
  "div",
5033
5127
  {
5034
5128
  ...props,
@@ -5045,13 +5139,13 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
5045
5139
  },
5046
5140
  children: [
5047
5141
  glyph(themeIcon2(theme.theme), "ui-dropdown__ic"),
5048
- /* @__PURE__ */ jsx40("span", { className: "ui-dropdown__main", children: /* @__PURE__ */ jsx40("span", { className: "ui-dropdown__label", children: "Theme" }) }),
5049
- /* @__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 }),
5050
5144
  glyph(icon7("chevronRight"), "ui-dropdown__more")
5051
5145
  ]
5052
5146
  }
5053
5147
  ),
5054
- sub && (inPlace ? choices : createPortal7(/* @__PURE__ */ jsx40(
5148
+ sub && (inPlace ? choices : createPortal7(/* @__PURE__ */ jsx41(
5055
5149
  "div",
5056
5150
  {
5057
5151
  ref: flyout,
@@ -5059,14 +5153,14 @@ function AccountMenu({ account, items, onSelect, withTheme, inPlace, away }) {
5059
5153
  children: choices
5060
5154
  }
5061
5155
  ), document.body))
5062
- ] }) : props.href ? /* @__PURE__ */ jsx40("a", { ...props }) : /* @__PURE__ */ jsx40("div", { ...props }),
5156
+ ] }) : props.href ? /* @__PURE__ */ jsx41("a", { ...props }) : /* @__PURE__ */ jsx41("div", { ...props }),
5063
5157
  onSelect
5064
5158
  }
5065
5159
  ) });
5066
5160
  }
5067
5161
 
5068
5162
  // src/AppShell.tsx
5069
- 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";
5070
5164
  var path = (value) => value.split(/[?#]/)[0].replace(/\/+$/, "") || "/";
5071
5165
  function AppShell({
5072
5166
  sections,
@@ -5096,12 +5190,12 @@ function AppShell({
5096
5190
  onNavigate,
5097
5191
  renderLink
5098
5192
  }) {
5099
- const uid = useId14();
5100
- const [collapsed, setCollapsed] = useState19(defaultCollapsed);
5101
- const [search, setSearch] = useState19(false);
5102
- const [menu, setMenu] = useState19(false);
5103
- const menuButton = useRef23(null);
5104
- 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);
5105
5199
  const firstRow = useMemo5(() => ({ get current() {
5106
5200
  return menuBody.current?.querySelector(".ui-nav__item") ?? null;
5107
5201
  } }), []);
@@ -5109,14 +5203,14 @@ function AppShell({
5109
5203
  const links = rows.flatMap((row2) => row2.items?.length ? row2.items : [row2]);
5110
5204
  const current = path(pathname);
5111
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];
5112
- useEffect19(() => {
5206
+ useEffect20(() => {
5113
5207
  setCollapsed(railCollapsed() ?? defaultCollapsed);
5114
5208
  }, [defaultCollapsed]);
5115
- useEffect19(() => {
5209
+ useEffect20(() => {
5116
5210
  setMenu(false);
5117
5211
  setSearch(false);
5118
5212
  }, [pathname]);
5119
- useEffect19(() => {
5213
+ useEffect20(() => {
5120
5214
  if (!menu) return;
5121
5215
  const grown = () => {
5122
5216
  const button = menuButton.current;
@@ -5125,7 +5219,7 @@ function AppShell({
5125
5219
  window.addEventListener("resize", grown);
5126
5220
  return () => window.removeEventListener("resize", grown);
5127
5221
  }, [menu]);
5128
- useEffect19(() => {
5222
+ useEffect20(() => {
5129
5223
  if (layout === "rail") return;
5130
5224
  const hotkey = (event) => {
5131
5225
  if (!(event.metaKey || event.ctrlKey) || event.altKey || event.shiftKey || event.key.toLowerCase() !== "k") return;
@@ -5144,7 +5238,7 @@ function AppShell({
5144
5238
  };
5145
5239
  const row = ({ href, label, icon: icon9, count }) => ({ id: href, href, label, icon: icon9, badge: layout === "rail" ? void 0 : count });
5146
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) })) }];
5147
- const sidebar = (label) => /* @__PURE__ */ jsx41(
5241
+ const sidebar = (label) => /* @__PURE__ */ jsx42(
5148
5242
  SidebarNav,
5149
5243
  {
5150
5244
  "aria-label": label,
@@ -5156,22 +5250,23 @@ function AppShell({
5156
5250
  const linkProps = { ...props, onClick: (event) => {
5157
5251
  if (!event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey) setMenu(false);
5158
5252
  } };
5159
- return renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx41("a", { ...linkProps });
5253
+ return renderLink ? renderLink(section, linkProps) : /* @__PURE__ */ jsx42("a", { ...linkProps });
5160
5254
  }
5161
5255
  }
5162
5256
  );
5163
5257
  const foldLabel = collapsed ? "Expand sidebar" : "Collapse sidebar";
5164
5258
  const navigable = links.length > 1 || Boolean(back);
5165
- const lockup = /* @__PURE__ */ jsxs37("a", { className: "ui-app__brand", href: brandHref, "aria-label": word, children: [
5166
- brand ?? /* @__PURE__ */ jsx41("i", { "aria-hidden": "true", className: "ui-react-app__mark", dangerouslySetInnerHTML: { __html: prism(uid, 24) } }),
5167
- /* @__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 })
5168
5263
  ] });
5169
5264
  const ownItems = accountItems.map(({ label, icon: icon9, href }, i) => ({ label, icon: icon9, href, value: `item-${i}` }));
5170
5265
  const pick = (value) => {
5171
5266
  if (value === "sign-out") onSignOut();
5172
5267
  else accountItems[Number(String(value).slice(5))]?.onSelect?.();
5173
5268
  };
5174
- const accountBlock = (withTheme = false, inPlace = false) => /* @__PURE__ */ jsx41(
5269
+ const accountBlock = (withTheme = false, inPlace = false) => /* @__PURE__ */ jsx42(
5175
5270
  AccountMenu,
5176
5271
  {
5177
5272
  account,
@@ -5182,10 +5277,10 @@ function AppShell({
5182
5277
  away: menuButton
5183
5278
  }
5184
5279
  );
5185
- const headSlot = layout === "topbar" && headControl && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__head-control", children: headControl });
5186
- 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: [
5187
5282
  headSlot,
5188
- /* @__PURE__ */ jsxs37(
5283
+ /* @__PURE__ */ jsxs38(
5189
5284
  "button",
5190
5285
  {
5191
5286
  type: "button",
@@ -5194,37 +5289,37 @@ function AppShell({
5194
5289
  "aria-label": foldLabel,
5195
5290
  onClick: fold,
5196
5291
  children: [
5197
- /* @__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: [
5198
- /* @__PURE__ */ jsx41("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
5199
- /* @__PURE__ */ jsx41("path", { className: "ui-app__fold-seam", d: "M9 3v18" }),
5200
- /* @__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" })
5201
5296
  ] }) }),
5202
- /* @__PURE__ */ jsx41("span", { className: "ui-nav__label", children: foldLabel })
5297
+ /* @__PURE__ */ jsx42("span", { className: "ui-nav__label", children: foldLabel })
5203
5298
  ]
5204
5299
  }
5205
5300
  )
5206
5301
  ] });
5207
- const page = /* @__PURE__ */ jsxs37("main", { className: `ui-app__main${width === "wide" ? " ui-app__main--wide" : ""}`, children: [
5208
- back && /* @__PURE__ */ jsx41(BackLink, { ...back }),
5209
- title != null && (tools ? /* @__PURE__ */ jsxs37("div", { className: "ui-app__title-row", children: [
5210
- /* @__PURE__ */ jsx41("h1", { children: title }),
5211
- /* @__PURE__ */ jsx41("div", { className: "ui-app__tools", children: tools })
5212
- ] }) : /* @__PURE__ */ jsx41("h1", { children: title })),
5213
- lede && /* @__PURE__ */ jsx41("p", { className: "ui-app__sub", children: lede }),
5214
- actions && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__actions", children: actions }),
5215
- /* @__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 })
5216
5311
  ] });
5217
- if (layout === "rail") return /* @__PURE__ */ jsxs37("div", { className: `ui-app ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
5218
- /* @__PURE__ */ jsxs37("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
5219
- /* @__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: [
5220
5315
  lockup,
5221
5316
  foldControl
5222
5317
  ] }),
5223
5318
  sidebar("Sections"),
5224
5319
  accountBlock()
5225
5320
  ] }),
5226
- /* @__PURE__ */ jsxs37("header", { className: "ui-app__bar ui-app__bar--phone", children: [
5227
- /* @__PURE__ */ jsx41(
5321
+ /* @__PURE__ */ jsxs38("header", { className: "ui-app__bar ui-app__bar--phone", children: [
5322
+ /* @__PURE__ */ jsx42(
5228
5323
  Button,
5229
5324
  {
5230
5325
  ref: menuButton,
@@ -5238,10 +5333,10 @@ function AppShell({
5238
5333
  onClick: () => setMenu(true)
5239
5334
  }
5240
5335
  ),
5241
- /* @__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) } }) })
5242
5337
  ] }),
5243
5338
  page,
5244
- /* @__PURE__ */ jsx41(
5339
+ /* @__PURE__ */ jsx42(
5245
5340
  Drawer,
5246
5341
  {
5247
5342
  open: menu,
@@ -5249,16 +5344,16 @@ function AppShell({
5249
5344
  title: word,
5250
5345
  side: drawerSide ?? "left",
5251
5346
  size: "sm",
5252
- footer: /* @__PURE__ */ jsx41("div", { className: "ui-app__drawer", children: accountBlock() }),
5253
- 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") })
5254
5349
  }
5255
5350
  )
5256
5351
  ] });
5257
- const ends = bandActions && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__band-actions", children: bandActions });
5258
- const control = bandControl && /* @__PURE__ */ jsx41("div", { className: "ui-react-app__control", inert: collapsed, children: bandControl });
5259
- return /* @__PURE__ */ jsxs37("div", { className: `ui-app ui-app--topbar ui-react-app${collapsed ? " is-collapsed" : ""}`, children: [
5260
- navigable && /* @__PURE__ */ jsxs37("div", { className: "ui-app__rail", role: "region", "aria-label": "Sidebar", children: [
5261
- /* @__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: [
5262
5357
  lockup,
5263
5358
  foldControl
5264
5359
  ] }),
@@ -5266,20 +5361,23 @@ function AppShell({
5266
5361
  sidebar("Sections"),
5267
5362
  accountBlock(true)
5268
5363
  ] }),
5269
- /* @__PURE__ */ jsxs37("div", { className: "ui-app__well", children: [
5270
- /* @__PURE__ */ jsxs37("header", { className: "ui-app__bar", children: [
5271
- navigable ? /* @__PURE__ */ jsxs37(Fragment19, { children: [
5272
- /* @__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) } }) }),
5273
- /* @__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 })
5274
5372
  ] }) : lockup,
5275
- /* @__PURE__ */ jsxs37("button", { type: "button", className: "ui-app__search", "aria-haspopup": "dialog", onClick: () => setSearch(true), children: [
5276
- /* @__PURE__ */ jsx41("span", { className: "ui-app__search-ic", children: /* @__PURE__ */ jsx41(Icon, { name: "search" }) }),
5277
- /* @__PURE__ */ jsx41("span", { className: "ui-app__search-txt", children: searchLabel }),
5278
- /* @__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() })
5279
5377
  ] }),
5280
- /* @__PURE__ */ jsx41("span", { className: "ui-app__bar-gap" }),
5378
+ /* @__PURE__ */ jsx42("span", { className: "ui-app__bar-gap" }),
5281
5379
  navigable && ends,
5282
- navigable ? /* @__PURE__ */ jsx41(
5380
+ navigable ? /* @__PURE__ */ jsx42(
5283
5381
  Button,
5284
5382
  {
5285
5383
  ref: menuButton,
@@ -5292,12 +5390,12 @@ function AppShell({
5292
5390
  "aria-expanded": menu,
5293
5391
  onClick: () => setMenu(true)
5294
5392
  }
5295
- ) : /* @__PURE__ */ jsxs37(Fragment19, { children: [
5296
- bandControl && /* @__PURE__ */ jsx41("span", { className: "ui-react-app__band-control", children: bandControl }),
5297
- 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 }),
5298
5396
  ends,
5299
- /* @__PURE__ */ jsx41(ThemeToggle, {}),
5300
- /* @__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(
5301
5399
  Dropdown,
5302
5400
  {
5303
5401
  variant: "menu",
@@ -5306,13 +5404,13 @@ function AppShell({
5306
5404
  title: `Signed in as ${account.name}, ${account.email}`,
5307
5405
  triggerClass: "ui-app__user-trigger",
5308
5406
  panelClass: "ui-app__user-panel",
5309
- triggerContent: /* @__PURE__ */ jsxs37(Fragment19, { children: [
5310
- /* @__PURE__ */ jsx41("span", { className: "ui-sr", children: `Signed in as ${account.name}, ${account.email}` }),
5311
- /* @__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 }) })
5312
5410
  ] }),
5313
- header: /* @__PURE__ */ jsxs37("div", { className: "ui-dropdown__head", children: [
5314
- /* @__PURE__ */ jsx41("b", { children: account.name }),
5315
- /* @__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 })
5316
5414
  ] }),
5317
5415
  items: [...ownItems, { label: "Sign out", value: "sign-out", icon: "logout", danger: true }],
5318
5416
  onSelect: pick
@@ -5322,7 +5420,7 @@ function AppShell({
5322
5420
  ] }),
5323
5421
  page
5324
5422
  ] }),
5325
- navigable && /* @__PURE__ */ jsx41(
5423
+ navigable && /* @__PURE__ */ jsx42(
5326
5424
  Drawer,
5327
5425
  {
5328
5426
  open: menu,
@@ -5332,47 +5430,127 @@ function AppShell({
5332
5430
  size: "sm",
5333
5431
  initialFocusRef: firstRow,
5334
5432
  headerActions: headSlot,
5335
- footer: /* @__PURE__ */ jsx41("div", { className: "ui-app__drawer", children: accountBlock(true, true) }),
5336
- children: /* @__PURE__ */ jsxs37("div", { className: "ui-react-app__menu", ref: menuBody, children: [
5337
- 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 }),
5338
5436
  sidebar("Menu sections")
5339
5437
  ] })
5340
5438
  }
5341
5439
  ),
5342
- /* @__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) })
5343
5441
  ] });
5344
5442
  }
5345
5443
 
5346
5444
  // src/AuthShell.tsx
5347
5445
  import { forwardRef as forwardRef10 } from "react";
5348
- import { jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
5446
+ import { jsx as jsx43, jsxs as jsxs39 } from "react/jsx-runtime";
5349
5447
  var AuthShell = forwardRef10(function AuthShell2({ brand, children, split, tagline, brandAbove, className, ...rest }, ref) {
5350
5448
  const cls = ["ui-auth", split && "ui-auth--split", brandAbove && "ui-auth--brand-above", className].filter(Boolean).join(" ");
5351
5449
  if (!split && brandAbove) {
5352
- return /* @__PURE__ */ jsxs38("div", { ...rest, ref, className: cls, children: [
5353
- /* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
5354
- /* @__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 })
5355
5453
  ] });
5356
5454
  }
5357
5455
  if (!split) {
5358
- return /* @__PURE__ */ jsx42("div", { ...rest, ref, className: cls, children: /* @__PURE__ */ jsxs38("div", { className: "ui-auth__card", children: [
5359
- /* @__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 }),
5360
5458
  children
5361
5459
  ] }) });
5362
5460
  }
5363
- return /* @__PURE__ */ jsxs38("div", { ...rest, ref, className: cls, children: [
5364
- /* @__PURE__ */ jsxs38("aside", { className: "ui-auth__brand-pane", children: [
5365
- /* @__PURE__ */ jsx42("div", { className: "ui-auth__brand", children: brand }),
5366
- 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 })
5367
5465
  ] }),
5368
- /* @__PURE__ */ jsx42("div", { className: "ui-auth__pane", children })
5466
+ /* @__PURE__ */ jsx43("div", { className: "ui-auth__pane", children })
5369
5467
  ] });
5370
5468
  });
5371
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
+
5372
5550
  // src/Footer.tsx
5373
- import { useId as useId15 } from "react";
5551
+ import { useId as useId17 } from "react";
5374
5552
  import { prism as prism2, safeUrl as safeUrl5 } from "@apliteni/apliteni-ui";
5375
- import { jsx as jsx43, jsxs as jsxs39 } from "react/jsx-runtime";
5553
+ import { jsx as jsx45, jsxs as jsxs41 } from "react/jsx-runtime";
5376
5554
  var SOCIAL_GLYPHS = {
5377
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"/>',
5378
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"/>',
@@ -5381,10 +5559,10 @@ var SOCIAL_GLYPHS = {
5381
5559
  };
5382
5560
  var escapeText = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
5383
5561
  function Legal({ legal, legalLinks, switcher }) {
5384
- return /* @__PURE__ */ jsxs39("div", { className: "ui-footer__bar", children: [
5385
- /* @__PURE__ */ jsx43("span", { className: "ui-footer__legal", children: legal }),
5386
- 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)) }),
5387
- 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
5388
5566
  ] });
5389
5567
  }
5390
5568
  function Footer({
@@ -5402,14 +5580,14 @@ function Footer({
5402
5580
  className,
5403
5581
  ...rest
5404
5582
  }) {
5405
- const uid = useId15();
5583
+ const uid = useId17();
5406
5584
  const cls = ["ui-footer", `ui-footer--${variant}`, className].filter(Boolean).join(" ");
5407
- const bar = /* @__PURE__ */ jsx43(Legal, { legal, legalLinks, switcher });
5585
+ const bar = /* @__PURE__ */ jsx45(Legal, { legal, legalLinks, switcher });
5408
5586
  if (variant !== "full") {
5409
- 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 }) });
5410
5588
  }
5411
5589
  const mark = prism2(uid.replace(/:/g, ""), 22);
5412
- const lockup = brand ?? /* @__PURE__ */ jsx43(
5590
+ const lockup = brand ?? /* @__PURE__ */ jsx45(
5413
5591
  "a",
5414
5592
  {
5415
5593
  className: "brand",
@@ -5418,21 +5596,21 @@ function Footer({
5418
5596
  dangerouslySetInnerHTML: { __html: `${mark}<span>${escapeText(word)}</span>` }
5419
5597
  }
5420
5598
  );
5421
- return /* @__PURE__ */ jsx43("footer", { ...rest, className: cls, role: "contentinfo", children: /* @__PURE__ */ jsxs39("div", { className: "ui-footer__in", children: [
5422
- /* @__PURE__ */ jsxs39("div", { className: "ui-footer__top", children: [
5423
- 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: [
5424
5602
  lockup,
5425
- tagline && /* @__PURE__ */ jsx43("p", { className: "ui-footer__tagline", children: tagline }),
5426
- 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" }) => {
5427
5605
  const markup = SOCIAL_GLYPHS[icon9];
5428
5606
  const fill = icon9 === "mail" ? "none" : "currentColor";
5429
5607
  const viewBox = icon9 === "linkedin" ? "0 0 448 512" : "0 0 24 24";
5430
- 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);
5431
5609
  }) })
5432
5610
  ] }),
5433
- (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: [
5434
- title && /* @__PURE__ */ jsx43("h2", { className: "ui-footer__col-title", children: title }),
5435
- /* @__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)) })
5436
5614
  ] }, title ?? i)) })
5437
5615
  ] }),
5438
5616
  bar
@@ -5440,32 +5618,32 @@ function Footer({
5440
5618
  }
5441
5619
 
5442
5620
  // src/ThemeChoice.tsx
5443
- import { useId as useId16 } from "react";
5444
- 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";
5445
5623
  var OPTIONS = [
5446
5624
  { value: "auto", name: "System" },
5447
5625
  { value: "light", name: "Light" },
5448
5626
  { value: "dark", name: "Dark" }
5449
5627
  ];
5450
- var Scene = ({ theme }) => /* @__PURE__ */ jsxs40("span", { className: `ui-theme-choice__scene ui-theme-choice__scene--${theme}`, children: [
5451
- /* @__PURE__ */ jsxs40("span", { className: "ui-theme-choice__rail", children: [
5452
- /* @__PURE__ */ jsx44("span", {}),
5453
- /* @__PURE__ */ jsx44("span", {}),
5454
- /* @__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", {})
5455
5633
  ] }),
5456
- /* @__PURE__ */ jsxs40("span", { className: "ui-theme-choice__main", children: [
5457
- /* @__PURE__ */ jsx44("span", { className: "ui-theme-choice__title" }),
5458
- /* @__PURE__ */ jsxs40("span", { className: "ui-theme-choice__card", children: [
5459
- /* @__PURE__ */ jsx44("span", {}),
5460
- /* @__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", {})
5461
5639
  ] })
5462
5640
  ] })
5463
5641
  ] });
5464
5642
  function ThemeChoice({ label = "Theme" }) {
5465
5643
  const { theme, set } = useThemeChoice();
5466
- const name = useId16();
5467
- 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: [
5468
- /* @__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(
5469
5647
  "input",
5470
5648
  {
5471
5649
  type: "radio",
@@ -5476,20 +5654,20 @@ function ThemeChoice({ label = "Theme" }) {
5476
5654
  onChange: () => set(value)
5477
5655
  }
5478
5656
  ),
5479
- /* @__PURE__ */ jsxs40("span", { className: "ui-theme-choice__pic", "aria-hidden": "true", children: [
5480
- value === "dark" ? /* @__PURE__ */ jsx44(Scene, { theme: "dark" }) : /* @__PURE__ */ jsx44(Scene, { theme: "light" }),
5481
- 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" })
5482
5660
  ] }),
5483
- /* @__PURE__ */ jsx44("span", { className: "ui-theme-choice__name", children: text2 })
5661
+ /* @__PURE__ */ jsx46("span", { className: "ui-theme-choice__name", children: text2 })
5484
5662
  ] }, value)) });
5485
5663
  }
5486
5664
 
5487
5665
  // src/Success.tsx
5488
- import { forwardRef as forwardRef11, useEffect as useEffect20, useRef as useRef24, useState as useState20 } from "react";
5489
- 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";
5490
5668
  var SuccessCheck = forwardRef11(function SuccessCheck2({ variant = "line", className, ...rest }, ref) {
5491
5669
  const circled = variant === "circled";
5492
- return /* @__PURE__ */ jsxs41(
5670
+ return /* @__PURE__ */ jsxs43(
5493
5671
  "svg",
5494
5672
  {
5495
5673
  ...rest,
@@ -5501,18 +5679,18 @@ var SuccessCheck = forwardRef11(function SuccessCheck2({ variant = "line", class
5501
5679
  "aria-hidden": "true",
5502
5680
  focusable: "false",
5503
5681
  children: [
5504
- circled && /* @__PURE__ */ jsx45("path", { className: "ui-sx__circle", d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
5505
- /* @__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" })
5506
5684
  ]
5507
5685
  }
5508
5686
  );
5509
5687
  });
5510
5688
  var SuccessPanel = forwardRef11(function SuccessPanel2({ title = "Done", sub, check = "line", className, ...rest }, ref) {
5511
5689
  const circled = check === "circled";
5512
- return /* @__PURE__ */ jsxs41("div", { ...rest, ref, className: ["ui-success", className].filter(Boolean).join(" "), children: [
5513
- /* @__PURE__ */ jsx45("div", { className: ["ui-success__check", circled && "ui-success__check--circled"].filter(Boolean).join(" "), children: /* @__PURE__ */ jsx45(SuccessCheck, { variant: circled ? "circled" : "line" }) }),
5514
- /* @__PURE__ */ jsx45("div", { className: "ui-success__title", children: title }),
5515
- 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 })
5516
5694
  ] });
5517
5695
  });
5518
5696
  var pieces = [
@@ -5532,12 +5710,12 @@ var pieces = [
5532
5710
  [80, 0.36, -20, "c", 1.05]
5533
5711
  ];
5534
5712
  function Countdown({ seconds, label = "Redirecting", onDone }) {
5535
- const [remaining, setRemaining] = useState20(seconds);
5536
- const callback = useRef24(onDone);
5537
- useEffect20(() => {
5713
+ const [remaining, setRemaining] = useState22(seconds);
5714
+ const callback = useRef26(onDone);
5715
+ useEffect22(() => {
5538
5716
  callback.current = onDone;
5539
5717
  }, [onDone]);
5540
- useEffect20(() => {
5718
+ useEffect22(() => {
5541
5719
  let count = seconds;
5542
5720
  const timer = setInterval(() => {
5543
5721
  count -= 1;
@@ -5549,12 +5727,12 @@ function Countdown({ seconds, label = "Redirecting", onDone }) {
5549
5727
  }, 1e3);
5550
5728
  return () => clearInterval(timer);
5551
5729
  }, [seconds]);
5552
- return /* @__PURE__ */ jsxs41("div", { className: "ui-sx__count", "data-sx-count": "", style: { "--sx-secs": `${seconds}s` }, children: [
5553
- /* @__PURE__ */ jsx45("span", { className: "ui-sx__count-ring", "aria-hidden": "true" }),
5554
- /* @__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: [
5555
5733
  label,
5556
5734
  " in ",
5557
- /* @__PURE__ */ jsx45("b", { "data-sx-num": "", children: remaining }),
5735
+ /* @__PURE__ */ jsx47("b", { "data-sx-num": "", children: remaining }),
5558
5736
  "s"
5559
5737
  ] })
5560
5738
  ] });
@@ -5581,7 +5759,7 @@ var Success = forwardRef11(function Success2({
5581
5759
  const seconds = countdown?.seconds;
5582
5760
  const duration = seconds != null && Number.isFinite(seconds) && seconds >= 1 ? Math.floor(seconds) : 5;
5583
5761
  const mark = check === "circled" ? "circled" : "line";
5584
- return /* @__PURE__ */ jsxs41(
5762
+ return /* @__PURE__ */ jsxs43(
5585
5763
  "div",
5586
5764
  {
5587
5765
  role: "status",
@@ -5590,16 +5768,16 @@ var Success = forwardRef11(function Success2({
5590
5768
  ref,
5591
5769
  className: ["ui-sx", `ui-sx--${layout}`, `ui-sx--check-${mark}`, confetti && "ui-sx--confetti", className].filter(Boolean).join(" "),
5592
5770
  children: [
5593
- confetti && /* @__PURE__ */ jsx45("div", { className: "ui-sx__confetti", "aria-hidden": "true", children: pieces.map(
5594
- ([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)
5595
5773
  ) }),
5596
- /* @__PURE__ */ jsxs41("div", { className: "ui-sx__inner", children: [
5597
- /* @__PURE__ */ jsx45("div", { className: "ui-sx__visual", children: /* @__PURE__ */ jsx45(SuccessCheck, { variant: mark }) }),
5598
- /* @__PURE__ */ jsxs41("div", { className: "ui-sx__content", children: [
5599
- /* @__PURE__ */ jsx45(Heading, { className: "ui-sx__title", children: title }),
5600
- body && /* @__PURE__ */ jsx45("p", { className: "ui-sx__body", children: body }),
5601
- hasActions && /* @__PURE__ */ jsx45("div", { className: "ui-sx__actions", children: actions }),
5602
- 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)
5603
5781
  ] })
5604
5782
  ] })
5605
5783
  ]
@@ -5611,18 +5789,18 @@ var Success = forwardRef11(function Success2({
5611
5789
  import {
5612
5790
  useCallback as useCallback8,
5613
5791
  useContext as useContext5,
5614
- useEffect as useEffect21,
5615
- useId as useId17,
5792
+ useEffect as useEffect23,
5793
+ useId as useId19,
5616
5794
  useLayoutEffect as useLayoutEffect5,
5617
5795
  useMemo as useMemo6,
5618
- useRef as useRef25,
5619
- useState as useState21
5796
+ useRef as useRef27,
5797
+ useState as useState23
5620
5798
  } from "react";
5621
5799
  import { createPortal as createPortal8 } from "react-dom";
5622
5800
  import { CHART_FLOOR, bridgeWalk, chartScale, pointTarget } from "@apliteni/apliteni-ui";
5623
5801
 
5624
5802
  // src/chart-looks.tsx
5625
- 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";
5626
5804
  var LOOK_DEFAULT = {
5627
5805
  line: "thin",
5628
5806
  area: "stacked",
@@ -5844,7 +6022,7 @@ function linesDrawing(g, open) {
5844
6022
  const [a, b] = [run[0], run[run.length - 1]];
5845
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`;
5846
6024
  }).join("");
5847
- return d && /* @__PURE__ */ jsx46(
6025
+ return d && /* @__PURE__ */ jsx48(
5848
6026
  "path",
5849
6027
  {
5850
6028
  className: cx8("ui-chart__area", tone(layer.tone)),
@@ -5854,7 +6032,7 @@ function linesDrawing(g, open) {
5854
6032
  `fill-${layer.id}`
5855
6033
  );
5856
6034
  }
5857
- return /* @__PURE__ */ jsx46(
6035
+ return /* @__PURE__ */ jsx48(
5858
6036
  "path",
5859
6037
  {
5860
6038
  className: cx8(look.share ? "ui-chart__segment" : "ui-chart__area", tone(layer.tone)),
@@ -5864,7 +6042,7 @@ function linesDrawing(g, open) {
5864
6042
  `fill-${layer.id}`
5865
6043
  );
5866
6044
  });
5867
- 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(
5868
6046
  "path",
5869
6047
  {
5870
6048
  className: cx8(
@@ -5875,7 +6053,7 @@ function linesDrawing(g, open) {
5875
6053
  d: `M${px(centre(i))} ${px(y(at(layer, i)))}${bend(k, i)}`
5876
6054
  },
5877
6055
  `edge-${layer.id}-${i}`
5878
- ) : 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(
5879
6057
  "line",
5880
6058
  {
5881
6059
  className: cx8(
@@ -5897,7 +6075,7 @@ function linesDrawing(g, open) {
5897
6075
  const shown = i === open || points || lonely && !look.share;
5898
6076
  if (!shown || look.share && i !== open) return null;
5899
6077
  if (look.share && layer !== look.layers[look.layers.length - 1]) return null;
5900
- return /* @__PURE__ */ jsx46(
6078
+ return /* @__PURE__ */ jsx48(
5901
6079
  "circle",
5902
6080
  {
5903
6081
  className: cx8("ui-chart__dot", tone(layer.tone)),
@@ -5925,8 +6103,8 @@ function linesDrawing(g, open) {
5925
6103
  base = at2 + Math.max(drop, fall + gap + ascent);
5926
6104
  }
5927
6105
  }
5928
- return /* @__PURE__ */ jsxs42("g", { children: [
5929
- /* @__PURE__ */ jsx46(
6106
+ return /* @__PURE__ */ jsxs44("g", { children: [
6107
+ /* @__PURE__ */ jsx48(
5930
6108
  "circle",
5931
6109
  {
5932
6110
  className: cx8("ui-chart__dot", tone(layer.tone)),
@@ -5935,7 +6113,7 @@ function linesDrawing(g, open) {
5935
6113
  r: "4"
5936
6114
  }
5937
6115
  ),
5938
- /* @__PURE__ */ jsx46(
6116
+ /* @__PURE__ */ jsx48(
5939
6117
  "text",
5940
6118
  {
5941
6119
  className: "ui-chart__text ui-chart__text--strong",
@@ -5947,8 +6125,8 @@ function linesDrawing(g, open) {
5947
6125
  )
5948
6126
  ] }, `end-${layer.id}`);
5949
6127
  });
5950
- return /* @__PURE__ */ jsxs42(Fragment20, { children: [
5951
- 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(
5952
6130
  "linearGradient",
5953
6131
  {
5954
6132
  id: ramp.id,
@@ -5959,14 +6137,14 @@ function linesDrawing(g, open) {
5959
6137
  y1: px(y(ramp.lo)),
5960
6138
  y2: px(y(ramp.hi)),
5961
6139
  children: [
5962
- /* @__PURE__ */ jsx46("stop", { className: curves ? "ui-chart__wash-floor" : "ui-chart__fade-base", offset: "0" }),
5963
- /* @__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" })
5964
6142
  ]
5965
6143
  },
5966
6144
  ramp.id
5967
6145
  )) }),
5968
6146
  fills,
5969
- open !== null && /* @__PURE__ */ jsx46(
6147
+ open !== null && /* @__PURE__ */ jsx48(
5970
6148
  "line",
5971
6149
  {
5972
6150
  className: "ui-chart__cross",
@@ -5991,7 +6169,7 @@ function columnsDrawing(g) {
5991
6169
  const y1 = y(layer.to[i]);
5992
6170
  const x = centre(i) - w / 2;
5993
6171
  const d = layer === filled[filled.length - 1] ? topRounded(x, y1, w, y0 - y1, 4) : square(x, y1, w, y0 - y1);
5994
- return /* @__PURE__ */ jsx46(
6172
+ return /* @__PURE__ */ jsx48(
5995
6173
  "path",
5996
6174
  {
5997
6175
  className: cx8("ui-chart__segment", tone(layer.tone), label.estimated && "is-estimated"),
@@ -6006,10 +6184,10 @@ function rowsDrawing(g, pick) {
6006
6184
  const { look, labels, format, formatAxis, scale } = g;
6007
6185
  const rows = rowsOf(g);
6008
6186
  const bottom = rows.row * labels.length;
6009
- return /* @__PURE__ */ jsxs42(Fragment20, { children: [
6010
- 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) }),
6011
- scale.ticks.map((tick) => /* @__PURE__ */ jsxs42("g", { children: [
6012
- /* @__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(
6013
6191
  "line",
6014
6192
  {
6015
6193
  className: tick === 0 ? "ui-chart__zero" : "ui-chart__grid",
@@ -6019,7 +6197,7 @@ function rowsDrawing(g, pick) {
6019
6197
  y2: px(bottom)
6020
6198
  }
6021
6199
  ),
6022
- /* @__PURE__ */ jsx46(
6200
+ /* @__PURE__ */ jsx48(
6023
6201
  "text",
6024
6202
  {
6025
6203
  className: "ui-chart__caption",
@@ -6034,8 +6212,8 @@ function rowsDrawing(g, pick) {
6034
6212
  labels.map((label, i) => {
6035
6213
  const top = rows.top(i);
6036
6214
  const filled = look.layers.filter((l) => l.to[i] > l.from[i]);
6037
- return /* @__PURE__ */ jsxs42("g", { children: [
6038
- /* @__PURE__ */ jsx46(
6215
+ return /* @__PURE__ */ jsxs44("g", { children: [
6216
+ /* @__PURE__ */ jsx48(
6039
6217
  "text",
6040
6218
  {
6041
6219
  className: "ui-chart__caption",
@@ -6050,7 +6228,7 @@ function rowsDrawing(g, pick) {
6050
6228
  const x0 = rows.x(layer.from[i]);
6051
6229
  const x1 = rows.x(layer.to[i]);
6052
6230
  const d = layer === filled[filled.length - 1] ? rightRounded(x0, top, x1 - x0, ROW_BAR, 4) : square(x0, top, x1 - x0, ROW_BAR);
6053
- return /* @__PURE__ */ jsx46(
6231
+ return /* @__PURE__ */ jsx48(
6054
6232
  "path",
6055
6233
  {
6056
6234
  d,
@@ -6059,7 +6237,7 @@ function rowsDrawing(g, pick) {
6059
6237
  `seg-${layer.id}`
6060
6238
  );
6061
6239
  }),
6062
- /* @__PURE__ */ jsx46(
6240
+ /* @__PURE__ */ jsx48(
6063
6241
  "text",
6064
6242
  {
6065
6243
  className: "ui-chart__text",
@@ -6077,8 +6255,8 @@ function ringDrawing(g) {
6077
6255
  const { look, format } = g;
6078
6256
  const ring = ringOf(g);
6079
6257
  const total = look.totals[0];
6080
- return /* @__PURE__ */ jsxs42(Fragment20, { children: [
6081
- 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(
6082
6260
  "path",
6083
6261
  {
6084
6262
  className: cx8("ui-chart__segment", tone(slice.tone)),
@@ -6086,42 +6264,42 @@ function ringDrawing(g) {
6086
6264
  },
6087
6265
  `slice-${slice.id}`
6088
6266
  )),
6089
- look.look === "thin" && /* @__PURE__ */ jsxs42("g", { "aria-hidden": "true", children: [
6090
- /* @__PURE__ */ jsx46("text", { className: "ui-chart__total", textAnchor: "middle", x: px(ring.x), y: px(ring.y + 2), children: format(total) }),
6091
- /* @__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 })
6092
6270
  ] }),
6093
6271
  look.look === "labels" && look.layers.filter((s) => s.to[0] > s.from[0]).map((slice) => {
6094
6272
  const mid = angle((slice.from[0] + slice.to[0]) / 2);
6095
6273
  const x = ring.x + (ring.r + 14) * Math.cos(mid);
6096
6274
  const y = ring.y + (ring.r + 14) * Math.sin(mid);
6097
6275
  const anchor = Math.cos(mid) >= 0 ? "start" : "end";
6098
- return /* @__PURE__ */ jsxs42("g", { "aria-hidden": "true", children: [
6099
- /* @__PURE__ */ jsx46("text", { className: "ui-chart__text ui-chart__text--strong", textAnchor: anchor, x: px(x), y: px(y - 2), children: slice.name }),
6100
- /* @__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])}` })
6101
6279
  ] }, `label-${slice.id}`);
6102
6280
  })
6103
6281
  ] });
6104
6282
  }
6105
6283
  function Shares({ look, format, swatch }) {
6106
6284
  const total = look.totals[0];
6107
- return /* @__PURE__ */ jsxs42("ul", { className: "ui-chart__shares", "aria-hidden": "true", children: [
6108
- 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: [
6109
6287
  swatch,
6110
- /* @__PURE__ */ jsx46("span", { children: slice.name }),
6111
- /* @__PURE__ */ jsx46("span", { className: "ui-chart__shares-value", children: format(slice.values[0]) }),
6112
- /* @__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 })
6113
6291
  ] }, slice.id)),
6114
- /* @__PURE__ */ jsxs42("li", { className: "ui-chart__shares-total", children: [
6115
- /* @__PURE__ */ jsx46("span", {}),
6116
- /* @__PURE__ */ jsx46("span", { children: look.totalLabel }),
6117
- /* @__PURE__ */ jsx46("span", { className: "ui-chart__shares-value", children: format(total) }),
6118
- /* @__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%" })
6119
6297
  ] })
6120
6298
  ] });
6121
6299
  }
6122
6300
 
6123
6301
  // src/Chart.tsx
6124
- 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";
6125
6303
  function placeChartTip(mark, tip) {
6126
6304
  const rect = mark.getBoundingClientRect();
6127
6305
  const view = tip.ownerDocument.documentElement;
@@ -6191,8 +6369,8 @@ function barPath(m, corner = m.w / 2) {
6191
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";
6192
6370
  }
6193
6371
  function useTapFloor() {
6194
- const [floor, setFloor] = useState21(TARGET);
6195
- useEffect21(() => {
6372
+ const [floor, setFloor] = useState23(TARGET);
6373
+ useEffect23(() => {
6196
6374
  const query = typeof window === "undefined" ? null : window.matchMedia?.(`(max-width: ${PHONE_MAX2}px) and (pointer: coarse)`);
6197
6375
  if (!query) return;
6198
6376
  const read = () => setFloor(query.matches ? TAP_FLOOR : TARGET);
@@ -6203,9 +6381,9 @@ function useTapFloor() {
6203
6381
  return floor;
6204
6382
  }
6205
6383
  function useTextWidth(host) {
6206
- const [face, setFace] = useState21(null);
6207
- const [loaded, setLoaded] = useState21(0);
6208
- useEffect21(() => {
6384
+ const [face, setFace] = useState23(null);
6385
+ const [loaded, setLoaded] = useState23(0);
6386
+ useEffect23(() => {
6209
6387
  const el = host.current;
6210
6388
  if (!el || typeof OffscreenCanvas === "undefined") return;
6211
6389
  const style = getComputedStyle(el);
@@ -6433,9 +6611,9 @@ function donutFrame(look, slices, totalLabel, format) {
6433
6611
  }
6434
6612
  function KeyMark({ shape }) {
6435
6613
  if (shape === "line") {
6436
- 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" }) });
6437
6615
  }
6438
- 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(
6439
6617
  "path",
6440
6618
  {
6441
6619
  className: "ui-chart__key-swatch",
@@ -6462,32 +6640,32 @@ function Chart(props) {
6462
6640
  const showValues = fit && "values" in props && props.values === true;
6463
6641
  const plotHeight = height ?? HEIGHT[variant];
6464
6642
  const showTable = table ?? !spark;
6465
- const [view, setView] = useState21("chart");
6643
+ const [view, setView] = useState23("chart");
6466
6644
  const asTable = showTable && view === "table";
6467
- const uid = useId17().replace(/[^\w-]/g, "");
6468
- const frameEl = useRef25(null);
6645
+ const uid = useId19().replace(/[^\w-]/g, "");
6646
+ const frameEl = useRef27(null);
6469
6647
  const card = useContext5(CardTools);
6470
6648
  const claim = card?.claim;
6471
6649
  useLayoutEffect5(() => showTable && claim ? claim(uid) : void 0, [showTable, claim, uid]);
6472
6650
  const toCard = showTable && card?.owner === uid ? card.slot : null;
6473
- const scroller = useRef25(null);
6474
- const plot = useRef25(null);
6475
- const tipEl = useRef25(null);
6476
- const svgEl = useRef25(null);
6477
- const ignoreMouseUntil = useRef25(0);
6478
- const touchMoved = useRef25(false);
6479
- const dismissed = useRef25(null);
6480
- const opening = useRef25(false);
6481
- 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);
6482
6660
  const floor = useTapFloor();
6483
6661
  const textWidth = useTextWidth(frameEl);
6484
- const [width, setWidth] = useState21(0);
6485
- const [boxWidth, setBoxWidth] = useState21(0);
6486
- const [overflows, setOverflows] = useState21(false);
6487
- const [openId, setOpenId] = useState21(null);
6488
- const [rawCursor, setCursor] = useState21(0);
6489
- const [said, setSaid] = useState21("");
6490
- 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);
6491
6669
  const pick = selected === void 0 ? ownPick : selected;
6492
6670
  const topLayer = typeof HTMLElement !== "undefined" && typeof HTMLElement.prototype.showPopover === "function";
6493
6671
  const steps = props.variant === "bridge" ? props.steps : void 0;
@@ -6635,7 +6813,7 @@ function Chart(props) {
6635
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]);
6636
6814
  const lead = useCallback8((column) => marks.find((m) => m.column === column), [marks]);
6637
6815
  const open = openId ? byId.get(openId) : void 0;
6638
- useEffect21(() => {
6816
+ useEffect23(() => {
6639
6817
  const el = plot.current;
6640
6818
  const box2 = scroller.current;
6641
6819
  if (!el || !box2) return;
@@ -6671,7 +6849,7 @@ function Chart(props) {
6671
6849
  if (layered) placeChartTip(anchor2, tip);
6672
6850
  else placeTip(frameEl.current, anchor2, tip);
6673
6851
  }, [openId, plotWidth, plotHeight, topLayer]);
6674
- useEffect21(() => {
6852
+ useEffect23(() => {
6675
6853
  if (!openId) return;
6676
6854
  const doc = frameEl.current?.ownerDocument;
6677
6855
  const view2 = doc?.defaultView;
@@ -6758,11 +6936,11 @@ function Chart(props) {
6758
6936
  };
6759
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) };
6760
6938
  const legendFirst = !(look?.variant === "donut" && look.look !== "labels");
6761
- 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: [
6762
- /* @__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 }),
6763
6941
  key.name
6764
6942
  ] }, key.id)) });
6765
- const viewSwitch = showTable && /* @__PURE__ */ jsx47(
6943
+ const viewSwitch = showTable && /* @__PURE__ */ jsx49(
6766
6944
  Segmented,
6767
6945
  {
6768
6946
  size: "sm",
@@ -6785,7 +6963,7 @@ function Chart(props) {
6785
6963
  return centre(i) - half < 0 ? "is-start" : centre(i) + half > plotWidth ? "is-end" : null;
6786
6964
  };
6787
6965
  const groupX = groupFrom >= 0 ? Math.min(Math.max(groupFrom * colWidth, 1), plotWidth - 1) : 0;
6788
- return /* @__PURE__ */ jsxs43(
6966
+ return /* @__PURE__ */ jsxs45(
6789
6967
  "div",
6790
6968
  {
6791
6969
  className: cx9(
@@ -6805,11 +6983,11 @@ function Chart(props) {
6805
6983
  },
6806
6984
  children: [
6807
6985
  toCard && createPortal8(viewSwitch, toCard),
6808
- (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: [
6809
6987
  legendFirst && legend,
6810
6988
  !toCard && viewSwitch
6811
6989
  ] }),
6812
- /* @__PURE__ */ jsxs43(
6990
+ /* @__PURE__ */ jsxs45(
6813
6991
  "div",
6814
6992
  {
6815
6993
  ref: frameEl,
@@ -6837,8 +7015,8 @@ function Chart(props) {
6837
7015
  setSaid("");
6838
7016
  },
6839
7017
  children: [
6840
- !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)) }),
6841
- /* @__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(
6842
7020
  "div",
6843
7021
  {
6844
7022
  ref: scroller,
@@ -6854,8 +7032,8 @@ function Chart(props) {
6854
7032
  if (mark.right <= view2.left || mark.left >= view2.right) setOpenId(null);
6855
7033
  else placeTip(frameEl.current, anchor2, tipEl.current);
6856
7034
  },
6857
- children: /* @__PURE__ */ jsxs43("div", { ref: plot, className: "ui-chart__plot", children: [
6858
- /* @__PURE__ */ jsxs43(
7035
+ children: /* @__PURE__ */ jsxs45("div", { ref: plot, className: "ui-chart__plot", children: [
7036
+ /* @__PURE__ */ jsxs45(
6859
7037
  "svg",
6860
7038
  {
6861
7039
  ref: svgEl,
@@ -6917,7 +7095,7 @@ function Chart(props) {
6917
7095
  announce(mark.column, selectable ? mark.column : pick);
6918
7096
  },
6919
7097
  children: [
6920
- !spark && columnsLayout && pick !== null && pick >= 0 && pick < count && /* @__PURE__ */ jsx47(
7098
+ !spark && columnsLayout && pick !== null && pick >= 0 && pick < count && /* @__PURE__ */ jsx49(
6921
7099
  "rect",
6922
7100
  {
6923
7101
  className: "ui-chart__band",
@@ -6930,7 +7108,7 @@ function Chart(props) {
6930
7108
  frame.links && frame.bars.slice(0, -1).map((bar, i) => {
6931
7109
  const from = byId.get(bar.id);
6932
7110
  const to = byId.get(frame.bars[i + 1].id);
6933
- return from && to ? /* @__PURE__ */ jsx47(
7111
+ return from && to ? /* @__PURE__ */ jsx49(
6934
7112
  "line",
6935
7113
  {
6936
7114
  className: "ui-chart__carry",
@@ -6942,7 +7120,7 @@ function Chart(props) {
6942
7120
  `carry-${bar.id}`
6943
7121
  ) : null;
6944
7122
  }),
6945
- !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(
6946
7124
  "line",
6947
7125
  {
6948
7126
  className: "ui-chart__grid",
@@ -6953,7 +7131,7 @@ function Chart(props) {
6953
7131
  },
6954
7132
  `grid-${tick}`
6955
7133
  )),
6956
- !spark && columnsLayout && scale.ticks.includes(0) && /* @__PURE__ */ jsx47(
7134
+ !spark && columnsLayout && scale.ticks.includes(0) && /* @__PURE__ */ jsx49(
6957
7135
  "line",
6958
7136
  {
6959
7137
  className: "ui-chart__zero",
@@ -6963,8 +7141,8 @@ function Chart(props) {
6963
7141
  y2: px2(y(0))
6964
7142
  }
6965
7143
  ),
6966
- groupFrom >= 0 && /* @__PURE__ */ jsxs43(Fragment21, { children: [
6967
- /* @__PURE__ */ jsx47(
7144
+ groupFrom >= 0 && /* @__PURE__ */ jsxs45(Fragment21, { children: [
7145
+ /* @__PURE__ */ jsx49(
6968
7146
  "line",
6969
7147
  {
6970
7148
  className: "ui-chart__boundary",
@@ -6974,7 +7152,7 @@ function Chart(props) {
6974
7152
  y2: px2(plotHeight - PAD)
6975
7153
  }
6976
7154
  ),
6977
- /* @__PURE__ */ jsx47(
7155
+ /* @__PURE__ */ jsx49(
6978
7156
  "text",
6979
7157
  {
6980
7158
  className: "ui-chart__text ui-chart__group",
@@ -6984,7 +7162,7 @@ function Chart(props) {
6984
7162
  }
6985
7163
  )
6986
7164
  ] }),
6987
- 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(
6988
7166
  "linearGradient",
6989
7167
  {
6990
7168
  id: fade.id,
@@ -6994,15 +7172,15 @@ function Chart(props) {
6994
7172
  y1: fade.up ? "1" : "0",
6995
7173
  y2: fade.up ? "0" : "1",
6996
7174
  children: [
6997
- /* @__PURE__ */ jsx47("stop", { className: "ui-chart__fade-base", offset: "0" }),
6998
- /* @__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" })
6999
7177
  ]
7000
7178
  },
7001
7179
  fade.id
7002
7180
  )) }),
7003
7181
  marks.filter((m) => m.kind === "bar").map((mark) => {
7004
7182
  const fade = fadeFor(mark);
7005
- return /* @__PURE__ */ jsx47(
7183
+ return /* @__PURE__ */ jsx49(
7006
7184
  "path",
7007
7185
  {
7008
7186
  className: cx9(
@@ -7019,7 +7197,7 @@ function Chart(props) {
7019
7197
  marks.filter((m) => m.kind === "bar" && printed.has(m.id)).map((mark) => {
7020
7198
  const text2 = formatAxis(mark.value);
7021
7199
  const below = under.has(mark.id);
7022
- return /* @__PURE__ */ jsx47(
7200
+ return /* @__PURE__ */ jsx49(
7023
7201
  "text",
7024
7202
  {
7025
7203
  className: cx9("ui-chart__text", "ui-chart__value", below && "ui-chart__value--below"),
@@ -7031,7 +7209,7 @@ function Chart(props) {
7031
7209
  );
7032
7210
  }),
7033
7211
  ["casing", "stroke"].map((layer) => lines.flatMap(
7034
- (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(
7035
7213
  "line",
7036
7214
  {
7037
7215
  className: layer === "casing" ? "ui-chart__line-casing" : cx9(
@@ -7047,7 +7225,7 @@ function Chart(props) {
7047
7225
  `${line.id}-${layer}-${i}`
7048
7226
  ) : null)
7049
7227
  )),
7050
- 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(
7051
7229
  "circle",
7052
7230
  {
7053
7231
  className: cx9("ui-chart__isolated", `ui-chart__tone--${line.tone}`),
@@ -7058,8 +7236,8 @@ function Chart(props) {
7058
7236
  `isolated-${line.id}-${i}`
7059
7237
  ) : null)),
7060
7238
  geometry && lookDrawing(geometry, open?.column ?? null, pick),
7061
- marks.map((mark) => /* @__PURE__ */ jsxs43("g", { "data-mark": mark.id, children: [
7062
- 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(
7063
7241
  "rect",
7064
7242
  {
7065
7243
  className: "ui-chart__hit",
@@ -7068,7 +7246,7 @@ function Chart(props) {
7068
7246
  y: px2(hitBand(mark.band).y),
7069
7247
  height: px2(hitBand(mark.band).h)
7070
7248
  }
7071
- ) : /* @__PURE__ */ jsx47(
7249
+ ) : /* @__PURE__ */ jsx49(
7072
7250
  "rect",
7073
7251
  {
7074
7252
  className: "ui-chart__hit",
@@ -7078,7 +7256,7 @@ function Chart(props) {
7078
7256
  height: px2(mark.hit?.h ?? TARGET)
7079
7257
  }
7080
7258
  ),
7081
- /* @__PURE__ */ jsx47(
7259
+ /* @__PURE__ */ jsx49(
7082
7260
  "rect",
7083
7261
  {
7084
7262
  "data-anchor": mark.id,
@@ -7093,8 +7271,8 @@ function Chart(props) {
7093
7271
  ]
7094
7272
  }
7095
7273
  ),
7096
- look?.variant === "donut" && look.look === "table" && /* @__PURE__ */ jsx47(Shares, { look, format, swatch: /* @__PURE__ */ jsx47(KeyMark, { shape: "fill" }) }),
7097
- !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(
7098
7276
  "span",
7099
7277
  {
7100
7278
  className: cx9("ui-chart__period", pick === i && "is-selected", every > 1 && edgeOf(i)),
@@ -7105,46 +7283,46 @@ function Chart(props) {
7105
7283
  ] })
7106
7284
  }
7107
7285
  ),
7108
- /* @__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: [
7109
- /* @__PURE__ */ jsx47("span", { className: "ui-tip__label", children: spark || look ? columns[open.column]?.label : `${open.name}, ${columns[open.column]?.label}` }),
7110
- open.rows ? /* @__PURE__ */ jsxs43(Fragment21, { children: [
7111
- open.rows.map((row) => /* @__PURE__ */ jsxs43("span", { className: "ui-tip__value ui-chart__row", children: [
7112
- /* @__PURE__ */ jsxs43("span", { className: cx9("ui-chart__key", `ui-chart__tone--${row.tone}`), children: [
7113
- /* @__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 }),
7114
7292
  row.name
7115
7293
  ] }),
7116
- /* @__PURE__ */ jsx47("span", { children: row.text })
7294
+ /* @__PURE__ */ jsx49("span", { children: row.text })
7117
7295
  ] }, row.name)),
7118
- open.total && /* @__PURE__ */ jsxs43("span", { className: "ui-tip__value ui-chart__row", children: [
7119
- /* @__PURE__ */ jsx47("span", { children: totalLabel }),
7120
- /* @__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 })
7121
7299
  ] })
7122
- ] }) : /* @__PURE__ */ jsx47("span", { className: "ui-tip__value", children: format(open.value) }),
7123
- (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 })
7124
7302
  ] }) })
7125
7303
  ]
7126
7304
  }
7127
7305
  ),
7128
7306
  !legendFirst && legend,
7129
- /* @__PURE__ */ jsx47("div", { className: "ui-sr", role: "status", children: said }),
7130
- 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(
7131
7309
  "div",
7132
7310
  {
7133
7311
  className: "ui-table-scroll",
7134
7312
  role: "region",
7135
7313
  tabIndex: 0,
7136
7314
  "aria-label": `${title}, as a table. Scroll for more columns.`,
7137
- children: /* @__PURE__ */ jsxs43("table", { className: "ui-table", "aria-label": title, children: [
7138
- /* @__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)) }) }),
7139
- /* @__PURE__ */ jsx47("tbody", { children: tableRows.map((row, i) => /* @__PURE__ */ jsxs43("tr", { "aria-current": pick === i ? true : void 0, children: [
7140
- /* @__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: [
7141
7319
  row.column.label,
7142
- row.column.estimated && /* @__PURE__ */ jsxs43(Fragment21, { children: [
7320
+ row.column.estimated && /* @__PURE__ */ jsxs45(Fragment21, { children: [
7143
7321
  " ",
7144
- /* @__PURE__ */ jsx47("span", { className: "ui-chart__state", children: stateOf(row.column) })
7322
+ /* @__PURE__ */ jsx49("span", { className: "ui-chart__state", children: stateOf(row.column) })
7145
7323
  ] })
7146
7324
  ] }),
7147
- 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]))
7148
7326
  ] }, `${row.column.label}-${i}`)) })
7149
7327
  ] })
7150
7328
  }
@@ -7157,7 +7335,7 @@ function Chart(props) {
7157
7335
  // src/AccentPicker.tsx
7158
7336
  import { forwardRef as forwardRef12 } from "react";
7159
7337
  import { ACCENTS, accentSwatchStyle } from "@apliteni/apliteni-ui";
7160
- import { jsx as jsx48 } from "react/jsx-runtime";
7338
+ import { jsx as jsx50 } from "react/jsx-runtime";
7161
7339
  var AccentPicker = forwardRef12(function AccentPicker2({
7162
7340
  value,
7163
7341
  onChange,
@@ -7166,7 +7344,7 @@ var AccentPicker = forwardRef12(function AccentPicker2({
7166
7344
  "aria-label": label = "Accent",
7167
7345
  ...rest
7168
7346
  }, ref) {
7169
- return /* @__PURE__ */ jsx48(
7347
+ return /* @__PURE__ */ jsx50(
7170
7348
  "div",
7171
7349
  {
7172
7350
  ...rest,
@@ -7177,7 +7355,7 @@ var AccentPicker = forwardRef12(function AccentPicker2({
7177
7355
  "aria-label": label,
7178
7356
  children: options.map((accent) => {
7179
7357
  const title = accent.charAt(0).toUpperCase() + accent.slice(1);
7180
- return /* @__PURE__ */ jsx48(
7358
+ return /* @__PURE__ */ jsx50(
7181
7359
  "button",
7182
7360
  {
7183
7361
  type: "button",
@@ -7198,7 +7376,7 @@ var AccentPicker = forwardRef12(function AccentPicker2({
7198
7376
  // src/TopBar.tsx
7199
7377
  import { Fragment as Fragment22 } from "react";
7200
7378
  import { prism as prism3, safeUrl as safeUrl6, icon as icon8, ACCOUNT_NAV } from "@apliteni/apliteni-ui";
7201
- 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";
7202
7380
  function TopBar({
7203
7381
  brand,
7204
7382
  word = "Strategy",
@@ -7210,20 +7388,20 @@ function TopBar({
7210
7388
  className,
7211
7389
  ...rest
7212
7390
  }) {
7213
- return /* @__PURE__ */ jsx49("header", { ...rest, className: ["topbar", className].filter(Boolean).join(" "), children: /* @__PURE__ */ jsxs44("div", { className: "topbar__in", children: [
7214
- brand ?? /* @__PURE__ */ jsxs44("a", { className: "brand", href: safeUrl6(brandHref), "aria-label": `Apliteni ${word}`, children: [
7215
- /* @__PURE__ */ jsx49("span", { "aria-hidden": "true", dangerouslySetInnerHTML: { __html: prism3("tb-mark", 22) } }),
7216
- /* @__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 })
7217
7395
  ] }),
7218
7396
  view,
7219
- /* @__PURE__ */ jsx49("span", { className: "spacer" }),
7397
+ /* @__PURE__ */ jsx51("span", { className: "spacer" }),
7220
7398
  version,
7221
7399
  theme,
7222
7400
  account
7223
7401
  ] }) });
7224
7402
  }
7225
7403
  function ViewSwitch({ items, active, label = "View", renderLink }) {
7226
- 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) => {
7227
7405
  const current = item.id === active;
7228
7406
  const linkProps = {
7229
7407
  className: current ? "cur" : void 0,
@@ -7232,13 +7410,13 @@ function ViewSwitch({ items, active, label = "View", renderLink }) {
7232
7410
  "aria-current": current ? "page" : void 0,
7233
7411
  children: item.label
7234
7412
  };
7235
- 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);
7236
7414
  }) });
7237
7415
  }
7238
7416
  var BADGE = { live: "Live", archive: "Archive" };
7239
7417
  function VersionSwitcher({ versions, value, onChange, label = "Version", defaultOpen }) {
7240
7418
  const current = versions.find((v) => v.value === value);
7241
- return /* @__PURE__ */ jsx49("div", { className: "vsw", children: /* @__PURE__ */ jsx49(
7419
+ return /* @__PURE__ */ jsx51("div", { className: "vsw", children: /* @__PURE__ */ jsx51(
7242
7420
  Dropdown,
7243
7421
  {
7244
7422
  variant: "select",
@@ -7249,9 +7427,9 @@ function VersionSwitcher({ versions, value, onChange, label = "Version", default
7249
7427
  chevron: false,
7250
7428
  defaultOpen,
7251
7429
  ariaLabel: `${label} \u2014 ${current?.label ?? ""}`,
7252
- triggerContent: /* @__PURE__ */ jsxs44(Fragment23, { children: [
7253
- /* @__PURE__ */ jsx49("span", { className: "cur", children: current?.label }),
7254
- /* @__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" })
7255
7433
  ] }),
7256
7434
  items: versions.map((v) => ({
7257
7435
  label: v.label,
@@ -7259,10 +7437,10 @@ function VersionSwitcher({ versions, value, onChange, label = "Version", default
7259
7437
  badge: BADGE[v.badge ?? "archive"],
7260
7438
  selected: v.value === value
7261
7439
  })),
7262
- row: (item, props) => /* @__PURE__ */ jsxs44("div", { ...props, className: `${props.className} vopt`, children: [
7263
- /* @__PURE__ */ jsx49("span", { className: "vname", children: item.label }),
7264
- /* @__PURE__ */ jsx49("span", { className: `vbadge ${item.badge === "Live" ? "live" : "arch"}`, children: String(item.badge) }),
7265
- /* @__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") } })
7266
7444
  ] }),
7267
7445
  onSelect: (picked) => {
7268
7446
  if (picked != null) onChange?.(String(picked));
@@ -7291,7 +7469,7 @@ function AccountMenu2({
7291
7469
  defaultOpen
7292
7470
  }) {
7293
7471
  const mark = initialsOf(name, email);
7294
- return /* @__PURE__ */ jsx49("div", { className: "acct on", children: /* @__PURE__ */ jsx49(
7472
+ return /* @__PURE__ */ jsx51("div", { className: "acct on", children: /* @__PURE__ */ jsx51(
7295
7473
  Dropdown,
7296
7474
  {
7297
7475
  variant: "menu",
@@ -7302,22 +7480,22 @@ function AccountMenu2({
7302
7480
  defaultOpen,
7303
7481
  ariaLabel: "Account",
7304
7482
  triggerContent: mark,
7305
- header: /* @__PURE__ */ jsxs44("div", { className: "ahead", children: [
7306
- /* @__PURE__ */ jsx49("span", { className: "avatar", children: mark }),
7307
- /* @__PURE__ */ jsxs44("span", { className: "aw", children: [
7308
- /* @__PURE__ */ jsx49("span", { className: "anm", children: name }),
7309
- /* @__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 })
7310
7488
  ] })
7311
7489
  ] }),
7312
7490
  items: [...items, "---", { label: "Sign out", icon: "logout", value: "sign-out", href: signOutHref }],
7313
- row: (item, props) => /* @__PURE__ */ jsxs44(
7491
+ row: (item, props) => /* @__PURE__ */ jsxs46(
7314
7492
  "a",
7315
7493
  {
7316
7494
  ...props,
7317
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}`),
7318
7496
  className: [props.className, !item.disabled && item.value === current && "cur", item.value === "sign-out" && "aout"].filter(Boolean).join(" "),
7319
7497
  children: [
7320
- 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) } }),
7321
7499
  item.label
7322
7500
  ]
7323
7501
  }
@@ -7394,12 +7572,14 @@ export {
7394
7572
  TextField,
7395
7573
  ThemeChoice,
7396
7574
  ThemeToggle,
7575
+ ThreeColumnPage,
7397
7576
  Timeline,
7398
7577
  Toast,
7399
7578
  Tooltip,
7400
7579
  TopBar,
7401
7580
  VersionSwitcher,
7402
7581
  ViewSwitch,
7582
+ Wizard,
7403
7583
  sortTableRows,
7404
7584
  useToast
7405
7585
  };