@intent-driven/adapter-shadcn 0.1.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/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +82 -0
- package/dist/index.cjs +676 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +136 -0
- package/dist/index.d.ts +136 -0
- package/dist/index.mjs +709 -0
- package/dist/index.mjs.map +1 -0
- package/dist/theme.css +82 -0
- package/package.json +73 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.1 — 2026-04-15
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Обновлена peerDependency `@intent-driven/renderer` до `>=0.2.0` (поддержка map primitive и IrreversibleBadge)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 0.1.0 — 2026-04-15
|
|
12
|
+
|
|
13
|
+
- Первый релиз: `shadcnAdapter` + `ShadcnAdapterProvider` + `theme.css`
|
|
14
|
+
- Doodle/sketch стилистика с Tailwind-токенами
|
|
15
|
+
- CSS-тема экспортируется через `@intent-driven/adapter-shadcn/styles.css`
|
|
16
|
+
- Radix UI primitives под капотом (dialog, dropdown, select, tabs, avatar)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ignat Dubovsky
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# @intent-driven/adapter-shadcn
|
|
2
|
+
|
|
3
|
+
Shadcn/ui doodle-style адаптер для `@intent-driven/renderer`. Handcrafted / sketch эстетика с Tailwind-токенами — дефолт для домена lifequest (mobile-first, BottomTabs, 6 custom canvas).
|
|
4
|
+
|
|
5
|
+
**Часть экосистемы [Intent-Driven Frontend (IDF)](https://github.com/ignatdubovskiy/idf).**
|
|
6
|
+
|
|
7
|
+
## Установка
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @intent-driven/adapter-shadcn lucide-react
|
|
11
|
+
# или
|
|
12
|
+
pnpm add @intent-driven/adapter-shadcn lucide-react
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Peer dependencies: `react@>=18`, `@intent-driven/renderer@>=0.2.0`, `lucide-react@>=1.0`.
|
|
16
|
+
|
|
17
|
+
Требуется Tailwind CSS в хост-приложении. CSS-тема подключается явно через entry `./styles.css`.
|
|
18
|
+
|
|
19
|
+
## Использование
|
|
20
|
+
|
|
21
|
+
```jsx
|
|
22
|
+
import { ShadcnAdapterProvider } from "@intent-driven/adapter-shadcn";
|
|
23
|
+
import "@intent-driven/adapter-shadcn/styles.css";
|
|
24
|
+
import { ProjectionRendererV2 } from "@intent-driven/renderer";
|
|
25
|
+
|
|
26
|
+
function App() {
|
|
27
|
+
return (
|
|
28
|
+
<ShadcnAdapterProvider>
|
|
29
|
+
<ProjectionRendererV2
|
|
30
|
+
artifact={artifact}
|
|
31
|
+
world={world}
|
|
32
|
+
exec={exec}
|
|
33
|
+
projectionId="goal_feed"
|
|
34
|
+
/>
|
|
35
|
+
</ShadcnAdapterProvider>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Что экспортируется
|
|
41
|
+
|
|
42
|
+
| Export | Описание |
|
|
43
|
+
|--------|----------|
|
|
44
|
+
| `ShadcnAdapterProvider` | Провайдер, регистрирует адаптер в реестре renderer |
|
|
45
|
+
| `shadcnAdapter` | Spec-объект адаптера (для ручной регистрации) |
|
|
46
|
+
|
|
47
|
+
CSS-тема: `@intent-driven/adapter-shadcn/styles.css` (обязательный импорт хостом).
|
|
48
|
+
|
|
49
|
+
## Capabilities
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
capabilities: {
|
|
53
|
+
primitive: {
|
|
54
|
+
chart: { fallback: "svg" }, // SVG fallback
|
|
55
|
+
statistic: false,
|
|
56
|
+
sparkline: false,
|
|
57
|
+
map: { fallback: "svg" },
|
|
58
|
+
},
|
|
59
|
+
shell: { modal: true, tabs: true },
|
|
60
|
+
button: { primary: true, secondary: true, danger: true, intent: true },
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Связь с IDF
|
|
65
|
+
|
|
66
|
+
Один из четырёх UI-адаптеров IDF. Doodle-стилистика ориентирована на lifestyle/productivity домены. Переключение адаптера — через `PrefsPanel ⚙ → UI-kit`.
|
|
67
|
+
|
|
68
|
+
Подробнее об архитектуре адаптеров: [manifesto §17](https://github.com/ignatdubovskiy/idf/blob/main/docs/manifesto-v1.7.md).
|
|
69
|
+
|
|
70
|
+
## Версии
|
|
71
|
+
|
|
72
|
+
[CHANGELOG.md](./CHANGELOG.md)
|
|
73
|
+
|
|
74
|
+
## Лицензия
|
|
75
|
+
|
|
76
|
+
**MIT** (см. [LICENSE](./LICENSE)).
|
|
77
|
+
|
|
78
|
+
Адаптер транзитивно зависит от `@intent-driven/core` (через peer-dep `@intent-driven/renderer`),
|
|
79
|
+
который распространяется под **Business Source License 1.1**. Hosted SaaS
|
|
80
|
+
на базе ядра — коммерческая лицензия; некоммерческое и внутреннее
|
|
81
|
+
производственное использование — свободно. Change Date: 2030-04-15
|
|
82
|
+
(автопереход на Apache 2.0).
|