@volter/world-console 2.0.13 → 2.0.14

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.
@@ -185,6 +185,10 @@ section > h2:first-child, section > h3:first-child { margin-top: 0; }
185
185
  /* ── the shared conventions: dialogs, confirmations, toasts, skeletons, menus, meters, tabs, the phone's drawer ── */
186
186
  dialog.dialog { padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--volter-shadow-dialog); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; }
187
187
  dialog.dialog.wide { width: min(720px, calc(100vw - 32px)); }
188
+ dialog.dialog.window { width: min(1040px, calc(100vw - 48px)); height: min(720px, calc(100vh - 48px)); overflow: hidden; }
189
+ dialog.dialog.window[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
190
+ dialog.dialog.window .dialog-head { padding: 14px 20px; border-bottom: 1px solid var(--line); }
191
+ dialog.dialog.window .dialog-body { padding: 0; min-height: 0; display: block; }
188
192
  dialog.dialog::backdrop { background: var(--volter-overlay-scrim); }
189
193
  dialog.dialog[open] { animation: dialog-in var(--volter-motion-fast, 140ms) ease-out; }
190
194
  @keyframes dialog-in { from { opacity: 0; transform: translateY(6px) scale(0.99); } to { opacity: 1; transform: none; } }
@@ -127,7 +127,7 @@ export function MenuDismiss(): null {
127
127
  // ── dialogs, confirmations and toasts: the conventions every page shares ─────────────────────────────────────────────
128
128
  /** A modal dialog: the browser's own (`<dialog>` shown modal), so focus stays in it, Esc closes it and the page behind is
129
129
  * inert; labelled by its title. A press on the backdrop closes it too. */
130
- export function Dialog({ open, onClose, title, children, footer, wide }: { open: boolean; onClose: () => void; title: React.ReactNode; children: React.ReactNode; footer?: React.ReactNode; wide?: boolean }): React.JSX.Element {
130
+ export function Dialog({ open, onClose, title, children, footer, wide }: { open: boolean; onClose: () => void; title: React.ReactNode; children: React.ReactNode; footer?: React.ReactNode; /** wider for a table; `window`: an app's settings window, its tabs beside its pane */ wide?: boolean | 'window' }): React.JSX.Element {
131
131
  const ref = useRef<HTMLDialogElement>(null); const id = useId();
132
132
  // opening moves focus to the dialog's first control (its Close); the first field of its body is where a person types
133
133
  useEffect(() => {
@@ -142,7 +142,7 @@ export function Dialog({ open, onClose, title, children, footer, wide }: { open:
142
142
  if (!open && d.open) d.close();
143
143
  }, [open]);
144
144
  return (
145
- <dialog ref={ref} className={wide ? 'dialog wide' : 'dialog'} aria-labelledby={id} onClose={onClose} onCancel={(e) => { e.preventDefault(); onClose(); }} onMouseDown={(e) => { if (e.target === ref.current) onClose(); }}>
145
+ <dialog ref={ref} className={wide === 'window' ? 'dialog window' : wide ? 'dialog wide' : 'dialog'} aria-labelledby={id} onClose={onClose} onCancel={(e) => { e.preventDefault(); onClose(); }} onMouseDown={(e) => { if (e.target === ref.current) onClose(); }}>
146
146
  {open ? <>
147
147
  <div className="dialog-head"><h2 id={id}>{title}</h2><button type="button" className="icon-button" aria-label="Close" onClick={onClose}>✕</button></div>
148
148
  <div className="dialog-body">{children}</div>
@@ -0,0 +1,8 @@
1
+ // The console's page, mounted: the host serves this entry (src/console.ts); a story renders ConsolePage itself.
2
+ import React from 'react';
3
+ import { createRoot } from 'react-dom/client';
4
+ import { applyTheme } from './kit/kit.tsx';
5
+ import { ConsolePage, ROOT } from './console.tsx';
6
+
7
+ applyTheme(); // the person's theme before the first paint
8
+ createRoot(ROOT).render(<ConsolePage />);
@@ -0,0 +1,2 @@
1
+ // The brand's icons (brand.volter.ai/icon), written by scripts/brand-tokens.ts: each one's elements, a tag and its attributes.
2
+ export const ICONS: Record<string, Array<[string, Record<string, string>]>> = {"git-commit-horizontal":[["rect",{"x":"9","y":"9","width":"6","height":"6"}],["path",{"d":"M3 12h6M15 12h6"}]],"arrow-down-to-line":[["path",{"d":"M12 17V3"}],["path",{"d":"m6 11 6 6 6-6"}],["path",{"d":"M19 21H5"}]],"arrow-up-from-line":[["path",{"d":"m18 9-6-6-6 6"}],["path",{"d":"M12 3v14"}],["path",{"d":"M5 21h14"}]],"git-branch":[["rect",{"x":"4","y":"3","width":"4","height":"4"}],["rect",{"x":"4","y":"17","width":"4","height":"4"}],["rect",{"x":"16","y":"5","width":"4","height":"4"}],["path",{"d":"M6 7v10M18 9v2a4 4 0 0 1-4 4H6"}]],"monitor":[["rect",{"x":"3","y":"4","width":"18","height":"13"}],["path",{"d":"M8 21h8M12 17v4"}]],"vault":[["rect",{"width":"18","height":"18","x":"3","y":"3"}],["rect",{"x":"6.3","y":"6.3","width":"2.4","height":"2.4","fill":"currentColor","stroke":"none"}],["path",{"d":"m7.9 7.9 2.7 2.7"}],["rect",{"x":"15.3","y":"6.3","width":"2.4","height":"2.4","fill":"currentColor","stroke":"none"}],["path",{"d":"m13.4 10.6 2.7-2.7"}],["rect",{"x":"6.3","y":"15.3","width":"2.4","height":"2.4","fill":"currentColor","stroke":"none"}],["path",{"d":"m7.9 16.1 2.7-2.7"}],["rect",{"x":"15.3","y":"15.3","width":"2.4","height":"2.4","fill":"currentColor","stroke":"none"}],["path",{"d":"m13.4 13.4 2.7 2.7"}],["circle",{"cx":"12","cy":"12","r":"2"}]],"settings":[["circle",{"cx":"12","cy":"12","r":"3"}],["circle",{"cx":"12","cy":"12","r":"7"}],["path",{"d":"M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9L7 7M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1"}]],"history":[["path",{"d":"M3 12a9 9 0 1 0 3-6.7"}],["path",{"d":"M3 4v5h5"}],["path",{"d":"M12 7v5l3 3"}]],"activity":[["path",{"d":"M2 12h4l3-8 6 16 3-8h4"}]],"file-diff":[["path",{"d":"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{"d":"M9 10h6"}],["path",{"d":"M12 13V7"}],["path",{"d":"M9 17h6"}]],"square-plus":[["rect",{"x":"4","y":"4","width":"16","height":"16"}],["path",{"d":"M12 8v8M8 12h8"}]],"square-minus":[["rect",{"width":"18","height":"18","x":"3","y":"3"}],["path",{"d":"M8 12h8"}]],"square-dot":[["rect",{"width":"18","height":"18","x":"3","y":"3"}],["rect",{"x":"10.8","y":"10.8","width":"2.4","height":"2.4","fill":"currentColor","stroke":"none"}]],"cloud":[["path",{"d":"M7 19a5 5 0 0 1-.5-10A6 6 0 0 1 18 8a4.5 4.5 0 0 1 .5 11z"}]],"refresh-cw":[["path",{"d":"M20 12a8 8 0 0 1-14.3 4.9M4 12a8 8 0 0 1 14.3-4.9"}],["path",{"d":"M19 3v5h-5M5 21v-5h5"}]],"clock":[["circle",{"cx":"12","cy":"12","r":"9"}],["path",{"d":"M12 7v5l3 3"}]],"key-round":[["path",{"d":"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}],["rect",{"x":"15.3","y":"6.3","width":"2.4","height":"2.4","fill":"currentColor","stroke":"none"}]],"plug":[["path",{"d":"M9 3v5M15 3v5M6 8h12v4a6 6 0 0 1-12 0zM12 18v3"}]],"list-checks":[["path",{"d":"M11 6h9M11 12h9M11 18h9"}],["path",{"d":"M3 6l1.5 1.5L7 5M3 12l1.5 1.5L7 11M3 18l1.5 1.5L7 17"}]],"palette":[["path",{"d":"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z"}],["rect",{"x":"12.3","y":"5.3","width":"2.4","height":"2.4","fill":"currentColor","stroke":"none"}],["rect",{"x":"16.3","y":"9.3","width":"2.4","height":"2.4","fill":"currentColor","stroke":"none"}],["rect",{"x":"5.3","y":"11.3","width":"2.4","height":"2.4","fill":"currentColor","stroke":"none"}],["rect",{"x":"7.3","y":"6.3","width":"2.4","height":"2.4","fill":"currentColor","stroke":"none"}]],"check":[["path",{"d":"M4 12l5 5L20 6"}]],"plus":[["path",{"d":"M12 4v16M4 12h16"}]],"chevron-down":[["path",{"d":"M5 9l7 7 7-7"}]],"external-link":[["path",{"d":"M14 4h6v6M20 4l-9 9"}],["path",{"d":"M18 14v6H4V6h6"}]],"table-2":[["path",{"d":"M3 9h18"}],["path",{"d":"M9 3v18"}],["rect",{"x":"3","y":"3","width":"18","height":"18"}]],"scroll-text":[["path",{"d":"M15 12h-5"}],["path",{"d":"M15 8h-5"}],["path",{"d":"M19 17V5a2 2 0 0 0-2-2H4"}],["path",{"d":"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"}]],"layout-grid":[["rect",{"x":"4","y":"4","width":"7","height":"7"}],["rect",{"x":"13","y":"4","width":"7","height":"7"}],["rect",{"x":"4","y":"13","width":"7","height":"7"}],["rect",{"x":"13","y":"13","width":"7","height":"7"}]],"globe":[["circle",{"cx":"12","cy":"12","r":"9"}],["path",{"d":"M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"}]],"arrow-left":[["path",{"d":"M20 12H5M11 6l-6 6 6 6"}]],"link":[["path",{"d":"M9 15l6-6"}],["path",{"d":"M11 6l2-2a4.2 4.2 0 0 1 6 6l-2 2M13 18l-2 2a4.2 4.2 0 0 1-6-6l2-2"}]],"user":[["circle",{"cx":"12","cy":"8","r":"4"}],["path",{"d":"M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1"}]],"log-out":[["path",{"d":"M10 4H4v16h6M9 12h11M16 8l4 4-4 4"}]]};