@cocoar/vue-ui 3.4.0-beta.22 → 3.4.0-beta.25

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 (127) hide show
  1. package/dist/compact-fonts.d.ts +1 -0
  2. package/dist/compact-fonts.d.ts.map +1 -0
  3. package/dist/compact-fonts.js +4 -0
  4. package/dist/components/avatar/CoarAvatar.vue.d.ts +1 -1
  5. package/dist/components/avatar/CoarAvatar.vue.d.ts.map +1 -1
  6. package/dist/components/badge/CoarBadge.vue.d.ts +1 -1
  7. package/dist/components/badge/CoarBadge.vue.d.ts.map +1 -1
  8. package/dist/components/breadcrumb/CoarBreadcrumbItem.vue.d.ts +2 -2
  9. package/dist/components/breadcrumb/CoarBreadcrumbItem.vue.d.ts.map +1 -1
  10. package/dist/components/button/CoarButton.vue.d.ts +2 -2
  11. package/dist/components/button/CoarButton.vue.d.ts.map +1 -1
  12. package/dist/components/card/CoarCard.vue.d.ts.map +1 -1
  13. package/dist/components/checkbox/CoarCheckbox.vue.d.ts +3 -3
  14. package/dist/components/checkbox/CoarCheckbox.vue.d.ts.map +1 -1
  15. package/dist/components/checkbox-group/CoarCheckboxGroup.vue.d.ts +1 -1
  16. package/dist/components/checkbox-group/CoarCheckboxGroup.vue.d.ts.map +1 -1
  17. package/dist/components/code-block/CoarCodeBlock.vue.d.ts +1 -1
  18. package/dist/components/code-block/CoarCodeBlock.vue.d.ts.map +1 -1
  19. package/dist/components/data-list/CoarDataList.vue.d.ts.map +1 -1
  20. package/dist/components/date-time/plain-date-picker/CoarPlainDatePicker.vue.d.ts +5 -5
  21. package/dist/components/date-time/plain-date-picker/CoarPlainDatePicker.vue.d.ts.map +1 -1
  22. package/dist/components/date-time/plain-date-time-or-date-picker/CoarPlainDateTimeOrDatePicker.vue.d.ts +1 -1
  23. package/dist/components/date-time/plain-date-time-or-date-picker/CoarPlainDateTimeOrDatePicker.vue.d.ts.map +1 -1
  24. package/dist/components/date-time/plain-date-time-picker/CoarPlainDateTimePicker.vue.d.ts +5 -5
  25. package/dist/components/date-time/plain-date-time-picker/CoarPlainDateTimePicker.vue.d.ts.map +1 -1
  26. package/dist/components/date-time/scrollable-calendar/CoarScrollableCalendar.vue.d.ts.map +1 -1
  27. package/dist/components/date-time/time-picker/CoarTimePicker.vue.d.ts.map +1 -1
  28. package/dist/components/date-time/zoned-date-time-or-date-picker/CoarZonedDateTimeOrDatePicker.vue.d.ts +1 -1
  29. package/dist/components/date-time/zoned-date-time-or-date-picker/CoarZonedDateTimeOrDatePicker.vue.d.ts.map +1 -1
  30. package/dist/components/date-time/zoned-date-time-picker/CoarZonedDateTimePicker.vue.d.ts +5 -5
  31. package/dist/components/date-time/zoned-date-time-picker/CoarZonedDateTimePicker.vue.d.ts.map +1 -1
  32. package/dist/components/date-time/zoned-date-time-picker/CoarZonedDateTimePickerPanel.vue.d.ts.map +1 -1
  33. package/dist/components/dialog/CoarDialogShell.vue.d.ts.map +1 -1
  34. package/dist/components/form-field/CoarFormField.vue.d.ts +3 -3
  35. package/dist/components/form-field/CoarFormField.vue.d.ts.map +1 -1
  36. package/dist/components/icon/CoarIcon.vue.d.ts +4 -4
  37. package/dist/components/icon/CoarIcon.vue.d.ts.map +1 -1
  38. package/dist/components/input-frame/CoarInputFrame.vue.d.ts +1 -1
  39. package/dist/components/input-frame/CoarInputFrame.vue.d.ts.map +1 -1
  40. package/dist/components/input-frame/CoarInputFrameButton.vue.d.ts +1 -1
  41. package/dist/components/input-frame/CoarInputFrameButton.vue.d.ts.map +1 -1
  42. package/dist/components/link/CoarLink.vue.d.ts +1 -1
  43. package/dist/components/link/CoarLink.vue.d.ts.map +1 -1
  44. package/dist/components/listbox/CoarListbox.vue.d.ts.map +1 -1
  45. package/dist/components/menu/CoarMenuItem.vue.d.ts +3 -3
  46. package/dist/components/menu/CoarMenuItem.vue.d.ts.map +1 -1
  47. package/dist/components/menu/CoarSubExpand.vue.d.ts.map +1 -1
  48. package/dist/components/menu/CoarSubFlyout.vue.d.ts.map +1 -1
  49. package/dist/components/notice/CoarNotice.vue.d.ts +1 -1
  50. package/dist/components/notice/CoarNotice.vue.d.ts.map +1 -1
  51. package/dist/components/number-input/CoarNumberInput.vue.d.ts +3 -3
  52. package/dist/components/number-input/CoarNumberInput.vue.d.ts.map +1 -1
  53. package/dist/components/otp-input/CoarOtpInput.vue.d.ts +4 -4
  54. package/dist/components/otp-input/CoarOtpInput.vue.d.ts.map +1 -1
  55. package/dist/components/overlay/CoarOverlayOutlet.vue.d.ts.map +1 -1
  56. package/dist/components/overlay/compact-context.d.ts +8 -0
  57. package/dist/components/overlay/compact-context.d.ts.map +1 -0
  58. package/dist/components/overlay/index.d.ts +2 -0
  59. package/dist/components/overlay/index.d.ts.map +1 -1
  60. package/dist/components/overlay/useCompactPresentationContext.d.ts +17 -0
  61. package/dist/components/overlay/useCompactPresentationContext.d.ts.map +1 -0
  62. package/dist/components/panel-layout/CoarSplitPane.vue.d.ts +1 -1
  63. package/dist/components/panel-layout/CoarSplitPane.vue.d.ts.map +1 -1
  64. package/dist/components/panel-layout/internal/CoarPaneDivider.vue.d.ts.map +1 -1
  65. package/dist/components/password-input/CoarPasswordInput.vue.d.ts +3 -3
  66. package/dist/components/password-input/CoarPasswordInput.vue.d.ts.map +1 -1
  67. package/dist/components/popconfirm/CoarPopconfirm.vue.d.ts +1 -1
  68. package/dist/components/popover/CoarPopover.vue.d.ts +1 -1
  69. package/dist/components/progress-bar/CoarProgressBar.vue.d.ts +1 -1
  70. package/dist/components/progress-bar/CoarProgressBar.vue.d.ts.map +1 -1
  71. package/dist/components/radio-group/CoarRadioGroup.vue.d.ts +2 -2
  72. package/dist/components/radio-group/CoarRadioGroup.vue.d.ts.map +1 -1
  73. package/dist/components/scrollbar/vScrollbar.d.ts.map +1 -1
  74. package/dist/components/select/CoarMultiSelect.vue.d.ts.map +1 -1
  75. package/dist/components/select/CoarMultiSelectDropdownPanel.vue.d.ts.map +1 -1
  76. package/dist/components/select/CoarSelectDropdownPanel.vue.d.ts.map +1 -1
  77. package/dist/components/select/CoarTagSelectDropdownPanel.vue.d.ts.map +1 -1
  78. package/dist/components/sidebar/CoarSidebar.vue.d.ts +1 -1
  79. package/dist/components/sidebar/CoarSidebar.vue.d.ts.map +1 -1
  80. package/dist/components/sidebar/CoarSidebarGroup.vue.d.ts +2 -2
  81. package/dist/components/sidebar/CoarSidebarGroup.vue.d.ts.map +1 -1
  82. package/dist/components/sidebar/CoarSidebarItem.vue.d.ts +2 -2
  83. package/dist/components/sidebar/CoarSidebarItem.vue.d.ts.map +1 -1
  84. package/dist/components/spinner/CoarSpinner.vue.d.ts +1 -1
  85. package/dist/components/spinner/CoarSpinner.vue.d.ts.map +1 -1
  86. package/dist/components/switch/CoarSwitch.vue.d.ts +3 -3
  87. package/dist/components/switch/CoarSwitch.vue.d.ts.map +1 -1
  88. package/dist/components/table/CoarTable.vue.d.ts +1 -1
  89. package/dist/components/table/CoarTable.vue.d.ts.map +1 -1
  90. package/dist/components/tabs/CoarTabGroup.vue.d.ts.map +1 -1
  91. package/dist/components/text-input/CoarTextInput.vue.d.ts +3 -3
  92. package/dist/components/text-input/CoarTextInput.vue.d.ts.map +1 -1
  93. package/dist/components/theme-editor/CoarPaletteEditor.vue.d.ts +3 -1
  94. package/dist/components/theme-editor/CoarPaletteEditor.vue.d.ts.map +1 -1
  95. package/dist/components/theme-editor/theme-editor-state.d.ts +3 -3
  96. package/dist/components/theme-editor/theme-editor-state.d.ts.map +1 -1
  97. package/dist/components/theme-scope/CoarThemeScope.vue.d.ts.map +1 -1
  98. package/dist/components/tree/CoarTreeNode.vue.d.ts.map +1 -1
  99. package/dist/composables/useDragDrop.d.ts.map +1 -1
  100. package/dist/composables/useDragImage.d.ts +2 -14
  101. package/dist/composables/useDragImage.d.ts.map +1 -1
  102. package/dist/index.css +1 -1
  103. package/dist/index.d.ts +2 -0
  104. package/dist/index.d.ts.map +1 -1
  105. package/dist/index.js +2091 -1854
  106. package/package.json +9 -4
  107. package/skills/cocoar-vue-ui/SKILL.md +1 -0
  108. package/skills/cocoar-vue-ui/references/components/calendar/index.md +26 -1
  109. package/skills/cocoar-vue-ui/references/components/data-grid.md +4 -0
  110. package/skills/cocoar-vue-ui/references/components/document-viewer/coar-document-viewer.md +4 -0
  111. package/skills/cocoar-vue-ui/references/components/form-field.md +10 -6
  112. package/skills/cocoar-vue-ui/references/components/listbox.md +2 -0
  113. package/skills/cocoar-vue-ui/references/components/map/index.md +5 -1
  114. package/skills/cocoar-vue-ui/references/components/markdown-editor.md +10 -0
  115. package/skills/cocoar-vue-ui/references/components/markdown-form.md +9 -0
  116. package/skills/cocoar-vue-ui/references/components/markdown.md +10 -0
  117. package/skills/cocoar-vue-ui/references/components/mermaid.md +11 -0
  118. package/skills/cocoar-vue-ui/references/components/script-editor.md +10 -0
  119. package/skills/cocoar-vue-ui/references/foundations/compact-presentation.md +215 -0
  120. package/skills/cocoar-vue-ui/references/foundations/theming.md +4 -0
  121. package/skills/cocoar-vue-ui/references/foundations/typography.md +3 -0
  122. package/skills/cocoar-vue-ui/references/guide/mobile.md +2 -2
  123. package/skills/cocoar-vue-ui/references/guide/theming.md +3 -0
  124. package/styles/tokens/all.css +3 -0
  125. package/styles/tokens/compact.css +441 -0
  126. package/styles/tokens/select-overlay.css +10 -10
  127. package/styles/tokens/tooltip.css +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocoar/vue-ui",
