@nqlib/nqui 0.5.6 → 0.6.1
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/dist/{command-palette-DhoWGyk_.js → command-palette-CHUiGh5m.js} +2 -2
- package/dist/{command-palette-D24rOeE6.cjs → command-palette-DsvP2QNP.cjs} +2 -2
- package/dist/command.cjs.js +1 -1
- package/dist/command.es.js +1 -1
- package/dist/components/custom/table-of-contents.d.ts +2 -2
- package/dist/components/custom/table-of-contents.d.ts.map +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/theme-appearance-menu.d.ts +9 -0
- package/dist/components/theme-appearance-menu.d.ts.map +1 -0
- package/dist/components/theme-toggle.d.ts +2 -0
- package/dist/components/theme-toggle.d.ts.map +1 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/combobox.d.ts +5 -3
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/{debug-panel-BjfW-YVo.js → debug-panel-BcYzsTp2.js} +1 -1
- package/dist/{debug-panel-CpqsKuxd.cjs → debug-panel-mwtujy5J.cjs} +1 -1
- package/dist/debug.cjs.js +1 -1
- package/dist/debug.es.js +1 -1
- package/dist/elevation-debate.html +286 -0
- package/dist/{input-shared-CDgy_NdJ.cjs → input-shared-C9Try5fg.cjs} +1 -1
- package/dist/{input-shared-NnOiyHpu.js → input-shared-DXf3Edqt.js} +1 -1
- package/dist/lib/floating-surface.d.ts +6 -2
- package/dist/lib/floating-surface.d.ts.map +1 -1
- package/dist/nqui.cjs.js +15 -13
- package/dist/nqui.es.js +2752 -2646
- package/dist/styles.css +151 -255
- package/docs/components/README.md +4 -1
- package/docs/components/nqui-combobox.md +15 -2
- package/docs/components/nqui-command-palette.md +7 -0
- package/docs/components/nqui-command.md +41 -0
- package/docs/components/nqui-scroll-area.md +69 -0
- package/docs/nqui-skills/AGENT_PROMPT.md +190 -0
- package/docs/nqui-skills/COMPONENTS_INDEX.md +51 -1
- package/docs/nqui-skills/COMPOSITION.md +321 -0
- package/docs/nqui-skills/ELEVATION.md +181 -0
- package/docs/nqui-skills/EVAL.md +148 -0
- package/docs/nqui-skills/HUMAN_GUIDE.md +18 -0
- package/docs/nqui-skills/MIGRATION.md +133 -0
- package/docs/nqui-skills/MOTION.md +189 -0
- package/docs/nqui-skills/README.md +2 -0
- package/docs/nqui-skills/READ_BUDGET.md +60 -0
- package/docs/nqui-skills/RECIPES.md +820 -0
- package/docs/nqui-skills/SKILL.md +58 -1
- package/docs/nqui-skills/STATES.md +154 -0
- package/docs/nqui-skills/THEMING.md +203 -0
- package/docs/nqui-skills/WRITING.md +205 -0
- package/docs/nqui-skills/_claude-commands/README.md +50 -0
- package/docs/nqui-skills/_claude-commands/design/SKILL.md +111 -0
- package/docs/nqui-skills/_claude-commands/edit/SKILL.md +97 -0
- package/docs/nqui-skills/adapt/SKILL.md +5 -2
- package/docs/nqui-skills/animate/SKILL.md +5 -2
- package/docs/nqui-skills/audit/SKILL.md +5 -2
- package/docs/nqui-skills/bolder/SKILL.md +5 -2
- package/docs/nqui-skills/clarify/SKILL.md +5 -2
- package/docs/nqui-skills/colorize/SKILL.md +5 -2
- package/docs/nqui-skills/delight/SKILL.md +5 -4
- package/docs/nqui-skills/distill/SKILL.md +5 -2
- package/docs/nqui-skills/impeccable/SKILL.md +0 -16
- package/docs/nqui-skills/impeccable/reference/INDEX.md +26 -0
- package/docs/nqui-skills/layout/SKILL.md +5 -2
- package/docs/nqui-skills/nqui-components/SKILL.md +33 -9
- package/docs/nqui-skills/nqui-composition/SKILL.md +148 -0
- package/docs/nqui-skills/nqui-data-tables/SKILL.md +127 -0
- package/docs/nqui-skills/nqui-design-system/SKILL.md +22 -1
- package/docs/nqui-skills/nqui-install/SKILL.md +1 -0
- package/docs/nqui-skills/overdrive/SKILL.md +5 -2
- package/docs/nqui-skills/polish/SKILL.md +5 -4
- package/docs/nqui-skills/quieter/SKILL.md +5 -2
- package/docs/nqui-skills/shape/SKILL.md +5 -2
- package/docs/nqui-skills/typeset/SKILL.md +5 -2
- package/package.json +2 -1
- package/scripts/build-styles.js +4 -3
- package/scripts/cli.js +2 -0
- package/scripts/install-claude-skills.js +148 -0
package/dist/debug.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./debug-panel-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./debug-panel-mwtujy5J.cjs");exports.Crosshair=e.Crosshair;exports.DebugPanel=e.DebugPanel;exports.Magnifier=e.Magnifier;exports.UITester=e.UITester;
|
package/dist/debug.es.js
CHANGED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Elevation Philosophy: Continuous vs Alternating vs Hybrid</title>
|
|
6
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--cont-0: oklch(0.99 0.005 250);
|
|
10
|
+
--cont-1: oklch(0.97 0.005 250);
|
|
11
|
+
--cont-2: oklch(0.95 0.005 250);
|
|
12
|
+
--cont-3: oklch(0.92 0.005 250);
|
|
13
|
+
--cont-4: oklch(0.89 0.005 250);
|
|
14
|
+
--cont-border: oklch(0.88 0.01 250);
|
|
15
|
+
|
|
16
|
+
--alt-a: oklch(0.99 0.005 250);
|
|
17
|
+
--alt-b: oklch(0.94 0.008 250);
|
|
18
|
+
--alt-border: oklch(0.88 0.01 250);
|
|
19
|
+
|
|
20
|
+
--hyb-a: oklch(0.99 0.005 250);
|
|
21
|
+
--hyb-b: oklch(0.94 0.008 250);
|
|
22
|
+
--hyb-border: oklch(0.88 0.01 250);
|
|
23
|
+
--hyb-divider: oklch(0.86 0.01 250);
|
|
24
|
+
|
|
25
|
+
--fg: oklch(0.18 0.01 250);
|
|
26
|
+
--fg-muted: oklch(0.5 0.008 250);
|
|
27
|
+
--fg-soft: oklch(0.62 0.008 250);
|
|
28
|
+
--accent: oklch(0.55 0.18 260);
|
|
29
|
+
}
|
|
30
|
+
.dark {
|
|
31
|
+
--cont-0: oklch(0.13 0.005 250);
|
|
32
|
+
--cont-1: oklch(0.17 0.006 250);
|
|
33
|
+
--cont-2: oklch(0.21 0.007 250);
|
|
34
|
+
--cont-3: oklch(0.25 0.008 250);
|
|
35
|
+
--cont-4: oklch(0.29 0.009 250);
|
|
36
|
+
--cont-border: oklch(0.32 0.01 250);
|
|
37
|
+
|
|
38
|
+
--alt-a: oklch(0.13 0.005 250);
|
|
39
|
+
--alt-b: oklch(0.22 0.008 250);
|
|
40
|
+
--alt-border: oklch(0.32 0.01 250);
|
|
41
|
+
|
|
42
|
+
--hyb-a: oklch(0.13 0.005 250);
|
|
43
|
+
--hyb-b: oklch(0.22 0.008 250);
|
|
44
|
+
--hyb-border: oklch(0.32 0.01 250);
|
|
45
|
+
--hyb-divider: oklch(0.3 0.01 250);
|
|
46
|
+
|
|
47
|
+
--fg: oklch(0.95 0.005 250);
|
|
48
|
+
--fg-muted: oklch(0.65 0.008 250);
|
|
49
|
+
--fg-soft: oklch(0.55 0.008 250);
|
|
50
|
+
--accent: oklch(0.72 0.18 260);
|
|
51
|
+
}
|
|
52
|
+
body { background: var(--cont-0); color: var(--fg); font-family: ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI", sans-serif; }
|
|
53
|
+
.panel { border-radius: 12px; padding: 16px; }
|
|
54
|
+
.panel-tight { border-radius: 8px; padding: 12px; }
|
|
55
|
+
.panel-tighter { border-radius: 6px; padding: 10px; }
|
|
56
|
+
.label-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
|
|
57
|
+
.label-section { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--fg-soft); }
|
|
58
|
+
.h-text { font-weight: 600; font-size: 14px; }
|
|
59
|
+
.h-big { font-weight: 600; font-size: 16px; }
|
|
60
|
+
.body-text { font-size: 13px; color: var(--fg-muted); line-height: 1.5; }
|
|
61
|
+
.swatch { width: 24px; height: 24px; border-radius: 4px; display: inline-block; vertical-align: middle; border: 1px solid var(--cont-border); }
|
|
62
|
+
.winner-badge { display: inline-block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: white; margin-left: 8px; vertical-align: middle; }
|
|
63
|
+
</style>
|
|
64
|
+
</head>
|
|
65
|
+
<body class="min-h-screen">
|
|
66
|
+
|
|
67
|
+
<div class="max-w-7xl mx-auto p-6">
|
|
68
|
+
|
|
69
|
+
<header class="flex items-center justify-between mb-8 pb-4 border-b" style="border-color: var(--cont-border);">
|
|
70
|
+
<div>
|
|
71
|
+
<h1 class="text-2xl font-semibold">Elevation Philosophy</h1>
|
|
72
|
+
<p class="text-sm" style="color: var(--fg-muted);">Continuous (5 tokens) vs Alternating (2 tokens) vs <strong>Hybrid (2 surfaces + spacing)</strong> — the recommended nqui model.</p>
|
|
73
|
+
</div>
|
|
74
|
+
<button id="themeToggle" class="text-sm px-3 py-1.5 rounded-md border" style="border-color: var(--cont-border);">Toggle theme</button>
|
|
75
|
+
</header>
|
|
76
|
+
|
|
77
|
+
<section class="grid grid-cols-3 gap-6 mb-8">
|
|
78
|
+
<div>
|
|
79
|
+
<p class="label-tag mb-2">Continuous — 5 tokens</p>
|
|
80
|
+
<div class="flex gap-1 items-center">
|
|
81
|
+
<span class="swatch" style="background:var(--cont-0)"></span>
|
|
82
|
+
<span class="swatch" style="background:var(--cont-1)"></span>
|
|
83
|
+
<span class="swatch" style="background:var(--cont-2)"></span>
|
|
84
|
+
<span class="swatch" style="background:var(--cont-3)"></span>
|
|
85
|
+
<span class="swatch" style="background:var(--cont-4)"></span>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<div>
|
|
89
|
+
<p class="label-tag mb-2">Alternating — 2 tokens (×N levels)</p>
|
|
90
|
+
<div class="flex gap-1 items-center">
|
|
91
|
+
<span class="swatch" style="background:var(--alt-a)"></span>
|
|
92
|
+
<span class="swatch" style="background:var(--alt-b)"></span>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
<div>
|
|
96
|
+
<p class="label-tag mb-2">Hybrid — 2 surfaces + spacing<span class="winner-badge">recommended</span></p>
|
|
97
|
+
<div class="flex gap-1 items-center">
|
|
98
|
+
<span class="swatch" style="background:var(--hyb-a)"></span>
|
|
99
|
+
<span class="swatch" style="background:var(--hyb-b)"></span>
|
|
100
|
+
<span class="text-xs ml-2" style="color: var(--fg-muted);">+ spacing & type weight for depth ≥3</span>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</section>
|
|
104
|
+
|
|
105
|
+
<section class="grid grid-cols-3 gap-6 mb-12">
|
|
106
|
+
<!-- CONTINUOUS -->
|
|
107
|
+
<div>
|
|
108
|
+
<div class="flex items-baseline justify-between mb-3">
|
|
109
|
+
<h2 class="text-base font-semibold">Continuous</h2>
|
|
110
|
+
<span class="label-tag">5 surfaces</span>
|
|
111
|
+
</div>
|
|
112
|
+
<div class="panel" style="background: var(--cont-0); border: 1px solid var(--cont-border);">
|
|
113
|
+
<p class="label-tag mb-2">Level 0 — page</p>
|
|
114
|
+
<div class="panel" style="background: var(--cont-1);">
|
|
115
|
+
<p class="label-tag mb-2">Level 1 — card</p>
|
|
116
|
+
<p class="h-text mb-1">Sprint 24</p>
|
|
117
|
+
<p class="body-text mb-3">In progress.</p>
|
|
118
|
+
<div class="panel-tight" style="background: var(--cont-2);">
|
|
119
|
+
<p class="label-tag mb-2">Level 2 — section</p>
|
|
120
|
+
<div class="panel-tight" style="background: var(--cont-3);">
|
|
121
|
+
<p class="label-tag mb-2">Level 3 — selected</p>
|
|
122
|
+
<div class="panel-tighter" style="background: var(--cont-4);">
|
|
123
|
+
<p class="label-tag mb-1">Level 4 — meta</p>
|
|
124
|
+
<p class="body-text">Build status.</p>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
<div class="mt-3 text-xs" style="color: var(--fg-muted);">Levels 2-4 collapse visually. Five tokens to maintain.</div>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
<!-- ALTERNATING -->
|
|
134
|
+
<div>
|
|
135
|
+
<div class="flex items-baseline justify-between mb-3">
|
|
136
|
+
<h2 class="text-base font-semibold">Alternating</h2>
|
|
137
|
+
<span class="label-tag">2 surfaces ×N</span>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="panel" style="background: var(--alt-a); border: 1px solid var(--alt-border);">
|
|
140
|
+
<p class="label-tag mb-2">Level 0 (A)</p>
|
|
141
|
+
<div class="panel" style="background: var(--alt-b);">
|
|
142
|
+
<p class="label-tag mb-2">Level 1 (B)</p>
|
|
143
|
+
<p class="h-text mb-1">Sprint 24</p>
|
|
144
|
+
<p class="body-text mb-3">In progress.</p>
|
|
145
|
+
<div class="panel-tight" style="background: var(--alt-a);">
|
|
146
|
+
<p class="label-tag mb-2">Level 2 (A)</p>
|
|
147
|
+
<div class="panel-tight" style="background: var(--alt-b);">
|
|
148
|
+
<p class="label-tag mb-2">Level 3 (B)</p>
|
|
149
|
+
<div class="panel-tighter" style="background: var(--alt-a);">
|
|
150
|
+
<p class="label-tag mb-1">Level 4 (A)</p>
|
|
151
|
+
<p class="body-text">Build status.</p>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
<div class="mt-3 text-xs" style="color: var(--fg-muted);">Every adjacent pair stays distinct. But past level 2, alternation reads as a pattern, not depth.</div>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<!-- HYBRID -->
|
|
161
|
+
<div>
|
|
162
|
+
<div class="flex items-baseline justify-between mb-3">
|
|
163
|
+
<h2 class="text-base font-semibold">Hybrid<span class="winner-badge">nqui rule</span></h2>
|
|
164
|
+
<span class="label-tag">2 surfaces · cap</span>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="panel" style="background: var(--hyb-a); border: 1px solid var(--hyb-border);">
|
|
167
|
+
<p class="label-tag mb-3">Level 0 (A) — page</p>
|
|
168
|
+
<div class="panel" style="background: var(--hyb-b);">
|
|
169
|
+
<p class="label-tag mb-3">Level 1 (B) — card</p>
|
|
170
|
+
<p class="h-big mb-1">Sprint 24</p>
|
|
171
|
+
<p class="body-text">In progress.</p>
|
|
172
|
+
<div style="margin-top: 24px;">
|
|
173
|
+
<p class="label-section mb-2">Section</p>
|
|
174
|
+
<p class="body-text">Selected issue lives here.</p>
|
|
175
|
+
<div style="margin-top: 16px; padding-left: 16px; border-left: 2px solid var(--hyb-divider);">
|
|
176
|
+
<p class="h-text" style="font-size: 13px;">Selected</p>
|
|
177
|
+
<p class="body-text">Expanded inline.</p>
|
|
178
|
+
<div style="margin-top: 12px;">
|
|
179
|
+
<p class="label-tag mb-1">Build status</p>
|
|
180
|
+
<p class="body-text">12 of 14 passing.</p>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="mt-3 text-xs" style="color: var(--fg-muted);"><strong style="color: var(--fg);">Calmest.</strong> 2 surfaces total. Depth ≥3 carried by spacing rhythm, uppercase labels, type weight, and one optional indent rule. No surface inflation.</div>
|
|
187
|
+
</div>
|
|
188
|
+
</section>
|
|
189
|
+
|
|
190
|
+
<!-- Realistic UI demonstration -->
|
|
191
|
+
<section class="mb-12">
|
|
192
|
+
<h2 class="text-base font-semibold mb-1">A realistic issue detail — hybrid applied</h2>
|
|
193
|
+
<p class="text-sm mb-4" style="color: var(--fg-muted);"><strong>One card on one page.</strong> Internal hierarchy via spacing rhythm + uppercase labels + one Separator + type weight. No third surface anywhere.</p>
|
|
194
|
+
|
|
195
|
+
<div class="panel" style="background: var(--hyb-a); border: 1px solid var(--hyb-border); padding: 24px;">
|
|
196
|
+
<div class="panel" style="background: var(--hyb-b); padding: 24px;">
|
|
197
|
+
<div>
|
|
198
|
+
<p class="label-tag" style="color: var(--fg-muted);">NQ-412</p>
|
|
199
|
+
<p class="h-big mt-1" style="font-size: 18px;">Implement OAuth 2.0 login flow</p>
|
|
200
|
+
</div>
|
|
201
|
+
<div class="flex flex-wrap items-center mt-3" style="gap: 16px; font-size: 12px; color: var(--fg-muted);">
|
|
202
|
+
<span>In progress</span>
|
|
203
|
+
<span>High priority</span>
|
|
204
|
+
<span>Alina Torres</span>
|
|
205
|
+
<span>Due Friday</span>
|
|
206
|
+
</div>
|
|
207
|
+
<hr style="border-color: var(--hyb-divider); margin: 24px 0;">
|
|
208
|
+
<div>
|
|
209
|
+
<p class="label-section mb-2">Description</p>
|
|
210
|
+
<p class="body-text" style="color: var(--fg);">Add Google and GitHub OAuth providers. Token refresh should happen transparently without user intervention.</p>
|
|
211
|
+
</div>
|
|
212
|
+
<div style="margin-top: 32px;">
|
|
213
|
+
<p class="label-section mb-2">Completion</p>
|
|
214
|
+
<div class="flex items-center" style="gap: 12px;">
|
|
215
|
+
<div style="flex: 1; height: 6px; border-radius: 3px; background: var(--hyb-divider); overflow: hidden;">
|
|
216
|
+
<div style="height: 100%; width: 68%; background: var(--accent);"></div>
|
|
217
|
+
</div>
|
|
218
|
+
<span style="font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums;">68%</span>
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
<div style="margin-top: 32px;">
|
|
222
|
+
<p class="label-section mb-2">Build health · last 14 days</p>
|
|
223
|
+
<div class="flex" style="gap: 2px; height: 24px;">
|
|
224
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
225
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
226
|
+
<div style="flex:1; background: oklch(0.6 0.2 25); border-radius: 2px;"></div>
|
|
227
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
228
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
229
|
+
<div style="flex:1; background: var(--hyb-divider); border-radius: 2px;"></div>
|
|
230
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
231
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
232
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
233
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
234
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
235
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
236
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
237
|
+
<div style="flex:1; background: var(--accent); border-radius: 2px;"></div>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
</div>
|
|
242
|
+
|
|
243
|
+
<p class="mt-3 text-xs" style="color: var(--fg-muted);">
|
|
244
|
+
<strong style="color: var(--fg);">What's doing the work:</strong>
|
|
245
|
+
surface A (page) → surface B (card) — the only flip ·
|
|
246
|
+
section gaps of 24/32 px ·
|
|
247
|
+
uppercase `label-section` per block ·
|
|
248
|
+
one horizontal Separator between header and body ·
|
|
249
|
+
type weight contrast (`label-tag` muted vs `h-big` bold).
|
|
250
|
+
Five visible "sections." <strong>Zero</strong> nested surfaces.
|
|
251
|
+
</p>
|
|
252
|
+
</section>
|
|
253
|
+
|
|
254
|
+
<!-- Decision rule -->
|
|
255
|
+
<section class="mb-12">
|
|
256
|
+
<h2 class="text-base font-semibold mb-3">When to use which</h2>
|
|
257
|
+
<div class="panel" style="background: var(--hyb-b); border: 1px solid var(--hyb-border); padding: 16px 20px;">
|
|
258
|
+
<table class="w-full text-sm" style="border-collapse: separate; border-spacing: 0 12px;">
|
|
259
|
+
<thead>
|
|
260
|
+
<tr style="color: var(--fg-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;">
|
|
261
|
+
<th class="text-left pb-2">Situation</th>
|
|
262
|
+
<th class="text-left pb-2">Model</th>
|
|
263
|
+
</tr>
|
|
264
|
+
</thead>
|
|
265
|
+
<tbody>
|
|
266
|
+
<tr><td>Product UI, general case</td><td><strong>Hybrid (2 surfaces + spacing)</strong> — the nqui default</td></tr>
|
|
267
|
+
<tr><td>Stacked modals (modal opening from a modal)</td><td>Continuous — each layer must feel physically above the previous</td></tr>
|
|
268
|
+
<tr><td>Bloomberg/observability dashboards with genuine semantic depth</td><td>Continuous, capped at 3-4 levels — density is dominant</td></tr>
|
|
269
|
+
<tr><td>Focus-mode editors, single-concept screens</td><td>Single surface + spacing only — the most refined option</td></tr>
|
|
270
|
+
<tr><td>You want to add a third nested inline surface</td><td><strong>Stop.</strong> Use spacing + label, or move to a sheet/route. A third surface is almost always a symptom.</td></tr>
|
|
271
|
+
</tbody>
|
|
272
|
+
</table>
|
|
273
|
+
</div>
|
|
274
|
+
</section>
|
|
275
|
+
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
<script>
|
|
279
|
+
document.getElementById('themeToggle').addEventListener('click', () => {
|
|
280
|
+
document.documentElement.classList.toggle('dark');
|
|
281
|
+
document.body.style.background = getComputedStyle(document.documentElement).getPropertyValue('--cont-0');
|
|
282
|
+
});
|
|
283
|
+
</script>
|
|
284
|
+
|
|
285
|
+
</body>
|
|
286
|
+
</html>
|
|
@@ -38,4 +38,4 @@
|
|
|
38
38
|
`)},me=function(){var e=parseInt(document.body.getAttribute(D)||"0",10);return isFinite(e)?e:0},Bt=function(){a.useEffect(function(){return document.body.setAttribute(D,(me()+1).toString()),function(){var e=me()-1;e<=0?document.body.removeAttribute(D):document.body.setAttribute(D,e.toString())}},[])},Ut=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Bt();var i=a.useMemo(function(){return Ft(o)},[o]);return a.createElement(Wt,{styles:_t(i,!t,o,n?"":"!important")})},re=!1;if(typeof window<"u")try{var j=Object.defineProperty({},"passive",{get:function(){return re=!0,!0}});window.addEventListener("test",j,j),window.removeEventListener("test",j,j)}catch{re=!1}var L=re?{passive:!1}:!1,jt=function(e){return e.tagName==="TEXTAREA"},Ie=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jt(e)&&n[t]==="visible")},Ht=function(e){return Ie(e,"overflowY")},$t=function(e){return Ie(e,"overflowX")},he=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ke(e,r);if(o){var i=Fe(e,r),u=i[1],c=i[2];if(u>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Kt=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Vt=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ke=function(e,t){return e==="v"?Ht(t):$t(t)},Fe=function(e,t){return e==="v"?Kt(t):Vt(t)},Xt=function(e,t){return e==="h"&&t==="rtl"?-1:1},Yt=function(e,t,n,r,o){var i=Xt(e,window.getComputedStyle(t).direction),u=i*r,c=n.target,v=t.contains(c),l=!1,d=u>0,f=0,m=0;do{if(!c)break;var p=Fe(e,c),w=p[0],s=p[1],h=p[2],g=s-h-i*w;(w||g)&&ke(e,c)&&(f+=g,m+=w);var E=c.parentNode;c=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!v&&c!==document.body||v&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(l=!0),l},H=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pe=function(e){return[e.deltaX,e.deltaY]},ge=function(e){return e&&"current"in e?e.current:e},zt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qt=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},Gt=0,x=[];function Zt(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(Gt++)[0],i=a.useState(De)[0],u=a.useRef(e);a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var s=yt([e.lockRef.current],(e.shards||[]).map(ge),!0).filter(Boolean);return s.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),s.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=a.useCallback(function(s,h){if("touches"in s&&s.touches.length===2||s.type==="wheel"&&s.ctrlKey)return!u.current.allowPinchZoom;var g=H(s),E=n.current,b="deltaX"in s?s.deltaX:E[0]-g[0],S="deltaY"in s?s.deltaY:E[1]-g[1],C,P=s.target,y=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in s&&y==="h"&&P.type==="range")return!1;var N=window.getSelection(),A=N&&N.anchorNode,F=A?A===P||A.contains(P):!1;if(F)return!1;var B=he(y,P);if(!B)return!0;if(B?C=y:(C=y==="v"?"h":"v",B=he(y,P)),!B)return!1;if(!r.current&&"changedTouches"in s&&(b||S)&&(r.current=C),!C)return!0;var oe=r.current||C;return Yt(oe,h,s,oe==="h"?b:S)},[]),v=a.useCallback(function(s){var h=s;if(!(!x.length||x[x.length-1]!==i)){var g="deltaY"in h?pe(h):H(h),E=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&zt(C.delta,g)})[0];if(E&&E.should){h.cancelable&&h.preventDefault();return}if(!E){var b=(u.current.shards||[]).map(ge).filter(Boolean).filter(function(C){return C.contains(h.target)}),S=b.length>0?c(h,b[0]):!u.current.noIsolation;S&&h.cancelable&&h.preventDefault()}}},[]),l=a.useCallback(function(s,h,g,E){var b={name:s,delta:h,target:g,should:E,shadowParent:Qt(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),d=a.useCallback(function(s){n.current=H(s),r.current=void 0},[]),f=a.useCallback(function(s){l(s.type,pe(s),s.target,c(s,e.lockRef.current))},[]),m=a.useCallback(function(s){l(s.type,H(s),s.target,c(s,e.lockRef.current))},[]);a.useEffect(function(){return x.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",v,L),document.addEventListener("touchmove",v,L),document.addEventListener("touchstart",d,L),function(){x=x.filter(function(s){return s!==i}),document.removeEventListener("wheel",v,L),document.removeEventListener("touchmove",v,L),document.removeEventListener("touchstart",d,L)}},[]);var p=e.removeScrollBar,w=e.inert;return a.createElement(a.Fragment,null,w?a.createElement(i,{styles:qt(o)}):null,p?a.createElement(Ut,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jt=Nt(Me,Zt);var We=a.forwardRef(function(e,t){return a.createElement(z,R({},e,{ref:t,sideCar:Jt}))});We.classNames=z.classNames;var en=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},M=new WeakMap,$=new WeakMap,K={},te=0,_e=function(e){return e&&(e.host||_e(e.parentNode))},tn=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=_e(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},nn=function(e,t,n,r){var o=tn(t,Array.isArray(e)?e:[e]);K[n]||(K[n]=new WeakMap);var i=K[n],u=[],c=new Set,v=new Set(o),l=function(f){!f||c.has(f)||(c.add(f),l(f.parentNode))};o.forEach(l);var d=function(f){!f||v.has(f)||Array.prototype.forEach.call(f.children,function(m){if(c.has(m))d(m);else try{var p=m.getAttribute(r),w=p!==null&&p!=="false",s=(M.get(m)||0)+1,h=(i.get(m)||0)+1;M.set(m,s),i.set(m,h),u.push(m),s===1&&w&&$.set(m,!0),h===1&&m.setAttribute(n,"true"),w||m.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}})};return d(t),c.clear(),te++,function(){u.forEach(function(f){var m=M.get(f)-1,p=i.get(f)-1;M.set(f,m),i.set(f,p),m||($.has(f)||f.removeAttribute(r),$.delete(f)),p||f.removeAttribute(n)}),te--,te||(M=new WeakMap,M=new WeakMap,$=new WeakMap,K={})}},rn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=en(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),nn(r,o,n,"aria-hidden")):function(){return null}};const on="rounded-lg border border-border bg-popover text-popover-foreground shadow-sm",an="rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground
|
|
41
|
+
`)},Gt=0,x=[];function Zt(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(Gt++)[0],i=a.useState(De)[0],u=a.useRef(e);a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var s=yt([e.lockRef.current],(e.shards||[]).map(ge),!0).filter(Boolean);return s.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),s.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=a.useCallback(function(s,h){if("touches"in s&&s.touches.length===2||s.type==="wheel"&&s.ctrlKey)return!u.current.allowPinchZoom;var g=H(s),E=n.current,b="deltaX"in s?s.deltaX:E[0]-g[0],S="deltaY"in s?s.deltaY:E[1]-g[1],C,P=s.target,y=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in s&&y==="h"&&P.type==="range")return!1;var N=window.getSelection(),A=N&&N.anchorNode,F=A?A===P||A.contains(P):!1;if(F)return!1;var B=he(y,P);if(!B)return!0;if(B?C=y:(C=y==="v"?"h":"v",B=he(y,P)),!B)return!1;if(!r.current&&"changedTouches"in s&&(b||S)&&(r.current=C),!C)return!0;var oe=r.current||C;return Yt(oe,h,s,oe==="h"?b:S)},[]),v=a.useCallback(function(s){var h=s;if(!(!x.length||x[x.length-1]!==i)){var g="deltaY"in h?pe(h):H(h),E=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&zt(C.delta,g)})[0];if(E&&E.should){h.cancelable&&h.preventDefault();return}if(!E){var b=(u.current.shards||[]).map(ge).filter(Boolean).filter(function(C){return C.contains(h.target)}),S=b.length>0?c(h,b[0]):!u.current.noIsolation;S&&h.cancelable&&h.preventDefault()}}},[]),l=a.useCallback(function(s,h,g,E){var b={name:s,delta:h,target:g,should:E,shadowParent:Qt(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),d=a.useCallback(function(s){n.current=H(s),r.current=void 0},[]),f=a.useCallback(function(s){l(s.type,pe(s),s.target,c(s,e.lockRef.current))},[]),m=a.useCallback(function(s){l(s.type,H(s),s.target,c(s,e.lockRef.current))},[]);a.useEffect(function(){return x.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",v,L),document.addEventListener("touchmove",v,L),document.addEventListener("touchstart",d,L),function(){x=x.filter(function(s){return s!==i}),document.removeEventListener("wheel",v,L),document.removeEventListener("touchmove",v,L),document.removeEventListener("touchstart",d,L)}},[]);var p=e.removeScrollBar,w=e.inert;return a.createElement(a.Fragment,null,w?a.createElement(i,{styles:qt(o)}):null,p?a.createElement(Ut,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jt=Nt(Me,Zt);var We=a.forwardRef(function(e,t){return a.createElement(z,R({},e,{ref:t,sideCar:Jt}))});We.classNames=z.classNames;var en=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},M=new WeakMap,$=new WeakMap,K={},te=0,_e=function(e){return e&&(e.host||_e(e.parentNode))},tn=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=_e(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},nn=function(e,t,n,r){var o=tn(t,Array.isArray(e)?e:[e]);K[n]||(K[n]=new WeakMap);var i=K[n],u=[],c=new Set,v=new Set(o),l=function(f){!f||c.has(f)||(c.add(f),l(f.parentNode))};o.forEach(l);var d=function(f){!f||v.has(f)||Array.prototype.forEach.call(f.children,function(m){if(c.has(m))d(m);else try{var p=m.getAttribute(r),w=p!==null&&p!=="false",s=(M.get(m)||0)+1,h=(i.get(m)||0)+1;M.set(m,s),i.set(m,h),u.push(m),s===1&&w&&$.set(m,!0),h===1&&m.setAttribute(n,"true"),w||m.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",m,g)}})};return d(t),c.clear(),te++,function(){u.forEach(function(f){var m=M.get(f)-1,p=i.get(f)-1;M.set(f,m),i.set(f,p),m||($.has(f)||f.removeAttribute(r),$.delete(f)),p||f.removeAttribute(n)}),te--,te||(M=new WeakMap,M=new WeakMap,$=new WeakMap,K={})}},rn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=en(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),nn(r,o,n,"aria-hidden")):function(){return null}};const on="rounded-lg border border-border bg-popover text-popover-foreground shadow-sm",an="rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:*:[svg]:text-accent-foreground",cn="w-full min-w-0 rounded-md border border-input bg-background ring-offset-background transition-[color,box-shadow]",sn="h-7";exports.DismissableLayer=Re;exports.FocusScope=Ne;exports.Portal=Ae;exports.Presence=Ce;exports.Primitive=W;exports.ReactRemoveScroll=We;exports.composeEventHandlers=V;exports.composeRefs=we;exports.createContext2=He;exports.createContextScope=$e;exports.dispatchDiscreteCustomEvent=Se;exports.floatingListItemInteractive=an;exports.floatingSurface=on;exports.hideOthers=rn;exports.inputFieldShellBase=cn;exports.inputFieldSingleRowHeight=sn;exports.useCallbackRef=k;exports.useComposedRefs=_;exports.useControllableState=Xe;exports.useFocusGuards=gt;exports.useId=et;exports.useLayoutEffect2=I;
|
|
@@ -1047,7 +1047,7 @@ var zt = function(e) {
|
|
|
1047
1047
|
return null;
|
|
1048
1048
|
};
|
|
1049
1049
|
};
|
|
1050
|
-
const sn = "rounded-lg border border-border bg-popover text-popover-foreground shadow-sm", un = "rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground
|
|
1050
|
+
const sn = "rounded-lg border border-border bg-popover text-popover-foreground shadow-sm", un = "rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:*:[svg]:text-accent-foreground", ln = "w-full min-w-0 rounded-md border border-input bg-background ring-offset-background transition-[color,box-shadow]", dn = "h-7";
|
|
1051
1051
|
export {
|
|
1052
1052
|
Ze as D,
|
|
1053
1053
|
nt as F,
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare const floatingSurface = "rounded-lg border border-border bg-popover text-popover-foreground shadow-sm";
|
|
5
5
|
/**
|
|
6
|
-
* List row: keyboard focus, pointer highlight (Radix), and cmdk
|
|
6
|
+
* List row: keyboard focus, pointer highlight (Radix), and cmdk selection on [cmdk-item].
|
|
7
7
|
* Muted is reserved for labels, shortcuts, empty copy — not selected rows.
|
|
8
|
+
*
|
|
9
|
+
* Use aria-selected (not data-selected) for cmdk highlight: React 19 renders
|
|
10
|
+
* data-selected="false" on unselected rows, and data-selected:bg-accent compiles
|
|
11
|
+
* to [data-selected], which matches every row.
|
|
8
12
|
*/
|
|
9
|
-
export declare const floatingListItemInteractive = "rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground
|
|
13
|
+
export declare const floatingListItemInteractive = "rounded-md outline-none focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:*:[svg]:text-accent-foreground";
|
|
10
14
|
//# sourceMappingURL=floating-surface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-surface.d.ts","sourceRoot":"","sources":["../../src/lib/floating-surface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe,iFACoD,CAAA;AAEhF
|
|
1
|
+
{"version":3,"file":"floating-surface.d.ts","sourceRoot":"","sources":["../../src/lib/floating-surface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe,iFACoD,CAAA;AAEhF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,0PACiN,CAAA"}
|