@supersoniks/concorde 5.0.4 → 5.1.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/.agents/skills/concorde-component-docs/SKILL.md +194 -0
- package/.agents/skills/concorde-component-docs/template.md +45 -0
- package/.tmp-cem/custom-elements.json +13705 -0
- package/ai/cursor/rules/concorde-theme.mdc +1 -1
- package/ai/cursor/rules/concorde.mdc +1 -1
- package/ai/skills/concorde/SKILL.md +1 -1
- package/ai/skills/concorde-theme/SKILL.md +21 -10
- package/build-infos.json +1 -1
- package/concorde-3d.bundle.js +3960 -0
- package/concorde-3d.es.js +33433 -0
- package/concorde-core.bundle.js +507 -513
- package/concorde-core.es.js +4027 -3702
- package/concorde-hugging-face-infer.bundle.js +32 -0
- package/concorde-hugging-face-infer.es.js +2952 -0
- package/concorde-interactive.bundle.js +1157 -0
- package/concorde-interactive.es.js +10734 -0
- package/concorde-shader.bundle.js +116 -0
- package/concorde-shader.es.js +8353 -0
- package/concorde-webgpu.bundle.js +307 -0
- package/concorde-webgpu.es.js +8627 -0
- package/custom-elements-manifest.config.mjs +14 -0
- package/dist/concorde-core.bundle.js +507 -513
- package/dist/concorde-core.es.js +4027 -3702
- package/dist/docs-mock-api-sw.js +2 -0
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/gitlab/job_tests.sh +0 -0
- package/index.html +4 -2
- package/package.json +42 -2
- package/public/docs-mock-api-sw.js +2 -0
- package/public/docs-mock-api-sw.js.map +2 -2
- package/scripts/generate-sdui-catalog.mjs +250 -0
- package/scripts/generate-sdui-catalog.spec.ts +91 -0
- package/scripts/pre-build.mjs +15 -0
- package/src/core/components/functional/if/if.ts +0 -0
- package/src/core/components/functional/sdui/SDUIDescriptorTransformer.ts +5 -5
- package/src/core/components/functional/sdui/__fixtures__/descriptors.ts +251 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-action.spec.ts.snap +73 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-incremental.spec.ts.snap +50 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui-partial.spec.ts.snap +50 -0
- package/src/core/components/functional/sdui/__snapshots__/sdui.regression.spec.ts.snap +461 -0
- package/src/core/components/functional/sdui/component-catalog.gaps.json +511 -0
- package/src/core/components/functional/sdui/component-catalog.json +3103 -0
- package/src/core/components/functional/sdui/component-catalog.spec.ts +23 -0
- package/src/core/components/functional/sdui/sdui-action.spec.ts +99 -0
- package/src/core/components/functional/sdui/sdui-dom-snapshot.ts +61 -0
- package/src/core/components/functional/sdui/sdui-extension-points.md +94 -0
- package/src/core/components/functional/sdui/sdui-incremental.spec.ts +137 -0
- package/src/core/components/functional/sdui/sdui-partial.spec.ts +83 -0
- package/src/core/components/functional/sdui/sdui-partial.ts +19 -0
- package/src/core/components/functional/sdui/sdui-safe.spec.ts +188 -0
- package/src/core/components/functional/sdui/sdui-safe.ts +100 -0
- package/src/core/components/functional/sdui/sdui.md +122 -0
- package/src/core/components/functional/sdui/sdui.regression.spec.ts +64 -0
- package/src/core/components/functional/sdui/sdui.ts +442 -34
- package/src/core/components/functional/sdui/types.ts +49 -0
- package/src/core/components/functional/value/value.ts +0 -0
- package/src/core/components/ui/_css/align.ts +1 -0
- package/src/core/components/ui/_css/type.ts +86 -8
- package/src/core/components/ui/_i18n/ui-aria-labels.ts +8 -0
- package/src/core/components/ui/alert/alert.md +21 -2
- package/src/core/components/ui/alert-messages/alert-messages.md +85 -0
- package/src/core/components/ui/badge/badge.md +19 -6
- package/src/core/components/ui/badge/badge.ts +8 -9
- package/src/core/components/ui/button/button.ts +5 -15
- package/src/core/components/ui/captcha/captcha.md +65 -6
- package/src/core/components/ui/card/card.md +73 -10
- package/src/core/components/ui/card/card.ts +24 -22
- package/src/core/components/ui/divider/divider.md +107 -13
- package/src/core/components/ui/divider/divider.ts +40 -33
- package/src/core/components/ui/form/fieldset/fieldset.md +175 -99
- package/src/core/components/ui/form/fieldset/fieldset.ts +15 -28
- package/src/core/components/ui/form/fieldset/legend.ts +13 -13
- package/src/core/components/ui/form/form-actions/form-actions.md +75 -52
- package/src/core/components/ui/form/form-actions/form-actions.ts +7 -5
- package/src/core/components/ui/form/form-layout/form-layout.md +109 -34
- package/src/core/components/ui/form/form-layout/form-layout.ts +27 -24
- package/src/core/components/ui/form/textarea/textarea.ts +4 -3
- package/src/core/components/ui/group/group.md +36 -36
- package/src/core/components/ui/group/group.ts +5 -10
- package/src/core/components/ui/icon/icon.md +132 -43
- package/src/core/components/ui/image/image.md +35 -3
- package/src/core/components/ui/link/link.md +43 -5
- package/src/core/components/ui/loader/loader.md +79 -22
- package/src/core/components/ui/loader/loader.ts +67 -27
- package/src/core/components/ui/loader/styles/fixed.ts +6 -11
- package/src/core/components/ui/menu/menu.md +133 -92
- package/src/core/components/ui/menu/menu.ts +53 -58
- package/src/core/components/ui/modal/modal.md +163 -47
- package/src/core/components/ui/modal/modal.ts +2 -4
- package/src/core/components/ui/pop/pop.md +217 -123
- package/src/core/components/ui/pop/pop.ts +0 -1
- package/src/core/components/ui/progress/progress.md +76 -30
- package/src/core/components/ui/progress/progress.ts +25 -56
- package/src/core/components/ui/table/table-caption.ts +2 -2
- package/src/core/components/ui/table/table-tbody.ts +3 -3
- package/src/core/components/ui/table/table-td.ts +23 -18
- package/src/core/components/ui/table/table-th.ts +8 -8
- package/src/core/components/ui/table/table-tr.ts +4 -4
- package/src/core/components/ui/table/table.md +147 -171
- package/src/core/components/ui/table/table.ts +20 -19
- package/src/core/components/ui/theme/theme-collection/auto.ts +15 -0
- package/src/core/components/ui/theme/theme-collection/core-variables.ts +8 -31
- package/src/core/components/ui/theme/theme-collection/dark.ts +1 -7
- package/src/core/components/ui/theme/theme-collection/light.ts +30 -26
- package/src/core/components/ui/theme/theme.md +122 -0
- package/src/core/components/ui/theme/theme.ts +30 -7
- package/src/core/components/ui/toast/toast-item.ts +6 -9
- package/src/core/components/ui/toast/toast.md +108 -58
- package/src/core/components/ui/toast/types.ts +1 -1
- package/src/core/components/ui/tooltip/tooltip.md +68 -26
- package/src/docs/_getting-started/start.md +1 -1
- package/src/docs/_getting-started/theming.md +223 -61
- package/src/docs/code.ts +125 -58
- package/src/docs/header/header.ts +62 -54
- package/src/docs/mock-api/router.ts +2 -0
- package/src/docs/navigation/navigation.ts +6 -3
- package/src/docs/search/docs-search.json +2504 -399
- package/src/docs/search/markdown-renderer.ts +6 -6
- package/src/docs/search/search.ts +4 -4
- package/src/docs/tailwind/css/tailwind.css +6 -5
- package/src/tsconfig.json +108 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/tailwind.config.js +19 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: concorde-component-docs
|
|
3
|
+
description: >-
|
|
4
|
+
Writes and edits Concorde UI component documentation pages (*.md) in English
|
|
5
|
+
with consistent structure, tone, sonic-code examples, and API tables. Use when
|
|
6
|
+
creating or updating component docs under src/core/components/ui/, when
|
|
7
|
+
uniformizing documentation, or when the user references alert.md-style docs.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Concorde component documentation
|
|
11
|
+
|
|
12
|
+
Apply this skill when **creating** or **editing** a component doc page (typically `src/core/components/ui/<component>/<component>.md`).
|
|
13
|
+
|
|
14
|
+
Canonical examples: `alert.md`, `badge.md`, `link.md`, `image.md`.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
### Creating a new page
|
|
19
|
+
|
|
20
|
+
1. Read the component implementation (`.ts` / props, slots, reflected attributes, defaults).
|
|
21
|
+
2. Draft the **intro** (what it does, when to use it, 1–2 critical APIs).
|
|
22
|
+
3. Add **feature sections** in order of reader need (basic → variants → composition → edge cases → a11y).
|
|
23
|
+
4. Add one **`<sonic-code>`** example per section; group enum variants in a single demo when practical.
|
|
24
|
+
5. End with **`## API reference`** (attributes table, slots table if any).
|
|
25
|
+
6. Run the [quality checklist](#quality-checklist).
|
|
26
|
+
|
|
27
|
+
### Editing an existing page
|
|
28
|
+
|
|
29
|
+
1. Preserve working examples; only change prose/structure to match this guide.
|
|
30
|
+
2. Do not duplicate `## API reference` blocks—merge into one.
|
|
31
|
+
3. Align intro tone and section titles with sibling docs; add missing API rows from source.
|
|
32
|
+
4. Keep demo markup valid; avoid unrelated refactors in examples.
|
|
33
|
+
|
|
34
|
+
## Page structure
|
|
35
|
+
|
|
36
|
+
```markdown
|
|
37
|
+
# ComponentName
|
|
38
|
+
|
|
39
|
+
[Intro paragraph: 1–3 sentences. Purpose, primary use case, key props/slots.]
|
|
40
|
+
|
|
41
|
+
## Basic example
|
|
42
|
+
[or first topical section, e.g. ## Type, ## Href, ## Rounded]
|
|
43
|
+
|
|
44
|
+
[Optional short prose before the example.]
|
|
45
|
+
|
|
46
|
+
<sonic-code>
|
|
47
|
+
<template>
|
|
48
|
+
...
|
|
49
|
+
</template>
|
|
50
|
+
</sonic-code>
|
|
51
|
+
|
|
52
|
+
## [Feature or variant name]
|
|
53
|
+
|
|
54
|
+
...
|
|
55
|
+
|
|
56
|
+
## API reference
|
|
57
|
+
|
|
58
|
+
| Attribute | Values | Description |
|
|
59
|
+
|----------|---------|-------------|
|
|
60
|
+
| ... | ... | ... |
|
|
61
|
+
|
|
62
|
+
| Slot | Description |
|
|
63
|
+
|------|-------------|
|
|
64
|
+
| ... | ... |
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Title (`#`)
|
|
68
|
+
|
|
69
|
+
- Singular component name, Title Case: `# Alert`, `# Badge`, `# Link`, `# Image`.
|
|
70
|
+
- Match the public tag name conceptually (`sonic-alert` → Alert).
|
|
71
|
+
|
|
72
|
+
### Intro (required for new-style docs)
|
|
73
|
+
|
|
74
|
+
One tight paragraph immediately after the title:
|
|
75
|
+
|
|
76
|
+
- State **what** the component does and **when** to choose it.
|
|
77
|
+
- Call out **defaults** and **constraints** only if they prevent misuse.
|
|
78
|
+
- Formatting:
|
|
79
|
+
- **Bold** for emphasis on behavior (not for every noun).
|
|
80
|
+
- API names and tags in backticks; when listing several, **do not put commas between inline-code spans** (rendered as adjacent `<code>`). Join with **`/`**, **`and`**, or separate clauses—e.g. `` `label` `` / `` `text` ``, not `` `label` ``, `` `text` ``.
|
|
81
|
+
- Cross-link related components in prose: “aligned with **`sonic-button`**”, “pair with **`ratio="1/1"`**”.
|
|
82
|
+
|
|
83
|
+
Avoid marketing fluff, long tutorials, and repeating the API table in the intro.
|
|
84
|
+
|
|
85
|
+
### Section headings (`##` / `###`)
|
|
86
|
+
|
|
87
|
+
- **Sentence case** or short Title Case; be consistent within one file.
|
|
88
|
+
- Name sections after **one concern**: `Status`, `Size`, `Dismissible`, `Accessibility (\`announce\`)`, `Prefix and suffix slots`.
|
|
89
|
+
- Use `###` for sub-variants of the same feature (e.g. `### AutoActive Strict vs partial`).
|
|
90
|
+
- Put **`## API reference`** last—never in the middle.
|
|
91
|
+
|
|
92
|
+
Suggested order (omit what does not apply):
|
|
93
|
+
|
|
94
|
+
1. Basic example / primary API
|
|
95
|
+
2. Visual variants (`type` / `status` / `variant` / `size` / …)
|
|
96
|
+
3. Content model (slots, `label` / `text`, rich content)
|
|
97
|
+
4. Composition patterns (inside buttons, with links, …)
|
|
98
|
+
5. Behavioral flags (`dismissible` / `announce` / `cover` / …)
|
|
99
|
+
6. Accessibility (dedicated section when non-obvious)
|
|
100
|
+
7. API reference
|
|
101
|
+
|
|
102
|
+
### Prose before examples
|
|
103
|
+
|
|
104
|
+
- **Default first**: “With no `status`, behavior is `default`.” “Default **`loading`** is `lazy`.”
|
|
105
|
+
- **Enums inline** when short: `` `outline` `` — border and text in the `type` color.
|
|
106
|
+
- **Requirements**: stable `` `id` `` required for `dismissForever`; parent must constrain width for `ellipsis`.
|
|
107
|
+
- **Implementation notes** only when they change usage: `localStorage`; `role="alert"`; remount to replay transitions.
|
|
108
|
+
- Length: 0–4 sentences per section; longer only for accessibility or non-obvious behavior.
|
|
109
|
+
|
|
110
|
+
## Live examples (`<sonic-code>`)
|
|
111
|
+
|
|
112
|
+
Wrap all demos:
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<sonic-code>
|
|
116
|
+
<template>
|
|
117
|
+
<!-- demo markup -->
|
|
118
|
+
</template>
|
|
119
|
+
</sonic-code>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Conventions:
|
|
123
|
+
|
|
124
|
+
- Use Tailwind layout utilities already used in the design system docs: `grid gap-4` / `flex flex-wrap gap-2` / `items-center`.
|
|
125
|
+
- Show **all enum values** in one row/grid when demonstrating `type`, `status`, or `size`.
|
|
126
|
+
- Label variants in the UI (badge text, caption `<p class="mt-2">`) when comparison matters.
|
|
127
|
+
- Prefer realistic copy over “Lorem ipsum” unless demonstrating truncation or length.
|
|
128
|
+
- Interactive demos (buttons that mutate DOM) are allowed when they teach behavior—add one sentence explaining what to click.
|
|
129
|
+
- Do not wrap API tables or long prose inside `<sonic-code>`.
|
|
130
|
+
|
|
131
|
+
## API reference
|
|
132
|
+
|
|
133
|
+
### Attributes table
|
|
134
|
+
|
|
135
|
+
```markdown
|
|
136
|
+
| Attribute | Values | Description |
|
|
137
|
+
|----------|---------|-------------|
|
|
138
|
+
| `name` | `a` · `b` (default `a`) | One line: behavior + default + interaction with other props |
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
- Column headers exactly: **Attribute**, **Values**, **Description**.
|
|
142
|
+
- **Values**: list allowed literals separated by **middle dot (` · `)** or **`…`** for ranges (`2xs` … `2xl`)—**never commas between backtick spans**. Put **(default `…`)** in this column or in Description—be consistent within the file.
|
|
143
|
+
- **Description**: imperative, factual; mention side effects (`removes from DOM`, `ignored when \`cover\` is set`).
|
|
144
|
+
- Document boolean attributes as boolean in the table; no need to say “true/false” unless ambiguous.
|
|
145
|
+
|
|
146
|
+
### Slots table
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
| Slot | Description |
|
|
150
|
+
|------|-------------|
|
|
151
|
+
| *(default)* | Main label / message body |
|
|
152
|
+
| `icon` | Replaces the default `sonic-icon` |
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
- If the component has **no slots**, state it in prose under the attributes table (see `image.md`).
|
|
156
|
+
- Use *(default)* for the unnamed slot.
|
|
157
|
+
|
|
158
|
+
### Single API block
|
|
159
|
+
|
|
160
|
+
One `## API reference` section per file. If the source doc has duplicates, consolidate without losing rows.
|
|
161
|
+
|
|
162
|
+
## Voice and language
|
|
163
|
+
|
|
164
|
+
- **English only** for user-facing doc text.
|
|
165
|
+
- Present tense, second person avoided; address the integrator (“Set **`announce`** when…”).
|
|
166
|
+
- Prefer precise verbs: surface, navigate, truncate, persist, intercept.
|
|
167
|
+
- Do not document internal CSS class names unless the doc already uses them for styling hooks (`[&[active]]:text-success` in examples is OK).
|
|
168
|
+
|
|
169
|
+
## Quality checklist
|
|
170
|
+
|
|
171
|
+
Before finishing, verify:
|
|
172
|
+
|
|
173
|
+
- [ ] `#` title + intro paragraph present (for new or modernized pages).
|
|
174
|
+
- [ ] Every `##` section (except API) has a `<sonic-code>` example unless it is pure sub-prose under a parent demo.
|
|
175
|
+
- [ ] Defaults and required attributes are stated in prose or API table.
|
|
176
|
+
- [ ] Accessibility called out where behavior affects AT (roles, `alt`, decorative icons).
|
|
177
|
+
- [ ] Exactly one `## API reference`; attributes and slots match the component source.
|
|
178
|
+
- [ ] No duplicate sections; heading levels skip only when using `###` under `##`.
|
|
179
|
+
- [ ] Attribute/slot names match the implementation (camelCase in docs).
|
|
180
|
+
- [ ] No comma-separated lists of inline-code terms in prose or API **Values** cells.
|
|
181
|
+
|
|
182
|
+
## Anti-patterns
|
|
183
|
+
|
|
184
|
+
- Long narrative guides, installation steps, or changelog in component `.md` files.
|
|
185
|
+
- Examples without `<sonic-code>` wrappers.
|
|
186
|
+
- API tables at the top of the page.
|
|
187
|
+
- Mixing French and English in the same page.
|
|
188
|
+
- Vague intros (“This component is very useful”) without API hints.
|
|
189
|
+
- Separate micro-sections per enum value when one grid demo suffices.
|
|
190
|
+
- Comma chains of inline code: `` `a` ``, `` `b` ``, and `` `c` `` (use `/`, ` · `, or `and` instead).
|
|
191
|
+
|
|
192
|
+
## Reference template
|
|
193
|
+
|
|
194
|
+
See [template.md](template.md) for a copy-paste skeleton.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# ComponentName
|
|
2
|
+
|
|
3
|
+
One paragraph: what **`sonic-component`** does, when to use it instead of alternatives, and the most important `` `attributes` `` / slots. Mention defaults only if they prevent mistakes.
|
|
4
|
+
|
|
5
|
+
## Basic example
|
|
6
|
+
|
|
7
|
+
<sonic-code>
|
|
8
|
+
<template>
|
|
9
|
+
<sonic-component>Minimal usage</sonic-component>
|
|
10
|
+
</template>
|
|
11
|
+
</sonic-code>
|
|
12
|
+
|
|
13
|
+
## Variant or feature name
|
|
14
|
+
|
|
15
|
+
Short explanation of default and allowed values.
|
|
16
|
+
|
|
17
|
+
<sonic-code>
|
|
18
|
+
<template>
|
|
19
|
+
<div class="flex flex-wrap gap-2">
|
|
20
|
+
<sonic-component>Default</sonic-component>
|
|
21
|
+
<sonic-component type="primary">Primary</sonic-component>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
</sonic-code>
|
|
25
|
+
|
|
26
|
+
## Accessibility
|
|
27
|
+
|
|
28
|
+
When screen readers or keyboard users need special handling.
|
|
29
|
+
|
|
30
|
+
<sonic-code>
|
|
31
|
+
<template>
|
|
32
|
+
<sonic-component aria-label="…">…</sonic-component>
|
|
33
|
+
</template>
|
|
34
|
+
</sonic-code>
|
|
35
|
+
|
|
36
|
+
## API reference
|
|
37
|
+
|
|
38
|
+
| Attribute | Values | Description |
|
|
39
|
+
|----------|---------|-------------|
|
|
40
|
+
| `example` | `a` · `b` (default `a`) | Behavior in one line |
|
|
41
|
+
|
|
42
|
+
| Slot | Description |
|
|
43
|
+
|------|-------------|
|
|
44
|
+
| *(default)* | Primary content |
|
|
45
|
+
| `named` | Optional slot purpose |
|