3
- "version": "3.4.0-beta.22",
3
+ "version": "3.4.0-beta.25",
4
4
  "description": "Cocoar Design System — a tablet-first Vue 3 component library with 30+ accessible, themeable components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -22,7 +22,8 @@
22
22
  "type": "module",
23
23
  "sideEffects": [
24
24
  "*.css",
25
- "./dist/fonts.js"
25
+ "./dist/fonts.js",
26
+ "./dist/compact-fonts.js"
26
27
  ],
27
28
  "main": "./dist/index.js",
28
29
  "module": "./dist/index.js",
@@ -36,6 +37,10 @@
36
37
  "./fonts": {
37
38
  "import": "./dist/fonts.js",
38
39
  "types": "./dist/fonts.d.ts"
40
+ },
41
+ "./fonts/compact": {
42
+ "import": "./dist/compact-fonts.js",
43
+ "types": "./dist/compact-fonts.d.ts"
39
44
  }
40
45
  },
41
46
  "bin": {
@@ -48,7 +53,7 @@
48
53
  "skills"
49
54
  ],
50
55
  "dependencies": {
51
- "@cocoar/vue-localization": "3.4.0-beta.22",
56
+ "@cocoar/vue-localization": "3.4.0-beta.25",
52
57
  "@fontsource/cascadia-code": "^5.2.3",
53
58
  "@fontsource/inter": "^5.2.8",
54
59
  "@fontsource/poppins": "^5.2.7",
@@ -73,7 +78,7 @@
73
78
  "vue": "^3.5.32",
74
79
  "vue-router": "^5.0.4"
75
80
  },
