@unframed/cli 1.0.0-rc.1 → 1.0.0-rc.3
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
CHANGED
|
@@ -27,6 +27,8 @@ Installs an [Agent Skill](https://agentskills.io): a `SKILL.md` with the rules f
|
|
|
27
27
|
|
|
28
28
|
In Claude Code you can install the same skill as a plugin instead, kept up to date with each release: `/plugin marketplace add P-DB/unframed-ui`, then `/plugin install unframed@unframed`.
|
|
29
29
|
|
|
30
|
+
To let your assistant check the code it writes, add the MCP server too: [`@unframed/mcp`](../mcp).
|
|
31
|
+
|
|
30
32
|
**[Documentation](https://p-db.github.io/unframed-ui/)** · **[Storybook](https://p-db.github.io/unframed-ui/storybook/)** · **[GitHub](https://github.com/P-DB/unframed-ui)**
|
|
31
33
|
|
|
32
34
|
MIT licensed. Status: 0.x, APIs may change before 1.0.
|
package/package.json
CHANGED
package/registry.json
CHANGED
package/skill/unframed/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ description: Builds UI with Unframed web components (@unframed/core, @unframed/r
|
|
|
5
5
|
|
|
6
6
|
# Unframed UI
|
|
7
7
|
|
|
8
|
-
Unframed 1.0.0-rc.
|
|
8
|
+
Unframed 1.0.0-rc.3: accessible UI components as standard custom elements (Lit). Every tag starts with `uf-`. They work in plain HTML and every framework; React, Vue and Angular have wrapper packages for typed props, events and form bindings.
|
|
9
9
|
|
|
10
10
|
## Before writing code
|
|
11
11
|
|
|
@@ -30,6 +30,10 @@ Unframed 1.0.0-rc.1: accessible UI components as standard custom elements (Lit).
|
|
|
30
30
|
- **Translations.** Built-in texts (dialog close button, "No results", pagination labels, a few error messages) are English. Italian, French, German, Spanish and Portuguese are built in: `import it from '@unframed/core/locales/it'; setTranslations(it, 'it')` (codes `it`, `fr`, `de`, `es`, `pt`), once at startup. For other languages, pass the texts yourself: `setTranslations({ close: 'Zamknij', page: 'Strona {page}' }, 'pl')`; components follow the nearest `lang` attribute. Don't add `aria-label`s to override them.
|
|
31
31
|
- **Dark mode** follows the OS; force it with `data-uf-theme="dark"` (or `"light"`) on any element.
|
|
32
32
|
|
|
33
|
+
## Check your code
|
|
34
|
+
|
|
35
|
+
If the Unframed MCP server is connected (its `validate_usage` tool), pass it the code you wrote and fix every error it reports before you finish. It catches unknown attributes and events, invalid values and missing labels.
|
|
36
|
+
|
|
33
37
|
## Components
|
|
34
38
|
|
|
35
39
|
| Component | Tags | Import |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Using Unframed 1.0.0-rc.
|
|
1
|
+
# Using Unframed 1.0.0-rc.3 in each framework
|
|
2
2
|
|
|
3
3
|
## HTML & JavaScript
|
|
4
4
|
|
|
@@ -42,7 +42,7 @@ Form controls join the surrounding `<form>` like native ones: `required`, `FormD
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
```js
|
|
45
|
-
import { toast } from '@unframed/core';
|
|
45
|
+
import { toast } from '@unframed/core/toast';
|
|
46
46
|
|
|
47
47
|
const form = document.querySelector('#signup');
|
|
48
48
|
const dialog = document.querySelector('#welcome');
|
|
@@ -68,8 +68,8 @@ dialog.addEventListener('uf-hide', () => toast('Welcome aboard!', { variant: 'su
|
|
|
68
68
|
<!doctype html>
|
|
69
69
|
<html lang="en">
|
|
70
70
|
<head>
|
|
71
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@unframed/tokens@1.0.0-rc.
|
|
72
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@unframed/core@1.0.0-rc.
|
|
71
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@unframed/tokens@1.0.0-rc.3/dist/tokens.css" />
|
|
72
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@unframed/core@1.0.0-rc.3/+esm"></script>
|
|
73
73
|
</head>
|
|
74
74
|
<body>
|
|
75
75
|
<uf-button variant="primary">It works</uf-button>
|
|
@@ -111,7 +111,8 @@ Props are the element's properties. Events: `onInput` and `onChange` for form co
|
|
|
111
111
|
|
|
112
112
|
```tsx
|
|
113
113
|
import { useState } from 'react';
|
|
114
|
-
import {
|
|
114
|
+
import type { UfCheckbox as UfCheckboxElement, UfInput as UfInputElement } from '@unframed/core';
|
|
115
|
+
import { toast } from '@unframed/core/toast';
|
|
115
116
|
import { UfButton, UfCheckbox, UfDialog, UfInput } from '@unframed/react';
|
|
116
117
|
|
|
117
118
|
export function Signup() {
|
|
@@ -212,7 +213,7 @@ createApp(App).mount('#app');
|
|
|
212
213
|
```vue
|
|
213
214
|
<script setup lang="ts">
|
|
214
215
|
import { ref } from 'vue';
|
|
215
|
-
import { toast } from '@unframed/core';
|
|
216
|
+
import { toast } from '@unframed/core/toast';
|
|
216
217
|
import { UfButton, UfCheckbox, UfDialog, UfInput } from '@unframed/vue';
|
|
217
218
|
|
|
218
219
|
const email = ref('');
|
|
@@ -285,7 +286,7 @@ Outputs keep the event names: `(input)`, `(change)`, `(uf-hide)`. `UNFRAMED` imp
|
|
|
285
286
|
```ts
|
|
286
287
|
import { Component, signal } from '@angular/core';
|
|
287
288
|
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
288
|
-
import { toast } from '@unframed/core';
|
|
289
|
+
import { toast } from '@unframed/core/toast';
|
|
289
290
|
import { UNFRAMED } from '@unframed/angular';
|
|
290
291
|
|
|
291
292
|
@Component({
|