@mieweb/ui 0.10.0-dev.16 → 0.10.0-dev.18

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 (172) hide show
  1. package/dist/CsvBlock-FX5YNGNE.cjs +17 -0
  2. package/dist/{CsvBlock-FVOKKWIY.cjs.map → CsvBlock-FX5YNGNE.cjs.map} +1 -1
  3. package/dist/CsvBlock-VLMG7GUO.js +8 -0
  4. package/dist/{CsvBlock-MXZO4W3N.js.map → CsvBlock-VLMG7GUO.js.map} +1 -1
  5. package/dist/HtmlPreviewBlock-5JE7L3GR.js +8 -0
  6. package/dist/{HtmlPreviewBlock-2UGW33SQ.js.map → HtmlPreviewBlock-5JE7L3GR.js.map} +1 -1
  7. package/dist/HtmlPreviewBlock-UO37JQ3K.cjs +17 -0
  8. package/dist/{HtmlPreviewBlock-CZKTQUCL.cjs.map → HtmlPreviewBlock-UO37JQ3K.cjs.map} +1 -1
  9. package/dist/MermaidBlock-3XHFBAMV.js +8 -0
  10. package/dist/{MermaidBlock-QXAEMOAA.js.map → MermaidBlock-3XHFBAMV.js.map} +1 -1
  11. package/dist/MermaidBlock-RZ75RPZA.cjs +17 -0
  12. package/dist/{MermaidBlock-NLDOJZUJ.cjs.map → MermaidBlock-RZ75RPZA.cjs.map} +1 -1
  13. package/dist/SurveyBlock-MUVJ3JUI.js +8 -0
  14. package/dist/{SurveyBlock-M5BEFZGT.js.map → SurveyBlock-MUVJ3JUI.js.map} +1 -1
  15. package/dist/SurveyBlock-VH47YXZC.cjs +17 -0
  16. package/dist/{SurveyBlock-GSHYZMTW.cjs.map → SurveyBlock-VH47YXZC.cjs.map} +1 -1
  17. package/dist/{chunk-77PNQILS.js → chunk-2BARVD4C.js} +3 -3
  18. package/dist/{chunk-77PNQILS.js.map → chunk-2BARVD4C.js.map} +1 -1
  19. package/dist/{chunk-IUQMOBFB.cjs → chunk-3KPDQG5O.cjs} +5 -5
  20. package/dist/{chunk-IUQMOBFB.cjs.map → chunk-3KPDQG5O.cjs.map} +1 -1
  21. package/dist/{chunk-OWLWABAS.js → chunk-4HC2IBOX.js} +3 -3
  22. package/dist/{chunk-OWLWABAS.js.map → chunk-4HC2IBOX.js.map} +1 -1
  23. package/dist/{chunk-R5AFQWR5.js → chunk-673GMFA6.js} +3 -3
  24. package/dist/{chunk-R5AFQWR5.js.map → chunk-673GMFA6.js.map} +1 -1
  25. package/dist/{chunk-UV4IJNSN.js → chunk-7YO7DNUV.js} +3 -3
  26. package/dist/{chunk-UV4IJNSN.js.map → chunk-7YO7DNUV.js.map} +1 -1
  27. package/dist/{chunk-XU2E7MTG.js → chunk-DSB4DKWG.js} +7 -7
  28. package/dist/{chunk-XU2E7MTG.js.map → chunk-DSB4DKWG.js.map} +1 -1
  29. package/dist/{chunk-XFLEW7AT.cjs → chunk-DXEPYK3I.cjs} +8 -4
  30. package/dist/chunk-DXEPYK3I.cjs.map +1 -0
  31. package/dist/{chunk-IBCCFWD4.js → chunk-EK3BCET6.js} +7 -2
  32. package/dist/chunk-EK3BCET6.js.map +1 -0
  33. package/dist/{chunk-WN6A4QOF.js → chunk-FBLVPM2K.js} +3 -3
  34. package/dist/{chunk-WN6A4QOF.js.map → chunk-FBLVPM2K.js.map} +1 -1
  35. package/dist/{chunk-CATY3P2U.js → chunk-FIKO4WR6.js} +3 -3
  36. package/dist/{chunk-CATY3P2U.js.map → chunk-FIKO4WR6.js.map} +1 -1
  37. package/dist/{chunk-FDP6VS5G.js → chunk-FZURBQJ2.js} +3 -3
  38. package/dist/{chunk-FDP6VS5G.js.map → chunk-FZURBQJ2.js.map} +1 -1
  39. package/dist/{chunk-LENW5YOC.js → chunk-GBUVIGD5.js} +46 -17
  40. package/dist/chunk-GBUVIGD5.js.map +1 -0
  41. package/dist/{chunk-O5A4GTTG.cjs → chunk-GU5OS7JJ.cjs} +4 -4
  42. package/dist/{chunk-O5A4GTTG.cjs.map → chunk-GU5OS7JJ.cjs.map} +1 -1
  43. package/dist/{chunk-YEQLSYJO.cjs → chunk-GVBHDRC7.cjs} +5 -5
  44. package/dist/{chunk-YEQLSYJO.cjs.map → chunk-GVBHDRC7.cjs.map} +1 -1
  45. package/dist/{chunk-W5TPBCBM.js → chunk-GVLNXPJX.js} +4 -4
  46. package/dist/{chunk-W5TPBCBM.js.map → chunk-GVLNXPJX.js.map} +1 -1
  47. package/dist/{chunk-AXRRBEER.js → chunk-GVM6DTR5.js} +8 -4
  48. package/dist/chunk-GVM6DTR5.js.map +1 -0
  49. package/dist/{chunk-UKUKBUME.cjs → chunk-GYXUS65N.cjs} +5 -5
  50. package/dist/{chunk-UKUKBUME.cjs.map → chunk-GYXUS65N.cjs.map} +1 -1
  51. package/dist/{chunk-R47H3Y7J.js → chunk-H2IAMSHK.js} +3 -3
  52. package/dist/{chunk-R47H3Y7J.js.map → chunk-H2IAMSHK.js.map} +1 -1
  53. package/dist/{chunk-KM5OQQL5.cjs → chunk-HIZWOAWY.cjs} +8 -8
  54. package/dist/{chunk-KM5OQQL5.cjs.map → chunk-HIZWOAWY.cjs.map} +1 -1
  55. package/dist/{chunk-6GZKQR7P.cjs → chunk-I4LXSHKO.cjs} +4 -4
  56. package/dist/{chunk-6GZKQR7P.cjs.map → chunk-I4LXSHKO.cjs.map} +1 -1
  57. package/dist/{chunk-4LPGJ3ZO.js → chunk-IYWG72DM.js} +4 -4
  58. package/dist/{chunk-4LPGJ3ZO.js.map → chunk-IYWG72DM.js.map} +1 -1
  59. package/dist/{chunk-OZ2LP2VQ.cjs → chunk-JELTRRR5.cjs} +9 -9
  60. package/dist/{chunk-OZ2LP2VQ.cjs.map → chunk-JELTRRR5.cjs.map} +1 -1
  61. package/dist/{chunk-DXCATYEO.js → chunk-K2K2HP35.js} +3 -3
  62. package/dist/{chunk-DXCATYEO.js.map → chunk-K2K2HP35.js.map} +1 -1
  63. package/dist/{chunk-M5NYHH3Z.cjs → chunk-KDW6BD4O.cjs} +4 -4
  64. package/dist/{chunk-M5NYHH3Z.cjs.map → chunk-KDW6BD4O.cjs.map} +1 -1
  65. package/dist/{chunk-VNCIIXGO.js → chunk-KHSFJTEX.js} +3 -3
  66. package/dist/{chunk-VNCIIXGO.js.map → chunk-KHSFJTEX.js.map} +1 -1
  67. package/dist/{chunk-DF7K6DOJ.cjs → chunk-LFPJ3OUM.cjs} +5 -5
  68. package/dist/{chunk-DF7K6DOJ.cjs.map → chunk-LFPJ3OUM.cjs.map} +1 -1
  69. package/dist/{chunk-X2PPZJSL.cjs → chunk-LHBWRMNC.cjs} +46 -16
  70. package/dist/chunk-LHBWRMNC.cjs.map +1 -0
  71. package/dist/{chunk-JX4UZEBZ.cjs → chunk-MQPG3KVK.cjs} +8 -8
  72. package/dist/{chunk-JX4UZEBZ.cjs.map → chunk-MQPG3KVK.cjs.map} +1 -1
  73. package/dist/{chunk-VLBUT2QM.cjs → chunk-N2CJJHHB.cjs} +4 -4
  74. package/dist/{chunk-VLBUT2QM.cjs.map → chunk-N2CJJHHB.cjs.map} +1 -1
  75. package/dist/{chunk-MB5KIIT4.cjs → chunk-N7C4OEP7.cjs} +6 -6
  76. package/dist/{chunk-MB5KIIT4.cjs.map → chunk-N7C4OEP7.cjs.map} +1 -1
  77. package/dist/{chunk-LGIQVSAE.cjs → chunk-NUQSQRG3.cjs} +16 -16
  78. package/dist/{chunk-LGIQVSAE.cjs.map → chunk-NUQSQRG3.cjs.map} +1 -1
  79. package/dist/{chunk-ETCHEURD.js → chunk-OYBJQBLO.js} +4 -4
  80. package/dist/{chunk-ETCHEURD.js.map → chunk-OYBJQBLO.js.map} +1 -1
  81. package/dist/{chunk-VPRKE2YU.cjs → chunk-P5CMZZRZ.cjs} +5 -5
  82. package/dist/{chunk-VPRKE2YU.cjs.map → chunk-P5CMZZRZ.cjs.map} +1 -1
  83. package/dist/{chunk-NEFBVO5W.cjs → chunk-QNDP6PE5.cjs} +7 -2
  84. package/dist/chunk-QNDP6PE5.cjs.map +1 -0
  85. package/dist/{chunk-WBBOH5QF.js → chunk-QOVJ6Z6R.js} +3 -3
  86. package/dist/{chunk-WBBOH5QF.js.map → chunk-QOVJ6Z6R.js.map} +1 -1
  87. package/dist/{chunk-4IETGCMD.js → chunk-R6KPWIGO.js} +4 -4
  88. package/dist/{chunk-4IETGCMD.js.map → chunk-R6KPWIGO.js.map} +1 -1
  89. package/dist/{chunk-GRV4MOEO.cjs → chunk-SVXWO37F.cjs} +26 -26
  90. package/dist/{chunk-GRV4MOEO.cjs.map → chunk-SVXWO37F.cjs.map} +1 -1
  91. package/dist/{chunk-T7U5HHGK.js → chunk-THLIL6PY.js} +3 -3
  92. package/dist/{chunk-T7U5HHGK.js.map → chunk-THLIL6PY.js.map} +1 -1
  93. package/dist/{chunk-PLDJU623.cjs → chunk-TTSSUOEV.cjs} +8 -8
  94. package/dist/{chunk-PLDJU623.cjs.map → chunk-TTSSUOEV.cjs.map} +1 -1
  95. package/dist/{chunk-E2B5BLAF.cjs → chunk-TYE5K5WV.cjs} +4 -4
  96. package/dist/{chunk-E2B5BLAF.cjs.map → chunk-TYE5K5WV.cjs.map} +1 -1
  97. package/dist/{chunk-YIWJTNR5.cjs → chunk-WCDJFMZO.cjs} +7 -7
  98. package/dist/{chunk-YIWJTNR5.cjs.map → chunk-WCDJFMZO.cjs.map} +1 -1
  99. package/dist/{chunk-EQXFDPXV.cjs → chunk-X5KAO35W.cjs} +14 -14
  100. package/dist/{chunk-EQXFDPXV.cjs.map → chunk-X5KAO35W.cjs.map} +1 -1
  101. package/dist/{chunk-2BGS7RFM.cjs → chunk-X6A27RGO.cjs} +4 -4
  102. package/dist/{chunk-2BGS7RFM.cjs.map → chunk-X6A27RGO.cjs.map} +1 -1
  103. package/dist/{chunk-7U5QYH54.js → chunk-XBTKZCZF.js} +3 -3
  104. package/dist/{chunk-7U5QYH54.js.map → chunk-XBTKZCZF.js.map} +1 -1
  105. package/dist/{chunk-TVSGJT6G.cjs → chunk-Y4E2WRUR.cjs} +6 -6
  106. package/dist/{chunk-TVSGJT6G.cjs.map → chunk-Y4E2WRUR.cjs.map} +1 -1
  107. package/dist/{chunk-UXI33QGR.js → chunk-YIV4Y4SK.js} +3 -3
  108. package/dist/{chunk-UXI33QGR.js.map → chunk-YIV4Y4SK.js.map} +1 -1
  109. package/dist/{chunk-VVZALGPI.js → chunk-YU55JD35.js} +3 -3
  110. package/dist/{chunk-VVZALGPI.js.map → chunk-YU55JD35.js.map} +1 -1
  111. package/dist/{chunk-WC25GQZD.js → chunk-ZYL4SNOR.js} +3 -3
  112. package/dist/{chunk-WC25GQZD.js.map → chunk-ZYL4SNOR.js.map} +1 -1
  113. package/dist/components/AlertDialog/index.cjs +4 -4
  114. package/dist/components/AlertDialog/index.js +3 -3
  115. package/dist/components/Button/index.cjs +4 -4
  116. package/dist/components/Button/index.js +2 -2
  117. package/dist/components/CalendarView/index.cjs +5 -5
  118. package/dist/components/CalendarView/index.js +3 -3
  119. package/dist/components/CustomizableDashboard/index.cjs +10 -10
  120. package/dist/components/CustomizableDashboard/index.js +3 -3
  121. package/dist/components/FloatingWindow/index.cjs +5 -5
  122. package/dist/components/FloatingWindow/index.js +3 -3
  123. package/dist/components/ListView/index.cjs +5 -5
  124. package/dist/components/ListView/index.js +3 -3
  125. package/dist/components/Markdown/index.cjs +17 -17
  126. package/dist/components/Markdown/index.js +8 -8
  127. package/dist/components/MediaEditor/index.cjs +9 -9
  128. package/dist/components/MediaEditor/index.js +4 -4
  129. package/dist/components/MediaPlayer/index.cjs +6 -6
  130. package/dist/components/MediaPlayer/index.js +3 -3
  131. package/dist/components/MegaMenu/index.cjs +6 -6
  132. package/dist/components/MegaMenu/index.js +3 -3
  133. package/dist/components/RadialExplorer/index.cjs +4 -4
  134. package/dist/components/RadialExplorer/index.js +3 -3
  135. package/dist/components/RichTextEditor/index.cjs +6 -6
  136. package/dist/components/RichTextEditor/index.js +3 -3
  137. package/dist/components/SectionSpyNav/index.cjs +4 -4
  138. package/dist/components/SectionSpyNav/index.js +3 -3
  139. package/dist/components/ViewSet/index.cjs +6 -6
  140. package/dist/components/ViewSet/index.js +5 -5
  141. package/dist/datavis.cjs +3 -3
  142. package/dist/datavis.js +2 -2
  143. package/dist/esheet.cjs +6 -6
  144. package/dist/esheet.js +3 -3
  145. package/dist/hooks/index.cjs +22 -18
  146. package/dist/hooks/index.d.cts +53 -2
  147. package/dist/hooks/index.d.ts +53 -2
  148. package/dist/hooks/index.js +1 -1
  149. package/dist/index.cjs +360 -356
  150. package/dist/index.d.cts +53 -2
  151. package/dist/index.d.ts +53 -2
  152. package/dist/index.js +30 -30
  153. package/dist/styles.css +1 -1
  154. package/dist/tailwind-preset.cjs +4 -4
  155. package/dist/tailwind-preset.js +1 -1
  156. package/dist/templates.cjs +24 -24
  157. package/dist/templates.js +2 -2
  158. package/package.json +1 -1
  159. package/dist/CsvBlock-FVOKKWIY.cjs +0 -17
  160. package/dist/CsvBlock-MXZO4W3N.js +0 -8
  161. package/dist/HtmlPreviewBlock-2UGW33SQ.js +0 -8
  162. package/dist/HtmlPreviewBlock-CZKTQUCL.cjs +0 -17
  163. package/dist/MermaidBlock-NLDOJZUJ.cjs +0 -17
  164. package/dist/MermaidBlock-QXAEMOAA.js +0 -8
  165. package/dist/SurveyBlock-GSHYZMTW.cjs +0 -17
  166. package/dist/SurveyBlock-M5BEFZGT.js +0 -8
  167. package/dist/chunk-AXRRBEER.js.map +0 -1
  168. package/dist/chunk-IBCCFWD4.js.map +0 -1
  169. package/dist/chunk-LENW5YOC.js.map +0 -1
  170. package/dist/chunk-NEFBVO5W.cjs.map +0 -1
  171. package/dist/chunk-X2PPZJSL.cjs.map +0 -1
  172. package/dist/chunk-XFLEW7AT.cjs.map +0 -1
