@orbitcommerce/constellation-docs 0.0.0-stage → 1.2.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.
- package/LICENSE.md +6 -0
- package/README.md +6 -2
- package/dist/docs.css +20787 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +308 -0
- package/dist/pages/Playground-Mk1yIWXb.js +129 -0
- package/dist/pages/_address-data-L9BR499w.js +161 -0
- package/dist/pages/_builder-demo-C0eJUmPU.js +282 -0
- package/dist/pages/_card-art-0be5ncyV.js +18 -0
- package/dist/pages/_conversation-samples-Bq7cn-4d.js +70 -0
- package/dist/pages/_figures-data-DaDvB7Nm.js +606 -0
- package/dist/pages/_foundations-blXWyYh8.js +30 -0
- package/dist/pages/_kpi-examples-DeGCBB9T.js +208 -0
- package/dist/pages/_overlays-specimens-bawR331Z.js +320 -0
- package/dist/pages/_preview-specimens-DKQC9HAo.js +153 -0
- package/dist/pages/accordion-Sg0TUqxB.js +1036 -0
- package/dist/pages/address-autocomplete-DP0PUOlK.js +360 -0
- package/dist/pages/address-block-BZOOOPA9.js +368 -0
- package/dist/pages/address-fields-CwSqro3W.js +277 -0
- package/dist/pages/ai-highlight-D3x2vD83.js +642 -0
- package/dist/pages/alert-D3i7xZTU.js +914 -0
- package/dist/pages/anchored-overlay-BV0OCu2Q.js +788 -0
- package/dist/pages/app-shell-D4hdlHps.js +1558 -0
- package/dist/pages/area-chart-BEWFwiB2.js +718 -0
- package/dist/pages/avatar-BFEqQViw.js +895 -0
- package/dist/pages/avatar-upload-BDCzJfyN.js +484 -0
- package/dist/pages/badge-0-PyMrih.js +1035 -0
- package/dist/pages/bar-chart-DkLogYlt.js +1060 -0
- package/dist/pages/bar-fold-B-3XeIDZ.js +360 -0
- package/dist/pages/board-card-D2tZY_mU.js +415 -0
- package/dist/pages/brand-mark-BqiLvFSR.js +417 -0
- package/dist/pages/button-DAyfssDY.js +715 -0
- package/dist/pages/calendar-Ds7KsgSI.js +682 -0
- package/dist/pages/canvas-stage-1KiPspkX.js +472 -0
- package/dist/pages/card-CQEM1_wc.js +1567 -0
- package/dist/pages/caret-suggestions-oHI6QvqW.js +526 -0
- package/dist/pages/chart-legend-B20AbakD.js +724 -0
- package/dist/pages/chat-composer-CwzUJYIa.js +437 -0
- package/dist/pages/checkbox-BG9Zkb6j.js +1581 -0
- package/dist/pages/checklist-card-DEyykVFS.js +783 -0
- package/dist/pages/chip-Ck-o3Ui6.js +839 -0
- package/dist/pages/chip-list-k1LxXuCi.js +414 -0
- package/dist/pages/clamp-text-n-iE8RDR.js +203 -0
- package/dist/pages/coachmark-Be2ghobT.js +366 -0
- package/dist/pages/code-block-Dv_Y5GYq.js +622 -0
- package/dist/pages/collab-field-CfqqK7d2.js +696 -0
- package/dist/pages/color-field-CZpfcA-A.js +1127 -0
- package/dist/pages/colour-q2ntvI0w.js +1974 -0
- package/dist/pages/column-mapper-TsTG39cl.js +502 -0
- package/dist/pages/combobox-DvK2j5tI.js +1334 -0
- package/dist/pages/command-palette-CJ7uBA04.js +1386 -0
- package/dist/pages/comment-box-CDSGYhr5.js +346 -0
- package/dist/pages/composer-D4B0NgpA.js +689 -0
- package/dist/pages/condition-builder-BZy2ZGXe.js +715 -0
- package/dist/pages/conflict-chooser-C--_9UIS.js +210 -0
- package/dist/pages/context-menu-F9DV30ia.js +487 -0
- package/dist/pages/copy-button-Cn7WiKRF.js +568 -0
- package/dist/pages/copy-field-D3Xt3Jq6.js +511 -0
- package/dist/pages/danger-zone-Db_UUeiP.js +564 -0
- package/dist/pages/date-input-GOW067EB.js +956 -0
- package/dist/pages/date-picker-GdBciR99.js +1569 -0
- package/dist/pages/date-time-BLKCXtVZ.js +678 -0
- package/dist/pages/delta-CNAGv8JY.js +779 -0
- package/dist/pages/description-list-BPeXn1eW.js +1268 -0
- package/dist/pages/device-switcher-BCaN99c1.js +554 -0
- package/dist/pages/dialog-CRpkRC98.js +3164 -0
- package/dist/pages/docs-lM2UBSir.js +520 -0
- package/dist/pages/doodle-nzkqi2UI.js +201 -0
- package/dist/pages/drag-ghost-B6kpzC3O.js +426 -0
- package/dist/pages/drill-menu-cskH5mol.js +490 -0
- package/dist/pages/dropzone-DOY_Rhw0.js +1069 -0
- package/dist/pages/element-toolbar-DZIhXlCJ.js +498 -0
- package/dist/pages/emoji-picker-CqaWaffD.js +235 -0
- package/dist/pages/empty-state-4U2txFpI.js +1113 -0
- package/dist/pages/facet-filters-McbBeY9e.js +353 -0
- package/dist/pages/figure-D-HF5vCj.js +563 -0
- package/dist/pages/figure-strip-BB3mNl7D.js +1364 -0
- package/dist/pages/figure-tabs-QOeQMY6N.js +578 -0
- package/dist/pages/file-chip-DMDjtlqQ.js +738 -0
- package/dist/pages/filter-pill-DzqNOsD4.js +1295 -0
- package/dist/pages/font-picker-Bqhu0QMh.js +416 -0
- package/dist/pages/form-grid-BfWCVlie.js +692 -0
- package/dist/pages/gallery-BBk2EOri.js +453 -0
- package/dist/pages/gif-picker-CnoDTCaL.js +270 -0
- package/dist/pages/gradient-editor-Bqxp7Fxj.js +378 -0
- package/dist/pages/grouped-checklist-gNZ0tBKU.js +477 -0
- package/dist/pages/heatmap-BohgIcNk.js +507 -0
- package/dist/pages/highlight-text-BfxzfmvS.js +287 -0
- package/dist/pages/home-dashboard-CxPmvduE.js +962 -0
- package/dist/pages/host-B6znjEgQ.js +109 -0
- package/dist/pages/hosted-embed-Jef3aIMP.js +163 -0
- package/dist/pages/hosted-field-BLh-53AE.js +208 -0
- package/dist/pages/hosted-field-DEpI4lVS.js +514 -0
- package/dist/pages/icon-button-Bu4Gj5sy.js +1200 -0
- package/dist/pages/icon-picker-DEyoMUTh.js +291 -0
- package/dist/pages/icon-tile-DcgxyXPF.js +592 -0
- package/dist/pages/icons-CJ9Aar3d.js +736 -0
- package/dist/pages/image-cropper-NyougqLH.js +466 -0
- package/dist/pages/image-field-7knBv4mJ.js +567 -0
- package/dist/pages/import-result-CmTtGXW_.js +486 -0
- package/dist/pages/inline-confirm-CEcI5Lxo.js +327 -0
- package/dist/pages/inline-edit-Ba39SzhM.js +1125 -0
- package/dist/pages/input-CzLCzfyx.js +2372 -0
- package/dist/pages/installation-C3UcpQJT.js +528 -0
- package/dist/pages/job-indicator-DOXWbFdl.js +755 -0
- package/dist/pages/kanban-Dy9sPAI0.js +740 -0
- package/dist/pages/kbd-UNj4zqxn.js +545 -0
- package/dist/pages/layout-primitives-CPRaZeyt.js +483 -0
- package/dist/pages/line-chart-CntWxeMF.js +1117 -0
- package/dist/pages/link-CXqvAg9z.js +689 -0
- package/dist/pages/link-picker-BMFGCC67.js +478 -0
- package/dist/pages/link-row-x8yaUuWc.js +595 -0
- package/dist/pages/live-globe-95ROMhGQ.js +715 -0
- package/dist/pages/loading-overlay-BeGuXM9G.js +456 -0
- package/dist/pages/loading-state-BNbCo51C.js +556 -0
- package/dist/pages/log-viewer-BQz8I_a2.js +503 -0
- package/dist/pages/logo-B38rnzoq.js +571 -0
- package/dist/pages/lottie_light-CxEH8eiR.js +9116 -0
- package/dist/pages/markdown-Ied72vMT.js +237 -0
- package/dist/pages/markdown-field-BfnIEKZH.js +193 -0
- package/dist/pages/media-banner-DkStCia0.js +233 -0
- package/dist/pages/menu-NrLYKqKp.js +2132 -0
- package/dist/pages/message-thread-Bo4zbxqu.js +731 -0
- package/dist/pages/meta-line-D5p2TycR.js +371 -0
- package/dist/pages/model-viewer-BfokvHoc.js +60288 -0
- package/dist/pages/model-viewer-C8PFO8wk.js +577 -0
- package/dist/pages/month-calendar-T1vw9Rup.js +457 -0
- package/dist/pages/motion-CrXtiBvA.js +865 -0
- package/dist/pages/number-input-CuyMZg18.js +968 -0
- package/dist/pages/orbit-loader-DeVBtkFE.js +219 -0
- package/dist/pages/orbit-spinner-Dxv5qAhr.js +348 -0
- package/dist/pages/otp-input-CVRoX1mw.js +591 -0
- package/dist/pages/overview-LA9XRhZc.js +130 -0
- package/dist/pages/package-dimensions-DFCyZj_T.js +192 -0
- package/dist/pages/pagination-C1EgVtW4.js +294 -0
- package/dist/pages/palette-tile-X9ZXu2Z0.js +414 -0
- package/dist/pages/password-field-DHEQKyUC.js +912 -0
- package/dist/pages/person-cell-BmjbADBz.js +564 -0
- package/dist/pages/phone-input-B3G7Qpb2.js +747 -0
- package/dist/pages/plan-card-DRaA6RuB.js +621 -0
- package/dist/pages/plan-card-DtloWvMh.js +258 -0
- package/dist/pages/plan-comparison-BVIGTtbd.js +559 -0
- package/dist/pages/plan-grid-cfPVTB5V.js +251 -0
- package/dist/pages/point-list-BbPmZjsm.js +222 -0
- package/dist/pages/popover-C3Oar9D5.js +1198 -0
- package/dist/pages/presence-avatars-CRZIk8n9.js +328 -0
- package/dist/pages/preview-frame-Bcwk0y_Q.js +1631 -0
- package/dist/pages/price-CRBLoa9h.js +604 -0
- package/dist/pages/principles-pnDyfHpK.js +483 -0
- package/dist/pages/print-page-BkLv6bW8.js +513 -0
- package/dist/pages/profile-hero-CC9dUzuN.js +498 -0
- package/dist/pages/progress-CP_awmo4.js +904 -0
- package/dist/pages/progress-ring-JuOAwk2T.js +576 -0
- package/dist/pages/radio-group-C-4tg6FS.js +1639 -0
- package/dist/pages/radius-control-B2kRA2Ch.js +441 -0
- package/dist/pages/rating-CweKN2SX.js +471 -0
- package/dist/pages/record-layout-DUP_X0RL.js +719 -0
- package/dist/pages/record-pager-y9D7JFgb.js +278 -0
- package/dist/pages/registry-BZg-xAbi.js +594 -0
- package/dist/pages/release-Cs6tl16C.js +16 -0
- package/dist/pages/repeater-BRZYKRQa.js +1351 -0
- package/dist/pages/reply-feedback-BDnHprla.js +192 -0
- package/dist/pages/reveal-BygENBbL.js +460 -0
- package/dist/pages/rich-text-DOFQZEpT.js +156 -0
- package/dist/pages/rich-text-editor-BhIM20JI.js +1265 -0
- package/dist/pages/rolldown-runtime-CbKu08Hx.js +25 -0
- package/dist/pages/rolling-number-GR3Cyfpz.js +529 -0
- package/dist/pages/row-list-Dl6CYhC-.js +1565 -0
- package/dist/pages/rule-list-DTCmIMpT.js +648 -0
- package/dist/pages/save-status-B5KkyMZP.js +378 -0
- package/dist/pages/schedule-YycI95O1.js +243 -0
- package/dist/pages/scroll-area-B2sGm23Q.js +423 -0
- package/dist/pages/search-field-D1uG7R6A.js +693 -0
- package/dist/pages/search-menu-DMuXyUUW.js +580 -0
- package/dist/pages/secret-field-Dj9x3LL8.js +337 -0
- package/dist/pages/section-rail-BtTCETS5.js +637 -0
- package/dist/pages/section-v2Pubup9.js +639 -0
- package/dist/pages/segmented-control-D-FB1K1T.js +1190 -0
- package/dist/pages/select-DZ43NpOm.js +1434 -0
- package/dist/pages/selection-chrome-Czcs6RN6.js +437 -0
- package/dist/pages/separator-CFwqRvfO.js +428 -0
- package/dist/pages/serp-preview-BGwORjmo.js +346 -0
- package/dist/pages/setting-row-Bt-dZV8H.js +913 -0
- package/dist/pages/shape-DzniHAVT.js +627 -0
- package/dist/pages/share-list-D4wgBxKN.js +926 -0
- package/dist/pages/side-panel-CCtkrZjs.js +811 -0
- package/dist/pages/site-preview-Dj1hM2Yo.js +353 -0
- package/dist/pages/skeleton-C1F5HkAu.js +1325 -0
- package/dist/pages/skip-link-BxznhSkz.js +252 -0
- package/dist/pages/slider-CAoPURKD.js +774 -0
- package/dist/pages/sortable-card-Sr44uCpI.js +424 -0
- package/dist/pages/sortable-list-DUAleYE1.js +1298 -0
- package/dist/pages/sortable-tree-BLzK-hTE.js +737 -0
- package/dist/pages/spacing-box-CtuvzxQu.js +550 -0
- package/dist/pages/sparkline-D3aavCly.js +947 -0
- package/dist/pages/split-bar-DYgZnFID.js +414 -0
- package/dist/pages/split-button-Be08-VI-.js +335 -0
- package/dist/pages/split-pane-lSNZgTKt.js +523 -0
- package/dist/pages/status-badge-DOdNhmzn.js +1074 -0
- package/dist/pages/status-checklist-CWkjCZIC.js +1152 -0
- package/dist/pages/status-dot-D99gAGsV.js +567 -0
- package/dist/pages/stepper-CxKTbEA-.js +1093 -0
- package/dist/pages/success-mark-CqFTOBEu.js +142 -0
- package/dist/pages/swatch-H_kNvHuC.js +565 -0
- package/dist/pages/switch-C93K6j9h.js +617 -0
- package/dist/pages/table-CL0vomno.js +3225 -0
- package/dist/pages/tabs-Dh0mUsLw.js +1690 -0
- package/dist/pages/tag-input-BjZWKKRJ.js +1307 -0
- package/dist/pages/task-card-Dv0sR1-w.js +295 -0
- package/dist/pages/textarea-CCM-SnGN.js +949 -0
- package/dist/pages/thumbnail-DwFJL_k1.js +1147 -0
- package/dist/pages/time-input-CA9-uZAa.js +442 -0
- package/dist/pages/time-zone-select-CEtMXVYO.js +296 -0
- package/dist/pages/timeline-BsMUTlpR.js +1798 -0
- package/dist/pages/toast-zXLRiMRT.js +1391 -0
- package/dist/pages/tool-rail-B1AbTMCP.js +355 -0
- package/dist/pages/toolbar-B9l_fHKy.js +754 -0
- package/dist/pages/tooltip-LHtCUkF-.js +826 -0
- package/dist/pages/translation-field-CTRXiF2N.js +251 -0
- package/dist/pages/tree-checklist-CJj3OcLg.js +451 -0
- package/dist/pages/tree-select-DU1qXHy_.js +492 -0
- package/dist/pages/tree-view-g_RjLtAb.js +739 -0
- package/dist/pages/typography-BSijtiRl.js +876 -0
- package/dist/pages/unit-input-Dml4fjmK.js +659 -0
- package/dist/pages/upload-rules-yozEzSah.js +419 -0
- package/dist/pages/url-upload-input-SSnMgfpA.js +307 -0
- package/dist/pages/value-change-CnubDKyO.js +489 -0
- package/dist/pages/weekly-hours-i2EpsmTx.js +287 -0
- package/dist/pages/widget-preview-CUJMyZ_k.js +625 -0
- package/dist/pages/working-status-CENemSsw.js +389 -0
- package/manifest.json +13001 -0
- package/package.json +35 -4
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { d as Section$1, i as DocPage, l as Note, m as ThemePair, o as Example, s as Guidelines, u as PropsTable } from "./docs-lM2UBSir.js";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { AiHighlight, AiNodeGlow, Button, Card, Combobox, Field, Input, SegmentedControl, Select, Switch, Textarea } from "@orbitcommerce/constellation";
|
|
6
|
+
//#region src/pages/components/ai-highlight.tsx
|
|
7
|
+
var CATEGORIES = [
|
|
8
|
+
"Office chairs",
|
|
9
|
+
"Desks",
|
|
10
|
+
"Storage",
|
|
11
|
+
"Lighting",
|
|
12
|
+
"Accessories"
|
|
13
|
+
].map((label) => ({
|
|
14
|
+
value: label.toLowerCase().replace(/\s+/g, "-"),
|
|
15
|
+
label
|
|
16
|
+
}));
|
|
17
|
+
function Preview() {
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
className: "ai-highlight-preview",
|
|
20
|
+
children: [/* @__PURE__ */ jsx(AiHighlight, {
|
|
21
|
+
state: "rest",
|
|
22
|
+
label: "Filled by Nebula",
|
|
23
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
24
|
+
"aria-label": "Product name",
|
|
25
|
+
defaultValue: "Arden ergonomic chair"
|
|
26
|
+
})
|
|
27
|
+
}), /* @__PURE__ */ jsx(AiHighlight, {
|
|
28
|
+
state: "rest",
|
|
29
|
+
label: "Filled by Nebula",
|
|
30
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
31
|
+
"aria-label": "Handle",
|
|
32
|
+
defaultValue: "arden-ergonomic-chair"
|
|
33
|
+
})
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
var LEAD_TIMES = [
|
|
38
|
+
{
|
|
39
|
+
value: "next",
|
|
40
|
+
label: "Next working day"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: "week",
|
|
44
|
+
label: "Within a week"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
value: "order",
|
|
48
|
+
label: "Made to order"
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
var RUN = [
|
|
52
|
+
{
|
|
53
|
+
field: "name",
|
|
54
|
+
text: "Arden ergonomic chair"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
field: "handle",
|
|
58
|
+
text: "arden-ergonomic-chair"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
field: "description",
|
|
62
|
+
text: "Mesh back, 4D arms and adjustable lumbar support, for a full day at the desk."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
field: "categories",
|
|
66
|
+
picks: ["office-chairs", "accessories"]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
field: "lead",
|
|
70
|
+
lead: "week"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
field: "featured",
|
|
74
|
+
on: true
|
|
75
|
+
}
|
|
76
|
+
];
|
|
77
|
+
function FillDemo() {
|
|
78
|
+
const [values, setValues] = useState({
|
|
79
|
+
name: "",
|
|
80
|
+
handle: "",
|
|
81
|
+
description: "",
|
|
82
|
+
categories: [],
|
|
83
|
+
lead: "next",
|
|
84
|
+
featured: false
|
|
85
|
+
});
|
|
86
|
+
const [active, setActive] = useState(null);
|
|
87
|
+
const [filled, setFilled] = useState(/* @__PURE__ */ new Set());
|
|
88
|
+
const [running, setRunning] = useState(false);
|
|
89
|
+
const timers = useRef([]);
|
|
90
|
+
useEffect(() => () => timers.current.forEach((timer) => window.clearTimeout(timer)), []);
|
|
91
|
+
const stateOf = (field) => active === field ? "active" : filled.has(field) ? "rest" : "none";
|
|
92
|
+
const clear = (field) => setFilled((before) => {
|
|
93
|
+
const next = new Set(before);
|
|
94
|
+
next.delete(field);
|
|
95
|
+
return next;
|
|
96
|
+
});
|
|
97
|
+
const fill = () => {
|
|
98
|
+
timers.current.forEach((timer) => window.clearTimeout(timer));
|
|
99
|
+
timers.current = [];
|
|
100
|
+
setValues({
|
|
101
|
+
name: "",
|
|
102
|
+
handle: "",
|
|
103
|
+
description: "",
|
|
104
|
+
categories: [],
|
|
105
|
+
lead: "next",
|
|
106
|
+
featured: false
|
|
107
|
+
});
|
|
108
|
+
setFilled(/* @__PURE__ */ new Set());
|
|
109
|
+
setRunning(true);
|
|
110
|
+
let at = 200;
|
|
111
|
+
const later = (fn, wait) => {
|
|
112
|
+
at += wait;
|
|
113
|
+
timers.current.push(window.setTimeout(fn, at));
|
|
114
|
+
};
|
|
115
|
+
for (const step of RUN) {
|
|
116
|
+
later(() => setActive(step.field), 0);
|
|
117
|
+
if (step.text) {
|
|
118
|
+
const text = step.text;
|
|
119
|
+
const stride = Math.max(1, Math.round(text.length / 24));
|
|
120
|
+
for (let i = stride; i < text.length + stride; i += stride) {
|
|
121
|
+
const upTo = Math.min(i, text.length);
|
|
122
|
+
later(() => setValues((before) => ({
|
|
123
|
+
...before,
|
|
124
|
+
[step.field]: text.slice(0, upTo)
|
|
125
|
+
})), 45);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (step.picks) for (const pick of step.picks) later(() => setValues((before) => ({
|
|
129
|
+
...before,
|
|
130
|
+
categories: [...before.categories, pick]
|
|
131
|
+
})), 420);
|
|
132
|
+
if (step.lead) {
|
|
133
|
+
const lead = step.lead;
|
|
134
|
+
later(() => setValues((before) => ({
|
|
135
|
+
...before,
|
|
136
|
+
lead
|
|
137
|
+
})), 420);
|
|
138
|
+
}
|
|
139
|
+
if (step.on) later(() => setValues((before) => ({
|
|
140
|
+
...before,
|
|
141
|
+
featured: true
|
|
142
|
+
})), 420);
|
|
143
|
+
later(() => setFilled((before) => new Set(before).add(step.field)), 700);
|
|
144
|
+
}
|
|
145
|
+
later(() => {
|
|
146
|
+
setActive(null);
|
|
147
|
+
setRunning(false);
|
|
148
|
+
}, 0);
|
|
149
|
+
};
|
|
150
|
+
const save = () => {
|
|
151
|
+
setFilled(/* @__PURE__ */ new Set());
|
|
152
|
+
setActive(null);
|
|
153
|
+
};
|
|
154
|
+
const glow = (field) => ({
|
|
155
|
+
state: stateOf(field),
|
|
156
|
+
label: "Filled by Nebula",
|
|
157
|
+
filling: running && active === field,
|
|
158
|
+
onUserEdit: () => clear(field)
|
|
159
|
+
});
|
|
160
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
161
|
+
className: "ai-highlight-demo",
|
|
162
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
163
|
+
className: "ai-highlight-demo__actions",
|
|
164
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
165
|
+
variant: "secondary",
|
|
166
|
+
size: "sm",
|
|
167
|
+
onClick: fill,
|
|
168
|
+
loading: running,
|
|
169
|
+
children: "Fill with Nebula"
|
|
170
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
171
|
+
size: "sm",
|
|
172
|
+
onClick: save,
|
|
173
|
+
disabled: running || filled.size === 0,
|
|
174
|
+
children: "Save"
|
|
175
|
+
})]
|
|
176
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
177
|
+
className: "ai-highlight-demo__form",
|
|
178
|
+
children: [
|
|
179
|
+
/* @__PURE__ */ jsx(Field, {
|
|
180
|
+
label: "Product name",
|
|
181
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
182
|
+
...glow("name"),
|
|
183
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
184
|
+
value: values.name,
|
|
185
|
+
onChange: (event) => setValues({
|
|
186
|
+
...values,
|
|
187
|
+
name: event.target.value
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
}),
|
|
192
|
+
/* @__PURE__ */ jsx(Field, {
|
|
193
|
+
label: "Handle",
|
|
194
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
195
|
+
...glow("handle"),
|
|
196
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
197
|
+
value: values.handle,
|
|
198
|
+
onChange: (event) => setValues({
|
|
199
|
+
...values,
|
|
200
|
+
handle: event.target.value
|
|
201
|
+
})
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ jsx(Field, {
|
|
206
|
+
label: "Description",
|
|
207
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
208
|
+
...glow("description"),
|
|
209
|
+
children: /* @__PURE__ */ jsx(Textarea, {
|
|
210
|
+
rows: 3,
|
|
211
|
+
value: values.description,
|
|
212
|
+
onChange: (event) => setValues({
|
|
213
|
+
...values,
|
|
214
|
+
description: event.target.value
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
})
|
|
218
|
+
}),
|
|
219
|
+
/* @__PURE__ */ jsx(Field, {
|
|
220
|
+
label: "Categories",
|
|
221
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
222
|
+
...glow("categories"),
|
|
223
|
+
children: /* @__PURE__ */ jsx(Combobox, {
|
|
224
|
+
multiple: true,
|
|
225
|
+
options: CATEGORIES,
|
|
226
|
+
placeholder: "Search categories",
|
|
227
|
+
value: values.categories,
|
|
228
|
+
onValueChange: (categories) => setValues({
|
|
229
|
+
...values,
|
|
230
|
+
categories
|
|
231
|
+
})
|
|
232
|
+
})
|
|
233
|
+
})
|
|
234
|
+
}),
|
|
235
|
+
/* @__PURE__ */ jsx(Field, {
|
|
236
|
+
label: "Lead time",
|
|
237
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
238
|
+
...glow("lead"),
|
|
239
|
+
children: /* @__PURE__ */ jsx(Select, {
|
|
240
|
+
options: LEAD_TIMES,
|
|
241
|
+
value: values.lead,
|
|
242
|
+
onValueChange: (lead) => setValues({
|
|
243
|
+
...values,
|
|
244
|
+
lead
|
|
245
|
+
})
|
|
246
|
+
})
|
|
247
|
+
})
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ jsx(AiHighlight, {
|
|
250
|
+
...glow("featured"),
|
|
251
|
+
className: "ai-highlight-demo__switch",
|
|
252
|
+
children: /* @__PURE__ */ jsx(Switch, {
|
|
253
|
+
label: "Feature on the home page",
|
|
254
|
+
checked: values.featured,
|
|
255
|
+
onCheckedChange: (featured) => setValues({
|
|
256
|
+
...values,
|
|
257
|
+
featured
|
|
258
|
+
})
|
|
259
|
+
})
|
|
260
|
+
})
|
|
261
|
+
]
|
|
262
|
+
})]
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
function NodeDemo() {
|
|
266
|
+
const node = useRef(null);
|
|
267
|
+
const [target, setTarget] = useState(null);
|
|
268
|
+
const page = useRef(null);
|
|
269
|
+
const [state, setState] = useState("active");
|
|
270
|
+
const [zoomed, setZoomed] = useState(false);
|
|
271
|
+
const [container, setContainer] = useState(null);
|
|
272
|
+
useEffect(() => {
|
|
273
|
+
setTarget(node.current);
|
|
274
|
+
setContainer(page.current);
|
|
275
|
+
}, []);
|
|
276
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
277
|
+
className: "ai-highlight-canvas",
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ jsx(SegmentedControl, {
|
|
280
|
+
"aria-label": "Glow",
|
|
281
|
+
size: "sm",
|
|
282
|
+
value: state,
|
|
283
|
+
onValueChange: (next) => setState(next),
|
|
284
|
+
options: [
|
|
285
|
+
{
|
|
286
|
+
value: "active",
|
|
287
|
+
label: "Active"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
value: "pending",
|
|
291
|
+
label: "Pending"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
value: "settling",
|
|
295
|
+
label: "Settling"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
value: "off",
|
|
299
|
+
label: "Off"
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
}),
|
|
303
|
+
/* @__PURE__ */ jsx(Switch, {
|
|
304
|
+
label: "Zoomed out canvas",
|
|
305
|
+
checked: zoomed,
|
|
306
|
+
onCheckedChange: setZoomed
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ jsxs("div", {
|
|
309
|
+
ref: page,
|
|
310
|
+
className: "ai-highlight-canvas__page",
|
|
311
|
+
"data-zoomed": zoomed ? "" : void 0,
|
|
312
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
313
|
+
className: "ai-highlight-canvas__shop",
|
|
314
|
+
children: "Harbour Desk Co"
|
|
315
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
316
|
+
ref: node,
|
|
317
|
+
className: "ai-highlight-canvas__node",
|
|
318
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
319
|
+
className: "ai-highlight-canvas__title",
|
|
320
|
+
children: "Desks made for long days"
|
|
321
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
322
|
+
className: "ai-highlight-canvas__text",
|
|
323
|
+
children: "Height-adjustable frames, solid oak tops and cable trays, delivered and built in your office."
|
|
324
|
+
})]
|
|
325
|
+
})]
|
|
326
|
+
}),
|
|
327
|
+
state === "off" ? null : /* @__PURE__ */ jsx(AiNodeGlow, {
|
|
328
|
+
target,
|
|
329
|
+
state,
|
|
330
|
+
container
|
|
331
|
+
}, state)
|
|
332
|
+
]
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
function Page() {
|
|
336
|
+
return /* @__PURE__ */ jsxs(DocPage, {
|
|
337
|
+
title: "AI highlight",
|
|
338
|
+
status: "new",
|
|
339
|
+
importNames: ["AiHighlight", "AiNodeGlow"],
|
|
340
|
+
lead: "Nebula's glow on what it is filling in and what it filled: a ring that sweeps the field it is writing, a settled ring and a faint wash on what it wrote until the form is saved, and a quieter glow on the section it is working in. The person's own edit clears a mark.",
|
|
341
|
+
children: [
|
|
342
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
343
|
+
id: "states",
|
|
344
|
+
title: "Three states",
|
|
345
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
346
|
+
"Wrap the control, not its label. ",
|
|
347
|
+
/* @__PURE__ */ jsx("code", { children: "active" }),
|
|
348
|
+
" while it is being written: a highlight travels the border every 2.4 seconds over a pulsing bloom, 3px outside the control. ",
|
|
349
|
+
/* @__PURE__ */ jsx("code", { children: "rest" }),
|
|
350
|
+
" once it is written: a settled ring and a faint wash over the control, held until the form is saved, as a list of what to review. ",
|
|
351
|
+
/* @__PURE__ */ jsx("code", { children: "none" }),
|
|
352
|
+
" ",
|
|
353
|
+
"is the field alone. Each glowing state carries a sparkle on its ring and says \"Filled by AI\" (or your",
|
|
354
|
+
" ",
|
|
355
|
+
/* @__PURE__ */ jsx("code", { children: "label" }),
|
|
356
|
+
"), so it never rests on colour alone."
|
|
357
|
+
] }),
|
|
358
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
359
|
+
align: "fill",
|
|
360
|
+
code: `
|
|
361
|
+
<Field label="Product name">
|
|
362
|
+
<AiHighlight state="active" label="Filled by Nebula">
|
|
363
|
+
<Input value={name} onChange={…} />
|
|
364
|
+
</AiHighlight>
|
|
365
|
+
</Field>
|
|
366
|
+
<Field label="Handle">
|
|
367
|
+
<AiHighlight state="rest" label="Filled by Nebula"><Input … /></AiHighlight>
|
|
368
|
+
</Field>
|
|
369
|
+
<Field label="Supplier code">
|
|
370
|
+
<AiHighlight state="none"><Input … /></AiHighlight>
|
|
371
|
+
</Field>`,
|
|
372
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
373
|
+
className: "ai-highlight-states",
|
|
374
|
+
children: [
|
|
375
|
+
/* @__PURE__ */ jsx(Field, {
|
|
376
|
+
label: "Product name",
|
|
377
|
+
description: "Active: being written",
|
|
378
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
379
|
+
state: "active",
|
|
380
|
+
label: "Filled by Nebula",
|
|
381
|
+
children: /* @__PURE__ */ jsx(Input, { defaultValue: "Arden ergono" })
|
|
382
|
+
})
|
|
383
|
+
}),
|
|
384
|
+
/* @__PURE__ */ jsx(Field, {
|
|
385
|
+
label: "Handle",
|
|
386
|
+
description: "Rest: written, until save",
|
|
387
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
388
|
+
state: "rest",
|
|
389
|
+
label: "Filled by Nebula",
|
|
390
|
+
children: /* @__PURE__ */ jsx(Input, { defaultValue: "arden-ergonomic-chair" })
|
|
391
|
+
})
|
|
392
|
+
}),
|
|
393
|
+
/* @__PURE__ */ jsx(Field, {
|
|
394
|
+
label: "Supplier code",
|
|
395
|
+
description: "None: untouched",
|
|
396
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
397
|
+
state: "none",
|
|
398
|
+
children: /* @__PURE__ */ jsx(Input, { defaultValue: "ARD-2041" })
|
|
399
|
+
})
|
|
400
|
+
})
|
|
401
|
+
]
|
|
402
|
+
})
|
|
403
|
+
})
|
|
404
|
+
}),
|
|
405
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
406
|
+
id: "filling",
|
|
407
|
+
title: "Filling a form",
|
|
408
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
409
|
+
"Press Fill: Nebula writes each field in turn, then leaves it resting until Save. Type in a field, flick the switch, or pick a category or a lead time (with the pointer, or Enter and Space) and that field's mark clears: it is yours now. A click that only places the caret, a search typed into the categories, or opening a picker is not an edit, and nothing the assistant writes itself counts (",
|
|
410
|
+
/* @__PURE__ */ jsx("code", { children: "filling" }),
|
|
411
|
+
"). The picked categories take a teal tint while they are marked. The layout never moves as a glow comes and goes, and the field is never remounted, so focus and what you typed stay where they are."
|
|
412
|
+
] }),
|
|
413
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
414
|
+
align: "fill",
|
|
415
|
+
code: `
|
|
416
|
+
const glow = (field) => ({
|
|
417
|
+
state: active === field ? 'active' : filled.has(field) ? 'rest' : 'none',
|
|
418
|
+
label: 'Filled by Nebula',
|
|
419
|
+
filling: running && active === field,
|
|
420
|
+
onUserEdit: () => clear(field),
|
|
421
|
+
})
|
|
422
|
+
|
|
423
|
+
<Field label="Product name">
|
|
424
|
+
<AiHighlight {...glow('name')}><Input … /></AiHighlight>
|
|
425
|
+
</Field>
|
|
426
|
+
<Field label="Categories">
|
|
427
|
+
<AiHighlight {...glow('categories')}><Combobox multiple … /></AiHighlight>
|
|
428
|
+
</Field>
|
|
429
|
+
<Field label="Lead time">
|
|
430
|
+
<AiHighlight {...glow('lead')}><Select options={leadTimes} … /></AiHighlight>
|
|
431
|
+
</Field>
|
|
432
|
+
<AiHighlight {...glow('featured')}>
|
|
433
|
+
<Switch label="Feature on the home page" … />
|
|
434
|
+
</AiHighlight>`,
|
|
435
|
+
children: /* @__PURE__ */ jsx(FillDemo, {})
|
|
436
|
+
})
|
|
437
|
+
}),
|
|
438
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
439
|
+
id: "sections",
|
|
440
|
+
title: "Sections",
|
|
441
|
+
description: /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("code", { children: "variant=\"section\"" }), " wraps the card a run is working in, so a long form shows both \"working in here\" and \"on this field\". It is deliberately quieter: a calm ring and a slow bloom, no sweep, and nothing at rest (the fields keep their own marks). It takes the card's 16px corners."] }),
|
|
442
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
443
|
+
align: "fill",
|
|
444
|
+
code: `
|
|
445
|
+
<AiHighlight variant="section" state="active" label="Filled by Nebula">
|
|
446
|
+
<Card>
|
|
447
|
+
<Field label="Address line 1">
|
|
448
|
+
<AiHighlight state="active" label="Filled by Nebula"><Input … /></AiHighlight>
|
|
449
|
+
</Field>
|
|
450
|
+
…
|
|
451
|
+
</Card>
|
|
452
|
+
</AiHighlight>`,
|
|
453
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
454
|
+
variant: "section",
|
|
455
|
+
state: "active",
|
|
456
|
+
label: "Filled by Nebula",
|
|
457
|
+
children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs("div", {
|
|
458
|
+
className: "ai-highlight-states",
|
|
459
|
+
children: [
|
|
460
|
+
/* @__PURE__ */ jsx(Field, {
|
|
461
|
+
label: "Address line 1",
|
|
462
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
463
|
+
state: "rest",
|
|
464
|
+
label: "Filled by Nebula",
|
|
465
|
+
children: /* @__PURE__ */ jsx(Input, { defaultValue: "14 Wharf Street" })
|
|
466
|
+
})
|
|
467
|
+
}),
|
|
468
|
+
/* @__PURE__ */ jsx(Field, {
|
|
469
|
+
label: "Town",
|
|
470
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
471
|
+
state: "active",
|
|
472
|
+
label: "Filled by Nebula",
|
|
473
|
+
children: /* @__PURE__ */ jsx(Input, { defaultValue: "Brist" })
|
|
474
|
+
})
|
|
475
|
+
}),
|
|
476
|
+
/* @__PURE__ */ jsx(Field, {
|
|
477
|
+
label: "Postcode",
|
|
478
|
+
children: /* @__PURE__ */ jsx(Input, {})
|
|
479
|
+
})
|
|
480
|
+
]
|
|
481
|
+
}) })
|
|
482
|
+
})
|
|
483
|
+
})
|
|
484
|
+
}),
|
|
485
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
486
|
+
id: "canvas",
|
|
487
|
+
title: "On a canvas",
|
|
488
|
+
description: /* @__PURE__ */ jsxs("p", { children: [
|
|
489
|
+
/* @__PURE__ */ jsx("code", { children: "AiNodeGlow" }),
|
|
490
|
+
" rings an element that cannot be wrapped, such as a node on a page-builder canvas: a layer of its own, kept on the element's box every frame, so scrolling and resizing need nothing; in a container that is moved or scaled (a zoomed canvas) it measures where it lands and corrects for it. It hides while the element is not laid out. ",
|
|
491
|
+
/* @__PURE__ */ jsx("code", { children: "active" }),
|
|
492
|
+
" sweeps; ",
|
|
493
|
+
/* @__PURE__ */ jsx("code", { children: "pending" }),
|
|
494
|
+
" is the calm ring while a rewrite request is in flight; ",
|
|
495
|
+
/* @__PURE__ */ jsx("code", { children: "settling" }),
|
|
496
|
+
" fades out once it lands."
|
|
497
|
+
] }),
|
|
498
|
+
children: /* @__PURE__ */ jsx(Example, {
|
|
499
|
+
align: "fill",
|
|
500
|
+
code: `
|
|
501
|
+
<AiNodeGlow target={nodeElement} state="pending" />
|
|
502
|
+
<AiNodeGlow target={nodeElement} state="active" container={zoomedCanvas} />`,
|
|
503
|
+
children: /* @__PURE__ */ jsx(NodeDemo, {})
|
|
504
|
+
})
|
|
505
|
+
}),
|
|
506
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
507
|
+
id: "both-themes",
|
|
508
|
+
title: "In both themes",
|
|
509
|
+
children: /* @__PURE__ */ jsx(ThemePair, { children: /* @__PURE__ */ jsxs("div", {
|
|
510
|
+
className: "ai-highlight-states",
|
|
511
|
+
children: [/* @__PURE__ */ jsx(Field, {
|
|
512
|
+
label: "Product name",
|
|
513
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
514
|
+
state: "active",
|
|
515
|
+
label: "Filled by Nebula",
|
|
516
|
+
children: /* @__PURE__ */ jsx(Input, { defaultValue: "Arden ergono" })
|
|
517
|
+
})
|
|
518
|
+
}), /* @__PURE__ */ jsx(Field, {
|
|
519
|
+
label: "Categories",
|
|
520
|
+
children: /* @__PURE__ */ jsx(AiHighlight, {
|
|
521
|
+
state: "rest",
|
|
522
|
+
label: "Filled by Nebula",
|
|
523
|
+
children: /* @__PURE__ */ jsx(Combobox, {
|
|
524
|
+
multiple: true,
|
|
525
|
+
options: CATEGORIES,
|
|
526
|
+
defaultValue: ["office-chairs", "desks"],
|
|
527
|
+
placeholder: "Search categories"
|
|
528
|
+
})
|
|
529
|
+
})
|
|
530
|
+
})]
|
|
531
|
+
}) })
|
|
532
|
+
}),
|
|
533
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
534
|
+
id: "guidelines",
|
|
535
|
+
title: "Guidelines",
|
|
536
|
+
children: [/* @__PURE__ */ jsx(Guidelines, { items: [
|
|
537
|
+
"Mark only what the assistant wrote. A field the person filled is never marked, and their own edit clears a mark.",
|
|
538
|
+
"Keep the resting marks until the form is saved: they are the list of what to check before saving.",
|
|
539
|
+
"Drop an active glow to rest while the assistant panel is closed: a closed panel says the person does not want to watch.",
|
|
540
|
+
"Glow the section and the field together on a long form; a section alone does not say which field."
|
|
541
|
+
] }), /* @__PURE__ */ jsx(Note, {
|
|
542
|
+
title: "Wrap the control",
|
|
543
|
+
children: "Wrap the control, inside its Field, so the ring follows the control's corners and the label stays clear of it. For a switch or a checkbox, wrap the row."
|
|
544
|
+
})]
|
|
545
|
+
}),
|
|
546
|
+
/* @__PURE__ */ jsx(Section$1, {
|
|
547
|
+
id: "accessibility",
|
|
548
|
+
title: "Accessibility",
|
|
549
|
+
children: /* @__PURE__ */ jsx(Guidelines, { items: [
|
|
550
|
+
/* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
551
|
+
"A glowing field is a group named by ",
|
|
552
|
+
/* @__PURE__ */ jsx("code", { children: "label" }),
|
|
553
|
+
" (\"Filled by Nebula\"), so a screen reader says it as focus enters, before the field's own label. The same words are its tooltip. A section shows them only as a tooltip; its fields say their own."
|
|
554
|
+
] }),
|
|
555
|
+
"The sparkle on the ring says it to the eye without colour. In forced colours the ring is a system-coloured outline, dashed at rest.",
|
|
556
|
+
"The wrapper is the same element in every state, so a glow that comes or goes never takes focus or a half-typed word with it.",
|
|
557
|
+
"Under reduced motion the ring holds still in its bright colour and the bloom stops pulsing; nothing else changes."
|
|
558
|
+
] })
|
|
559
|
+
}),
|
|
560
|
+
/* @__PURE__ */ jsx(Fragment$1, {}),
|
|
561
|
+
/* @__PURE__ */ jsxs(Section$1, {
|
|
562
|
+
id: "props",
|
|
563
|
+
title: "Props",
|
|
564
|
+
children: [
|
|
565
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
566
|
+
title: "AiHighlight",
|
|
567
|
+
rows: [
|
|
568
|
+
{
|
|
569
|
+
name: "state",
|
|
570
|
+
type: "'active' | 'rest' | 'none'",
|
|
571
|
+
default: "'none'",
|
|
572
|
+
description: "Being written now, written earlier in the run (until save), or untouched."
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
name: "variant",
|
|
576
|
+
type: "'field' | 'section'",
|
|
577
|
+
default: "'field'",
|
|
578
|
+
description: "A control, or the quieter glow on the card a run is working in (no sweep, nothing at rest)."
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
name: "label",
|
|
582
|
+
type: "string",
|
|
583
|
+
default: "'Filled by AI'",
|
|
584
|
+
description: "What the glow says: a field's group name and its tooltip; a section's tooltip."
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
name: "onUserEdit",
|
|
588
|
+
type: "() => void",
|
|
589
|
+
description: "The person's own edit inside it while it glows: input, a change, or a click on a control that is not a text box."
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
name: "filling",
|
|
593
|
+
type: "boolean",
|
|
594
|
+
default: "false",
|
|
595
|
+
description: "The assistant is writing: edits inside are its own and call nothing."
|
|
596
|
+
}
|
|
597
|
+
]
|
|
598
|
+
}),
|
|
599
|
+
/* @__PURE__ */ jsxs("p", {
|
|
600
|
+
className: "doc-section__description",
|
|
601
|
+
children: [
|
|
602
|
+
"AiHighlight also accepts every native div attribute. Set ",
|
|
603
|
+
/* @__PURE__ */ jsx("code", { children: "--o-ai-radius" }),
|
|
604
|
+
" for a control with other corners."
|
|
605
|
+
]
|
|
606
|
+
}),
|
|
607
|
+
/* @__PURE__ */ jsx(PropsTable, {
|
|
608
|
+
title: "AiNodeGlow",
|
|
609
|
+
rows: [
|
|
610
|
+
{
|
|
611
|
+
name: "target",
|
|
612
|
+
type: "HTMLElement | null",
|
|
613
|
+
required: true,
|
|
614
|
+
description: "The element to ring. Nothing is drawn without one."
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
name: "state",
|
|
618
|
+
type: "'active' | 'pending' | 'settling'",
|
|
619
|
+
default: "'active'",
|
|
620
|
+
description: "The sweep, the calm ring while a request is in flight, or the fade out."
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
name: "inset",
|
|
624
|
+
type: "number",
|
|
625
|
+
default: "3",
|
|
626
|
+
description: "Room between the element's edge and the ring, in px."
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
name: "container",
|
|
630
|
+
type: "Element | null",
|
|
631
|
+
default: "document.body",
|
|
632
|
+
description: "Where the layer is portalled. A moved, scrolled or scaled container works too: the layer corrects for it."
|
|
633
|
+
}
|
|
634
|
+
]
|
|
635
|
+
})
|
|
636
|
+
]
|
|
637
|
+
})
|
|
638
|
+
]
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
//#endregion
|
|
642
|
+
export { Page, Preview };
|