76
- "gitHead": "cf85a8c3795712915384fcd39d03a78d0264e860",
81
+ "gitHead": "2b5e0cc78c34cfa6e4a278f27fe91cbfabb2118f",
77
82
  "scripts": {
78
83
  "build": "vite build",
79
84
  "test": "vitest run",
@@ -107,6 +107,7 @@ of each other.
107
107
  - [Icons](references/foundations/icons.md) — CoarIcon and the built-in SVG icon set: preset sizes, colors, rotation, spin animation, and registering custom icon sources with fallback.
108
108
  - [Motion](references/foundations/motion.md) — Motion design tokens: duration and easing CSS variables plus pre-composed transition values, with interactive demos and usage examples.
109
109
  - [Theme Editor](references/foundations/theming.md) — CoarThemeEditor, a live token editor: explore primitive, semantic, and component token layers, apply presets, and export a CSS snippet.
110
+ - [Compact presentation (Preview)](references/foundations/compact-presentation.md) — Preview: an opt-in compact presentation with Inter, Slate surfaces and separate desktop, touch and input roles. Existing applications keep their presentation.
110
111
 
111
112
  ### Localization (@cocoar/vue-localization)
112
113
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Calendar (Preview)
4
4
 
5
- **Devices:** desktop ready · tablet partial · phone planned — Taps, swipe paging and long-press selection work on touch; event resize handles are only 6 px tall.
5
+ **Devices:** desktop ready · tablet partial · phone planned — Touch taps, paging and long-press selection work; legacy resize targets are 6 px. Compact targets stay smaller on short/crowded events.
6
6
 
7
7
  A Vue 3 calendar whose visible hierarchy follows the iOS calendar: **Year**, **Month**, **Day** and **Agenda**, plus fixed **Week** and **Work week** time grids for web applications. Month and Day expose their display choices as nested variations instead of flattening every renderer into the primary view switcher.
8
8
 
@@ -293,6 +293,31 @@ To customize, redefine any token under the same trigger after the package styles
293
293
  }
