bref-ui 2.1.0 → 2.1.2

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.
@@ -0,0 +1,8 @@
1
+ @font-face {
2
+ font-family: 'Material Symbols Outlined';
3
+ font-style: normal;
4
+ font-display: block;
5
+ font-weight: 100 700;
6
+ src: url('@fontsource-variable/material-symbols-outlined/files/material-symbols-outlined-latin-fill-normal.woff2')
7
+ format('woff2-variations');
8
+ }
@@ -1,10 +1,3 @@
1
- <style>
2
- @font-face {
3
- font-family: 'Material Symbols Outlined';
4
- font-style: normal;
5
- font-display: block;
6
- font-weight: 100 700;
7
- src: url('@fontsource-variable/material-symbols-outlined/files/material-symbols-outlined-latin-fill-normal.woff2')
8
- format('woff2-variations');
9
- }
10
- </style>
1
+ <script lang="ts">
2
+ import './fonts.css';
3
+ </script>
@@ -1,18 +1,6 @@
1
- export default Fonts;
2
- type Fonts = SvelteComponent<{
3
- [x: string]: never;
4
- }, {
5
- [evt: string]: CustomEvent<any>;
6
- }, {}> & {
7
- $$bindings?: string | undefined;
8
- };
9
- declare const Fonts: $$__sveltets_2_IsomorphicComponent<{
10
- [x: string]: never;
11
- }, {
12
- [evt: string]: CustomEvent<any>;
13
- }, {}, {}, string>;
1
+ import './fonts.css';
14
2
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
15
- new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
16
4
  $$bindings?: Bindings;
17
5
  } & Exports;
18
6
  (internal: unknown, props: {
@@ -24,3 +12,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
24
12
  };
25
13
  z_$$bindings?: Bindings;
26
14
  }
15
+ declare const Fonts: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
+ [evt: string]: CustomEvent<any>;
17
+ }, {}, {}, string>;
18
+ type Fonts = InstanceType<typeof Fonts>;
19
+ export default Fonts;
@@ -6,6 +6,7 @@
6
6
  "surfaces.svelte",
7
7
  "glass.svelte",
8
8
  "fonts.svelte",
9
+ "fonts.css",
9
10
  "styles.svelte",
10
11
  "surface.ts"
