@nons-dev/uikit 0.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/dist/index.css +1 -0
- package/dist/index.js +3685 -0
- package/dist/src/index.d.ts +8 -0
- package/package.json +46 -0
- package/readme.md +58 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { registry } from '../core/registry/registry';
|
|
2
|
+
export { bootstrapRegistry } from '../core/registry/bootstrap';
|
|
3
|
+
export { loadConfig, getConfig, getDirection, getDefaultLocale, getSupportedLocales, getFontFamily } from '../core/config';
|
|
4
|
+
export type { NonsConfig } from '../core/config/types';
|
|
5
|
+
export { runtimeContext, hasPermission, setUILocale, setUIDirection } from '../core/runtime';
|
|
6
|
+
export { validateSchema, normalizeSchema } from '../core/schema-engine';
|
|
7
|
+
export type { SchemaNode } from '../core/types/schema';
|
|
8
|
+
export { t, useI18n, setLocale } from '../plugins/i18n';
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nons-dev/uikit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"types": "./dist/src/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/src/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./style.css": {
|
|
21
|
+
"import": "./dist/index.css",
|
|
22
|
+
"default": "./dist/index.css"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"dev": "vite",
|
|
27
|
+
"build": "npm run generate && vue-tsc -b && vite build",
|
|
28
|
+
"preview": "vite preview",
|
|
29
|
+
"generate": "tsx scripts/generate.ts"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@lucide/vue": "^1.21.0",
|
|
33
|
+
"js-yaml": "^5.1.0",
|
|
34
|
+
"vue": "^3.5.13"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/js-yaml": "^4.0.9",
|
|
38
|
+
"@types/node": "^26.0.1",
|
|
39
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
40
|
+
"tsx": "^4.22.4",
|
|
41
|
+
"typescript": "~5.7.3",
|
|
42
|
+
"vite": "^6.3.3",
|
|
43
|
+
"vite-plugin-dts": "^5.0.3",
|
|
44
|
+
"vue-tsc": "^2.2.8"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Nons UIKit
|
|
2
|
+
|
|
3
|
+
Schema-driven UI component library for the Nons platform — Vue 3, TypeScript, token-based design system.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
core/ Schema types, component registry, schema renderer, runtime context
|
|
9
|
+
ui/ Vue 3 components (primitives, composites, layouts, sections)
|
|
10
|
+
design-system/ CSS custom property tokens, reset, light/dark themes
|
|
11
|
+
playground/ Demo/explorer app for component development and testing
|
|
12
|
+
plugins/ i18n, direction, permissions
|
|
13
|
+
adapters/ Data provider layer (mock API, storage abstraction)
|
|
14
|
+
locales/ Persian (fa) and English (en) translation files
|
|
15
|
+
docs/ Component contracts, style guide, reference
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install
|
|
22
|
+
npm run dev # Start Vite dev server
|
|
23
|
+
npm run build # Type-check + production build (vue-tsc -b && vite build)
|
|
24
|
+
npm run preview # Preview production build
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## CLI Commands
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm run ui -- components:list # List all discovered UI components
|
|
31
|
+
npm run ui -- component:show <name> # Show full detail for a component
|
|
32
|
+
npm run ui -- schema <name> # Show schema JSON for a component
|
|
33
|
+
npm run ui -- components:search <q> # Search components by name/description
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Documentation
|
|
37
|
+
|
|
38
|
+
| Resource | Description |
|
|
39
|
+
|----------|-------------|
|
|
40
|
+
| [Style Guide](docs/STYLE-GUIDE.md) | Token-driven design, layout isolation, flat UI, component conventions |
|
|
41
|
+
| [Component Contracts](docs/component-contracts/) | Single source of truth for all component APIs, schemas, and states |
|
|
42
|
+
|
|
43
|
+
## Key Conventions
|
|
44
|
+
|
|
45
|
+
- **Zero-hardcoding** — all visual values via CSS custom properties (`var(--...)`)
|
|
46
|
+
- **RTL-first** — `<html dir="rtl">`, logical properties (`inset-inline-start`, `margin-inline`)
|
|
47
|
+
- **Schema-driven** — every component has a registry key, contract, and schema example
|
|
48
|
+
- **modelValue** — all form inputs use `modelValue` prop + `update:modelValue` emit
|
|
49
|
+
- **No external margins** — component spacing via parent layout `gap`
|
|
50
|
+
- **Flat UI** — no elevation shadows; separation via themed borders (`--border-primary`)
|
|
51
|
+
- **TypeScript strict** — `strict: true`, `noUncheckedIndexedAccess`, `noUnusedLocals`
|
|
52
|
+
|
|
53
|
+
## Dependencies
|
|
54
|
+
|
|
55
|
+
- Vue 3.5 (Composition API, `<script setup lang="ts">`)
|
|
56
|
+
- `@lucide/vue` icons
|
|
57
|
+
- Tabler Icons (CDN)
|
|
58
|
+
- Plain CSS only (no SCSS/Sass)
|