294
294
  ```
295
295
 
296
+ ### Compact presentation (Preview)
297
+
298
+ Inside the library's experimental `.coar-compact` profile, the calendar takes its surfaces, lines, text and
299
+ state colours from the vue-ui semantic tokens (`--coar-background-neutral-*`, `--coar-border-neutral-tertiary`,
300
+ `--coar-text-neutral-*`, accent and error roles) in light and dark alike, and its type from the shared compact
301
+ roles: labels and day headers follow the UI text size, event cards, pills, bars and axis captions the caption
302
+ size, with weight 500 for labels and titles and 600 only for view titles and the today number. Today is marked
303
+ in the accent colour in every view. Radii, header and agenda-row padding follow the shared control, panel and
304
+ interactive-row roles, so agenda rows reach the 44 px touch row under `.coar-mobile`.
305
+
306
+ Fixed week columns retain a 128 px geometry floor and scroll inside the shell on narrow screens; a horizontal
307
+ gesture scrolls rather than paging while the grid overflows. Month overflow actions and timed resize targets
308
+ have independent roles (`--coar-calendar-month-overflow-target-size` and `--coar-calendar-resize-target-size`).
309
+ The resize side rail is bounded by half the card to avoid overlapping targets and preserve its move area.
310
+ All-day lanes measure their own CSS height before positioning bars and overflow actions.
311
+
312
+ Outside the profile the presentation is unchanged: role usages retain their historical fallbacks, and compact-only
313
+ overflow rules do not apply. The roles are set on the outermost calendar element, so a scheme or mobile
314
+ scope between `.coar-compact` and the calendar still applies, and a value you set on the calendar element
315
+ itself (`.my-calendar { --coar-calendar-bg: … }`) wins over the profile.
316
+
317
+ Not part of the profile: event colours (`meta.color`, `meta.textColor`), assignee and band colours you pass,
318
+ and the geometry the views compute in script — `pixelsPerHour`, `timelineRowHeight`, the
319
+ pill and chip line boxes, `--coar-time-grid-axis-width` and `--coar-calendar-scroll-inset-bottom`.
320
+
296
321
  > **Tip: RTL**
297
322
  >
298
323
  > Layout-mirroring for `direction: rtl` is **not yet** wired (multi-day bars, resize handles, sticky-header positioning all assume LTR). If you need RTL support, open an issue — the math is mostly localised to the bar / handle inset calc()s, but it deserves a deliberate pass with proper test coverage rather than a one-shot patch.
@@ -142,6 +142,10 @@ const builder = CoarGridBuilder.create<User>()
142
142
 
143
143
  Dark styles ship with the package. The theme maps AG Grid's variables onto the semantic `--coar-*` tokens (with hardcoded fallbacks), so the grid follows your design-system theme in both modes. Dark values activate via the `.dark-mode` class — on `<html>` or any ancestor (the Cocoar convention, same as `@cocoar/vue-ui`), or directly on the grid element. `[data-theme="dark"]` is **not** a trigger here.
144
144
 
145
+ ### Compact presentation (Preview)
146
+
147
+ Inside the experimental `.coar-compact` profile — on an ancestor or on the grid itself (`class="coar-compact"`) — the grid uses the library's compact roles: 13px UI text (14px with `.coar-mobile`), rows, header and AG Grid's list items at the interactive-row height (36px, 44px with `.coar-mobile`), 12px cell padding, the header in the label weight, and AG Grid's accent, icons, checkboxes, inputs, menus and drop markers on the semantic tokens. The same `cocoarTheme` serves both looks; outside the profile nothing changes. Override a role on the grid or inside the compact area: `--coar-data-grid-row-height`, `--coar-data-grid-header-height`, `--coar-data-grid-list-item-height`, `--coar-data-grid-font-size`, `--coar-data-grid-cell-padding-x`, `--coar-data-grid-header-font-weight`, `--coar-data-grid-control-radius`, `--coar-data-grid-radius`, `--coar-data-grid-tree-indent` and `--coar-data-grid-tree-toggle-size` (the last two apply in every presentation).
148
+
145
149
  ## Column Types
146
150
 
147
151
  Built-in renderers for dates, numbers, currency, tags, and icons — no custom cell components needed. Date, number, and currency columns are locale-aware and update reactively when the locale changes. Try the locale switcher in the nav bar.
@@ -263,6 +263,10 @@ The viewer fills 100% of its parent and uses internal flexbox to allocate space
263
263
 
264
264
  Splitters between the columns are draggable — users can resize the left rail (thumbnails) and right rail (annotations panel) on the fly.
265
265
 
266
+ ## Compact presentation (Preview)
267
+
268
+ Inside the experimental `.coar-compact` profile — on an ancestor or on the viewer — the chrome (toolbar, sidebar, annotations panel, search bar, annotation popover) follows the semantic color tokens in light and dark, uses the library's UI, caption and field text sizes, and gets 28px buttons and inputs (44px buttons, 36px inputs and 48px headers with `.coar-mobile`). The annotation popover, teleported to `body`, takes the profile of its viewer. The page itself — canvas, rendered content, annotations, search highlights — is document content and keeps its colors. `--coar-color-*` overrides you set still win; outside the profile nothing changes.
269
+
266
270
  ## Position memory example
267
271
 
268
272
  ```vue
@@ -46,6 +46,8 @@ const name = ref('');
46
46
 
47
47
  `CoarFormField` can place its label before or after any control, either stacked or inline. All four combinations have a visible effect. Inline layouts are especially useful when the field label is the only label of a checkbox or switch; leave the control's own `label` unset in that case.
48
48
 
49
+ Each example below has its own value. The two checkboxes demonstrate label-after and label-before independently; in Compact, the inline label stays beside its control.
50
+
49
51
  **Demo — `form-field/demos/FormFieldLayouts.vue`**
50
52
 
51
53
  ```vue
@@ -59,7 +61,7 @@ const name = ref('');
59
61
  layout="inline"
60
62
  label-position="after"
61
63
  >
62
- <CoarCheckbox v-model="active" />
64
+ <CoarCheckbox v-model="activeAfter" />
63
65
  </CoarFormField>
64
66
  </section>
65
67
 
@@ -71,7 +73,7 @@ const name = ref('');
71
73
  layout="inline"
72
74
  label-position="before"
73
75
  >
74
- <CoarCheckbox v-model="active" />
76
+ <CoarCheckbox v-model="activeBefore" />
75
77
  </CoarFormField>
76
78
  </section>
77
79
 
@@ -83,7 +85,7 @@ const name = ref('');
83
85
  layout="inline"
84
86
  label-position="after"
85
87
  >
86
- <CoarTextInput v-model="name" placeholder="Ada Lovelace" />
88
+ <CoarTextInput v-model="inlineName" placeholder="Ada Lovelace" />
87
89
  </CoarFormField>
88
90
  </section>
89
91
 
@@ -95,7 +97,7 @@ const name = ref('');
95
97
  layout="stacked"
96
98
  label-position="after"
97
99
  >
98
- <CoarTextInput v-model="name" placeholder="Ada Lovelace" />
100
+ <CoarTextInput v-model="stackedName" placeholder="Ada Lovelace" />
99
101
  </CoarFormField>
100
102
  </section>
101
103
  </div>
@@ -105,8 +107,10 @@ const name = ref('');
105
107
  import { ref } from 'vue';
106
108
  import { CoarCheckbox, CoarFormField, CoarTextInput } from '@cocoar/vue-ui';
107
109
 
108
- const active = ref(false);
109
- const name = ref('');
110
+ const activeAfter = ref(false);
111
+ const activeBefore = ref(false);
112
+ const inlineName = ref('');
113
+ const stackedName = ref('');
110
114
  </script>
111
115
 
112
116
  <style scoped>
@@ -15,6 +15,8 @@ import type { CoarListboxOption } from '@cocoar/vue-ui';
15
15
 
16
16
  Multi-select highlight via click, `Ctrl+Click`, `Shift+Click`, and keyboard (arrows, `Space`, `Ctrl+A`). Double-click (or `Enter`) emits `item-activate` — wire this up to move items, open a detail view, etc.
17
17
 
18
+ In Compact, the scrollbar track stays transparent so the list's rounded border remains visible when its contents overflow.
19
+
18
20
  **Demo — `listbox/demos/BasicListbox.vue`**
19
21
 
20
22
  ```vue
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Map (Preview)
4
4
 
