bref-ui 2.1.0 → 2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +51 -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.1",
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
@@ -30,22 +30,19 @@ props and theme customization on `/button`, `/icon` and `/theme`.
30
30
 
31
31
  ### Use the local package
32
32
 
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:
33
+ The package includes the component CLI and canonical sources. Build a local package
34
+ from the development checkout:
38
35
 
39
36
  ```sh
40
37
  bun run build
41
38
  npm pack --ignore-scripts
42
39
  ```
43
40
 
44
- This produces `bref-ui-2.0.0.tgz`. In an existing Svelte 5.56.1+ project with its
41
+ This produces `bref-ui-2.1.1.tgz`. In an existing Svelte 5.56.1+ project with its
45
42
  dependencies installed, install that tarball, replacing the example path:
46
43
 
47
44
  ```sh
48
- npm install /path/to/bref-ui-2.0.0.tgz
45
+ npm install /path/to/bref-ui-2.1.1.tgz
49
46
  ```
50
47
 
51
48
  Then use the components in a `.svelte` file:
@@ -111,13 +108,55 @@ is available from `bref-ui/types`. Copied components include the helper in
111
108
  complete site generation, generative UI and interactive interfaces for agent
112
109
  workflows.
113
110
 
114
- ## Copy components into a project (WIP)
111
+ ## Copy components into a project
112
+
113
+ The package includes the `bref-ui` executable, which requires Bun. After installing
114
+ the tarball, run commands from the consumer project's root:
115
+
116
+ ```sh
117
+ bun run bref-ui init
118
+ bun run bref-ui add button
119
+ bun run bref-ui --help
120
+ ```
121
+
122
+ `init` creates `bref.config.json` and leaves an existing file untouched:
123
+
124
+ ```json
125
+ {
126
+ "ui": "$lib/ui"
127
+ }
128
+ ```
129
+
130
+ The default destination is `src/lib/ui`. Edit `ui` to another `$lib` path, such as
131
+ `$lib/bref`, to change the destination. The CLI maps `$lib` to `src/lib`; it does not
132
+ discover project aliases or accept an `--alias` option. Configure the same alias
133
+ in a plain Svelte project if using `$lib/ui` imports.
134
+
135
+ `add <component>` copies the component and its registry dependencies, then merges
136
+ component exports into the destination's `index.ts`. Button includes Icon and Theme.
137
+ The preview lists `add`, `unchanged` and `conflict` files. Each conflicting file
138
+ requires overwrite approval, followed by a final installation confirmation. Declining
139
+ a prompt cancels without writes; identical files are skipped.
140
+
141
+ Use the copied components in a `.svelte` file:
142
+
143
+ ```svelte
144
+ <script lang="ts">
145
+ import { Button, Theme } from '$lib/ui';
146
+ </script>
147
+
148
+ <Theme />
149
+ <Button label="Save" />
150
+ ```
115
151
 
116
- The local package includes the `bref` executable. After installing the tarball,
117
- preview and accept the setup and Button copies:
152
+ Keep `bref-ui` installed for shared types imported from `bref-ui/types`. To copy
153
+ Theme separately, run `bun run bref-ui add theme`. The copied Theme uses the default
154
+ palette and has no `palette` prop; customize its copied CSS tokens. The package
155
+ Theme retains its `palette` prop.
118
156
 
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.
157
+ Available component IDs: `button`, `checkbox`, `combobox`, `dialog`, `icon`, `pill`,
158
+ `pill-choice-group`, `pill-group`, `popover`, `progress`, `select`, `spinner`,
159
+ `surface`, `switch`, `text-area`, `text-input`, `theme` and `tree-view`.
121
160
 
122
161
  ## Documentation and demos
123
162