@skygraph/vue 0.0.0-placeholder.0 → 0.6.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SkyGraph Contributors
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 CHANGED
@@ -1,12 +1,108 @@
1
- # @skygraph/vue
2
-
3
- > Placeholder package. **Do not install yet.**
4
-
5
- `@skygraph/vue` is the Vue 3 adapter for [SkyGraph](https://skygraph.ruslansinkevich.ru) composables and components built on `@skygraph/core`.
6
-
7
- This release is a name-reservation stub (`0.0.0-placeholder.0`, dist-tag `placeholder`). The first usable version will be published under the `latest` tag.
8
-
9
- - Live Vue demo: <https://skygraph.ruslansinkevich.ru/vue/>
10
- - Repository: <https://github.com/RuslanSinkevich/skygraph>
11
-
12
- MIT © Ruslan Sinkevich
1
+ # @skygraph/vue
2
+
3
+ Vue 3 adapter for [SkyGraph](https://skygraph.ruslansinkevich.ru/) 66+ components and composables built on the framework-agnostic [`@skygraph/core`](../core) engine. Shares the `.sg-*` CSS contract with the React adapter via [`@skygraph/styles`](../styles).
4
+
5
+ > **Easier paththe meta-package:**
6
+ >
7
+ > ```bash
8
+ > npm install skygraph-vue
9
+ > ```
10
+ >
11
+ > The meta-package re-exports everything below and auto-loads the CSS as a side effect. No separate `@skygraph/core` install, no manual `import '@skygraph/styles'`. Use this package directly only when you need fine-grained control over the install set.
12
+
13
+ ## Install (direct)
14
+
15
+ ```bash
16
+ npm install @skygraph/vue @skygraph/core vue
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```vue
22
+ <script setup lang="ts">
23
+ import { ref } from 'vue'
24
+ import { SgButton, SgInput, SgForm, SgField } from '@skygraph/vue'
25
+ import '@skygraph/styles'
26
+
27
+ const text = ref('')
28
+
29
+ function onSubmit(payload: {
30
+ values: Record<string, unknown>
31
+ valid: boolean
32
+ }) {
33
+ console.log(payload)
34
+ }
35
+ </script>
36
+
37
+ <template>
38
+ <SgInput v-model="text" placeholder="Type here…" />
39
+
40
+ <SgForm
41
+ :default-values="{ email: '' }"
42
+ @submit="onSubmit"
43
+ >
44
+ <SgField
45
+ name="email"
46
+ label="Email"
47
+ :rules="[{ required: true }, { type: 'email' }]"
48
+ v-slot="{ value, onChange, errors }"
49
+ >
50
+ <SgInput
51
+ :model-value="String(value ?? '')"
52
+ :status="errors.length ? 'error' : undefined"
53
+ @update:model-value="onChange"
54
+ />
55
+ </SgField>
56
+ <SgButton type="primary" html-type="submit">Submit</SgButton>
57
+ </SgForm>
58
+ </template>
59
+ ```
60
+
61
+ ## Mapping to `@skygraph/react`
62
+
63
+ | React | Vue |
64
+ | ------------------------- | ------------------------- |
65
+ | `useForm()` | `useForm()` |
66
+ | `useField(core, form, n)` | `useField(core, form, n)` |
67
+ | `useTable()` | `useTable()` |
68
+ | `useTree()` | `useTree()` |
69
+ | `useGraph()` | `useGraph()` |
70
+ | `<Button />` | `<SgButton />` |
71
+ | `<Input />` | `<SgInput v-model />` |
72
+ | `<Form />` | `<SgForm />` |
73
+ | `<Field />` | `<SgField v-slot />` |
74
+
75
+ The `Sg` prefix avoids clashing with the React names *and* with native HTML
76
+ elements / globally-registered Vue components (e.g. `Form`, `Input`).
77
+
78
+ CSS class names (`.sg-button`, `.sg-input`, `.sg-form`, `.sg-field`, …) are
79
+ **identical** between the React and Vue adapters — both consume the same
80
+ [`@skygraph/styles`](../styles) package, which is the single source of
81
+ truth for visual styling.
82
+
83
+ ## Scope of MVP
84
+
85
+ This package is a foundation, not a full port. It deliberately does not
86
+ yet ship Vue equivalents for:
87
+
88
+ - the other ~74 React components (Select, Table, Diagram, Charts, …)
89
+ - chart / dashboard / calendar / tree-view widgets
90
+ - per-component i18n
91
+ - per-component documentation pages
92
+
93
+ Those land in subsequent Vue streams.
94
+
95
+ ## Development
96
+
97
+ ```bash
98
+ pnpm install
99
+ pnpm --filter @skygraph/vue typecheck
100
+ pnpm --filter @skygraph/vue test
101
+ pnpm --filter @skygraph/vue build
102
+ ```
103
+
104
+ To explore a live demo:
105
+
106
+ ```bash
107
+ pnpm --filter demo-vue dev
108
+ ```