@meistrari/tela-build 2.1.1 → 2.3.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  Latest updates and announcements.
4
4
 
5
+ ## December 2, 2026
6
+
7
+ - [Getting started](/) Tela Build now lives in the `meistrari/tela-design` repo, with its history, and is released from there. The package name and its `2.x` line are unchanged. It now declares `virtua` (used by `TelaAnimatedText`) and `date-fns` (used by the chat text message) as dependencies, so apps outside the Studio no longer need to install them.
8
+ - [Chat → Usage](/templates/chat#usage) `TelaChatUsagePopover` renders its percentage with [Animated Number](/components/animated-number), so a new `percent` rolls its digits in instead of swapping the text, alongside the bar's fill.
9
+
10
+ ## December 1, 2026
11
+
12
+ - [Chat → Usage](/templates/chat#usage) `TelaChatUsageMeter` has a `popover-align` prop (`start`, `center` or `end`, default `end`) that picks which edge of the popover lines up with the ring, so a ring near the left of the page can open its popover to the right.
13
+
5
14
  ## November 25, 2026
6
15
 
7
16
  - [Chat → Usage](/templates/chat#usage) New `TelaChatUsageMeter` and `TelaChatUsagePopover` show the assistant's monthly usage. The meter is an 18px progress ring that fills clockwise with `percent` and opens the popover above it (`v-model:open`). The popover is a 256px card with the renewal (`renews-in-days`), the monthly limit bar and its percentage, plus what its `state` adds: `warning` a notice with the share left, `limit` the limit notice with **Turn on extra usage** and **Not now** (emit `activate` and `dismiss`, and close the meter's popover), and `additional` the formatted `additional-amount`. It renders on its own too, for hosts that show the body without the ring. Set `calculating` while a new value is on its way: the ring pulses over the last value (a steady dimmer ring under reduced motion), the meter's `aria-label` reads `labels.calculating` and sets `aria-busy`, and the popover shows `labels.calculating` ("Calculating…") in place of the percentage. Copy comes from `labels` (`TelaChatUsageLabels`), with English defaults.
@@ -1340,7 +1340,7 @@ How much of the assistant's monthly allowance the user has spent. `TelaChatUsage
1340
1340
  </template>
1341
1341
  ```
1342
1342
 
1343
- The meter fills clockwise with the percentage and is a full ring at 100%. Clicking it opens the popover; **Turn on extra usage** and **Not now** close it and emit `activate` and `dismiss`. Bind `v-model:open` to open it from the host, for example when the user reaches the limit.
1343
+ The meter fills clockwise with the percentage and is a full ring at 100%. Clicking it opens the popover; **Turn on extra usage** and **Not now** close it and emit `activate` and `dismiss`. Bind `v-model:open` to open it from the host, for example when the user reaches the limit. The popover lines up its right edge with the ring; set `popover-align="start"` when the ring sits near the left of the page.
1344
1344
 
1345
1345
  ```vue
1346
1346
  <script setup lang="ts">
@@ -2016,6 +2016,7 @@ type UsagePopoverEmits = { activate: [], dismiss: [] } // the 'limit' state's
2016
2016
 
2017
2017
  type UsageMeterProps = UsagePopoverProps & {
2018
2018
  open?: boolean // v-model:open; activate and dismiss close it
2019
+ popoverAlign?: 'start' | 'center' | 'end' // the popover's edge lined up with the ring; default: 'end'
2019
2020
  // calculating also pulses the ring over the last value, sets aria-busy and passes labels.calculating to labels.trigger
2020
2021
  }
2021
2022
 
@@ -8,9 +8,11 @@ const props = withDefaults(defineProps<{
8
8
  additionalAmount?: string
9
9
  labels?: Partial<TelaChatUsageLabels>
10
10
  calculating?: boolean
11
+ popoverAlign?: 'start' | 'center' | 'end'
11
12
  }>(), {
12
13
  state: 'normal',
13
14
  calculating: false,
15
+ popoverAlign: 'end',
14
16
  labels: () => ({}),
15
17
  })
16
18
 
@@ -65,7 +67,7 @@ const triggerLabel = computed(() => props.labels.trigger?.(shown.value) ?? `Usag
65
67
  </TelaPopoverTrigger>
66
68
  <TelaPopoverContent
67
69
  side="top"
68
- align="end"
70
+ :align="popoverAlign"
69
71
  :side-offset="6"
70
72
  data-tela-escape-layer
71
73
  class="!w-auto !rounded-none !border-0 !bg-transparent !p-0 !shadow-none"
@@ -36,7 +36,10 @@ const used = computed(() => Math.min(100, Math.max(0, Math.round(props.percent))
36
36
  </script>
37
37
 
38
38
  <template>
39
- <div flex="~ col" gap-16px w-256px pt-10px px-12px pb-12px bg rounded-12px border-0.5px border shadow-flying>
39
+ <div
40
+ flex="~ col" gap-16px w-256px pt-10px px-12px pb-12px bg rounded-12px border-0.5px shadow-flying
41
+ class="border-black/12"
42
+ >
40
43
  <div flex items-center justify-between gap-8px>
41
44
  <span body-11-semibold text-primary>{{ copy.title }}</span>
42
45
  <span body-11-regular text-secondary>{{ copy.renewsIn(renewsInDays) }}</span>
@@ -45,8 +48,9 @@ const used = computed(() => Math.min(100, Math.max(0, Math.round(props.percent))
45
48
  <div flex="~ col" gap-8px>
46
49
  <div flex="~ col" gap-6px>
47
50
  <div flex items-center justify-between gap-8px>
48
- <span body-11-medium text-primary>{{ copy.monthlyLimit }}</span>
49
- <span body-11-regular text-secondary>{{ calculating ? copy.calculating : `${used}%` }}</span>
51
+ <span body-11-semibold text-primary>{{ copy.monthlyLimit }}</span>
52
+ <span v-if="calculating" body-11-regular text-secondary>{{ copy.calculating }}</span>
53
+ <TelaAnimatedNumber v-else :value="used" suffix="%" class="body-11-regular text-secondary" />
50
54
  </div>
51
55
  <TelaProgressBar :model-value="used" variant="blue" :aria-label="copy.monthlyLimit" />
52
56
  </div>
@@ -3,8 +3,6 @@ import { ref, computed, watch } from 'vue'
3
3
  import { useMagicKeys } from '@vueuse/core'
4
4
 
5
5
  import { ComboboxRoot as Combobox, ComboboxTrigger } from 'reka-ui'
6
- import type { AllActionsInfo } from 'tela-workflow/src/compat-v1-schemas'
7
-
8
6
  import ComboboxAnchor from './combobox-anchor.vue'
9
7
  import ComboboxEmpty from './combobox-empty.vue'
10
8
  import ComboboxGroup from './combobox-group.vue'
@@ -22,7 +20,7 @@ import TabsTrigger from '../tabs/tabs-trigger.vue'
22
20
  export interface CombinedOption {
23
21
  label: string
24
22
  description?: string
25
- value: AllActionsInfo['actionName']
23
+ value: string
26
24
  icon: string
27
25
  enabled?: () => boolean | undefined
28
26
  tabs?: string[]
package/docs/index.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Tela Build
2
2
 
3
- Tela Build (`@meistrari/tela-build`) is the design system for Tela's Nuxt apps: the `Tela*` Vue components, the UnoCSS design tokens, and the rules on this page. In the tela monorepo its source is `packages/build`.
3
+ Tela Build (`@meistrari/tela-build`) is the design system for Tela's Nuxt apps: the `Tela*` Vue components, the UnoCSS design tokens, and the rules on this page. Its source is `packages/build` in the `meistrari/tela-design` repo; apps install the published package from npm.
4
4
 
5
5
  Components and composables are auto-imported. Never import a `Tela*` component, `useSound` or `useTelaLabels` by hand.
6
6
 
@@ -251,7 +251,7 @@ When you review or polish UI, read [Design review](guides/design-review.md): it
251
251
 
252
252
  ## Changing Tela Build itself
253
253
 
254
- This section applies only when you edit `packages/build` in the tela monorepo.
254
+ This section applies only when you edit `packages/build` in the `meistrari/tela-design` repo.
255
255
 
256
256
  - This skill is generated. `packages/build/docs/index.md` is this page, the other files in `packages/build/docs/` become `guides/`, and every component page comes from the component's `.vue` source and the `.mdx` file next to it. Never edit `.agents/skills/tela-build/` by hand: regeneration overwrites it.
257
257
  - After changing a component's props, slots, events or `.mdx`, or anything in `packages/build/docs/`, run `pnpm --filter @meistrari/tela-build run generate-docs` and commit the result. CI fails when the generated docs drift.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "2.1.1",
3
+ "version": "2.3.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",
@@ -44,6 +44,7 @@
44
44
  "class-variance-authority": "0.7.0",
45
45
  "clsx": "2.1.1",
46
46
  "comark": "0.5.1",
47
+ "date-fns": "4.1.0",
47
48
  "glob": "14.0.6",
48
49
  "lucide-vue-next": "0.456.0",
49
50
  "mdast-util-mdx": "3.0.0",
@@ -66,6 +67,7 @@
66
67
  "typescript": "5.8.2",
67
68
  "unified": "11.0.5",
68
69
  "unocss": "66.5.12",
70
+ "virtua": "0.40.3",
69
71
  "vue-component-meta": "3.0.8",
70
72
  "vue-docgen-api": "4.78.0",
71
73
  "vue-input-otp": "0.3.2",
@@ -80,13 +82,14 @@
80
82
  "devDependencies": {
81
83
  "@nuxt/kit": "4.6.2",
82
84
  "@types/node": "22.19.0",
85
+ "@vitejs/plugin-vue": "6.0.10",
86
+ "@vue/test-utils": "2.4.6",
83
87
  "gray-matter": "4.0.3",
88
+ "happy-dom": "21.0.4",
84
89
  "nuxt": "4.6.4",
85
- "vue": "3.5.42",
90
+ "vite": "8.3.5",
86
91
  "vitest": "4.1.11",
87
- "vue-tsc": "3.3.11",
88
- "@vitejs/plugin-vue": "6.0.10",
89
- "happy-dom": "21.0.4",
90
- "vite": "8.3.5"
92
+ "vue": "3.5.42",
93
+ "vue-tsc": "3.3.11"
91
94
  }
92
95
  }