@happyvertical/smrt-subscriptions 0.55.13 → 0.55.17

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.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-subscriptions",
5
- "packageVersion": "0.55.13",
5
+ "packageVersion": "0.55.17",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-subscriptions:SubscriptionPlanCollection": {
8
8
  "name": "subscriptionplancollection",
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-subscriptions",
6
- "packageVersion": "0.55.13",
6
+ "packageVersion": "0.55.17",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "b2d61d88123b7ff00aecd3abcc5d29448c45c946f79aab5bd5ff4f01ceeda4fd",
11
- "packageJson": "f41f54912e17226b5ccb8bfa611f3905c03eeba33a73d5ae71d66124efbf56ee",
10
+ "manifest": "561f96582d91a2663e634a7a69b246fc7f0e831698771eab8b738d587ec21071",
11
+ "packageJson": "1040576e2e099b3d331ffe3be0f81430006d7680e7c530ac31f9da2975ecab48",
12
12
  "agents": "89ab9b5f7047d2f7f316a4bbbb1eef225f3fa8e85f21cb9a699ec3ce18bdb9cd"
13
13
  },
14
14
  "exports": [
@@ -41,7 +41,7 @@ function formatCharge(metric: CommercialMetricView): string {
41
41
  }
42
42
  </script>
43
43
 
44
- <section class="commercial-overview" aria-label={t(M['subscriptions.commercial.overview_label'])}>
44
+ <section class="commercial-overview" aria-label={t(M['subscriptions.commercial.overview_label'])} data-smrt-component="CommercialOverview">
45
45
  {#each metrics as metric (metric.metricKey)}
46
46
  <article>
47
47
  <header><strong>{metric.metricKey}</strong><span class:blocked={metric.thresholdState === 'blocked'}>{metric.thresholdState ?? 'ok'}</span></header>
@@ -56,11 +56,14 @@ function formatCharge(metric: CommercialMetricView): string {
56
56
  </section>
57
57
 
58
58
  <style>
59
+ @layer smrt.reset, smrt.structure, smrt.theme;
60
+ @layer smrt.theme {
59
61
  .commercial-overview { display:grid; gap:.75rem; }
60
- article { border:1px solid var(--smrt-color-outline-variant,#d8dde6); border-radius:var(--smrt-radius-md,8px); padding:1rem; }
62
+ article { border:1px solid var(--smrt-color-outline-variant); border-radius:var(--smrt-radius-md); padding:1rem; }
61
63
  header, dl, dl div { display:flex; justify-content:space-between; gap:1rem; }
62
64
  dl { flex-wrap:wrap; margin:.75rem 0 0; }
63
- dt { color:var(--smrt-color-on-surface-variant,#64748b); }
65
+ dt { color:var(--smrt-color-on-surface-variant); }
64
66
  dd { margin:0; }
65
- .blocked { color:var(--smrt-color-error,#dc2626); }
67
+ .blocked { color:var(--smrt-color-error); }
68
+ }
66
69
  </style>
@@ -79,7 +79,7 @@ let {
79
79
  } = $props();
80
80
  </script>
81
81
 
82
- <div class="smrt-plan-picker">
82
+ <div class="smrt-plan-picker" data-smrt-component="PlanPicker">
83
83
  {#each plans as plan (plan.planKey)}
84
84
  <!-- raw-primitive-allow: pressable selection card (aria-pressed toggle with multi-line plan summary), not a standard action button -->
85
85
  <button
@@ -105,6 +105,8 @@ let {
105
105
  </div>
106
106
 
107
107
  <style>
108
+ @layer smrt.reset, smrt.structure, smrt.theme;
109
+ @layer smrt.theme {
108
110
  .smrt-plan-picker {
109
111
  display: grid;
110
112
  gap: 0.75rem;
@@ -113,9 +115,9 @@ let {
113
115
 
114
116
  .smrt-plan-picker__plan {
115
117
  align-items: flex-start;
116
- background: var(--smrt-color-surface, #fff);
117
- border: 1px solid var(--smrt-color-outline-variant, #d8dde6);
118
- border-radius: var(--smrt-radius-md, 8px);
118
+ background: var(--smrt-color-surface);
119
+ border: 1px solid var(--smrt-color-outline-variant);
120
+ border-radius: var(--smrt-radius-md);
119
121
  color: inherit;
120
122
  cursor: pointer;
121
123
  display: grid;
@@ -125,8 +127,8 @@ let {
125
127
  }
126
128
 
127
129
  .smrt-plan-picker__plan.selected {
128
- border-color: var(--smrt-color-primary, #2563eb);
129
- box-shadow: 0 0 0 1px var(--smrt-color-primary, #2563eb);
130
+ border-color: var(--smrt-color-primary);
131
+ box-shadow: 0 0 0 1px var(--smrt-color-primary);
130
132
  }
131
133
 
132
134
  .smrt-plan-picker__name {
@@ -141,7 +143,8 @@ let {
141
143
  .smrt-plan-picker__price small,
142
144
  .smrt-plan-picker__description,
143
145
  .smrt-plan-picker__features {
144
- color: var(--smrt-color-on-surface-variant, #64748b);
146
+ color: var(--smrt-color-on-surface-variant);
145
147
  font-size: var(--smrt-typography-body-medium-size, 0.875rem);
146
148
  }
149
+ }
147
150
  </style>
@@ -46,7 +46,7 @@ const periodLabel = $derived(
46
46
  );
47
47
  </script>
48
48
 
49
- <section class="smrt-subscription-summary">
49
+ <section class="smrt-subscription-summary" data-smrt-component="SubscriptionSummary">
50
50
  <div>
51
51
  <p class="smrt-subscription-summary__label">{t(M['subscriptions.summary.current_plan'])}</p>
52
52
  <h2>{resolution?.planKey ?? t(M['subscriptions.summary.no_active_plan'])}</h2>
@@ -74,6 +74,8 @@ const periodLabel = $derived(
74
74
  </section>
75
75
 
76
76
  <style>
77
+ @layer smrt.reset, smrt.structure, smrt.theme;
78
+ @layer smrt.theme {
77
79
  .smrt-subscription-summary {
78
80
  align-items: center;
79
81
  display: flex;
@@ -88,7 +90,7 @@ const periodLabel = $derived(
88
90
 
89
91
  .smrt-subscription-summary__label,
90
92
  .smrt-subscription-summary dt {
91
- color: var(--smrt-color-on-surface-variant, #64748b);
93
+ color: var(--smrt-color-on-surface-variant);
92
94
  font-size: var(--smrt-typography-label-medium-size, 0.8rem);
93
95
  }
94
96
 
@@ -102,4 +104,5 @@ const periodLabel = $derived(
102
104
  font-weight: var(--smrt-typography-weight-bold, 650);
103
105
  margin: 0;
104
106
  }
107
+ }
105
108
  </style>
@@ -9,7 +9,7 @@ let {
9
9
  } = $props();
10
10
  </script>
11
11
 
12
- <div class="smrt-usage-thresholds">
12
+ <div class="smrt-usage-thresholds" data-smrt-component="UsageThresholds">
13
13
  {#each evaluations as evaluation (`${evaluation.threshold.metricKey}:${evaluation.usage.windowStart.toISOString()}`)}
14
14
  <article
15
15
  class:warn={evaluation.state === 'warn'}
@@ -33,25 +33,27 @@ let {
33
33
  </div>
34
34
 
35
35
  <style>
36
+ @layer smrt.reset, smrt.structure, smrt.theme;
37
+ @layer smrt.theme {
36
38
  .smrt-usage-thresholds {
37
39
  display: grid;
38
40
  gap: 0.75rem;
39
41
  }
40
42
 
41
43
  .smrt-usage-thresholds__row {
42
- border: 1px solid var(--smrt-color-outline-variant, #d8dde6);
43
- border-radius: var(--smrt-radius-md, 8px);
44
+ border: 1px solid var(--smrt-color-outline-variant);
45
+ border-radius: var(--smrt-radius-md);
44
46
  display: grid;
45
47
  gap: 0.45rem;
46
48
  padding: 0.875rem;
47
49
  }
48
50
 
49
51
  .smrt-usage-thresholds__row.warn {
50
- border-color: var(--smrt-color-warning, #d97706);
52
+ border-color: var(--smrt-color-warning);
51
53
  }
52
54
 
53
55
  .smrt-usage-thresholds__row.blocked {
54
- border-color: var(--smrt-color-error, #dc2626);
56
+ border-color: var(--smrt-color-error);
55
57
  }
56
58
 
57
59
  .smrt-usage-thresholds__header {
@@ -61,9 +63,9 @@ let {
61
63
  }
62
64
 
63
65
  .smrt-usage-thresholds p {
64
- color: var(--smrt-color-on-surface-variant, #64748b);
66
+ color: var(--smrt-color-on-surface-variant);
65
67
  font-size: var(--smrt-typography-body-medium-size, 0.875rem);
66
68
  margin: 0;
67
69
  }
68
-
70
+ }
69
71
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-subscriptions",
3
- "version": "0.55.13",
3
+ "version": "0.55.17",
4
4
  "description": "Tenant subscriptions, entitlement resolution, usage thresholds, and subscription UI for SMRT",
5
5
  "type": "module",
6
6
  "smrtRawPrimitives": "strict",
@@ -26,10 +26,10 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "@happyvertical/smrt-core": "0.55.13",
30
- "@happyvertical/smrt-tenancy": "0.55.13",
31
- "@happyvertical/smrt-ui": "0.55.13",
32
- "@happyvertical/sql": "^0.103.2"
29
+ "@happyvertical/smrt-core": "0.55.17",
30
+ "@happyvertical/smrt-tenancy": "0.55.17",
31
+ "@happyvertical/smrt-ui": "0.55.17",
32
+ "@happyvertical/sql": "^0.103.4"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "svelte": "^5.57.0"
@@ -40,7 +40,7 @@
40
40
  }
41
41
  },
42
42
  "devDependencies": {
43
- "@happyvertical/smrt-vitest": "0.55.13",
43
+ "@happyvertical/smrt-vitest": "0.55.17",
44
44
  "@sveltejs/package": "^2.5.8",
45
45
  "@types/node": "24.13.6",
46
46
  "svelte": "^5.57.1",