@happyvertical/smrt-tenancy 0.34.4 → 0.34.5

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "timestamp": 1782257776833,
3
+ "timestamp": 1782261228191,
4
4
  "packageName": "@happyvertical/smrt-tenancy",
5
- "packageVersion": "0.34.4",
5
+ "packageVersion": "0.34.5",
6
6
  "objects": {},
7
7
  "moduleType": "smrt",
8
8
  "smrtDependencies": [
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-06-23T23:36:17.641Z",
3
+ "generatedAt": "2026-06-24T00:33:48.833Z",
4
4
  "packageName": "@happyvertical/smrt-tenancy",
5
- "packageVersion": "0.34.4",
5
+ "packageVersion": "0.34.5",
6
6
  "sourceManifestPath": "dist/manifest.json",
7
7
  "agentDocPath": "AGENTS.md",
8
8
  "sourceHashes": {
9
- "manifest": "eeb967be7e05f833025419de628a2fc05dbbb89955b52261d6fb9b8c625100f1",
10
- "packageJson": "9ddab0a8705412c59160cbc610b7fe6f6646df5168917a4d0ee6dc14d8fdee46",
9
+ "manifest": "f279d5f7960a10552864e944f2e05a57f2e41cd5e81442a6f840ff0ee727f448",
10
+ "packageJson": "e9e183e0b9207b5859bf4fe72265c2ed922a44f9d06b6a11be15df6edb3ab529",
11
11
  "agents": "6466580ac48829d3e51e940aaf42578919619e3a43fa7efbb741b744c80530c8"
12
12
  },
13
13
  "exports": [
@@ -7,6 +7,7 @@
7
7
  import type { Tenant } from '@happyvertical/smrt-types';
8
8
  import { Icon, ripple } from '@happyvertical/smrt-ui';
9
9
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
10
+ import { Button } from '@happyvertical/smrt-ui/ui';
10
11
  import { M } from '../i18n.js';
11
12
 
12
13
  export interface Props {
@@ -107,26 +108,24 @@ function getColor(name: string): string {
107
108
  {#if actions && (onedit || ondelete)}
108
109
  <div class="actions">
109
110
  {#if onedit}
110
- <button
111
- type="button"
112
- class="action-btn"
111
+ <Button
112
+ variant="ghost"
113
+ class="action-btn"
113
114
  onclick={(event: MouseEvent) => { event.stopPropagation(); onedit?.(); }}
114
- use:ripple
115
115
  aria-label={t(M['tenancy.tenant_card.edit'])}
116
116
  >
117
117
  <Icon name="menu" size={18} />
118
- </button>
118
+ </Button>
119
119
  {/if}
120
120
  {#if ondelete}
121
- <button
122
- type="button"
123
- class="action-btn danger"
121
+ <Button
122
+ variant="ghost"
123
+ class="action-btn action-btn--danger"
124
124
  onclick={(event: MouseEvent) => { event.stopPropagation(); ondelete?.(); }}
125
- use:ripple
126
125
  aria-label={t(M['tenancy.tenant_card.delete'])}
127
126
  >
128
127
  <Icon name="close" size={18} />
129
- </button>
128
+ </Button>
130
129
  {/if}
131
130
  </div>
132
131
  {/if}
@@ -246,27 +245,26 @@ function getColor(name: string): string {
246
245
  flex-shrink: 0;
247
246
  }
248
247
 
249
- .action-btn {
250
- display: flex;
251
- align-items: center;
252
- justify-content: center;
248
+ /*
249
+ * The action buttons now render through smrt-ui's <Button variant="ghost">.
250
+ * Svelte scopes `.action-btn` to this component, but the <button> is emitted
251
+ * inside the Button child, so a plain `.action-btn {}` rule would not match —
252
+ * `.actions :global(.action-btn)` keeps the scope anchor on `.actions` (a real
253
+ * element here) and pierces into the child (issue #1589). These override only
254
+ * sizing/shape/color (higher specificity than Button's base rules); ghost owns
255
+ * the transparent background + hover layer. The delete button's modifier class
256
+ * is `action-btn--danger`, NOT `danger`, so it never collides with Button's own
257
+ * `.danger` variant class (which would otherwise apply the red-filled variant).
258
+ */
259
+ .actions :global(.action-btn) {
253
260
  width: 32px;
254
261
  height: 32px;
255
- background: transparent;
256
- border: none;
262
+ padding: 0;
257
263
  border-radius: var(--smrt-radius-full, 9999px);
258
- cursor: pointer;
259
264
  color: var(--smrt-color-on-surface-variant);
260
- position: relative;
261
- overflow: hidden;
262
- }
263
-
264
- .action-btn:hover {
265
- background-color: var(--smrt-color-surface-container-highest);
266
- color: var(--smrt-color-on-surface);
267
265
  }
268
266
 
269
- .action-btn.danger:hover {
267
+ .actions :global(.action-btn--danger):hover {
270
268
  color: var(--smrt-color-error);
271
269
  }
272
270
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"TenantCard.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/TenantCard.svelte.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAMxD,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AA0GD,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"TenantCard.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/TenantCard.svelte.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAOxD,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AA2GD,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
@@ -22,6 +22,7 @@ function handleChange(event: Event) {
22
22
  {#if memberships.length <= 1}
23
23
  <span class="tenant-name">{currentTenant?.name ?? 'Unknown'}</span>
24
24
  {:else}
25
+ <!-- raw-primitive-allow: the Select form primitive lives in @happyvertical/smrt-svelte, which transitively depends on smrt-tenancy (smrt-svelte to smrt-languages to smrt-tenancy), so importing it would create a DAG cycle (#1582); the native select element retains full keyboard/AT a11y -->
25
26
  <select value={currentTenantId} onchange={handleChange} class="tenant-select">
26
27
  {#each memberships as membership}
27
28
  {#if membership.tenantId}
@@ -1 +1 @@
1
- {"version":3,"file":"TenantSwitcher.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/TenantSwitcher.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAGpE,MAAM,WAAW,KAAK;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAoCD,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"TenantSwitcher.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/TenantSwitcher.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAGpE,MAAM,WAAW,KAAK;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAqCD,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-tenancy",
3
- "version": "0.34.4",
3
+ "version": "0.34.5",
4
4
  "description": "Production-ready multi-tenancy framework for SMRT with automatic tenant isolation and enforcement",
5
5
  "type": "module",
6
+ "smrtRawPrimitives": "strict",
6
7
  "main": "./dist/index.js",
7
8
  "types": "./dist/index.d.ts",
8
9
  "files": [
@@ -43,9 +44,9 @@
43
44
  "@happyvertical/logger": "^0.74.7",
44
45
  "@happyvertical/sql": "^0.74.7",
45
46
  "@happyvertical/utils": "^0.74.7",
46
- "@happyvertical/smrt-core": "0.34.4",
47
- "@happyvertical/smrt-types": "0.34.4",
48
- "@happyvertical/smrt-ui": "0.34.4"
47
+ "@happyvertical/smrt-core": "0.34.5",
48
+ "@happyvertical/smrt-types": "0.34.5",
49
+ "@happyvertical/smrt-ui": "0.34.5"
49
50
  },
50
51
  "peerDependencies": {
51
52
  "svelte": "^5.46.4"
@@ -64,7 +65,7 @@
64
65
  "typescript": "^5.9.3",
65
66
  "vite": "^7.3.1",
66
67
  "vitest": "^4.0.17",
67
- "@happyvertical/smrt-vitest": "0.34.4"
68
+ "@happyvertical/smrt-vitest": "0.34.5"
68
69
  },
69
70
  "keywords": [
70
71
  "ai",