11
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bref-ui",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "A Svelte-first, human-first, agent-first UI library for building beautiful sites and apps with components you can make your own.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/readme.md CHANGED
@@ -7,11 +7,6 @@ and apps with components you can make your own.
7
7
  [![Discord](https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white)](https://discord.gg/JpgQRTUsVS)
8
8
  [![MIT license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
9
9
 
10
- > <small>V2 is in development and has not been published to npm. The npm badge tracks the
11
- > published release; the examples below use the v2 development checkout. Button,
12
- > Icon, Surface, Theme and ThemeModeToggle exist today. Agent skills, site generation
13
- > and live generative UI are planned.</small>
14
-
15
10
  ## Get started
16
11
 
17
12
  ### Explore the gallery
@@ -30,22 +25,20 @@ props and theme customization on `/button`, `/icon` and `/theme`.
30
25
 
31
26
  ### Use the local package
32
27
 
33
- The CLI/registry changes are currently local and uncommitted, so they are absent
34
- from the clone above. This section and the copy workflow below require the
35
- development checkout containing those changes.
36
-
37
- In that checkout, build a local package:
28
+ The package includes the component CLI and canonical sources. Build a local package
29
+ from the development checkout:
38
30
 
39
31
  ```sh
40
32
  bun run build
41
33
  npm pack --ignore-scripts
42
34
  ```
43
35
 
44
- This produces `bref-ui-2.0.0.tgz`. In an existing Svelte 5.56.1+ project with its
45
- dependencies installed, install that tarball, replacing the example path:
36
+ This produces `bref-ui-<version>.tgz`, named after the `package.json` version. In an
37
+ existing Svelte 5.56.1+ project with its dependencies installed, install that
38
+ tarball, replacing the example path:
46
39
 
47
40
  ```sh
48
- npm install /path/to/bref-ui-2.0.0.tgz
41
+ npm install /path/to/bref-ui-<version>.tgz
49
42
  ```
50
43
 
51
44
  Then use the components in a `.svelte` file:
@@ -111,13 +104,55 @@ is available from `bref-ui/types`. Copied components include the helper in
111
104
  complete site generation, generative UI and interactive interfaces for agent
112
105
  workflows.
113
106
 
114
- ## Copy components into a project (WIP)
107
+ ## Copy components into a project
108
+
109
+ The package includes the `bref-ui` executable, which requires Bun. After installing
110
+ the tarball, run commands from the consumer project's root:
111
+
112
+ ```sh
113
+ bun run bref-ui init
114
+ bun run bref-ui add button
115
+ bun run bref-ui --help
116
+ ```
117
+
118
+ `init` creates `bref.config.json` and leaves an existing file untouched:
119
+
120
+ ```json
121
+ {
122
+ "ui": "$lib/ui"
123
+ }
124
+ ```
125
+
126
+ The default destination is `src/lib/ui`. Edit `ui` to another `$lib` path, such as
127
+ `$lib/bref`, to change the destination. The CLI maps `$lib` to `src/lib`; it does not
128
+ discover project aliases or accept an `--alias` option. Configure the same alias
129
+ in a plain Svelte project if using `$lib/ui` imports.
130
+
131
+ `add <component>` copies the component and its registry dependencies, then merges
132
+ component exports into the destination's `index.ts`. Button includes Icon and Theme.
133
+ The preview lists `add`, `unchanged` and `conflict` files. Each conflicting file
134
+ requires overwrite approval, followed by a final installation confirmation. Declining
135
+ a prompt cancels without writes; identical files are skipped.
136
+
137
+ Use the copied components in a `.svelte` file:
138
+
139
+ ```svelte
140
+ <script lang="ts">
141
+ import { Button, Theme } from '$lib/ui';
142
+ </script>
143
+
144
+ <Theme />
145
+ <Button label="Save" />
146
+ ```
115
147
 
116
- The local package includes the `bref` executable. After installing the tarball,
117
- preview and accept the setup and Button copies:
148
+ Keep `bref-ui` installed for shared types imported from `bref-ui/types`. To copy
149
+ Theme separately, run `bun run bref-ui add theme`. The copied Theme uses the default
150
+ palette and has no `palette` prop; customize its copied CSS tokens. The package
151
+ Theme retains its `palette` prop.
118
152
 
119
- Run `bun run bref-ui add theme` to copy the default-only Theme source into the configured UI directory. The copied `Theme` has no `palette` prop; edit its CSS tokens directly. The package `Theme` retains the `palette` prop. Button copies include Icon and required types. SvelteKit can use
120
- `--alias '$lib/bref'` during init after its existing sync command.
153
+ Available component IDs: `button`, `checkbox`, `combobox`, `dialog`, `icon`, `pill`,
154
+ `pill-choice-group`, `pill-group`, `popover`, `progress`, `select`, `spinner`,
155
+ `surface`, `switch`, `text-area`, `text-input`, `theme` and `tree-view`.
121
156
 
122
157
  ## Documentation and demos
123
158
 
@@ -0,0 +1,8 @@
1
+ @font-face {
2
+ font-family: 'Material Symbols Outlined';
3
+ font-style: normal;
4
+ font-display: block;
5
+ font-weight: 100 700;
6
+ src: url('@fontsource-variable/material-symbols-outlined/files/material-symbols-outlined-latin-fill-normal.woff2')
7
+ format('woff2-variations');
8
+ }
@@ -1,10 +1,3 @@
1
- <style>
2
- @font-face {
3
- font-family: 'Material Symbols Outlined';
4
- font-style: normal;
5
- font-display: block;
6
- font-weight: 100 700;
7
- src: url('@fontsource-variable/material-symbols-outlined/files/material-symbols-outlined-latin-fill-normal.woff2')
8
- format('woff2-variations');
9
- }
10
- </style>
1
+ <script lang="ts">
2
+ import './fonts.css';
3
+ </script>
@@ -6,6 +6,7 @@
6
6
  "surfaces.svelte",
7
7
  "glass.svelte",
8
8
  "fonts.svelte",
9
+ "fonts.css",
9
10
  "styles.svelte",
10
11
  "surface.ts"
11
12
  ],