5
- **Devices:** desktop ready · tablet ready · phone partial — Pan and zoom work by touch; the map's controls have no .coar-mobile presentation yet.
5
+ **Devices:** desktop ready · tablet ready · phone partial — Touch pan/zoom; compact mobile enlarges zoom and list controls. Dense pins and vertices retain small spatial targets.
6
6
 
7
7
  An interactive [Leaflet](https://leafletjs.com/) map for Vue 3. `<CoarMap>` is
8
8
  **standalone and data-driven**: you feed it resolved `MapData` + `MapConfig` and
@@ -317,6 +317,10 @@ Until the map hydrates — and if Leaflet ever fails to load, or with JS off —
317
317
  crawlable `<ol>` of the named points is shown and then hidden once the map is
318
318
  live. The map container's height is `--coar-map-height` (default `360px`).
319
319
 
320
+ ## Compact presentation (Preview)
321
+
322
+ Inside the experimental `.coar-compact` profile — on an ancestor or on the map — Leaflet's own controls, popups, tooltips and attribution use the library's text, radii and semantic colors (light and dark), and the selection ring follows the accent. With `.coar-mobile` as well, zoom buttons and the point list's drag handle get a 44px touch target. Pins and editor vertices keep their real hit geometry: expanded invisible targets would intercept neighbouring markers. Dense map markers therefore do not meet the same touch-target floor; the point list is an alternative for selecting pins. Map data — tiles, the route, shape dots, category colors, pin size — is not themed. `--coar-map-*` variables you set still win; outside the profile nothing changes.
323
+
320
324
  ## Security
321
325
 
322
326
  Point text (`label`, `note`, `icon`) is treated as untrusted: popups are built
@@ -1318,6 +1318,16 @@ If you embed the editor next to a viewer pane (the playground's "viewer pane" to
1318
1318
  | `--coar-markdown-link` | `var(--coar-text-brand-primary)` | Link color (also applied to inline code). |
1319
1319
  | `--coar-markdown-border` | `var(--coar-border-neutral-tertiary)` | Used by tables, blockquote, `<hr>`. |
1320
1320
 
1321
+ ## Compact presentation (Preview)
1322
+
1323
+ Inside an element with the class `coar-compact` (the experimental compact profile, working title) the
1324
+ editor follows the compact document layout of [`CoarMarkdown`](./markdown.md#theming) and tightens its
1325
+ own chrome: field-sized writing text (14 px, 16 px with `coar-mobile` so iOS does not zoom), a toolbar
1326
+ strip of one interactive row (36 px, 44 px with `coar-mobile`), 28 px floating-toolbar buttons (44 px
1327
+ with `coar-mobile`, wrapping within the viewport) and caption-sized text in the table and color
1328
+ pickers. The floating toolbar and the table handles are teleported to `<body>`; they carry the
1329
+ profile classes of the editor they belong to. Without `coar-compact` nothing changes.
1330
+
1321
1331
  ## Toolbar layout (`tools`)
1322
1332
 
1323
1333
  Pass a `tools` array to control which buttons the **sidebar** toolbar exposes and
@@ -325,6 +325,15 @@ can still be typed, but formatting commands are not shown.
325
325
  - `readonly` formats the values as a finished document. No field is editable.
326
326
  - Fixed Markdown is never editable in either mode.
327
327
 
328
+ ## Compact presentation (Preview)
329
+
330
+ Inside an element with the class `coar-compact` (the experimental compact profile, working title), the
331
+ form reads its colors from the semantic tokens instead of fixed light values, so it follows dark mode
332
+ and the accent: input-colored block frames with the control radius, the focus color on focus,
333
+ semantic error colors and 12 px error text, filled-in readonly values at weight 600 instead of 700, and
334
+ `design: 'basic'` controls with field-sized text and the height of the Cocoar inputs. Without the
335
+ class nothing changes.
336
+
328
337
  ## Validation
329
338
 
330
339
  Validation is always calculated, while `show-errors` controls its visual
@@ -276,3 +276,13 @@ The markdown component uses CSS custom properties for theming:
276
276
  --coar-markdown-border: var(--coar-border-neutral);
277
277
  }
278
278
  ```
279
+
280
+ ### Compact presentation (Preview)
281
+
282
+ Inside an element with the class `coar-compact` (the experimental compact profile, working title), the
283
+ shared stylesheet uses a denser reading layout: 14 px reading text (15 px with `coar-mobile`), headings
284
+ 24 / 18 / 16 px at weight 600, 12 / 24 px block and section spacing, sentence-case table headers, inline
285
+ code as a quiet chip and legible frontmatter. Without the class nothing changes. The values are
286
+ `--coar-markdown-*` roles (`--coar-markdown-font-size`, `--coar-markdown-h1-font-size`,
287
+ `--coar-markdown-table-cell-padding`, …) that you can override inside the profile. Colors set in the
288
+ document (`<span style="color: …">`) are kept as they are.
@@ -166,6 +166,17 @@ exported as pure functions if you need to build your own Mermaid config:
166
166
  | `readCssTokens(el?)` | `getComputedStyle`-backed token getter. |
167
167
  | `makeCssColorResolver()` | Canvas-backed CSS-color → sRGB resolver (handles `oklch(...)`). |
168
168
 
169
+ ### Compact presentation (Preview)
170
+
171
+ Inside an element with the class `coar-compact` (the experimental compact profile, working title), the
172
+ zoom viewport and its controls take the panel radius, the zoom buttons are 28 px (44 px with
173
+ `coar-mobile`, since they are the only way to zoom on touch), and the loading and error states use the
174
+ UI text size. The diagram itself keeps Mermaid's sizes.
175
+
176
+ Mermaid's configuration is global to the page. A page that uses one profile initializes Mermaid once,
177
+ as before; when a diagram of the other profile renders, Mermaid is initialized again with that
178
+ diagram's tokens.
179
+
169
180
  ## In markdown
170
181
 
171
182
  To render diagrams from ` ```mermaid ` fences inside `<CoarMarkdown>`, don't wire
@@ -1250,6 +1250,16 @@ The editor container surfaces these CSS custom properties:
1250
1250
 
1251
1251
  To register your own Monaco theme, call `monaco.editor.defineTheme('my-theme', {...})` anywhere in your app and pass it via the underlying editor instance (`editorRef.value?.getEditor().updateOptions({ theme: 'my-theme' })`).
1252
1252
 
1253
+ ### Compact presentation (Preview)
1254
+
1255
+ Two more themes, `coar-compact-light` and `coar-compact-dark` (slate neutrals, line numbers at 4.5:1),
1256
+ are registered next to the two above, which stay unchanged. Monaco themes apply to every editor on the
1257
+ page, so the compact themes are used only when `<html>` or `<body>` has the class `coar-compact`
1258
+ (the experimental compact profile, working title); `theme` keeps choosing light or dark. The editor
1259
+ frame follows a local `coar-compact` area too (control radius), but Monaco's colors inside it do not:
1260
+ mixing default and compact editors on one page is not supported. The compact themes use fixed colors
1261
+ and do not follow token or accent overrides.
1262
+
1253
1263
  ### Font
1254
1264
 
1255
1265
  The editor renders code in **Cascadia Code** (Microsoft's ligature-enabled coding font) with `Consolas`, `Monaco`, `Courier New` as fallback. Ligatures are enabled by default, so `!=`, `=>`, `===`, and `&&` render as combined glyphs. This matches `CoarCodeBlock` — both components share the same font stack.
@@ -0,0 +1,215 @@
1
+ <!-- Generated from apps/docs/foundations/compact-presentation.md by apps/docs/scripts/sync-skill.mjs. Do not edit; edit the docs page. -->
2
+
3
+ # Compact presentation (Preview)
4
+
5
+ The compact profile is an experiment across the library, not a change of the default theme.
6
+ It uses smaller, normally weighted Inter text, Slate-tinted structure, restrained corners and
7
+ aligned controls. Existing props, events and data formats are unchanged.
8
+
9
+ ## Compare this documentation
10
+
11
+ Use **Style → Bisher / Compact** in the navigation to switch the entire documentation:
12
+ the VitePress shell, prose and ordinary live component examples. In a narrower window, the
13
+ selector is in the main navigation menu. The mobile documentation has the same selector in its header.
14
+
15
+ The choice is remembered in this browser and follows page navigation. Embedded phone/tablet
16
+ demos follow it without reloading, so their form values and open dialogs remain intact.
17
+ Light/dark mode remains independent. If browser storage is blocked, switching still works
18
+ for the current visit.
19
+
20
+ **Bisher** remains the default. Examples that explicitly opt into Compact, including the
21
+ sample on this page, remain Compact in either site mode; explicit theme demonstrations keep
22
+ their own scopes. This documentation preference does not change an application's opt-in.
23
+
24
+ ## Opt in
25
+
26
+ Keep the normal stylesheet import and load the optional font entry:
27
+
28
+ ```ts
29
+ import '@cocoar/vue-ui/styles';
30
+ import '@cocoar/vue-ui/fonts/compact';
31
+ ```
32
+
33
+ ```vue
34
+ <CoarThemeScope mode="light">
35
+ <section class="coar-compact">
36
+ <!-- UI, calendar, grids, editors, viewer and map chrome -->
37
+ </section>
38
+ </CoarThemeScope>
39
+ ```
40
+
41
+ Use `.coar-compact` on `html` for an entire application, or on a container for a local comparison.
42
+ Areas outside the class retain the existing desktop and mobile presentation. The library does not
43
+ paint an application's page background; use `background: var(--coar-background-neutral-primary)`
44
+ on your page or panel.
45
+
46
+ Load `@cocoar/vue-ui/fonts` as before if the same document also displays the legacy typography.
47
+ The compact entry self-hosts Inter 400, 500, 600 and 700; it does not load fonts from a CDN.
48
+
49
+ ## Density and typography
50
+
51
+ | Role | Desktop | With `.coar-mobile` |
52
+ | --- | --- | --- |
53
+ | Body | 14 px / 1.5, weight 400 | 14 px / 1.5 |
54
+ | Actions and UI labels | 13 px, weight 400/500 | 14 px |
55
+ | Input text `xs / s / m / l` | 12 / 13 / 14 / 16 px | 16 / 16 / 16 / 18 px |
56
+ | Caption | 12 px | 12 px |
57
+ | Normal control | 36 px | 44 px |
58
+ | Controls `xs / s / m / l` | 24 / 32 / 36 / 44 px | 44 / 44 / 44 / 48 px |
59
+ | Control / panel radius | 6 / 8 px | 6 / 8 px |
60
+
61
+ Input text and action text are deliberately independent. A small visible icon is not a small touch
62
+ target. Dense calendar labels and document/code content have their own roles; they are not scaled
63
+ by a global zoom or density multiplier.
64
+
65
+ `--coar-field-font-size` sets the medium field text. Extra-small, small and large text default
66
+ to two pixels smaller, one pixel smaller and two pixels larger. Override those sizes independently
67
+ with `--coar-field-xs-font-size`, `--coar-field-s-font-size` and `--coar-field-l-font-size` on the
68
+ Compact boundary. Nested themes inherit these overrides; an explicit theme reset restores defaults.
69
+ `--coar-field-min-font-size` keeps all mobile field text at least 16 px without enlarging action text.
70
+ Single-line controls retain their existing heights. Multiline fields retain their previous minimum
71
+ row spacing and add leading when their text is larger than medium, so umlauts and descenders do not
72
+ clip or touch. Textareas with many rows can therefore grow to fit the larger type.
73
+ The playground's `/design-review/field-sizes` page exercises the same roles across text,
74
+ selection, date/time and OTP fields.
75
+
76
+ Fixed week grids keep a minimum day-column width and scroll horizontally inside the calendar
77
+ instead of clipping the last day. A horizontal gesture scrolls that overflow; range paging resumes
78
+ when all columns fit. Month overflow actions follow a separate target-size role. Timed-event resize
79
+ targets occupy a side rail, leaving the body available for moving. Short or narrow cards bound the
80
+ rail to half the card: they do not promise full-size touch targets, and arrow keys remain an alternative.
81
+
82
+ ```html
83
+ <section class="coar-compact coar-mobile">…</section>
84
+ ```
85
+
86
+ Live demo in phone size: [Compact fields and keyboard-aware sheet](https://docs.cocoar.dev/cocoar-ui-vue/mobile/#/compact)
87
+
88
+ <div class="coar-mobile">
89
+
90
+ **Demo — `mobile/demos/CompactDemo.vue`**
91
+
92
+ ```vue
93
+ <script setup lang="ts">
94
+ import { ref } from 'vue';
95
+ import { CoarButton, CoarCheckbox, CoarFormField, CoarSelect, CoarTextInput, useDialog } from '@cocoar/vue-ui';
96
+ import '@cocoar/vue-ui/fonts/compact';
97
+ import SheetDemoContact, { type Contact } from './SheetDemoContact.vue';
98
+
99
+ const name = ref('Anna Berger');
100
+ const status = ref<string | null>('review');
101
+ const notify = ref(true);
102
+ const message = ref('Synthetic data only.');
103
+ const dialog = useDialog();
104
+ const contact: Contact = {
105
+ name: 'Anna Berger', email: 'anna@example.com', phone: '+43 1 234 567',
106
+ company: 'Example', street: 'Ringstraße 12', postcode: '1010',
107
+ city: 'Vienna', country: 'Austria', notes: 'Synthetic compact presentation sample.',
108
+ };
109
+
110
+ async function edit() {
111
+ const result = await dialog.open<Contact>(
112
+ SheetDemoContact,
113
+ { title: 'Compact contact', presentation: 'sheet' },
114
+ { contact },
115
+ ).result;
116
+ message.value = result ? `Saved “${result.name}”.` : 'Editing cancelled.';
117
+ }
118
+ </script>
119
+
120
+ <template>
121
+ <section class="coar-compact compact-demo">
122
+ <p>Preview: 44 px controls, 14 px actions and separate 16 px input text.</p>
123
+ <CoarFormField label="Name"><CoarTextInput v-model="name" clearable /></CoarFormField>
124
+ <CoarFormField label="Status">
125
+ <CoarSelect v-model="status" :options="[
126
+ { value: 'review', label: 'In Prüfung' },
127
+ { value: 'planned', label: 'Geplant' },
128
+ { value: 'done', label: 'Abgeschlossen' },
129
+ ]" />
130
+ </CoarFormField>
131
+ <CoarCheckbox v-model="notify" label="Benachrichtigungen senden" />
132
+ <CoarButton full-width @click="edit">Edit compact contact</CoarButton>
133
+ <output>{{ message }}</output>
134
+ </section>
135
+ </template>
136
+
137
+ <style scoped>
138
+ .compact-demo { display: grid; gap: 12px; padding: 16px; background: var(--coar-background-neutral-primary); }
139
+ .compact-demo p { margin: 0; }
140
+ .compact-demo output { overflow-wrap: anywhere; color: var(--coar-text-neutral-secondary); }
141
+ </style>
142
+ ```
143
+
144
+ </div>
145
+
146
+ ## Theme inputs and local specialization
147
+
148
+ `CoarThemeScope` continues to accept accent, semantic colors, fonts and component radii.
149
+ Without an explicit accent, compact uses Slate instead of the legacy blue. The compact curves
150
+ separate filled-action colors from text, border and focus colors in light and dark mode.
151
+ Normal field outlines use a muted Slate tone; hover strengthens them only slightly.
152
+ The `--coar-border-input` and `--coar-border-input-hover` roles remain independently
153
+ customizable, separate from focus and semantic error colors.
154
+
155
+ ```vue
156
+ <CoarThemeScope :theme="{ accent: '#15803d', bodyFontFamily: 'Inter', buttonRadius: 8 }">
157
+ <section class="coar-compact">…</section>
158
+ </CoarThemeScope>
159
+ ```
160
+
161
+ Apply shared role overrides on a presentation boundary (`.coar-compact`, `CoarThemeScope`, or
162
+ `.coar-theme-scope`), where dependent aliases are recalculated. Setting a source variable on an
163
+ arbitrary descendant does not recalculate aliases that CSS already resolved on its ancestor.
164
+
165
+ ```html
166
+ <div class="coar-compact">
167
+ <section class="coar-theme-scope" style="--coar-ui-font-size: 14px; --coar-panel-radius: 10px">
168
+ …
169
+ </section>
170
+ </div>
171
+ ```
172
+
173
+ Package roles stay independent where their meaning differs: grid row heights, calendar event
174
+ geometry, document pages and editor line heights are not interchangeable control heights.
175
+ Consumer-supplied event colors, map geometry, PDF content and saved page layouts are not rewritten.
176
+
177
+ Inside compact, `.coar-theme-none` resets brand inputs to the compact light defaults without
178
+ turning the presentation into a mixture of legacy and compact tokens. It retains the surrounding
179
+ mobile presentation. Use a sibling outside `.coar-compact` for a fully legacy area.
180
+
181
+ ## Teleports and global renderers
182
+
183
+ Library overlays carry their originating profile, local theme, mobile roles and explicit overrides,
184
+ including changes while open. Custom library-like teleports can use the Preview helper:
185
+
186
+ ```ts
187
+ const presentation = useCompactPresentationContext(() => origin.value);
188
+ ```
189
+
190
+ ```vue
191
+ <Teleport to="body">
192
+ <div :class="presentation.classes" :style="presentation.style">…</div>
193
+ </Teleport>
194
+ ```
195
+
196
+ The helper is exported from `@cocoar/vue-ui`; it observes source ancestors, not all computed CSS
197
+ properties. Register the origin as an element ref and keep it mounted while the tool is open.
198
+
199
+ - **Monaco:** themes are document-global. Compact editor colors activate only when `html` or `body`
200
+ carries `.coar-compact`; local compact frames do not promise an independent Monaco theme.
201
+ Compare legacy and compact editors in separate documents. Shared color roles are converted to
202
+ concrete Monaco colors; code typography remains independent of the UI scale.
203
+ - **Mermaid:** rendering is serialized with the diagram's resolved compact configuration. Local
204
+ mode and token changes rerender compact diagrams; stored diagram source is unchanged.
205
+ - **Page Builder:** authoring chrome uses the compact roles, including theme-aware accent ink for
206
+ selected canvas labels and frames. Saved layout and document geometry retain their meaning.
207
+ Embedded library widgets still use the host presentation.
208
+
209
+ The profile does not add missing touch features: Monaco editing, hover-only editor handles,
210
+ some viewer flyouts and desktop-oriented builder interactions retain their documented device limits.
211
+ Browser emulation is not native keyboard or safe-area acceptance.
212
+
213
+ This preview is for testing in real applications, not a completed design review. Native calendar
214
+ gestures and some grid editor and document viewer states still need verification. Keep the
215
+ `.coar-compact` class behind an app-level toggle so testers can compare with the default presentation.
@@ -21,6 +21,10 @@ import CoarThemeEditor from '@cocoar/vue-ui/theme-editor';
21
21
 
22
22
  ### Props
23
23
 
24
+ In the Preview [compact presentation](./compact-presentation.md), mounting the editor inside a compact
25
+ area targets that area rather than a neighboring legacy area. Its teleported tools keep that area's
26
+ presentation. The editor remains a single live editor per document.
27
+
24
28
  | Prop | Type | Default | Description |
25
29
  |------|------|---------|-------------|
26
30
  | `hideDarkToggle` | `boolean` | `false` | Hides the light/dark toggle. Set to `true` when your app manages dark mode itself. |
@@ -6,6 +6,9 @@ Our type system creates clear visual hierarchy and ensures readability across al
6
6
 
7
7
  ## Type Scale
8
8
 
9
+ These are the existing defaults. The opt-in [compact presentation](./compact-presentation.md) uses
10
+ Inter throughout with a smaller, separate UI/input scale; it does not change these defaults.
11
+
9
12
  Each row shows the style rendered at its actual size, with font metadata alongside.
10
13
 
11
14
  **Demo — `typography/demos/TypeScale.vue`**
@@ -417,14 +417,14 @@ are only being added, and testing on real devices remains the job of the app.
417
417
 
418
418
  | Page | Desktop | Tablet | Phone | Note |
419
419
  |---|---|---|---|---|
420
- | [Map](../components/map/index.md) | ready | ready | partial | Pan and zoom work by touch; the map's controls have no .coar-mobile presentation yet. |
420
+ | [Map](../components/map/index.md) | ready | ready | partial | Touch pan/zoom; compact mobile enlarges zoom and list controls. Dense pins and vertices retain small spatial targets. |
421
421
  | [Map Editor](../components/map/editor.md) | ready | partial | partial | Map editing works on touch; the point list's drag reorder is mouse-only and nothing is phone-adapted. |
422
422
 
423
423
  **Calendar (@cocoar/vue-calendar)**
424
424
 
425
425
  | Page | Desktop | Tablet | Phone | Note |
426
426
  |---|---|---|---|---|
427
- | [Calendar](../components/calendar/index.md) | ready | partial | planned | Taps, swipe paging and long-press selection work on touch; event resize handles are only 6 px tall. |
427
+ | [Calendar](../components/calendar/index.md) | ready | partial | planned | Touch taps, paging and long-press selection work; legacy resize targets are 6 px. Compact targets stay smaller on short/crowded events. |
428
428
  | [`<CoarCalendar>` — Composer](../components/calendar/coar-calendar.md) | ready | partial | planned | Taps, swipe paging and long-press selection work on touch; event resize handles are only 6 px tall. |
429
429
  | [`<CoarYearView>` — Year View](../components/calendar/year-view.md) | ready | ready | planned | Tap to drill in works on touch; a phone presentation of the calendar is planned. |
430
430
  | [Month Views](../components/calendar/month-view.md) | ready | partial | planned | Taps work on touch; multi-day bar resize handles are only 6 px and a touch on a pill always drags it. |
@@ -2,6 +2,9 @@
2
2
 
3
3
  # Theming
4
4
 
5
+ The defaults below remain unchanged. The experimental [compact presentation](../foundations/compact-presentation.md)
6
+ adds an opt-in Slate palette and smaller typography; use its appearance inputs and documented scope boundaries.
7
+
5
8
  Cocoar uses an **oklch-based** color system. You set a few base colors, and the entire palette — including all shades for light and dark mode — is auto-calculated.
6
9
 
7
10
  ## Quick Start
@@ -43,3 +43,6 @@
43
43
 
44
44
  /* 8. Optional mobile presentation (inherited from .coar-mobile) */
45
45
  @import './mobile.css';
46
+
47
+ /* 9. Experimental appearance; existing desktop/mobile values stay untouched. */
48
+ @import './compact.css';