@@ -226,6 +226,19 @@ declare const VISUAL_VIEWPORT_HEIGHT_VAR = "--mieweb-visual-viewport-height";
226
226
  declare const VISUAL_VIEWPORT_OFFSET_TOP_VAR = "--mieweb-visual-viewport-offset-top";
227
227
  /** Boolean attribute set on `<html>` while an on-screen keyboard is open. */
228
228
  declare const KEYBOARD_OPEN_ATTRIBUTE = "data-keyboard-open";
229
+ /** Attribute on `<html>` naming the active {@link KeyboardInsetSource}. */
230
+ declare const KEYBOARD_SOURCE_ATTRIBUTE = "data-keyboard-source";
231
+ /**
232
+ * Where keyboard metrics come from.
233
+ *
234
+ * - `'visual-viewport'` — the Visual Viewport API. Works in any browser, but
235
+ * iOS only reports the keyboard once its slide-in animation has finished.
236
+ * - `'native'` — `keyboardWillShow` / `keyboardWillHide` window events with a
237
+ * `keyboardHeight` property, as fired by `cordova-plugin-ionic-keyboard` and
238
+ * Capacitor's Keyboard plugin. They arrive *before* the keyboard animates,
239
+ * so layout can move in step with it.
240
+ */
241
+ type KeyboardInsetSource = 'visual-viewport' | 'native';
229
242
  interface KeyboardInsetState {
230
243
  /** Pixels of the layout viewport covered by the on-screen keyboard. */
231
244
  keyboardInset: number;
@@ -235,9 +248,26 @@ interface KeyboardInsetState {
235
248
  interface UseKeyboardInsetOptions {
236
249
  /** Track the keyboard; `false` stops tracking and clears the CSS variables. @default true */
237
250
  enabled?: boolean;
251
+ /** Where keyboard metrics come from. @default 'visual-viewport' */
252
+ source?: KeyboardInsetSource;
238
253
  }
239
254
  /**
240
- * Tracks the on-screen keyboard via the Visual Viewport API.
255
+ * Tracks the on-screen keyboard and publishes it on `<html>`.
256
+ *
257
+ * ### `source: 'native'` (Cordova / Capacitor apps)
258
+ *
259
+ * Listens for the native keyboard plugin's `keyboardWillShow` /
260
+ * `keyboardWillHide` window events. Configure the plugin so the WebView is
261
+ * neither resized nor panned (for `cordova-plugin-ionic-keyboard`:
262
+ * `KeyboardResize=false`), keep the app shell at full height, and move only
263
+ * the composer dock by `--mieweb-keyboard-inset` with a short transition
264
+ * (~250ms) so it rides up with the keyboard. Only `--mieweb-keyboard-inset`,
265
+ * `data-keyboard-open` and `data-keyboard-source` are published; the
266
+ * visual-viewport variables stay unset.
267
+ *
268
+ * ### `source: 'visual-viewport'` (browsers, default)
269
+ *
270
+ * Uses the Visual Viewport API.
241
271
  *
242
272
  * iOS Safari and WKWebView (Cordova) ignore
243
273
  * `interactive-widget=resizes-content`, and `dvh` does not shrink for the
@@ -255,6 +285,10 @@ interface UseKeyboardInsetOptions {
255
285
  * Android with `interactive-widget=resizes-content`) the inset stays 0 and
256
286
  * the variables simply mirror the layout viewport.
257
287
  *
288
+ * iOS reports the visual viewport only after the keyboard has finished
289
+ * animating, so a shell sized this way snaps into place once the keyboard
290
+ * lands. Prefer `source: 'native'` wherever a native keyboard plugin exists.
291
+ *
258
292
  * Mount it once, near the app root.
259
293
  *
260
294
  * @example
@@ -273,6 +307,23 @@ interface UseKeyboardInsetOptions {
273
307
  * );
274
308
  * }
275
309
  * ```
310
+ *
311
+ * @example Native app (keyboard plugin with WebView resizing disabled)
312
+ * ```tsx
313
+ * function ComposerDock({ children }) {
314
+ * useKeyboardInset({ source: 'native' });
315
+ * return (
316
+ * <div
317
+ * style={{
318
+ * paddingBottom: 'calc(var(--mieweb-keyboard-inset, 0px) + 0.5rem)',
319
+ * transition: 'padding-bottom 250ms ease',
320
+ * }}
321
+ * >
322
+ * {children}
323
+ * </div>
324
+ * );
325
+ * }
326
+ * ```
276
327
  */
277
328
  declare function useKeyboardInset(options?: UseKeyboardInsetOptions): KeyboardInsetState;
278
329
 
@@ -952,4 +1003,4 @@ interface UseTranscriptEditsResult {
952
1003
  */
953
1004
  declare function useTranscriptEdits(options: UseTranscriptEditsOptions): UseTranscriptEditsResult;
954
1005
 
955
- export { type AnchoredPlacement, DEFAULT_FILLER_WORDS, DEFAULT_MIN_SILENCE_MS, DEFAULT_NL_SILENCE_MS, type Direction, type DragOverState, type FillerAnalysis, type HoverPreviewState, KEYBOARD_INSET_VAR, KEYBOARD_OPEN_ATTRIBUTE, type KeyboardInsetState, type KeyboardShortcutOptions, type MediaTransportState, RTL_LOCALES, type ResolvedTheme, type SilenceThresholdCount, type Theme, type TranscriptClipboard, type TranscriptEditStats, type UseAnchoredPositionOptions, type UseAnchoredPositionReturn, type UseDragReorderOptions, type UseDragReorderReturn, type UseKeyboardInsetOptions, type UseMediaTransportOptions, type UseMediaTransportReturn, type UseScrollSpyOptions, type UseScrollSpyReturn, type UseStickToBottomOptions, type UseStickToBottomReturn, type UseTranscriptEditsOptions, type UseTranscriptEditsResult, type UseYouTubeHoverPreviewOptions, type UseYouTubeHoverPreviewReturn, VISUAL_VIEWPORT_HEIGHT_VAR, VISUAL_VIEWPORT_OFFSET_TOP_VAR, buildPlaybackSegments, dragIndicatorClasses, getSpeedAtIndex, initEditableWords, insertSilences, isDarkMode, isRtlLocale, reorderIds, useAnchoredPosition, useClickOutside, useCommandK, useDirection, useDragReorder, useEscapeKey, useFocusTrap, useIsDarkMode, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardInset, useKeyboardShortcut, useLiveAnnouncement, useMediaQuery, useMediaTransport, usePrefersReducedMotion, useScrollSpy, useStickToBottom, useStreamEndedBelowFold, useTheme, useTranscriptEdits, useYouTubeHoverPreview };
1006
+ export { type AnchoredPlacement, DEFAULT_FILLER_WORDS, DEFAULT_MIN_SILENCE_MS, DEFAULT_NL_SILENCE_MS, type Direction, type DragOverState, type FillerAnalysis, type HoverPreviewState, KEYBOARD_INSET_VAR, KEYBOARD_OPEN_ATTRIBUTE, KEYBOARD_SOURCE_ATTRIBUTE, type KeyboardInsetSource, type KeyboardInsetState, type KeyboardShortcutOptions, type MediaTransportState, RTL_LOCALES, type ResolvedTheme, type SilenceThresholdCount, type Theme, type TranscriptClipboard, type TranscriptEditStats, type UseAnchoredPositionOptions, type UseAnchoredPositionReturn, type UseDragReorderOptions, type UseDragReorderReturn, type UseKeyboardInsetOptions, type UseMediaTransportOptions, type UseMediaTransportReturn, type UseScrollSpyOptions, type UseScrollSpyReturn, type UseStickToBottomOptions, type UseStickToBottomReturn, type UseTranscriptEditsOptions, type UseTranscriptEditsResult, type UseYouTubeHoverPreviewOptions, type UseYouTubeHoverPreviewReturn, VISUAL_VIEWPORT_HEIGHT_VAR, VISUAL_VIEWPORT_OFFSET_TOP_VAR, buildPlaybackSegments, dragIndicatorClasses, getSpeedAtIndex, initEditableWords, insertSilences, isDarkMode, isRtlLocale, reorderIds, useAnchoredPosition, useClickOutside, useCommandK, useDirection, useDragReorder, useEscapeKey, useFocusTrap, useIsDarkMode, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardInset, useKeyboardShortcut, useLiveAnnouncement, useMediaQuery, useMediaTransport, usePrefersReducedMotion, useScrollSpy, useStickToBottom, useStreamEndedBelowFold, useTheme, useTranscriptEdits, useYouTubeHoverPreview };
@@ -226,6 +226,19 @@ declare const VISUAL_VIEWPORT_HEIGHT_VAR = "--mieweb-visual-viewport-height";
226
226
  declare const VISUAL_VIEWPORT_OFFSET_TOP_VAR = "--mieweb-visual-viewport-offset-top";
227
227
  /** Boolean attribute set on `<html>` while an on-screen keyboard is open. */
228
228
  declare const KEYBOARD_OPEN_ATTRIBUTE = "data-keyboard-open";
229
+ /** Attribute on `<html>` naming the active {@link KeyboardInsetSource}. */
230
+ declare const KEYBOARD_SOURCE_ATTRIBUTE = "data-keyboard-source";
231
+ /**
232
+ * Where keyboard metrics come from.
233
+ *
234
+ * - `'visual-viewport'` — the Visual Viewport API. Works in any browser, but
235
+ * iOS only reports the keyboard once its slide-in animation has finished.
236
+ * - `'native'` — `keyboardWillShow` / `keyboardWillHide` window events with a
237
+ * `keyboardHeight` property, as fired by `cordova-plugin-ionic-keyboard` and
238
+ * Capacitor's Keyboard plugin. They arrive *before* the keyboard animates,
239
+ * so layout can move in step with it.
240
+ */
241
+ type KeyboardInsetSource = 'visual-viewport' | 'native';
229
242
  interface KeyboardInsetState {
230
243
  /** Pixels of the layout viewport covered by the on-screen keyboard. */
231
244
  keyboardInset: number;
@@ -235,9 +248,26 @@ interface KeyboardInsetState {
235
248
  interface UseKeyboardInsetOptions {
236
249
  /** Track the keyboard; `false` stops tracking and clears the CSS variables. @default true */
237
250
  enabled?: boolean;
251
+ /** Where keyboard metrics come from. @default 'visual-viewport' */
252
+ source?: KeyboardInsetSource;
238
253
  }
239
254
  /**
240
- * Tracks the on-screen keyboard via the Visual Viewport API.
255
+ * Tracks the on-screen keyboard and publishes it on `<html>`.
256
+ *
257
+ * ### `source: 'native'` (Cordova / Capacitor apps)
258
+ *
259
+ * Listens for the native keyboard plugin's `keyboardWillShow` /
260
+ * `keyboardWillHide` window events. Configure the plugin so the WebView is
261
+ * neither resized nor panned (for `cordova-plugin-ionic-keyboard`:
262
+ * `KeyboardResize=false`), keep the app shell at full height, and move only
263
+ * the composer dock by `--mieweb-keyboard-inset` with a short transition
264
+ * (~250ms) so it rides up with the keyboard. Only `--mieweb-keyboard-inset`,
265
+ * `data-keyboard-open` and `data-keyboard-source` are published; the
266
+ * visual-viewport variables stay unset.
267
+ *
268
+ * ### `source: 'visual-viewport'` (browsers, default)
269
+ *
270
+ * Uses the Visual Viewport API.
241
271
  *
242
272
  * iOS Safari and WKWebView (Cordova) ignore
243
273
  * `interactive-widget=resizes-content`, and `dvh` does not shrink for the
@@ -255,6 +285,10 @@ interface UseKeyboardInsetOptions {
255
285
  * Android with `interactive-widget=resizes-content`) the inset stays 0 and
256
286
  * the variables simply mirror the layout viewport.
257
287
  *
288
+ * iOS reports the visual viewport only after the keyboard has finished
289
+ * animating, so a shell sized this way snaps into place once the keyboard
290
+ * lands. Prefer `source: 'native'` wherever a native keyboard plugin exists.
291
+ *
258
292
  * Mount it once, near the app root.
259
293
  *
260
294
  * @example
@@ -273,6 +307,23 @@ interface UseKeyboardInsetOptions {
273
307
  * );
274
308
  * }
275
309
  * ```
310
+ *
311
+ * @example Native app (keyboard plugin with WebView resizing disabled)
312
+ * ```tsx
313
+ * function ComposerDock({ children }) {
314
+ * useKeyboardInset({ source: 'native' });
315
+ * return (
316
+ * <div
317
+ * style={{
318
+ * paddingBottom: 'calc(var(--mieweb-keyboard-inset, 0px) + 0.5rem)',
319
+ * transition: 'padding-bottom 250ms ease',
320
+ * }}
321
+ * >
322
+ * {children}
323
+ * </div>
324
+ * );
325
+ * }
326
+ * ```
276
327
  */
277
328
  declare function useKeyboardInset(options?: UseKeyboardInsetOptions): KeyboardInsetState;
278
329
 
@@ -952,4 +1003,4 @@ interface UseTranscriptEditsResult {
952
1003
  */
953
1004
  declare function useTranscriptEdits(options: UseTranscriptEditsOptions): UseTranscriptEditsResult;
954
1005
 
955
- export { type AnchoredPlacement, DEFAULT_FILLER_WORDS, DEFAULT_MIN_SILENCE_MS, DEFAULT_NL_SILENCE_MS, type Direction, type DragOverState, type FillerAnalysis, type HoverPreviewState, KEYBOARD_INSET_VAR, KEYBOARD_OPEN_ATTRIBUTE, type KeyboardInsetState, type KeyboardShortcutOptions, type MediaTransportState, RTL_LOCALES, type ResolvedTheme, type SilenceThresholdCount, type Theme, type TranscriptClipboard, type TranscriptEditStats, type UseAnchoredPositionOptions, type UseAnchoredPositionReturn, type UseDragReorderOptions, type UseDragReorderReturn, type UseKeyboardInsetOptions, type UseMediaTransportOptions, type UseMediaTransportReturn, type UseScrollSpyOptions, type UseScrollSpyReturn, type UseStickToBottomOptions, type UseStickToBottomReturn, type UseTranscriptEditsOptions, type UseTranscriptEditsResult, type UseYouTubeHoverPreviewOptions, type UseYouTubeHoverPreviewReturn, VISUAL_VIEWPORT_HEIGHT_VAR, VISUAL_VIEWPORT_OFFSET_TOP_VAR, buildPlaybackSegments, dragIndicatorClasses, getSpeedAtIndex, initEditableWords, insertSilences, isDarkMode, isRtlLocale, reorderIds, useAnchoredPosition, useClickOutside, useCommandK, useDirection, useDragReorder, useEscapeKey, useFocusTrap, useIsDarkMode, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardInset, useKeyboardShortcut, useLiveAnnouncement, useMediaQuery, useMediaTransport, usePrefersReducedMotion, useScrollSpy, useStickToBottom, useStreamEndedBelowFold, useTheme, useTranscriptEdits, useYouTubeHoverPreview };
1006
+ export { type AnchoredPlacement, DEFAULT_FILLER_WORDS, DEFAULT_MIN_SILENCE_MS, DEFAULT_NL_SILENCE_MS, type Direction, type DragOverState, type FillerAnalysis, type HoverPreviewState, KEYBOARD_INSET_VAR, KEYBOARD_OPEN_ATTRIBUTE, KEYBOARD_SOURCE_ATTRIBUTE, type KeyboardInsetSource, type KeyboardInsetState, type KeyboardShortcutOptions, type MediaTransportState, RTL_LOCALES, type ResolvedTheme, type SilenceThresholdCount, type Theme, type TranscriptClipboard, type TranscriptEditStats, type UseAnchoredPositionOptions, type UseAnchoredPositionReturn, type UseDragReorderOptions, type UseDragReorderReturn, type UseKeyboardInsetOptions, type UseMediaTransportOptions, type UseMediaTransportReturn, type UseScrollSpyOptions, type UseScrollSpyReturn, type UseStickToBottomOptions, type UseStickToBottomReturn, type UseTranscriptEditsOptions, type UseTranscriptEditsResult, type UseYouTubeHoverPreviewOptions, type UseYouTubeHoverPreviewReturn, VISUAL_VIEWPORT_HEIGHT_VAR, VISUAL_VIEWPORT_OFFSET_TOP_VAR, buildPlaybackSegments, dragIndicatorClasses, getSpeedAtIndex, initEditableWords, insertSilences, isDarkMode, isRtlLocale, reorderIds, useAnchoredPosition, useClickOutside, useCommandK, useDirection, useDragReorder, useEscapeKey, useFocusTrap, useIsDarkMode, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardInset, useKeyboardShortcut, useLiveAnnouncement, useMediaQuery, useMediaTransport, usePrefersReducedMotion, useScrollSpy, useStickToBottom, useStreamEndedBelowFold, useTheme, useTranscriptEdits, useYouTubeHoverPreview };
@@ -1,4 +1,4 @@
1
- export { KEYBOARD_INSET_VAR, KEYBOARD_OPEN_ATTRIBUTE, RTL_LOCALES, VISUAL_VIEWPORT_HEIGHT_VAR, VISUAL_VIEWPORT_OFFSET_TOP_VAR, isRtlLocale, useCommandK, useDirection, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardInset, useKeyboardShortcut, useMediaQuery } from '../chunk-LENW5YOC.js';
1
+ export { KEYBOARD_INSET_VAR, KEYBOARD_OPEN_ATTRIBUTE, KEYBOARD_SOURCE_ATTRIBUTE, RTL_LOCALES, VISUAL_VIEWPORT_HEIGHT_VAR, VISUAL_VIEWPORT_OFFSET_TOP_VAR, isRtlLocale, useCommandK, useDirection, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardInset, useKeyboardShortcut, useMediaQuery } from '../chunk-GBUVIGD5.js';
2
2
  export { useYouTubeHoverPreview } from '../chunk-POWS35OT.js';
3
3
  export { useTheme } from '../chunk-KJZNEVYM.js';
4
4
  export { useStickToBottom, useStreamEndedBelowFold } from '../chunk-BM35CACB.js';