@getflip/swirl-ai 0.448.0 → 0.448.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/README.md +63 -34
- package/dist/agent/components/swirl-carousel-slide.md +2 -2
- package/dist/agent/components/swirl-empty-state.md +1 -0
- package/dist/agent/components/swirl-form-group.md +1 -0
- package/dist/agent/components/swirl-icon.md +1 -1
- package/dist/agent/components/swirl-lightbox.md +1 -0
- package/dist/agent/components/swirl-resource-list-item.md +1 -0
- package/dist/agent/components-index.json +474 -7307
- package/dist/agent/get-started.md +116 -0
- package/dist/custom-elements.manifest.json +3 -3
- package/dist/mcp/mcp.js +206 -0
- package/dist/types/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.d.ts +2 -0
- package/dist/types/components/swirl-icon/swirl-icon.d.ts +1 -1
- package/package.json +33 -6
package/README.md
CHANGED
|
@@ -1,52 +1,81 @@
|
|
|
1
1
|
# @getflip/swirl-ai
|
|
2
2
|
|
|
3
|
-
Swirl Design System
|
|
4
|
-
|
|
3
|
+
AI integration for the Swirl Design System. Use it as an **MCP server** so
|
|
4
|
+
agents can discover and use Swirl components interactively, or consume the
|
|
5
|
+
**build-time artifacts** directly.
|
|
5
6
|
|
|
6
|
-
##
|
|
7
|
+
## MCP server
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
| ---------------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
10
|
-
| **Custom elements manifest** | `dist/custom-elements.manifest.json` | Full CEM schema (tags, props, events, slots, descriptions). Use when you need complete API detail. |
|
|
11
|
-
| **Agent components index** | `dist/agent/components-index.json` | Compact, agent-oriented list: tag, summary, required/optional props, events, slots, methods, a11y hints, related components. Prefer this for “which component?” and quick lookup. |
|
|
12
|
-
| **Per-component docs** | `dist/agent/components/<tag>.md` | One markdown file per component: purpose, required/optional props, slots, events, methods, composition, accessibility, minimal example, common mistakes. Use for retrieval and code generation. |
|
|
13
|
-
| **TypeScript types** | `dist/types/` | Declarations for all components (props, events, methods). Use for type-checking and IDE support. |
|
|
9
|
+
The package ships a Model Context Protocol server with 6 tools:
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
| Tool | Description |
|
|
12
|
+
| ------------------------- | ------------------------------------------------------------- |
|
|
13
|
+
| `get_started` | Installation and setup guide (Web Components, Angular, React) |
|
|
14
|
+
| `list_components` | List all UI components (buttons, modals, forms, etc.) |
|
|
15
|
+
| `list_icons` | List all icon components (`swirl-icon-*`) |
|
|
16
|
+
| `list_symbols` | List all symbol components (`swirl-symbol-*`) |
|
|
17
|
+
| `list_emojis` | List all emoji components (`swirl-emoji-*`) |
|
|
18
|
+
| `get_component_details` | Full docs for a component (props, events, slots, examples) |
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
by summary and related components.
|
|
19
|
-
2. **Detail** – For each chosen tag, load `dist/agent/components/<tag>.md` for
|
|
20
|
-
usage, composition, and examples.
|
|
21
|
-
3. **Precision** – If needed, use `dist/custom-elements.manifest.json` or
|
|
22
|
-
`dist/types/` for exact types and full API.
|
|
20
|
+
### Usage
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
```jsonc
|
|
23
|
+
{
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"swirl-ai": {
|
|
26
|
+
"command": "npx",
|
|
27
|
+
"args": ["-y", "@getflip/swirl-ai"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
25
32
|
|
|
26
|
-
|
|
33
|
+
For local development, point to the built file directly:
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
```jsonc
|
|
36
|
+
{
|
|
37
|
+
"mcpServers": {
|
|
38
|
+
"swirl-ai": {
|
|
39
|
+
"command": "node",
|
|
40
|
+
"args": ["<path-to-repo>/packages/swirl-ai/dist/mcp/mcp.js"]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Local testing
|
|
47
|
+
|
|
48
|
+
Use the MCP inspector to call tools interactively in a web UI:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npx @modelcontextprotocol/inspector node dist/mcp/mcp.js
|
|
52
|
+
```
|
|
30
53
|
|
|
31
|
-
|
|
32
|
-
`node_modules/@getflip/swirl-ai/dist/agent/components/swirl-accordion.md`).
|
|
33
|
-
Resolve via your bundler or file system relative to the package root.
|
|
54
|
+
Or during development (no rebuild needed after changes):
|
|
34
55
|
|
|
35
|
-
|
|
56
|
+
```sh
|
|
57
|
+
npx @modelcontextprotocol/inspector tsx scripts/mcp.ts
|
|
58
|
+
```
|
|
36
59
|
|
|
37
|
-
|
|
38
|
-
entry includes:
|
|
60
|
+
## Artifacts
|
|
39
61
|
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
62
|
+
Build-time artifacts for agents that prefer direct file access:
|
|
63
|
+
|
|
64
|
+
| Artifact | Path | Purpose |
|
|
65
|
+
| ---------------------------- | ------------------------------------ | ---------------------------------------------------------------- |
|
|
66
|
+
| **Agent components index** | `dist/agent/components-index.json` | Lean catalog: tag, summary, and related components per entry. |
|
|
67
|
+
| **Per-component docs** | `dist/agent/components/<tag>.md` | Full markdown docs: props, events, slots, examples, a11y info. |
|
|
68
|
+
| **Custom elements manifest** | `dist/custom-elements.manifest.json` | Full CEM schema (tags, props, events, slots, descriptions). |
|
|
69
|
+
| **TypeScript types** | `dist/types/` | Type declarations for all components. |
|
|
70
|
+
|
|
71
|
+
### Package exports
|
|
72
|
+
|
|
73
|
+
- `@getflip/swirl-ai/agent-index` → `dist/agent/components-index.json`
|
|
74
|
+
- `@getflip/swirl-ai/manifest` → `dist/custom-elements.manifest.json`
|
|
44
75
|
|
|
45
|
-
|
|
46
|
-
optional fields may be added.
|
|
76
|
+
Per-component docs are at `dist/agent/components/<tag>.md`.
|
|
47
77
|
|
|
48
78
|
## Versioning
|
|
49
79
|
|
|
50
80
|
Artifacts are generated from `@getflip/swirl-components` at build time. Keep
|
|
51
|
-
`@getflip/swirl-ai` and `@getflip/swirl-components` versions in sync
|
|
52
|
-
index and docs match the installed components.
|
|
81
|
+
`@getflip/swirl-ai` and `@getflip/swirl-components` versions in sync.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
The SwirlCarouselSlide component is used to display a single slide inside the [SwirlCarousel component](?path=/docs/components-
|
|
5
|
+
The SwirlCarouselSlide component is used to display a single slide inside the [SwirlCarousel component](?path=/docs/components-swirlcarousel--docs).
|
|
6
6
|
|
|
7
7
|
## Required props
|
|
8
8
|
|
|
@@ -61,7 +61,7 @@ No component-specific keyboard behavior.
|
|
|
61
61
|
```html
|
|
62
62
|
<swirl-carousel-slide label="Label">
|
|
63
63
|
<img alt="Description" src="/sample-3.jpg" />
|
|
64
|
-
</swirl-carousel-slide>
|
|
64
|
+
</swirl-carousel-slide>
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
## Common mistakes
|
|
@@ -12,7 +12,7 @@ Icons are visual symbols used to represent ideas, objects or actions.
|
|
|
12
12
|
|
|
13
13
|
- `color` ("critical" | "default" | "disabled" | "highlight" | "info" | "on-action-primary" | "on-image" | "on-status" | "on-surface-highlight" | "on-surface-highlight-subdued" | "strong" | "success" | "warning" | undefined) –
|
|
14
14
|
- `size` (16 | 20 | 24 | 28 | undefined) –
|
|
15
|
-
- `wrapperColor` ("banana" | "blueberry" | "chilli" | "grape" | "kiwi" | "neutral" | "pumpkin" | "radish" | undefined) –
|
|
15
|
+
- `wrapperColor` ("banana" | "blueberry" | "chilli" | "default" | "grape" | "kiwi" | "neutral" | "pumpkin" | "radish" | undefined) –
|
|
16
16
|
- `wrapperSize` ("2xl" | "l" | "m" | "s" | "xl" | "xs" | undefined) –
|
|
17
17
|
|
|
18
18
|
## Slots
|