@changebot/widgets-vue 0.1.22 → 0.2.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.
package/README.md CHANGED
@@ -28,14 +28,15 @@ import {
28
28
  </script>
29
29
 
30
30
  <template>
31
- <ChangebotProvider slug="your-team-slug">
32
- <header>
33
- <h1>My App</h1>
34
- <ChangebotBadge />
35
- </header>
31
+ <!-- Provider can be placed anywhere - components don't need to be nested -->
32
+ <ChangebotProvider slug="your-team-slug" />
36
33
 
37
- <ChangebotPanel mode="drawer-right" />
38
- </ChangebotProvider>
34
+ <header>
35
+ <h1>My App</h1>
36
+ <ChangebotBadge />
37
+ </header>
38
+
39
+ <ChangebotPanel mode="drawer-right" />
39
40
  </template>
40
41
  ```
41
42
 
@@ -43,7 +44,7 @@ import {
43
44
 
44
45
  ### ChangebotProvider
45
46
 
46
- The provider component manages state and data fetching for all child Changebot components. Wrap your components with this provider to enable automatic updates and state synchronization.
47
+ The provider component manages state and data fetching for all Changebot components. It listens at the document level, so components do **not** need to be nested inside it—they can be placed anywhere on the page.
47
48
 
48
49
  #### Props
49
50
 
@@ -56,9 +57,10 @@ The provider component manages state and data fetching for all child Changebot c
56
57
 
57
58
  ```vue
58
59
  <template>
59
- <ChangebotProvider slug="acme-corp">
60
- <!-- Your components -->
61
- </ChangebotProvider>
60
+ <!-- Components can be siblings - no nesting required -->
61
+ <ChangebotProvider slug="acme-corp" />
62
+ <ChangebotBadge />
63
+ <ChangebotPanel />
62
64
  </template>
63
65
  ```
64
66
 
@@ -93,10 +95,10 @@ A badge component that displays the count of new, unread updates. Clicking the b
93
95
  | Prop | Type | Default | Description |
94
96
  |------|------|---------|-------------|
95
97
  | `scope` | `string` | `"default"` | Scope to connect to (must match provider scope) |
96
- | `show-count` | `boolean` | `true` | Whether to display the numeric count |
97
98
  | `theme` | `Theme` | - | Fixed theme (see Theming section) |
98
99
  | `light` | `Theme` | - | Theme for light mode (auto-switches based on system preference) |
99
100
  | `dark` | `Theme` | - | Theme for dark mode (auto-switches based on system preference) |
101
+ | `indicator` | `"count"` \| `"dot"` | `"count"` | Display style: show count number or dot only |
100
102
 
101
103
  #### Example
102
104
 
@@ -108,14 +110,14 @@ A badge component that displays the count of new, unread updates. Clicking the b
108
110
  <!-- With theme -->
109
111
  <ChangebotBadge theme="catppuccin-mocha" />
110
112
 
113
+ <!-- Show dot instead of count -->
114
+ <ChangebotBadge indicator="dot" />
115
+
111
116
  <!-- Auto-switching theme -->
112
117
  <ChangebotBadge
113
118
  light="catppuccin-latte"
114
119
  dark="catppuccin-mocha"
115
120
  />
116
-
117
- <!-- Hidden count (shows dot only) -->
118
- <ChangebotBadge :show-count="false" />
119
121
  </template>
120
122
  ```
121
123
 
@@ -413,21 +415,6 @@ Displays as a centered modal dialog with backdrop overlay. Best for focused, imp
413
415
 
414
416
  Components can work independently without a provider for simple use cases:
415
417
 
416
- #### Standalone Badge
417
-
418
- ```vue
419
- <script setup>
420
- import { ref } from 'vue';
421
- import { ChangebotBadge } from '@changebot/widgets-vue';
422
-
423
- const count = ref(3);
424
- </script>
425
-
426
- <template>
427
- <ChangebotBadge :count="count" :show-count="true" />
428
- </template>
429
- ```
430
-
431
418
  #### Standalone Panel
432
419
 
433
420
  ```vue
@@ -479,33 +466,34 @@ import {
479
466
  </script>
480
467
 
481
468
  <template>
482
- <ChangebotProvider slug="acme-corp">
483
- <!-- Banner appears automatically for banner-highlighted updates -->
484
- <ChangebotBanner theme="catppuccin-mocha" />
469
+ <!-- Provider can be placed anywhere -->
470
+ <ChangebotProvider slug="acme-corp" />
485
471
 
486
- <header>
487
- <h1>ACME Corp</h1>
488
- <!-- Badge shows count of new updates -->
489
- <ChangebotBadge theme="catppuccin-mocha" />
490
- </header>
472
+ <!-- Banner appears automatically for banner-highlighted updates -->
473
+ <ChangebotBanner theme="catppuccin-mocha" />
491
474
 
492
- <main>
493
- <!-- Your app content -->
494
- </main>
475
+ <header>
476
+ <h1>ACME Corp</h1>
477
+ <!-- Badge shows count of new updates -->
478
+ <ChangebotBadge theme="catppuccin-mocha" />
479
+ </header>
495
480
 
496
- <!-- Panel opens when badge is clicked -->
497
- <ChangebotPanel
498
- mode="drawer-right"
499
- theme="catppuccin-mocha"
500
- />
481
+ <main>
482
+ <!-- Your app content -->
483
+ </main>
501
484
 
502
- <!-- Toast appears for toast-highlighted updates -->
503
- <ChangebotToast
504
- position="bottom-right"
505
- :auto-dismiss="5"
506
- theme="catppuccin-mocha"
507
- />
508
- </ChangebotProvider>
485
+ <!-- Panel opens when badge is clicked -->
486
+ <ChangebotPanel
487
+ mode="drawer-right"
488
+ theme="catppuccin-mocha"
489
+ />
490
+
491
+ <!-- Toast appears for toast-highlighted updates -->
492
+ <ChangebotToast
493
+ position="bottom-right"
494
+ :auto-dismiss="5"
495
+ theme="catppuccin-mocha"
496
+ />
509
497
  </template>
510
498
  ```
511
499
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/stencil-generated/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAE/F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAK3C,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAOjE,CAAC;AAGH,eAAO,MAAM,eAAe,EAAE,mBAAmB,CAAC,GAAG,CAAC,eAAe,CAMnE,CAAC;AAGH,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAMjE,CAAC;AAGH,eAAO,MAAM,iBAAiB,EAAE,mBAAmB,CAAC,GAAG,CAAC,iBAAiB,CAOvE,CAAC;AAGH,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAQjE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/stencil-generated/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAE/F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAK3C,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAOjE,CAAC;AAGH,eAAO,MAAM,eAAe,EAAE,mBAAmB,CAAC,GAAG,CAAC,eAAe,CAKnE,CAAC;AAGH,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAMjE,CAAC;AAGH,eAAO,MAAM,iBAAiB,EAAE,mBAAmB,CAAC,GAAG,CAAC,iBAAiB,CAQvE,CAAC;AAGH,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAOjE,CAAC"}
@@ -3,41 +3,40 @@
3
3
  /* auto-generated vue proxies */
4
4
  import { defineContainer } from '@stencil/vue-output-target/runtime';
5
5
  export const ChangebotBadge = /*@__PURE__*/ defineContainer('changebot-badge', undefined, [
6
- 'scope',
7
6
  'theme',
7
+ 'scope',
8
8
  'light',
9
9
  'dark',
10
- 'showCount',
10
+ 'indicator',
11
11
  'count'
12
12
  ]);
13
13
  export const ChangebotBanner = /*@__PURE__*/ defineContainer('changebot-banner', undefined, [
14
- 'scope',
15
14
  'theme',
15
+ 'scope',
16
16
  'light',
17
- 'dark',
18
- 'preview'
17
+ 'dark'
19
18
  ]);
20
19
  export const ChangebotPanel = /*@__PURE__*/ defineContainer('changebot-panel', undefined, [
21
- 'scope',
22
20
  'theme',
21
+ 'scope',
23
22
  'light',
24
23
  'dark',
25
24
  'mode'
26
25
  ]);
27
26
  export const ChangebotProvider = /*@__PURE__*/ defineContainer('changebot-provider', undefined, [
28
- 'baseUrl',
29
27
  'slug',
28
+ 'userId',
29
+ 'userData',
30
30
  'scope',
31
+ 'baseUrl',
31
32
  'mockData',
32
- 'userId',
33
- 'userData'
33
+ 'preview'
34
34
  ]);
35
35
  export const ChangebotToast = /*@__PURE__*/ defineContainer('changebot-toast', undefined, [
36
- 'scope',
37
36
  'theme',
37
+ 'scope',
38
38
  'light',
39
39
  'dark',
40
40
  'position',
41
- 'autoDismiss',
42
- 'preview'
41
+ 'autoDismiss'
43
42
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@changebot/widgets-vue",
3
- "version": "0.1.22",
3
+ "version": "0.2.1",
4
4
  "description": "Vue wrapper components for Changebot widgets",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@stencil/vue-output-target": "^0.11.8",
16
- "@changebot/core": "^0.1.22"
16
+ "@changebot/core": "^0.2.1"
17
17
  },
18
18
  "devDependencies": {
19
19
  "vue": "^3.3.0",