@bysages/svelte 0.0.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 By Sages
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,74 @@
1
+ # @bysages/svelte
2
+
3
+ ![npm version](https://img.shields.io/npm/v/@bysages/svelte)
4
+ ![npm downloads](https://img.shields.io/npm/dw/@bysages/svelte)
5
+ ![npm license](https://img.shields.io/npm/l/@bysages/svelte)
6
+
7
+ > By Sages Elements for Svelte — 70+ accessible component families, headless by construction, dressed by the paper-and-ink style layer.
8
+
9
+ ## Features
10
+
11
+ - 🧩 **70+ families** — actions, forms, overlays, navigation, data, layout, and an AI conversation family on ai-sdk formats
12
+ - 🏛️ **Headless inside** — interaction, state, ARIA, and positioning come from proven headless state machines; wrappers add API narrowing and style injection, no DOM of their own
13
+ - 🎨 **Token-styled** — every visual value is a CSS custom property from `@bysages/core`; light/dark, accent pigments, contrast and density tiers are data, never hardcoded styles
14
+ - 📦 **Container-driven** — components respond to `@container`, not the viewport; the same component composes in a sidebar, a card, or a page
15
+ - 💡 **Styles on import** — each family injects its stylesheet at module load, guarded against double-injection
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ # pnpm
21
+ pnpm add @bysages/svelte @bysages/core
22
+
23
+ # npm
24
+ npm install @bysages/svelte @bysages/core
25
+
26
+ # yarn
27
+ yarn add @bysages/svelte @bysages/core
28
+
29
+ # bun
30
+ bun add @bysages/svelte @bysages/core
31
+ ```
32
+
33
+ ## Quick Start
34
+
35
+ Import the token stylesheet once, theme the document, then use the components:
36
+
37
+ ```ts
38
+ // main.ts
39
+ import "@bysages/tokens/css";
40
+ import { mount } from "svelte";
41
+ import { applyTheme } from "@bysages/core";
42
+ import App from "./App.svelte";
43
+
44
+ applyTheme({ mode: "system", accent: "ink" });
45
+
46
+ mount(App, { target: document.getElementById("app")! });
47
+ ```
48
+
49
+ ```svelte
50
+ <!-- App.svelte -->
51
+ <script lang="ts">
52
+ import { Dialog } from "@bysages/svelte";
53
+ </script>
54
+
55
+ <Dialog.Root>
56
+ <Dialog.Trigger>Delete item</Dialog.Trigger>
57
+ <Dialog.Backdrop />
58
+ <Dialog.Positioner>
59
+ <Dialog.Content>
60
+ <Dialog.Title>Delete item</Dialog.Title>
61
+ <Dialog.Description>This action cannot be undone.</Dialog.Description>
62
+ <Dialog.CloseTrigger>×</Dialog.CloseTrigger>
63
+ </Dialog.Content>
64
+ </Dialog.Positioner>
65
+ </Dialog.Root>
66
+ ```
67
+
68
+ ## Documentation
69
+
70
+ The [documentation site](https://elements.bysages.com) carries every family with live demos and props tables.
71
+
72
+ ## License
73
+
74
+ - [MIT](../../LICENSE) © [By Sages](https://www.bysages.com/)