gbs-add-block 2.1.0 → 2.3.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/.gbs/skills/gbs-components/SKILL.md +190 -134
- package/.gbs/skills/gbs-components/references/install.md +25 -3
- package/.gbs/skills/gbs-components/references/styling.md +246 -207
- package/CHANGELOG.md +74 -0
- package/README.md +154 -23
- package/index.cjs +212 -3
- package/package.json +41 -10
- package/schema/passport-v1.schema.json +204 -0
- package/source/beta-components/accordion/passport.json +259 -0
- package/source/beta-components/accordion/styles.css +207 -208
- package/source/beta-components/alert/passport.json +250 -0
- package/source/beta-components/alert/styles.css +154 -155
- package/source/beta-components/avatar/passport.json +294 -0
- package/source/beta-components/avatar/styles.css +225 -226
- package/source/beta-components/badge/passport.json +332 -0
- package/source/beta-components/badge/styles.css +203 -204
- package/source/beta-components/breadcrumb/passport.json +243 -0
- package/source/beta-components/breadcrumb/styles.css +138 -140
- package/source/beta-components/button/passport.json +402 -0
- package/source/beta-components/button/passport.manual.json +31 -0
- package/source/beta-components/button/styles.css +232 -234
- package/source/beta-components/card/passport.json +337 -0
- package/source/beta-components/card/styles.css +230 -232
- package/source/beta-components/checkbox/passport.json +456 -0
- package/source/beta-components/checkbox/styles.css +211 -213
- package/source/beta-components/combobox/passport.json +456 -0
- package/source/beta-components/combobox/styles.css +419 -417
- package/source/beta-components/data-grid/agent/coerce.ts +368 -0
- package/source/beta-components/data-grid/agent/contract.ts +410 -0
- package/source/beta-components/data-grid/agent/dataset.ts +92 -0
- package/source/beta-components/data-grid/agent/engine.ts +470 -0
- package/source/beta-components/data-grid/agent/executors.ts +155 -0
- package/source/beta-components/data-grid/agent/index.ts +79 -0
- package/source/beta-components/data-grid/agent/intent.ts +324 -0
- package/source/beta-components/data-grid/agent/operations.ts +335 -0
- package/source/beta-components/data-grid/agent/validate.ts +630 -0
- package/source/beta-components/data-grid/agent/webmcp.ts +107 -0
- package/source/beta-components/data-grid/index.ts +14 -7
- package/source/beta-components/data-grid/passport.json +1051 -0
- package/source/beta-components/data-grid/passport.manual.json +255 -0
- package/source/beta-components/data-grid/react/AskGrid.tsx +164 -0
- package/source/beta-components/data-grid/react/DataGrid.tsx +39 -0
- package/source/beta-components/data-grid/styles.css +874 -716
- package/source/beta-components/date-picker/passport.json +407 -0
- package/source/beta-components/date-picker/styles.css +445 -446
- package/source/beta-components/dialog/passport.json +344 -0
- package/source/beta-components/dialog/styles.css +280 -279
- package/source/beta-components/file-uploader/passport.json +518 -0
- package/source/beta-components/file-uploader/styles.css +394 -396
- package/source/beta-components/input/passport.json +536 -0
- package/source/beta-components/input/styles.css +295 -297
- package/source/beta-components/menu/passport.json +322 -0
- package/source/beta-components/menu/styles.css +224 -223
- package/source/beta-components/modal/passport.json +289 -0
- package/source/beta-components/modal/styles.css +241 -240
- package/source/beta-components/number-input/passport.json +541 -0
- package/source/beta-components/number-input/styles.css +230 -231
- package/source/beta-components/popover/passport.json +238 -0
- package/source/beta-components/popover/styles.css +148 -147
- package/source/beta-components/progress/passport.json +270 -0
- package/source/beta-components/progress/styles.css +200 -201
- package/source/beta-components/radio-group/passport.json +477 -0
- package/source/beta-components/radio-group/styles.css +269 -270
- package/source/beta-components/shared/core/agent/adapter.ts +65 -0
- package/source/beta-components/shared/core/agent/history.ts +120 -0
- package/source/beta-components/shared/core/agent/index.ts +46 -0
- package/source/beta-components/shared/core/agent/numbers.ts +217 -0
- package/source/beta-components/shared/core/agent/schema.ts +180 -0
- package/source/beta-components/shared/core/agent/types.ts +169 -0
- package/source/beta-components/shared/core/agent/webmcp.ts +328 -0
- package/source/beta-components/shared/index.ts +9 -0
- package/source/beta-components/shared/react/GramproAIProvider.tsx +50 -0
- package/source/beta-components/shared/react/useAskAgent.ts +217 -0
- package/source/beta-components/shared/styles.css +79 -0
- package/source/beta-components/shared/version.json +4 -4
- package/source/beta-components/shared/version.ts +6 -6
- package/source/beta-components/skeleton/passport.json +251 -0
- package/source/beta-components/skeleton/styles.css +185 -187
- package/source/beta-components/spinner/passport.json +245 -0
- package/source/beta-components/spinner/styles.css +173 -174
- package/source/beta-components/switch/passport.json +421 -0
- package/source/beta-components/switch/styles.css +227 -229
- package/source/beta-components/tabs/passport.json +315 -0
- package/source/beta-components/tabs/styles.css +263 -264
- package/source/beta-components/textarea/passport.json +382 -0
- package/source/beta-components/textarea/styles.css +158 -160
- package/source/beta-components/toaster/passport.json +221 -0
- package/source/beta-components/toaster/styles.css +282 -282
- package/source/beta-components/tooltip/passport.json +170 -0
- package/source/beta-components/tooltip/styles.css +71 -73
- package/tools/env.cjs +61 -0
- package/tools/passport/cli.cjs +79 -0
- package/tools/passport/extract.cjs +493 -0
- package/tools/passport/index.cjs +185 -0
- package/tools/passport/merge.cjs +131 -0
- package/tools/passport/policy.cjs +65 -0
- package/tools/passport/validate.cjs +277 -0
- package/tools/ts-require.cjs +79 -0
- package/source/beta-components/accordion/__tests__/core.test.ts +0 -58
- package/source/beta-components/alert/__tests__/core.test.ts +0 -17
- package/source/beta-components/avatar/__tests__/core.test.ts +0 -88
- package/source/beta-components/badge/__tests__/core.test.ts +0 -46
- package/source/beta-components/breadcrumb/__tests__/core.test.ts +0 -58
- package/source/beta-components/button/__tests__/core.test.ts +0 -31
- package/source/beta-components/card/__tests__/core.test.ts +0 -57
- package/source/beta-components/checkbox/__tests__/core.test.ts +0 -40
- package/source/beta-components/combobox/__tests__/core.test.ts +0 -134
- package/source/beta-components/data-grid/__tests__/core.test.ts +0 -356
- package/source/beta-components/data-grid/__tests__/export.test.ts +0 -70
- package/source/beta-components/data-grid/__tests__/pdf.test.ts +0 -209
- package/source/beta-components/date-picker/__tests__/core.test.ts +0 -273
- package/source/beta-components/dialog/__tests__/core.test.ts +0 -86
- package/source/beta-components/file-uploader/__tests__/core.test.ts +0 -395
- package/source/beta-components/input/__tests__/core.test.ts +0 -75
- package/source/beta-components/menu/__tests__/core.test.ts +0 -120
- package/source/beta-components/modal/__tests__/core.test.ts +0 -55
- package/source/beta-components/number-input/__tests__/core.test.ts +0 -151
- package/source/beta-components/progress/__tests__/core.test.ts +0 -56
- package/source/beta-components/radio-group/__tests__/core.test.ts +0 -64
- package/source/beta-components/shared/__tests__/boundaries.test.ts +0 -95
- package/source/beta-components/shared/__tests__/core.test.ts +0 -55
- package/source/beta-components/shared/__tests__/position.test.ts +0 -143
- package/source/beta-components/skeleton/__tests__/core.test.ts +0 -41
- package/source/beta-components/spinner/__tests__/core.test.ts +0 -48
- package/source/beta-components/switch/__tests__/core.test.ts +0 -64
- package/source/beta-components/tabs/__tests__/core.test.ts +0 -51
- package/source/beta-components/textarea/__tests__/core.test.ts +0 -38
- package/source/beta-components/toaster/__tests__/core.test.ts +0 -256
- package/source/beta-components/tooltip/__tests__/core.test.ts +0 -42
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
import type { AgentAdapter, AskOutcome } from "../core/agent/adapter";
|
|
5
|
+
import type { JsonSchema } from "../core/agent/types";
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* One request, end to end: what a person typed goes to the adapter, the
|
|
9
|
+
* adapter's answer goes to the validator, and only a validated command runs.
|
|
10
|
+
*
|
|
11
|
+
* The order is the point. This hook never looks at the answer's contents to
|
|
12
|
+
* decide anything — it hands the envelope to `respond()` and reports what came
|
|
13
|
+
* back. A producer that returns nonsense, a stale schema, or an operation the
|
|
14
|
+
* component does not have is refused by the same five layers a form faces, and
|
|
15
|
+
* the person sees the validator's own words rather than a guess.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/** The part of a component's agent this hook uses. */
|
|
19
|
+
export interface AskableAgent {
|
|
20
|
+
contract(): unknown;
|
|
21
|
+
responseSchema(): JsonSchema;
|
|
22
|
+
/** Validates a whole envelope. Does not change anything. */
|
|
23
|
+
respond(response: unknown): AskExecution;
|
|
24
|
+
execute(intent: unknown, options?: { confirm?: boolean }): Promise<AskExecution>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** The statuses a component's validator and executor answer with. */
|
|
28
|
+
export type AskExecution =
|
|
29
|
+
| {
|
|
30
|
+
status: "done";
|
|
31
|
+
commands: readonly { explain: { summary: string } }[];
|
|
32
|
+
warnings: readonly { code: string; message: string }[];
|
|
33
|
+
}
|
|
34
|
+
| {
|
|
35
|
+
status: "needs-confirmation";
|
|
36
|
+
commands: readonly { explain: { summary: string } }[];
|
|
37
|
+
confirm: { code: string; message: string };
|
|
38
|
+
}
|
|
39
|
+
| { status: "rejected"; reason: string; code: string; layer: string; suggestion?: string }
|
|
40
|
+
| { status: "clarify"; question: string; options?: readonly string[] }
|
|
41
|
+
| { status: "declined"; reason: string };
|
|
42
|
+
|
|
43
|
+
const IDLE: AskOutcome = { phase: "idle", message: "" };
|
|
44
|
+
|
|
45
|
+
export interface UseAskAgent {
|
|
46
|
+
ask(utterance: string): Promise<void>;
|
|
47
|
+
/** Run a `needs-confirmation` request the person has now agreed to. */
|
|
48
|
+
confirm(): Promise<void>;
|
|
49
|
+
reset(): void;
|
|
50
|
+
outcome: AskOutcome;
|
|
51
|
+
busy: boolean;
|
|
52
|
+
/** Set when the last answer stopped to ask; `confirm()` applies it. */
|
|
53
|
+
pending: unknown;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function useAskAgent(
|
|
57
|
+
agent: AskableAgent | null,
|
|
58
|
+
adapter: AgentAdapter | null,
|
|
59
|
+
): UseAskAgent {
|
|
60
|
+
const [outcome, setOutcome] = useState<AskOutcome>(IDLE);
|
|
61
|
+
const [busy, setBusy] = useState(false);
|
|
62
|
+
const [pending, setPending] = useState<unknown>(null);
|
|
63
|
+
|
|
64
|
+
// One request at a time: typing again abandons the one in flight rather
|
|
65
|
+
// than racing it to the grid.
|
|
66
|
+
const inFlight = useRef<AbortController | null>(null);
|
|
67
|
+
const alive = useRef(true);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
alive.current = true;
|
|
70
|
+
return () => {
|
|
71
|
+
alive.current = false;
|
|
72
|
+
inFlight.current?.abort();
|
|
73
|
+
};
|
|
74
|
+
}, []);
|
|
75
|
+
|
|
76
|
+
const report = useCallback((next: AskOutcome) => {
|
|
77
|
+
if (alive.current) setOutcome(next);
|
|
78
|
+
}, []);
|
|
79
|
+
|
|
80
|
+
/** Turn a validator answer into something to show, and run it when allowed. */
|
|
81
|
+
const settle = useCallback(
|
|
82
|
+
async (verdict: AskExecution, intents: unknown, raw: unknown) => {
|
|
83
|
+
if (verdict.status === "rejected") {
|
|
84
|
+
report({
|
|
85
|
+
phase: "refused",
|
|
86
|
+
message: verdict.reason,
|
|
87
|
+
code: verdict.code,
|
|
88
|
+
layer: verdict.layer,
|
|
89
|
+
suggestion: verdict.suggestion,
|
|
90
|
+
raw,
|
|
91
|
+
});
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (verdict.status === "clarify") {
|
|
95
|
+
report({ phase: "clarify", message: verdict.question, raw });
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (verdict.status === "declined") {
|
|
99
|
+
report({ phase: "refused", message: verdict.reason, raw });
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (verdict.status === "needs-confirmation") {
|
|
103
|
+
setPending(intents);
|
|
104
|
+
report({
|
|
105
|
+
phase: "clarify",
|
|
106
|
+
message: verdict.confirm.message,
|
|
107
|
+
code: verdict.confirm.code,
|
|
108
|
+
raw,
|
|
109
|
+
});
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const run = await agent!.execute(intents);
|
|
114
|
+
if (run.status !== "done") {
|
|
115
|
+
report({
|
|
116
|
+
phase: "refused",
|
|
117
|
+
message: "reason" in run ? run.reason : run.status,
|
|
118
|
+
raw,
|
|
119
|
+
});
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
report({
|
|
123
|
+
phase: "done",
|
|
124
|
+
message: run.commands.map((command) => command.explain.summary).join("; "),
|
|
125
|
+
warnings: run.warnings.map((warning) => `${warning.code}: ${warning.message}`),
|
|
126
|
+
raw,
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
[agent, report],
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
const ask = useCallback(
|
|
133
|
+
async (utterance: string) => {
|
|
134
|
+
const text = utterance.trim();
|
|
135
|
+
if (!agent || !adapter || text === "") return;
|
|
136
|
+
|
|
137
|
+
inFlight.current?.abort();
|
|
138
|
+
const controller = new AbortController();
|
|
139
|
+
inFlight.current = controller;
|
|
140
|
+
|
|
141
|
+
setPending(null);
|
|
142
|
+
setBusy(true);
|
|
143
|
+
report({ phase: "thinking", message: "" });
|
|
144
|
+
|
|
145
|
+
let raw: unknown;
|
|
146
|
+
try {
|
|
147
|
+
raw = await adapter({
|
|
148
|
+
utterance: text,
|
|
149
|
+
contract: agent.contract(),
|
|
150
|
+
responseSchema: agent.responseSchema(),
|
|
151
|
+
signal: controller.signal,
|
|
152
|
+
});
|
|
153
|
+
} catch (error) {
|
|
154
|
+
if (!controller.signal.aborted) {
|
|
155
|
+
// Reaching the producer failed. That is not the producer refusing,
|
|
156
|
+
// and saying so avoids blaming the person's wording.
|
|
157
|
+
report({
|
|
158
|
+
phase: "error",
|
|
159
|
+
message: error instanceof Error ? error.message : String(error),
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
if (alive.current && inFlight.current === controller) setBusy(false);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
if (controller.signal.aborted) return;
|
|
167
|
+
|
|
168
|
+
try {
|
|
169
|
+
const intents =
|
|
170
|
+
raw && typeof raw === "object" && "intents" in raw
|
|
171
|
+
? (raw as { intents: unknown }).intents
|
|
172
|
+
: raw;
|
|
173
|
+
await settle(agent.respond(raw), intents, raw);
|
|
174
|
+
} catch (error) {
|
|
175
|
+
report({
|
|
176
|
+
phase: "error",
|
|
177
|
+
message: error instanceof Error ? error.message : String(error),
|
|
178
|
+
raw,
|
|
179
|
+
});
|
|
180
|
+
} finally {
|
|
181
|
+
if (alive.current && inFlight.current === controller) setBusy(false);
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
[adapter, agent, report, settle],
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
const confirm = useCallback(async () => {
|
|
188
|
+
if (!agent || pending === null) return;
|
|
189
|
+
setBusy(true);
|
|
190
|
+
try {
|
|
191
|
+
// Without the flag the executor stops and asks again, forever.
|
|
192
|
+
const run = await agent.execute(pending, { confirm: true });
|
|
193
|
+
report(
|
|
194
|
+
run.status === "done"
|
|
195
|
+
? {
|
|
196
|
+
phase: "done",
|
|
197
|
+
message: run.commands.map((command) => command.explain.summary).join("; "),
|
|
198
|
+
}
|
|
199
|
+
: {
|
|
200
|
+
phase: "refused",
|
|
201
|
+
message: "reason" in run ? run.reason : run.status,
|
|
202
|
+
},
|
|
203
|
+
);
|
|
204
|
+
setPending(null);
|
|
205
|
+
} finally {
|
|
206
|
+
if (alive.current) setBusy(false);
|
|
207
|
+
}
|
|
208
|
+
}, [agent, pending, report]);
|
|
209
|
+
|
|
210
|
+
const reset = useCallback(() => {
|
|
211
|
+
inFlight.current?.abort();
|
|
212
|
+
setPending(null);
|
|
213
|
+
report(IDLE);
|
|
214
|
+
}, [report]);
|
|
215
|
+
|
|
216
|
+
return { ask, confirm, reset, outcome, busy, pending };
|
|
217
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Shared defaults every component can rely on.
|
|
3
|
+
*
|
|
4
|
+
* Rules are unlayered: they beat a framework reset on specificity, and lose to
|
|
5
|
+
* anything you pass through `className`. With Tailwind v4, import this file
|
|
6
|
+
* after the framework and inside its components layer - see the README.
|
|
7
|
+
*
|
|
8
|
+
* Right now this file is scrollbars. Each component carries its own fallback
|
|
9
|
+
* values, so a component installed on its own still looks right; what lives
|
|
10
|
+
* here is the single place to theme them, and the `gbs-scroll` class for your
|
|
11
|
+
* own scrolling areas.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* Thin scrollbars, themed with the rest of the kit.
|
|
16
|
+
*
|
|
17
|
+
* `scrollbar-width` and `scrollbar-color` are the standard properties -
|
|
18
|
+
* Baseline since December 2024 - rather than the `::-webkit-scrollbar`
|
|
19
|
+
* pseudo-elements. Two reasons: the standard ones are what the other browsers
|
|
20
|
+
* implement, and mixing the two is a known way to get a scrollbar that is thin
|
|
21
|
+
* in one engine and default in another. `scrollbar-width` takes no length,
|
|
22
|
+
* only `auto | thin | none`, so `thin` is the whole control surface.
|
|
23
|
+
*
|
|
24
|
+
* Override any of these on `:root` to restyle every scrollbar at once, or on
|
|
25
|
+
* one element to restyle that one:
|
|
26
|
+
*
|
|
27
|
+
* :root {
|
|
28
|
+
* --gbs-scrollbar-width: auto; bring the chunky ones back
|
|
29
|
+
* --gbs-scrollbar-thumb: var(--gbs-accent); tint them with the brand
|
|
30
|
+
* }
|
|
31
|
+
*/
|
|
32
|
+
:root {
|
|
33
|
+
/* `auto | thin | none`. `thin` is the default across the kit. */
|
|
34
|
+
--gbs-scrollbar-width: thin;
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* Derived from the accent so a themed kit themes its scrollbars too, and
|
|
38
|
+
* muted hard, because a scrollbar is furniture rather than content. The
|
|
39
|
+
* fallbacks are the same neutral the components use when untouched.
|
|
40
|
+
*/
|
|
41
|
+
--gbs-scrollbar-thumb: color-mix(
|
|
42
|
+
in oklab,
|
|
43
|
+
var(--gbs-accent, light-dark(#2563eb, #60a5fa)) 28%,
|
|
44
|
+
light-dark(#a1a1aa, #52525b)
|
|
45
|
+
);
|
|
46
|
+
--gbs-scrollbar-thumb-hover: color-mix(
|
|
47
|
+
in oklab,
|
|
48
|
+
var(--gbs-accent, light-dark(#2563eb, #60a5fa)) 55%,
|
|
49
|
+
light-dark(#71717a, #71717a)
|
|
50
|
+
);
|
|
51
|
+
/* Transparent by default: a track that is a visible stripe reads as heavier
|
|
52
|
+
than the scrollbar it holds. */
|
|
53
|
+
--gbs-scrollbar-track: transparent;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
* Apply to your own scrolling areas to match the components:
|
|
58
|
+
*
|
|
59
|
+
* <div class="gbs-scroll">…</div>
|
|
60
|
+
*
|
|
61
|
+
* `:where()` keeps the specificity at zero, so a single utility class of your
|
|
62
|
+
* own still wins without `!important`.
|
|
63
|
+
*/
|
|
64
|
+
:where(.gbs-scroll) {
|
|
65
|
+
scrollbar-width: var(--gbs-scrollbar-width, thin);
|
|
66
|
+
scrollbar-color: var(--gbs-scrollbar-thumb, light-dark(#c4c4ca, #3f3f46))
|
|
67
|
+
var(--gbs-scrollbar-track, transparent);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/*
|
|
71
|
+
* The hover brightening is a progressive enhancement: `scrollbar-color` does
|
|
72
|
+
* not transition, and a pointer-coarse device has no hover to speak of.
|
|
73
|
+
*/
|
|
74
|
+
@media (hover: hover) {
|
|
75
|
+
:where(.gbs-scroll):hover {
|
|
76
|
+
scrollbar-color: var(--gbs-scrollbar-thumb-hover, light-dark(#a1a1aa, #52525b))
|
|
77
|
+
var(--gbs-scrollbar-track, transparent);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "shared",
|
|
3
|
-
"version": "1.
|
|
4
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "shared",
|
|
3
|
+
"version": "1.3.0"
|
|
4
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bumped whenever anything in `shared/` changes. The installer copies
|
|
3
|
-
* `version.json` next to it and compares the two, so a project is never left
|
|
4
|
-
* with components built against a newer `shared/` than the one on disk.
|
|
5
|
-
*/
|
|
6
|
-
export const version = "1.
|
|
1
|
+
/**
|
|
2
|
+
* Bumped whenever anything in `shared/` changes. The installer copies
|
|
3
|
+
* `version.json` next to it and compares the two, so a project is never left
|
|
4
|
+
* with components built against a newer `shared/` than the one on disk.
|
|
5
|
+
*/
|
|
6
|
+
export const version = "1.3.0";
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
{
|
|
2
|
+
"passportVersion": "1.0.0",
|
|
3
|
+
"identity": {
|
|
4
|
+
"component": "Skeleton",
|
|
5
|
+
"folder": "skeleton",
|
|
6
|
+
"exports": [
|
|
7
|
+
"Empty",
|
|
8
|
+
"Skeleton"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"source": {
|
|
12
|
+
"libraryVersion": "2.3.0",
|
|
13
|
+
"files": [
|
|
14
|
+
"core/index.ts",
|
|
15
|
+
"core/lines.ts",
|
|
16
|
+
"core/types.ts",
|
|
17
|
+
"index.ts",
|
|
18
|
+
"react/Empty.tsx",
|
|
19
|
+
"react/Skeleton.tsx",
|
|
20
|
+
"react/props.ts"
|
|
21
|
+
],
|
|
22
|
+
"sourceHash": "sha256:f94d1d6763336652599c4423a1ddfc11d8b67e31670e0b019003eed8c71eec2b"
|
|
23
|
+
},
|
|
24
|
+
"props": [
|
|
25
|
+
{
|
|
26
|
+
"name": "actions",
|
|
27
|
+
"type": "other",
|
|
28
|
+
"typeText": "ReactNode",
|
|
29
|
+
"required": false,
|
|
30
|
+
"origin": "derived",
|
|
31
|
+
"description": "The way out — usually one button, occasionally two.",
|
|
32
|
+
"descriptionOrigin": "jsdoc"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "animation",
|
|
36
|
+
"type": "enum",
|
|
37
|
+
"values": [
|
|
38
|
+
"none",
|
|
39
|
+
"pulse",
|
|
40
|
+
"wave"
|
|
41
|
+
],
|
|
42
|
+
"typeText": "SkeletonAnimation | undefined",
|
|
43
|
+
"required": false,
|
|
44
|
+
"default": "pulse",
|
|
45
|
+
"origin": "derived",
|
|
46
|
+
"description": "Default `pulse`. Reduced-motion settings turn any of them off.",
|
|
47
|
+
"descriptionOrigin": "jsdoc"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "className",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"typeText": "string | undefined",
|
|
53
|
+
"required": false,
|
|
54
|
+
"origin": "derived"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "classNames",
|
|
58
|
+
"type": "other",
|
|
59
|
+
"typeText": "Partial<Record<SkeletonSlot, string>> | undefined",
|
|
60
|
+
"required": false,
|
|
61
|
+
"origin": "derived"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "description",
|
|
65
|
+
"type": "other",
|
|
66
|
+
"typeText": "ReactNode",
|
|
67
|
+
"required": false,
|
|
68
|
+
"origin": "derived",
|
|
69
|
+
"description": "Why it is empty, and what to do about it.",
|
|
70
|
+
"descriptionOrigin": "jsdoc"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "height",
|
|
74
|
+
"type": "other",
|
|
75
|
+
"typeText": "string | number | undefined",
|
|
76
|
+
"required": false,
|
|
77
|
+
"origin": "derived"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "icon",
|
|
81
|
+
"type": "other",
|
|
82
|
+
"typeText": "ReactNode",
|
|
83
|
+
"required": false,
|
|
84
|
+
"origin": "derived",
|
|
85
|
+
"description": "Decorative: an illustration or icon above the title.",
|
|
86
|
+
"descriptionOrigin": "jsdoc"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "label",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"typeText": "string | undefined",
|
|
92
|
+
"required": false,
|
|
93
|
+
"origin": "derived",
|
|
94
|
+
"description": "Announced while the placeholder is up. Leave it out inside a region that\nalready says it is busy — two announcements are worse than one.",
|
|
95
|
+
"descriptionOrigin": "jsdoc"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "lastLineWidth",
|
|
99
|
+
"type": "number",
|
|
100
|
+
"typeText": "number | undefined",
|
|
101
|
+
"required": false,
|
|
102
|
+
"default": 60,
|
|
103
|
+
"origin": "derived",
|
|
104
|
+
"description": "Width of the last line as a percentage, for `text`. Default 60.",
|
|
105
|
+
"descriptionOrigin": "jsdoc"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "lines",
|
|
109
|
+
"type": "number",
|
|
110
|
+
"typeText": "number | undefined",
|
|
111
|
+
"required": false,
|
|
112
|
+
"default": 1,
|
|
113
|
+
"origin": "derived",
|
|
114
|
+
"description": "Number of bars, for `text`. Default 1.",
|
|
115
|
+
"descriptionOrigin": "jsdoc"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "radius",
|
|
119
|
+
"type": "other",
|
|
120
|
+
"typeText": "string | number | undefined",
|
|
121
|
+
"required": false,
|
|
122
|
+
"origin": "derived",
|
|
123
|
+
"description": "Corner radius for `rect`.",
|
|
124
|
+
"descriptionOrigin": "jsdoc"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "ref",
|
|
128
|
+
"type": "other",
|
|
129
|
+
"typeText": "Ref<HTMLDivElement> | undefined",
|
|
130
|
+
"required": false,
|
|
131
|
+
"origin": "derived"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "size",
|
|
135
|
+
"type": "enum",
|
|
136
|
+
"values": [
|
|
137
|
+
"lg",
|
|
138
|
+
"md",
|
|
139
|
+
"sm"
|
|
140
|
+
],
|
|
141
|
+
"typeText": "'sm' | 'md' | 'lg' | undefined",
|
|
142
|
+
"required": false,
|
|
143
|
+
"default": "md",
|
|
144
|
+
"origin": "derived",
|
|
145
|
+
"description": "Default `md`. `sm` suits an empty panel inside a page.",
|
|
146
|
+
"descriptionOrigin": "jsdoc"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "style",
|
|
150
|
+
"type": "other",
|
|
151
|
+
"typeText": "CSSProperties | undefined",
|
|
152
|
+
"required": false,
|
|
153
|
+
"origin": "derived"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "title",
|
|
157
|
+
"type": "other",
|
|
158
|
+
"typeText": "ReactNode",
|
|
159
|
+
"required": true,
|
|
160
|
+
"origin": "derived",
|
|
161
|
+
"description": "What is missing, in a few words.",
|
|
162
|
+
"descriptionOrigin": "jsdoc"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "variant",
|
|
166
|
+
"type": "enum",
|
|
167
|
+
"values": [
|
|
168
|
+
"circle",
|
|
169
|
+
"rect",
|
|
170
|
+
"text"
|
|
171
|
+
],
|
|
172
|
+
"typeText": "SkeletonVariant | undefined",
|
|
173
|
+
"required": false,
|
|
174
|
+
"default": "text",
|
|
175
|
+
"origin": "derived",
|
|
176
|
+
"description": "Default `text`.",
|
|
177
|
+
"descriptionOrigin": "jsdoc"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "width",
|
|
181
|
+
"type": "other",
|
|
182
|
+
"typeText": "string | number | undefined",
|
|
183
|
+
"required": false,
|
|
184
|
+
"origin": "derived",
|
|
185
|
+
"description": "A number is pixels; a string is used as given.",
|
|
186
|
+
"descriptionOrigin": "jsdoc"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"events": [],
|
|
190
|
+
"slots": [
|
|
191
|
+
"root",
|
|
192
|
+
"line",
|
|
193
|
+
"icon",
|
|
194
|
+
"title",
|
|
195
|
+
"description",
|
|
196
|
+
"actions"
|
|
197
|
+
],
|
|
198
|
+
"states": [
|
|
199
|
+
{
|
|
200
|
+
"attr": "data-animation",
|
|
201
|
+
"values": [
|
|
202
|
+
"animation",
|
|
203
|
+
"pulse",
|
|
204
|
+
"wave"
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"attr": "data-lines"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"attr": "data-size",
|
|
212
|
+
"values": [
|
|
213
|
+
"lg",
|
|
214
|
+
"sm"
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"attr": "data-theme",
|
|
219
|
+
"values": [
|
|
220
|
+
"dark",
|
|
221
|
+
"light"
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"attr": "data-variant",
|
|
226
|
+
"values": [
|
|
227
|
+
"circle",
|
|
228
|
+
"rect",
|
|
229
|
+
"text",
|
|
230
|
+
"variant"
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"accessibility": {
|
|
235
|
+
"supplied": [],
|
|
236
|
+
"required": []
|
|
237
|
+
},
|
|
238
|
+
"composition": {},
|
|
239
|
+
"operations": {},
|
|
240
|
+
"intentDomains": [],
|
|
241
|
+
"safeMutations": {},
|
|
242
|
+
"examples": [],
|
|
243
|
+
"coverage": {
|
|
244
|
+
"propsTotal": 17,
|
|
245
|
+
"propsDescribed": 12,
|
|
246
|
+
"describedPct": 71,
|
|
247
|
+
"authoredSections": [
|
|
248
|
+
"accessibility"
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
}
|