@nhtio/lucid-resourceful-vue-components 0.1.0-master-2b799e79 → 0.1.0-master-9802f3a9
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/{VChip-DWwcL8cL.mjs → VChip-COQck2AV.mjs} +2 -2
- package/{VChip-DWwcL8cL.mjs.map → VChip-COQck2AV.mjs.map} +1 -1
- package/{VDatePicker-C7_ULYfO.mjs → VDatePicker-DJFZcev9.mjs} +4 -4
- package/{VDatePicker-C7_ULYfO.mjs.map → VDatePicker-DJFZcev9.mjs.map} +1 -1
- package/{VDialog-BVRDhoD7.mjs → VDialog-JGibK5Rl.mjs} +3 -3
- package/{VDialog-BVRDhoD7.mjs.map → VDialog-JGibK5Rl.mjs.map} +1 -1
- package/{VEmptyState-C2B0Znk9.mjs → VEmptyState-DKODfacQ.mjs} +2 -2
- package/{VEmptyState-C2B0Znk9.mjs.map → VEmptyState-DKODfacQ.mjs.map} +1 -1
- package/{VHover-DnB1GlWG.mjs → VHover-DGMoUvi7.mjs} +3 -3
- package/{VHover-DnB1GlWG.mjs.map → VHover-DGMoUvi7.mjs.map} +1 -1
- package/{VListItem-DojRgtpe.mjs → VListItem-ZmExdT37.mjs} +3 -3
- package/{VListItem-DojRgtpe.mjs.map → VListItem-ZmExdT37.mjs.map} +1 -1
- package/{VMenu-D2biKkpd.mjs → VMenu-DCDIKpqX.mjs} +3 -3
- package/{VMenu-D2biKkpd.mjs.map → VMenu-DCDIKpqX.mjs.map} +1 -1
- package/{VPicker-dxKS1KK4.mjs → VPicker-CAvKVtUE.mjs} +4 -4
- package/{VPicker-dxKS1KK4.mjs.map → VPicker-CAvKVtUE.mjs.map} +1 -1
- package/{VRadioGroup-lC_c6Ath.mjs → VRadioGroup-BPByWwud.mjs} +4 -4
- package/{VRadioGroup-lC_c6Ath.mjs.map → VRadioGroup-BPByWwud.mjs.map} +1 -1
- package/{VRow-BBY2gEjT.mjs → VRow-BwokRy3H.mjs} +2 -2
- package/{VRow-BBY2gEjT.mjs.map → VRow-BwokRy3H.mjs.map} +1 -1
- package/{VSheet-B4SA9_dv.mjs → VSheet-CHO05eqU.mjs} +2 -2
- package/{VSheet-B4SA9_dv.mjs.map → VSheet-CHO05eqU.mjs.map} +1 -1
- package/{actions-CXhEUJp6.mjs → actions-CpgDJP6D.mjs} +12 -12
- package/{actions-CXhEUJp6.mjs.map → actions-CpgDJP6D.mjs.map} +1 -1
- package/{alert-B0j6GH3V.mjs → alert-C-iwLX_v.mjs} +11 -11
- package/{alert-B0j6GH3V.mjs.map → alert-C-iwLX_v.mjs.map} +1 -1
- package/{bigint-DXS_rVbG.mjs → bigint-DatNMKMQ.mjs} +7 -7
- package/{bigint-DXS_rVbG.mjs.map → bigint-DatNMKMQ.mjs.map} +1 -1
- package/{boolean-BTu-4Ihs.mjs → boolean-B0IH8K9C.mjs} +10 -10
- package/{boolean-BTu-4Ihs.mjs.map → boolean-B0IH8K9C.mjs.map} +1 -1
- package/{clipboard-C6YTX8YB.mjs → clipboard-DWKPq79h.mjs} +7 -7
- package/{clipboard-C6YTX8YB.mjs.map → clipboard-DWKPq79h.mjs.map} +1 -1
- package/{common-a_cd4SQg.mjs → common-Dzn-bQuK.mjs} +15 -15
- package/{common-a_cd4SQg.mjs.map → common-Dzn-bQuK.mjs.map} +1 -1
- package/components/autorefresh_controller.mjs +1 -1
- package/components/control_button.mjs +1 -1
- package/components/control_button_bar.mjs +2 -2
- package/components/control_menu.mjs +1 -1
- package/components/custom_field.mjs +1 -1
- package/components/exporter.mjs +1 -1
- package/components/fields/bigint.mjs +1 -1
- package/components/fields/boolean.mjs +1 -1
- package/components/fields/date.mjs +1 -1
- package/components/fields/date_time.mjs +1 -1
- package/components/fields/enum.mjs +1 -1
- package/components/fields/integer.mjs +1 -1
- package/components/fields/number.mjs +1 -1
- package/components/fields/string.mjs +1 -1
- package/components/fields/unsigned_integer.mjs +1 -1
- package/components/fields.mjs +9 -9
- package/components/form_with_validation.mjs +1 -1
- package/components/resourceful_alerter.mjs +1 -1
- package/components/resourceful_index.mjs +1 -1
- package/components/resourceful_record.mjs +2 -2
- package/components/resourceful_record_default_form.mjs +1 -1
- package/components/resourceful_record_form.mjs +1 -1
- package/components/sortable.mjs +1 -1
- package/components/svg_icon.mjs +1 -1
- package/components/timezone_picker.mjs +1 -1
- package/components.mjs +23 -23
- package/composables.mjs +11 -11
- package/{custom-CgyU3A_B.mjs → custom-B_tvJRGH.mjs} +7 -7
- package/{custom-CgyU3A_B.mjs.map → custom-B_tvJRGH.mjs.map} +1 -1
- package/{date-B8edF8kU.mjs → date-4kOMkpPK.mjs} +10 -10
- package/{date-B8edF8kU.mjs.map → date-4kOMkpPK.mjs.map} +1 -1
- package/{date_time-BNsYnH-e.mjs → date_time-D96QVf1U.mjs} +18 -18
- package/{date_time-BNsYnH-e.mjs.map → date_time-D96QVf1U.mjs.map} +1 -1
- package/{display-pfXaBUr6.mjs → display-D5DX6q0x.mjs} +4 -4
- package/{display-pfXaBUr6.mjs.map → display-D5DX6q0x.mjs.map} +1 -1
- package/{display-CHspVOz6.mjs → display-XSB3T9Jj.mjs} +25 -25
- package/{display-CHspVOz6.mjs.map → display-XSB3T9Jj.mjs.map} +1 -1
- package/{enum-DoxJn16e.mjs → enum-0BP9v0N5.mjs} +9 -9
- package/{enum-DoxJn16e.mjs.map → enum-0BP9v0N5.mjs.map} +1 -1
- package/{exceptions-BeFuVcrH.mjs → exceptions-eIayR6I-.mjs} +2 -2
- package/{exceptions-BeFuVcrH.mjs.map → exceptions-eIayR6I-.mjs.map} +1 -1
- package/exceptions.mjs +2 -2
- package/factories.mjs +2 -2
- package/{field_composer-CPqM1aSV.mjs → field_composer-ohZKjFvR.mjs} +3 -3
- package/{field_composer-CPqM1aSV.mjs.map → field_composer-ohZKjFvR.mjs.map} +1 -1
- package/{form-BkQlevYR.mjs → form-Bn6xP2j6.mjs} +15 -15
- package/{form-BkQlevYR.mjs.map → form-Bn6xP2j6.mjs.map} +1 -1
- package/{guards-D0G8CU2m.mjs → guards-2UyYIEIu.mjs} +2 -2
- package/{guards-D0G8CU2m.mjs.map → guards-2UyYIEIu.mjs.map} +1 -1
- package/guards.mjs +4 -4
- package/helpers.mjs +12 -12
- package/{http-C15bx-Gn.mjs → http-BCSx8rC5.mjs} +6 -6
- package/{http-C15bx-Gn.mjs.map → http-BCSx8rC5.mjs.map} +1 -1
- package/{http-ChBUYgv8.mjs → http-BPAApU10.mjs} +2 -2
- package/{http-ChBUYgv8.mjs.map → http-BPAApU10.mjs.map} +1 -1
- package/http.mjs +1 -1
- package/{index-DHoLuRuJ.mjs → index-BACipeG5.mjs} +6 -6
- package/{index-DHoLuRuJ.mjs.map → index-BACipeG5.mjs.map} +1 -1
- package/{index-De0W4KPF.mjs → index-BL6_XmCt.mjs} +8 -8
- package/{index-De0W4KPF.mjs.map → index-BL6_XmCt.mjs.map} +1 -1
- package/{index-CduefDwU.mjs → index-BPddr1wp.mjs} +3 -3
- package/{index-CduefDwU.mjs.map → index-BPddr1wp.mjs.map} +1 -1
- package/{index-CvhhGjZn.mjs → index-BfgMbbzT.mjs} +3 -3
- package/{index-CvhhGjZn.mjs.map → index-BfgMbbzT.mjs.map} +1 -1
- package/{index-DLzoBhUb.mjs → index-BzKOotZB.mjs} +4 -4
- package/{index-DLzoBhUb.mjs.map → index-BzKOotZB.mjs.map} +1 -1
- package/{index-CdaTAyzs.mjs → index-CGcmZuao.mjs} +15 -15
- package/{index-CdaTAyzs.mjs.map → index-CGcmZuao.mjs.map} +1 -1
- package/{index-CHELe70a.mjs → index-CIi2Afdj.mjs} +8 -8
- package/{index-CHELe70a.mjs.map → index-CIi2Afdj.mjs.map} +1 -1
- package/{index-Cb3Fmo7E.mjs → index-dd1icY6k.mjs} +43 -43
- package/{index-Cb3Fmo7E.mjs.map → index-dd1icY6k.mjs.map} +1 -1
- package/{index-BcDX9w4T.mjs → index-omu1xByg.mjs} +8 -8
- package/{index-BcDX9w4T.mjs.map → index-omu1xByg.mjs.map} +1 -1
- package/index.mjs +37 -37
- package/{integer-BWdmDp7S.mjs → integer-DUt4-3uq.mjs} +3 -3
- package/{integer-BWdmDp7S.mjs.map → integer-DUt4-3uq.mjs.map} +1 -1
- package/{ioc-Q-KAX6x1.mjs → ioc-De3kv3aq.mjs} +2 -2
- package/{ioc-Q-KAX6x1.mjs.map → ioc-De3kv3aq.mjs.map} +1 -1
- package/ioc.mjs +1 -1
- package/{mdi-jw9Ee7p6.mjs → mdi-CicdOYKA.mjs} +15 -15
- package/{mdi-jw9Ee7p6.mjs.map → mdi-CicdOYKA.mjs.map} +1 -1
- package/{number-Chf-qQs7.mjs → number-UcQrSUBH.mjs} +8 -8
- package/{number-Chf-qQs7.mjs.map → number-UcQrSUBH.mjs.map} +1 -1
- package/package.json +26 -26
- package/{props-fFnbtBgH.mjs → props-DtG7gC-5.mjs} +6 -6
- package/{props-fFnbtBgH.mjs.map → props-DtG7gC-5.mjs.map} +1 -1
- package/{props-eYGYq1uo.mjs → props-KjN-Kdb9.mjs} +4 -4
- package/{props-eYGYq1uo.mjs.map → props-KjN-Kdb9.mjs.map} +1 -1
- package/{renderers-DLsO8zG-.mjs → renderers-B4GBzuIN.mjs} +14 -14
- package/{renderers-DLsO8zG-.mjs.map → renderers-B4GBzuIN.mjs.map} +1 -1
- package/{string-D-UsgMTx.mjs → string-C4_hGKOb.mjs} +13 -13
- package/{string-D-UsgMTx.mjs.map → string-C4_hGKOb.mjs.map} +1 -1
- package/{unsigned_integer-7R2vw_Qn.mjs → unsigned_integer-59LqwDCe.mjs} +4 -4
- package/{unsigned_integer-7R2vw_Qn.mjs.map → unsigned_integer-59LqwDCe.mjs.map} +1 -1
- package/{utils-DehfJ8pT.mjs → utils-C5k3feJf.mjs} +2 -2
- package/{utils-DehfJ8pT.mjs.map → utils-C5k3feJf.mjs.map} +1 -1
- package/{validation-41gHTtyY.mjs → validation-D4B5S8pa.mjs} +5 -5
- package/{validation-41gHTtyY.mjs.map → validation-D4B5S8pa.mjs.map} +1 -1
- package/{vendor-nhtio-vuetifiable-CS-KbH1h.mjs → vendor-nhtio-vuetifiable-D1pLdLSx.mjs} +16 -16
- package/{vendor-nhtio-vuetifiable-CS-KbH1h.mjs.map → vendor-nhtio-vuetifiable-D1pLdLSx.mjs.map} +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { k as useBrowser } from "./ioc-
|
|
1
|
+
import { k as useBrowser } from "./ioc-De3kv3aq.mjs";
|
|
2
2
|
import { useDisplay } from "vuetify";
|
|
3
|
-
import { t as toUnreactive, f as isHTMLElement } from "./utils-
|
|
4
|
-
import { l as getCurrentInstanceName, S as SUPPORTS_INTERSECTION, d as debounce, I as IN_BROWSER } from "./vendor-nhtio-vuetifiable-
|
|
3
|
+
import { t as toUnreactive, f as isHTMLElement } from "./utils-C5k3feJf.mjs";
|
|
4
|
+
import { l as getCurrentInstanceName, S as SUPPORTS_INTERSECTION, d as debounce, I as IN_BROWSER } from "./vendor-nhtio-vuetifiable-D1pLdLSx.mjs";
|
|
5
5
|
import { shallowRef, reactive, onMounted, watch, onUnmounted, toRefs, triggerRef, nextTick } from "vue";
|
|
6
6
|
const SUPPORTS_RESIZE_OBSERVATION = IN_BROWSER && "ResizeObserver" in window;
|
|
7
7
|
const SUPPORTS_VISUAL_VIEWPORT = IN_BROWSER && "visualViewport" in window;
|
|
@@ -261,4 +261,4 @@ export {
|
|
|
261
261
|
SUPPORTS_VISUAL_VIEWPORT as a,
|
|
262
262
|
useScopedDisplay as u
|
|
263
263
|
};
|
|
264
|
-
//# sourceMappingURL=display-
|
|
264
|
+
//# sourceMappingURL=display-D5DX6q0x.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-pfXaBUr6.mjs","sources":["../src/private/ux/display.ts"],"sourcesContent":["import { useBrowser } from '../ioc'\nimport { useDisplay } from 'vuetify'\nimport { toUnreactive } from '../common/utils'\nimport { isHTMLElement } from '../common/guards'\nimport { debounce } from '@nhtio/vuetifiable/util/helpers'\nimport { IN_BROWSER, SUPPORTS_INTERSECTION } from '@nhtio/vuetifiable/util/globals'\nimport { getCurrentInstanceName } from '@nhtio/vuetifiable/util/getCurrentInstance'\nimport {\n reactive,\n shallowRef,\n triggerRef,\n toRefs,\n watch,\n onMounted,\n onUnmounted,\n nextTick,\n} from 'vue'\nimport type { Ref, ComponentPublicInstance, UnwrapRef, WatchStopHandle } from 'vue'\nimport type { DisplayInstance, DisplayBreakpoint, DisplayThresholds } from 'vuetify'\n\nexport const SUPPORTS_RESIZE_OBSERVATION = IN_BROWSER && 'ResizeObserver' in window\n\nexport const SUPPORTS_VISUAL_VIEWPORT = IN_BROWSER && 'visualViewport' in window\n\ntype DisplayPlatform = DisplayInstance['platform']\n\nexport type ReferencedContainer = Ref<HTMLElement | ComponentPublicInstance | null>\n\nexport const ScopedDisplayOrientation = ['landscape', 'portrait', 'square'] as const\nexport type ScopedDisplayOrientation = (typeof ScopedDisplayOrientation)[number]\n\nexport type ScopedDisplayInstance = DisplayInstance & {\n ssr: boolean\n intersecting: Ref<boolean>\n visible: Ref<boolean>\n orientation: Ref<ScopedDisplayOrientation>\n}\n\n// Extract the ref types as non-ref types and exclude functions\ntype InternalReactiveScopedDisplayStateTypes = {\n [key in keyof ScopedDisplayInstance]: ScopedDisplayInstance[key] extends Ref<any>\n ? UnwrapRef<ScopedDisplayInstance[key]>\n : ScopedDisplayInstance[key] extends Function\n ? never\n : ScopedDisplayInstance[key]\n}\n\n// Create a type that only includes the non-excluded keys\ntype InternalReactiveScopedDisplayState = {\n [K in keyof InternalReactiveScopedDisplayStateTypes as InternalReactiveScopedDisplayStateTypes[K] extends never\n ? never\n : K]: InternalReactiveScopedDisplayStateTypes[K]\n}\n\nexport const useScopedDisplay = (\n container: ReferencedContainer,\n name: string = getCurrentInstanceName('resourcefulComposables')\n) => {\n const vuetifyState = useDisplay({ mobile: null }, name)\n const {\n mobile,\n mobileBreakpoint,\n platform,\n thresholds,\n ssr,\n update: vuetifyUseDisplayUpdate,\n } = vuetifyState\n // despite the urge to use a Set here, an array is more peformant for doing simple iterations\n const watchStopHandles: WatchStopHandle[] = []\n let resizeObserver: ResizeObserver | undefined\n let intersectionObserver: IntersectionObserver | undefined\n const width = shallowRef<number>(0)\n const height = shallowRef<number>(0)\n const intersecting = shallowRef<boolean>(false)\n const visible = shallowRef<boolean>(false)\n const state = reactive<Omit<InternalReactiveScopedDisplayState, 'ssr'>>({\n xs: false,\n sm: false,\n md: false,\n lg: false,\n xl: false,\n xxl: false,\n smAndUp: false,\n mdAndUp: false,\n lgAndUp: false,\n xlAndUp: false,\n smAndDown: false,\n mdAndDown: false,\n lgAndDown: false,\n xlAndDown: false,\n name: 'xs' as const,\n width: 0,\n height: 0,\n mobile: false,\n mobileBreakpoint: toUnreactive(mobileBreakpoint),\n platform: toUnreactive(platform),\n thresholds: toUnreactive(thresholds),\n intersecting: false,\n visible: false,\n orientation: 'square' as ScopedDisplayOrientation,\n })\n const resizeObserverHandler = (entries: ResizeObserverEntry[]) => {\n let w: number = 0\n let h: number = 0\n for (const entry of entries) {\n if ('contentBoxSize' in entry && 'undefined' !== typeof entry.contentBoxSize) {\n const contentBoxSize = Array.isArray(entry.contentBoxSize)\n ? (entry.contentBoxSize[0] as ResizeObserverSize)\n : // Old versions of Firefox treat ResizeObserverSize as a single item\n (entry.contentBoxSize as unknown as ResizeObserverSize)\n w = contentBoxSize.inlineSize\n } else {\n w = entry.contentRect.width\n }\n h = entry.contentRect.height\n updateDimensions(w, h)\n }\n }\n const intersectionObserverHandler = (entries: IntersectionObserverEntry[]) => {\n const isIntersecting = entries.some((entry) => entry.isIntersecting)\n const isVisible = entries.some((entry) =>\n 'isVisible' in entry ? (entry as any).isVisible : entry.isIntersecting\n )\n intersecting.value = isIntersecting\n visible.value = isVisible\n triggerRef(intersecting)\n triggerRef(visible)\n }\n // helper utility to ensure that the width and height are updated\n const updateDimensions = (w: number = 0, h: number = 0) => {\n width.value = w\n height.value = h\n triggerRef(width)\n triggerRef(height)\n }\n // an exposed method to force an update of the display state\n const update = () => {\n vuetifyUseDisplayUpdate()\n const el = getContainerHtmlElement()\n if (el) {\n const rect = el.getBoundingClientRect()\n updateDimensions(rect.width, rect.height)\n } else {\n updateDimensions(0, 0)\n }\n }\n // helper utility to get the mobile breakpoint as a number for comparisons\n const getMobileBreakpointAsNumber = () => {\n if (typeof state.mobileBreakpoint === 'number') {\n return state.mobileBreakpoint\n }\n if (state.mobileBreakpoint in state.thresholds) {\n return state.thresholds[state.mobileBreakpoint]\n }\n // fallback to 600\n return 600\n }\n // helper utility to get the element from a referenced value\n // used to get the container element from the reference, and in watchers\n const getReferencedHtmlElement = (value: HTMLElement | ComponentPublicInstance | null) => {\n const browser = useBrowser()\n if (!value || browser.ssr) return undefined\n if (isHTMLElement(value)) return value\n if ('$el' in value && isHTMLElement(value.$el)) {\n return value.$el\n }\n return undefined\n }\n // helper utility to get the referenced container element\n const getContainerHtmlElement = (): HTMLElement | undefined => {\n return getReferencedHtmlElement(container.value)\n }\n // observers for changes in the values from vuetify's useDisplay composable\n const vuetifyUseDisplayMobileObserver = (is: boolean) => {\n if (true === is) {\n state.mobile = true\n } else if (width.value < getMobileBreakpointAsNumber()) {\n state.mobile = true\n } else {\n state.mobile = false\n }\n }\n const vuetifyUseDisplayMobileBreakpointObserver = (is: number | DisplayBreakpoint) => {\n state.mobileBreakpoint = toUnreactive(is)\n queueMicrotask(() => vuetifyUseDisplayMobileObserver(mobile.value))\n }\n const vuetifyUseDisplayPlatformObserver = (is: DisplayPlatform) => {\n state.platform = toUnreactive(is)\n }\n const vuetifyUseDisplayThresholdsObserver = (is: DisplayThresholds) => {\n state.thresholds = toUnreactive(is)\n queueMicrotask(() => vuetifyUseDisplayMobileObserver(mobile.value))\n }\n const containerObserver = (\n is: HTMLElement | ComponentPublicInstance | null,\n was: HTMLElement | ComponentPublicInstance | null | undefined\n ) => {\n const newEl = getReferencedHtmlElement(is)\n const oldEl = getReferencedHtmlElement(was ?? null)\n if (newEl === oldEl) return\n if (intersectionObserver) {\n if (oldEl) {\n intersectionObserver.unobserve(oldEl)\n }\n if (newEl) {\n intersectionObserver.observe(newEl)\n }\n }\n if (resizeObserver) {\n if (oldEl) {\n resizeObserver.unobserve(oldEl)\n }\n if (newEl) {\n resizeObserver.observe(newEl)\n }\n }\n const el = getContainerHtmlElement()\n if (el) {\n const rect = el.getBoundingClientRect()\n updateDimensions(rect.width, rect.height)\n } else {\n updateDimensions(0, 0)\n }\n }\n const dimensionsObserver = debounce(() => {\n state.width = width.value\n state.height = height.value\n vuetifyUseDisplayMobileObserver(mobile.value)\n const xs = width.value < thresholds.value.sm\n const sm = width.value < thresholds.value.md && !xs\n const md = width.value < thresholds.value.lg && !(sm || xs)\n const lg = width.value < thresholds.value.xl && !(md || sm || xs)\n const xl = width.value < thresholds.value.xxl && !(lg || md || sm || xs)\n const xxl = width.value >= thresholds.value.xxl\n const breakpointName = xs ? 'xs' : sm ? 'sm' : md ? 'md' : lg ? 'lg' : xl ? 'xl' : 'xxl'\n const smAndUp = !xs\n const mdAndUp = !(xs || sm)\n const lgAndUp = !(xs || sm || md)\n const xlAndUp = !(xs || sm || md || lg)\n const smAndDown = !(md || lg || xl || xxl)\n const mdAndDown = !(lg || xl || xxl)\n const lgAndDown = !(xl || xxl)\n const xlAndDown = !xxl\n const orientation: ScopedDisplayOrientation =\n width.value > height.value ? 'landscape' : height.value > width.value ? 'portrait' : 'square'\n state.xs = xs\n state.sm = sm\n state.md = md\n state.lg = lg\n state.xl = xl\n state.xxl = xxl\n state.name = breakpointName\n state.smAndUp = smAndUp\n state.mdAndUp = mdAndUp\n state.lgAndUp = lgAndUp\n state.xlAndUp = xlAndUp\n state.smAndDown = smAndDown\n state.mdAndDown = mdAndDown\n state.lgAndDown = lgAndDown\n state.xlAndDown = xlAndDown\n state.orientation = orientation\n }, 50)\n const intersectionAndVisibilityObserver = debounce(() => {\n state.intersecting = intersecting.value\n state.visible = visible.value\n }, 50)\n const windowResizeHandler = debounce(() => {\n // Update Vuetify's display state (handles viewport breakpoints)\n vuetifyUseDisplayUpdate()\n // Give the process a tick and then force an update\n nextTick(update)\n }, 50)\n onMounted(() => {\n watchStopHandles.push(watch(mobile, vuetifyUseDisplayMobileObserver, { immediate: true }))\n watchStopHandles.push(\n watch(mobileBreakpoint, vuetifyUseDisplayMobileBreakpointObserver, { immediate: true })\n )\n watchStopHandles.push(watch(platform, vuetifyUseDisplayPlatformObserver, { immediate: true }))\n watchStopHandles.push(\n watch(thresholds, vuetifyUseDisplayThresholdsObserver, { immediate: true })\n )\n if (SUPPORTS_RESIZE_OBSERVATION) {\n resizeObserver = new ResizeObserver(resizeObserverHandler)\n }\n if (SUPPORTS_INTERSECTION) {\n intersectionObserver = new IntersectionObserver(intersectionObserverHandler)\n }\n watchStopHandles.push(watch(container, containerObserver, { immediate: true }))\n watchStopHandles.push(watch(width, dimensionsObserver, { immediate: true }))\n watchStopHandles.push(watch(height, dimensionsObserver, { immediate: true }))\n watchStopHandles.push(\n watch(intersecting, intersectionAndVisibilityObserver, { immediate: true })\n )\n watchStopHandles.push(watch(visible, intersectionAndVisibilityObserver, { immediate: true }))\n // Add window resize listener\n if (IN_BROWSER) {\n window.addEventListener('resize', windowResizeHandler)\n }\n // Add visual viewport listeners\n if (SUPPORTS_VISUAL_VIEWPORT) {\n window.visualViewport!.addEventListener('resize', windowResizeHandler)\n window.visualViewport!.addEventListener('scroll', windowResizeHandler)\n }\n })\n onUnmounted(() => {\n // Remove window resize listener\n if (IN_BROWSER) {\n window.removeEventListener('resize', windowResizeHandler)\n }\n // Remove visual viewport listeners\n if (SUPPORTS_VISUAL_VIEWPORT) {\n window.visualViewport!.removeEventListener('resize', windowResizeHandler)\n window.visualViewport!.removeEventListener('scroll', windowResizeHandler)\n }\n // clear all of the watch stop handles\n watchStopHandles.forEach((stopHandle) => stopHandle())\n watchStopHandles.splice(0, watchStopHandles.length)\n // cleanup the resize observer\n if (resizeObserver) {\n resizeObserver.disconnect()\n resizeObserver = undefined\n }\n // cleanup the intersection observer\n if (intersectionObserver) {\n intersectionObserver.disconnect()\n intersectionObserver = undefined\n }\n })\n return { ...toRefs(state), update, ssr: !!ssr }\n}\n"],"names":[],"mappings":";;;;;AAoBO,MAAM,8BAA8B,cAAc,oBAAoB;AAEtE,MAAM,2BAA2B,cAAc,oBAAoB;AAgCnE,MAAM,mBAAmB,CAC9B,WACA,OAAe,uBAAuB,wBAAwB,MAC3D;AACH,QAAM,eAAe,WAAW,EAAE,QAAQ,KAAA,GAAQ,IAAI;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EAAA,IACN;AAEJ,QAAM,mBAAsC,CAAA;AAC5C,MAAI;AACJ,MAAI;AACJ,QAAM,QAAQ,WAAmB,CAAC;AAClC,QAAM,SAAS,WAAmB,CAAC;AACnC,QAAM,eAAe,WAAoB,KAAK;AAC9C,QAAM,UAAU,WAAoB,KAAK;AACzC,QAAM,QAAQ,SAA0D;AAAA,IACtE,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,KAAK;AAAA,IACL,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA,IACX,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,kBAAkB,aAAa,gBAAgB;AAAA,IAC/C,UAAU,aAAa,QAAQ;AAAA,IAC/B,YAAY,aAAa,UAAU;AAAA,IACnC,cAAc;AAAA,IACd,SAAS;AAAA,IACT,aAAa;AAAA,EAAA,CACd;AACD,QAAM,wBAAwB,CAAC,YAAmC;AAChE,QAAI,IAAY;AAChB,QAAI,IAAY;AAChB,eAAW,SAAS,SAAS;AAC3B,UAAI,oBAAo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;AACD,cAAY,MAAM;AAEhB,QAAI,YAAY;AACd,aAAO,oBAAoB,UAAU,mBAAmB;AAAA,IAC1D;AAEA,QAAI,0BAA0B;AAC5B,aAAO,eAAgB,oBAAoB,UAAU,mBAAmB;AACxE,aAAO,eAAgB,oBAAoB,UAAU,mBAAmB;AAAA,IAC1E;AAEA,qBAAiB,QAAQ,CAAC,eAAe,WAAA,CAAY;AACrD,qBAAiB,OAAO,GAAG,iBAAiB,MAAM;AAElD,QAAI,gBAAgB;AAClB,qBAAe,WAAA;AACf,uBAAiB;AAAA,IACnB;AAEA,QAAI,sBAAsB;AACxB,2BAAqB,WAAA;AACrB,6BAAuB;AAAA,IACzB;AAAA,EACF,CAAC;AACD,SAAO,EAAE,GAAG,OAAO,KAAK,GAAG,QAAQ,KAAK,CAAC,CAAC,IAAA;AAC5C;"}
|
|
1
|
+
{"version":3,"file":"display-D5DX6q0x.mjs","sources":["../src/private/ux/display.ts"],"sourcesContent":["import { useBrowser } from '../ioc'\nimport { useDisplay } from 'vuetify'\nimport { toUnreactive } from '../common/utils'\nimport { isHTMLElement } from '../common/guards'\nimport { debounce } from '@nhtio/vuetifiable/util/helpers'\nimport { IN_BROWSER, SUPPORTS_INTERSECTION } from '@nhtio/vuetifiable/util/globals'\nimport { getCurrentInstanceName } from '@nhtio/vuetifiable/util/getCurrentInstance'\nimport {\n reactive,\n shallowRef,\n triggerRef,\n toRefs,\n watch,\n onMounted,\n onUnmounted,\n nextTick,\n} from 'vue'\nimport type { Ref, ComponentPublicInstance, UnwrapRef, WatchStopHandle } from 'vue'\nimport type { DisplayInstance, DisplayBreakpoint, DisplayThresholds } from 'vuetify'\n\nexport const SUPPORTS_RESIZE_OBSERVATION = IN_BROWSER && 'ResizeObserver' in window\n\nexport const SUPPORTS_VISUAL_VIEWPORT = IN_BROWSER && 'visualViewport' in window\n\ntype DisplayPlatform = DisplayInstance['platform']\n\nexport type ReferencedContainer = Ref<HTMLElement | ComponentPublicInstance | null>\n\nexport const ScopedDisplayOrientation = ['landscape', 'portrait', 'square'] as const\nexport type ScopedDisplayOrientation = (typeof ScopedDisplayOrientation)[number]\n\nexport type ScopedDisplayInstance = DisplayInstance & {\n ssr: boolean\n intersecting: Ref<boolean>\n visible: Ref<boolean>\n orientation: Ref<ScopedDisplayOrientation>\n}\n\n// Extract the ref types as non-ref types and exclude functions\ntype InternalReactiveScopedDisplayStateTypes = {\n [key in keyof ScopedDisplayInstance]: ScopedDisplayInstance[key] extends Ref<any>\n ? UnwrapRef<ScopedDisplayInstance[key]>\n : ScopedDisplayInstance[key] extends Function\n ? never\n : ScopedDisplayInstance[key]\n}\n\n// Create a type that only includes the non-excluded keys\ntype InternalReactiveScopedDisplayState = {\n [K in keyof InternalReactiveScopedDisplayStateTypes as InternalReactiveScopedDisplayStateTypes[K] extends never\n ? never\n : K]: InternalReactiveScopedDisplayStateTypes[K]\n}\n\nexport const useScopedDisplay = (\n container: ReferencedContainer,\n name: string = getCurrentInstanceName('resourcefulComposables')\n) => {\n const vuetifyState = useDisplay({ mobile: null }, name)\n const {\n mobile,\n mobileBreakpoint,\n platform,\n thresholds,\n ssr,\n update: vuetifyUseDisplayUpdate,\n } = vuetifyState\n // despite the urge to use a Set here, an array is more peformant for doing simple iterations\n const watchStopHandles: WatchStopHandle[] = []\n let resizeObserver: ResizeObserver | undefined\n let intersectionObserver: IntersectionObserver | undefined\n const width = shallowRef<number>(0)\n const height = shallowRef<number>(0)\n const intersecting = shallowRef<boolean>(false)\n const visible = shallowRef<boolean>(false)\n const state = reactive<Omit<InternalReactiveScopedDisplayState, 'ssr'>>({\n xs: false,\n sm: false,\n md: false,\n lg: false,\n xl: false,\n xxl: false,\n smAndUp: false,\n mdAndUp: false,\n lgAndUp: false,\n xlAndUp: false,\n smAndDown: false,\n mdAndDown: false,\n lgAndDown: false,\n xlAndDown: false,\n name: 'xs' as const,\n width: 0,\n height: 0,\n mobile: false,\n mobileBreakpoint: toUnreactive(mobileBreakpoint),\n platform: toUnreactive(platform),\n thresholds: toUnreactive(thresholds),\n intersecting: false,\n visible: false,\n orientation: 'square' as ScopedDisplayOrientation,\n })\n const resizeObserverHandler = (entries: ResizeObserverEntry[]) => {\n let w: number = 0\n let h: number = 0\n for (const entry of entries) {\n if ('contentBoxSize' in entry && 'undefined' !== typeof entry.contentBoxSize) {\n const contentBoxSize = Array.isArray(entry.contentBoxSize)\n ? (entry.contentBoxSize[0] as ResizeObserverSize)\n : // Old versions of Firefox treat ResizeObserverSize as a single item\n (entry.contentBoxSize as unknown as ResizeObserverSize)\n w = contentBoxSize.inlineSize\n } else {\n w = entry.contentRect.width\n }\n h = entry.contentRect.height\n updateDimensions(w, h)\n }\n }\n const intersectionObserverHandler = (entries: IntersectionObserverEntry[]) => {\n const isIntersecting = entries.some((entry) => entry.isIntersecting)\n const isVisible = entries.some((entry) =>\n 'isVisible' in entry ? (entry as any).isVisible : entry.isIntersecting\n )\n intersecting.value = isIntersecting\n visible.value = isVisible\n triggerRef(intersecting)\n triggerRef(visible)\n }\n // helper utility to ensure that the width and height are updated\n const updateDimensions = (w: number = 0, h: number = 0) => {\n width.value = w\n height.value = h\n triggerRef(width)\n triggerRef(height)\n }\n // an exposed method to force an update of the display state\n const update = () => {\n vuetifyUseDisplayUpdate()\n const el = getContainerHtmlElement()\n if (el) {\n const rect = el.getBoundingClientRect()\n updateDimensions(rect.width, rect.height)\n } else {\n updateDimensions(0, 0)\n }\n }\n // helper utility to get the mobile breakpoint as a number for comparisons\n const getMobileBreakpointAsNumber = () => {\n if (typeof state.mobileBreakpoint === 'number') {\n return state.mobileBreakpoint\n }\n if (state.mobileBreakpoint in state.thresholds) {\n return state.thresholds[state.mobileBreakpoint]\n }\n // fallback to 600\n return 600\n }\n // helper utility to get the element from a referenced value\n // used to get the container element from the reference, and in watchers\n const getReferencedHtmlElement = (value: HTMLElement | ComponentPublicInstance | null) => {\n const browser = useBrowser()\n if (!value || browser.ssr) return undefined\n if (isHTMLElement(value)) return value\n if ('$el' in value && isHTMLElement(value.$el)) {\n return value.$el\n }\n return undefined\n }\n // helper utility to get the referenced container element\n const getContainerHtmlElement = (): HTMLElement | undefined => {\n return getReferencedHtmlElement(container.value)\n }\n // observers for changes in the values from vuetify's useDisplay composable\n const vuetifyUseDisplayMobileObserver = (is: boolean) => {\n if (true === is) {\n state.mobile = true\n } else if (width.value < getMobileBreakpointAsNumber()) {\n state.mobile = true\n } else {\n state.mobile = false\n }\n }\n const vuetifyUseDisplayMobileBreakpointObserver = (is: number | DisplayBreakpoint) => {\n state.mobileBreakpoint = toUnreactive(is)\n queueMicrotask(() => vuetifyUseDisplayMobileObserver(mobile.value))\n }\n const vuetifyUseDisplayPlatformObserver = (is: DisplayPlatform) => {\n state.platform = toUnreactive(is)\n }\n const vuetifyUseDisplayThresholdsObserver = (is: DisplayThresholds) => {\n state.thresholds = toUnreactive(is)\n queueMicrotask(() => vuetifyUseDisplayMobileObserver(mobile.value))\n }\n const containerObserver = (\n is: HTMLElement | ComponentPublicInstance | null,\n was: HTMLElement | ComponentPublicInstance | null | undefined\n ) => {\n const newEl = getReferencedHtmlElement(is)\n const oldEl = getReferencedHtmlElement(was ?? null)\n if (newEl === oldEl) return\n if (intersectionObserver) {\n if (oldEl) {\n intersectionObserver.unobserve(oldEl)\n }\n if (newEl) {\n intersectionObserver.observe(newEl)\n }\n }\n if (resizeObserver) {\n if (oldEl) {\n resizeObserver.unobserve(oldEl)\n }\n if (newEl) {\n resizeObserver.observe(newEl)\n }\n }\n const el = getContainerHtmlElement()\n if (el) {\n const rect = el.getBoundingClientRect()\n updateDimensions(rect.width, rect.height)\n } else {\n updateDimensions(0, 0)\n }\n }\n const dimensionsObserver = debounce(() => {\n state.width = width.value\n state.height = height.value\n vuetifyUseDisplayMobileObserver(mobile.value)\n const xs = width.value < thresholds.value.sm\n const sm = width.value < thresholds.value.md && !xs\n const md = width.value < thresholds.value.lg && !(sm || xs)\n const lg = width.value < thresholds.value.xl && !(md || sm || xs)\n const xl = width.value < thresholds.value.xxl && !(lg || md || sm || xs)\n const xxl = width.value >= thresholds.value.xxl\n const breakpointName = xs ? 'xs' : sm ? 'sm' : md ? 'md' : lg ? 'lg' : xl ? 'xl' : 'xxl'\n const smAndUp = !xs\n const mdAndUp = !(xs || sm)\n const lgAndUp = !(xs || sm || md)\n const xlAndUp = !(xs || sm || md || lg)\n const smAndDown = !(md || lg || xl || xxl)\n const mdAndDown = !(lg || xl || xxl)\n const lgAndDown = !(xl || xxl)\n const xlAndDown = !xxl\n const orientation: ScopedDisplayOrientation =\n width.value > height.value ? 'landscape' : height.value > width.value ? 'portrait' : 'square'\n state.xs = xs\n state.sm = sm\n state.md = md\n state.lg = lg\n state.xl = xl\n state.xxl = xxl\n state.name = breakpointName\n state.smAndUp = smAndUp\n state.mdAndUp = mdAndUp\n state.lgAndUp = lgAndUp\n state.xlAndUp = xlAndUp\n state.smAndDown = smAndDown\n state.mdAndDown = mdAndDown\n state.lgAndDown = lgAndDown\n state.xlAndDown = xlAndDown\n state.orientation = orientation\n }, 50)\n const intersectionAndVisibilityObserver = debounce(() => {\n state.intersecting = intersecting.value\n state.visible = visible.value\n }, 50)\n const windowResizeHandler = debounce(() => {\n // Update Vuetify's display state (handles viewport breakpoints)\n vuetifyUseDisplayUpdate()\n // Give the process a tick and then force an update\n nextTick(update)\n }, 50)\n onMounted(() => {\n watchStopHandles.push(watch(mobile, vuetifyUseDisplayMobileObserver, { immediate: true }))\n watchStopHandles.push(\n watch(mobileBreakpoint, vuetifyUseDisplayMobileBreakpointObserver, { immediate: true })\n )\n watchStopHandles.push(watch(platform, vuetifyUseDisplayPlatformObserver, { immediate: true }))\n watchStopHandles.push(\n watch(thresholds, vuetifyUseDisplayThresholdsObserver, { immediate: true })\n )\n if (SUPPORTS_RESIZE_OBSERVATION) {\n resizeObserver = new ResizeObserver(resizeObserverHandler)\n }\n if (SUPPORTS_INTERSECTION) {\n intersectionObserver = new IntersectionObserver(intersectionObserverHandler)\n }\n watchStopHandles.push(watch(container, containerObserver, { immediate: true }))\n watchStopHandles.push(watch(width, dimensionsObserver, { immediate: true }))\n watchStopHandles.push(watch(height, dimensionsObserver, { immediate: true }))\n watchStopHandles.push(\n watch(intersecting, intersectionAndVisibilityObserver, { immediate: true })\n )\n watchStopHandles.push(watch(visible, intersectionAndVisibilityObserver, { immediate: true }))\n // Add window resize listener\n if (IN_BROWSER) {\n window.addEventListener('resize', windowResizeHandler)\n }\n // Add visual viewport listeners\n if (SUPPORTS_VISUAL_VIEWPORT) {\n window.visualViewport!.addEventListener('resize', windowResizeHandler)\n window.visualViewport!.addEventListener('scroll', windowResizeHandler)\n }\n })\n onUnmounted(() => {\n // Remove window resize listener\n if (IN_BROWSER) {\n window.removeEventListener('resize', windowResizeHandler)\n }\n // Remove visual viewport listeners\n if (SUPPORTS_VISUAL_VIEWPORT) {\n window.visualViewport!.removeEventListener('resize', windowResizeHandler)\n window.visualViewport!.removeEventListener('scroll', windowResizeHandler)\n }\n // clear all of the watch stop handles\n watchStopHandles.forEach((stopHandle) => stopHandle())\n watchStopHandles.splice(0, watchStopHandles.length)\n // cleanup the resize observer\n if (resizeObserver) {\n resizeObserver.disconnect()\n resizeObserver = undefined\n }\n // cleanup the intersection observer\n if (intersectionObserver) {\n intersectionObserver.disconnect()\n intersectionObserver = undefined\n }\n })\n return { ...toRefs(state), update, ssr: !!ssr }\n}\n"],"names":[],"mappings":";;;;;AAoBO,MAAM,8BAA8B,cAAc,oBAAoB;AAEtE,MAAM,2BAA2B,cAAc,oBAAoB;AAgCnE,MAAM,mBAAmB,CAC9B,WACA,OAAe,uBAAuB,wBAAwB,MAC3D;AACH,QAAM,eAAe,WAAW,EAAE,QAAQ,KAAA,GAAQ,IAAI;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EAAA,IACN;AAEJ,QAAM,mBAAsC,CAAA;AAC5C,MAAI;AACJ,MAAI;AACJ,QAAM,QAAQ,WAAmB,CAAC;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}
|
|
@@ -3826,21 +3826,21 @@ export {
|
|
|
3826
3826
|
Intersect as I,
|
|
3827
3827
|
getNextElement as J,
|
|
3828
3828
|
focusableChildren as K,
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3829
|
+
VSlideYTransition as L,
|
|
3830
|
+
filterInputAttrs as M,
|
|
3831
|
+
VBtnGroup as N,
|
|
3832
|
+
breakpoints as O,
|
|
3833
|
+
getCurrentInstance as P,
|
|
3834
|
+
useVariant as Q,
|
|
3835
|
+
useToggleScope as R,
|
|
3836
|
+
refElement as S,
|
|
3837
|
+
genOverlays as T,
|
|
3838
|
+
makeVariantProps as U,
|
|
3839
3839
|
VProgressLinear as V,
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3840
|
+
useLocale as W,
|
|
3841
|
+
clamp as X,
|
|
3842
|
+
extractNumber as Y,
|
|
3843
|
+
escapeForRegex as Z,
|
|
3844
3844
|
useLoader as _,
|
|
3845
3845
|
VImg as a,
|
|
3846
3846
|
makeLoaderProps as a$,
|
|
@@ -3934,21 +3934,21 @@ export {
|
|
|
3934
3934
|
isEmpty as bn,
|
|
3935
3935
|
VBtn as c,
|
|
3936
3936
|
VIcon as d,
|
|
3937
|
-
|
|
3938
|
-
|
|
3937
|
+
provideTheme as e,
|
|
3938
|
+
useBackgroundColor as f,
|
|
3939
3939
|
genericComponent as g,
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3940
|
+
useDimension as h,
|
|
3941
|
+
useDisplay as i,
|
|
3942
|
+
useRender as j,
|
|
3943
|
+
VDefaultsProvider as k,
|
|
3944
3944
|
convertToUnit as l,
|
|
3945
3945
|
makeThemeProps as m,
|
|
3946
3946
|
makeSizeProps as n,
|
|
3947
|
-
|
|
3947
|
+
makeDimensionProps as o,
|
|
3948
3948
|
propsFactory as p,
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3949
|
+
makeComponentProps as q,
|
|
3950
|
+
IconValue as r,
|
|
3951
|
+
omit as s,
|
|
3952
3952
|
useBorder as t,
|
|
3953
3953
|
useProxiedModel as u,
|
|
3954
3954
|
useElevation as v,
|
|
@@ -3957,4 +3957,4 @@ export {
|
|
|
3957
3957
|
useRounded as y,
|
|
3958
3958
|
makeTagProps as z
|
|
3959
3959
|
};
|
|
3960
|
-
//# sourceMappingURL=display-
|
|
3960
|
+
//# sourceMappingURL=display-XSB3T9Jj.mjs.map
|