@bagelink/vue 1.22.3 → 1.23.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.
@@ -0,0 +1,7 @@
1
+ declare const inset: import('vue').Ref<number, number>;
2
+ /** Subscribe to the shared keyboard-inset tracker. Safe to call from many components. */
3
+ export declare function useKeyboardInset(): {
4
+ inset: Readonly<typeof inset>;
5
+ };
6
+ export {};
7
+ //# sourceMappingURL=useKeyboardInset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useKeyboardInset.d.ts","sourceRoot":"","sources":["../../src/utils/useKeyboardInset.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,KAAK,mCAAS,CAAA;AAIpB,yFAAyF;AACzF,wBAAgB,gBAAgB,IAAI;IAAE,KAAK,EAAE,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAA;CAAE,CA4BpE"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.22.3",
4
+ "version": "1.23.1",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -59,11 +59,11 @@
59
59
  "bin/experimentalGenTypedRoutes.ts"
60
60
  ],
61
61
  "devDependencies": {
62
+ "@bagelink/sdk": "1.23.1",
62
63
  "@types/leaflet": "^1.9.22",
63
64
  "@types/signature_pad": "^4.0.0",
64
65
  "vue": "^3.5.45",
65
- "vue-component-type-helpers": "^2.2.12",
66
- "@bagelink/sdk": "1.22.3"
66
+ "vue-component-type-helpers": "^2.2.12"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "@bagelink/sdk": "*",
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Material Symbols the Vue controls paint themselves, not from a prop.
3
+ *
4
+ * A Blox SSG subset is harvested from prerendered HTML plus `icon:"name"`
5
+ * literals. Selects, date fields, password toggles and the rich-text toolbar
6
+ * choose their glyph in a ternary or computed (`open ? 'unfold_less' :
7
+ * 'unfold_more'`), so the harvest never sees it and the subset font draws the
8
+ * ligature as plain text. These names are always requested, on every site.
9
+ *
10
+ * Keep this to icons a control renders with no configuration. Icons that only
11
+ * appear because a caller passed `icon="…"` are harvested from that call site.
12
+ */
13
+ export const BASELINE_MATERIAL_ICONS = [
14
+ 'add',
15
+ 'add_column_left',
16
+ 'add_column_right',
17
+ 'add_link',
18
+ 'add_row_above',
19
+ 'add_row_below',
20
+ 'align_horizontal_left',
21
+ 'align_horizontal_right',
22
+ 'arrow_downward',
23
+ 'arrow_upward',
24
+ 'autorenew',
25
+ 'block',
26
+ 'calendar_month',
27
+ 'call_split',
28
+ 'check',
29
+ 'check_box_outline_blank',
30
+ 'check_circle',
31
+ 'chevron_left',
32
+ 'chevron_right',
33
+ 'close',
34
+ 'collapse_all',
35
+ 'content_copy',
36
+ 'crop',
37
+ 'delete',
38
+ 'delete_sweep',
39
+ 'download',
40
+ 'draft',
41
+ 'drag_indicator',
42
+ 'expand_all',
43
+ 'expand_less',
44
+ 'expand_more',
45
+ 'find_replace',
46
+ 'fit_screen',
47
+ 'format_align_center',
48
+ 'format_align_justify',
49
+ 'format_align_left',
50
+ 'format_align_right',
51
+ 'format_bold',
52
+ 'format_italic',
53
+ 'format_list_bulleted_add',
54
+ 'format_textdirection_l_to_r',
55
+ 'format_textdirection_r_to_l',
56
+ 'format_underlined',
57
+ 'keyboard_return',
58
+ 'link_off',
59
+ 'match_case',
60
+ 'match_word',
61
+ 'more_vert',
62
+ 'open_in_new',
63
+ 'open_with',
64
+ 'regular_expression',
65
+ 'remove',
66
+ 'search',
67
+ 'select_all',
68
+ 'select_check_box',
69
+ 'table_chart',
70
+ 'table_edit',
71
+ 'text_select_move_down',
72
+ 'unfold_less',
73
+ 'unfold_more',
74
+ 'upload',
75
+ 'upload_2',
76
+ 'visibility',
77
+ 'visibility_off',
78
+ 'warning',
79
+ 'width_full',
80
+ ] as const
@@ -33,6 +33,7 @@ export { default as FloatingPanel } from './FloatingPanel.vue'
33
33
  export * from './form'
34
34
  export { default as Icon } from './Icon/Icon.vue'
35
35
  export { FONT_AWESOME_BRANDS_ICONS, MATERIAL_ICONS } from './Icon/constants'
36
+ export { BASELINE_MATERIAL_ICONS } from './Icon/baseline'
36
37
  export { default as IframeVue } from './IframeVue.vue'
37
38
  export { default as Image } from './Image.vue'
38
39
  export * from './layout'
@@ -453,7 +453,6 @@ const slotBind = computed(() => ({ isOpen, isMobile, toggleMenu, closeOnMobile }
453
453
  </template>
454
454
 
455
455
  <style scoped>
456
-
457
456
  /* Root is a column: [top band] · [start|center|end row] · [bottom band].
458
457
  Safe-area uses physical left/right (not a single inline shorthand) — iPhone Duo
459
458
  insets are often asymmetric across the fold. `svh` keeps the shell stable while
@@ -237,6 +237,12 @@ animation: fade-out 0.15s ease-in forwards;
237
237
  }
238
238
 
239
239
  /* Dialog position animations */
240
+ /* Center vertically. The base `dialog` rule sets explicit margin-top/bottom,
241
+ which cancels the UA `margin: auto` centering and pins the dialog to the top. */
242
+ dialog.dialog-center {
243
+ margin-block: auto;
244
+ }
245
+
240
246
  dialog.dialog-center[open] {
241
247
  animation: scale-fade-in 0.2s ease-out;
242
248
  }
package/src/index.ts CHANGED
@@ -42,3 +42,4 @@ export * from './utils/elementUtils'
42
42
  export * from './utils/filterRef'
43
43
  export * from './utils/ipapi'
44
44
  export * from './utils/useSearch'
45
+ export { useKeyboardInset } from './utils/useKeyboardInset'
@@ -0,0 +1,36 @@
1
+ import { onBeforeUnmount, onMounted, readonly, ref } from 'vue'
2
+
3
+ const inset = ref(0)
4
+ let listeners = 0
5
+ let cleanup: (() => void) | null = null
6
+
7
+ /** Subscribe to the shared keyboard-inset tracker. Safe to call from many components. */
8
+ export function useKeyboardInset(): { inset: Readonly<typeof inset> } {
9
+ onMounted(() => {
10
+ listeners += 1
11
+ if (cleanup) return
12
+ if (typeof window === 'undefined' || !('visualViewport' in window)) return
13
+ const viewport = window.visualViewport
14
+ if (!viewport) return
15
+ const base = viewport.height
16
+ const onResize = () => {
17
+ inset.value = Math.max(0, Math.round(base - viewport.height))
18
+ document.documentElement.style.setProperty('--bgl-keyboard-inset', `${inset.value}px`)
19
+ }
20
+ viewport.addEventListener('resize', onResize)
21
+ cleanup = () => {
22
+ viewport.removeEventListener('resize', onResize)
23
+ document.documentElement.style.removeProperty('--bgl-keyboard-inset')
24
+ inset.value = 0
25
+ cleanup = null
26
+ }
27
+ })
28
+ onBeforeUnmount(() => {
29
+ listeners -= 1
30
+ if (listeners <= 0 && cleanup) {
31
+ cleanup()
32
+ listeners = 0
33
+ }
34
+ })
35
+ return { inset: readonly(inset) }
36
+ }