@mhmo91/schmancy 0.6.1 → 0.6.3
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/dist/{avatar-Bp8OELqy.js → avatar-BVT4-Eiv.js} +4 -4
- package/dist/{avatar-Bp8OELqy.js.map → avatar-BVT4-Eiv.js.map} +1 -1
- package/dist/{avatar-gH9_xHZs.cjs → avatar-yo2bVOKs.cjs} +2 -2
- package/dist/{avatar-gH9_xHZs.cjs.map → avatar-yo2bVOKs.cjs.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{email-recipients-DPpv0qRr.js → email-recipients-D7WQ6lzz.js} +2 -2
- package/dist/{email-recipients-DPpv0qRr.js.map → email-recipients-D7WQ6lzz.js.map} +1 -1
- package/dist/{email-recipients-Uogc-X_3.cjs → email-recipients-OK-VdpJk.cjs} +2 -2
- package/dist/{email-recipients-Uogc-X_3.cjs.map → email-recipients-OK-VdpJk.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/{sheet-CcVGEdfr.cjs → sheet-DP3mfHiD.cjs} +2 -2
- package/dist/{sheet-CcVGEdfr.cjs.map → sheet-DP3mfHiD.cjs.map} +1 -1
- package/dist/{sheet-D5-XmZs5.js → sheet-tfwcuM1g.js} +2 -2
- package/dist/{sheet-D5-XmZs5.js.map → sheet-tfwcuM1g.js.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{sheet.service-iUShtJp1.cjs → sheet.service-lSWe4XK5.cjs} +2 -2
- package/dist/sheet.service-lSWe4XK5.cjs.map +1 -0
- package/dist/{sheet.service-C66WNur0.js → sheet.service-xiXyDA0o.js} +10 -10
- package/dist/sheet.service-xiXyDA0o.js.map +1 -0
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +1 -1
- package/readme.md +5 -4
- package/dist/sheet.service-C66WNur0.js.map +0 -1
- package/dist/sheet.service-iUShtJp1.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-2eNprXDV.cjs");const n=require("./area.component-DAPQYHtN.cjs"),t=require("./utils-C38P63L6.cjs");require("./autocomplete-CbsmZ0p6.cjs");const r=require("./avatar-gH9_xHZs.cjs"),N=require("./boat-pwsR3UrD.cjs");require("./spinner-DpIB845r.cjs");const g=require("./icon-button-D24NUFs7.cjs");require("./media-hFrznC-7.cjs");const A=require("./checkbox-BXpnd4MJ.cjs"),i=require("./suggestion-chip-DgwbXrI1.cjs"),x=require("./input-chip-Y6Umqn68.cjs"),h=require("./code-preview-DC1nnjD6.cjs"),E=require("./payment-card-form-C3RKAyE-.cjs"),d=require("./date-range-B1l0Wnyd.cjs"),B=require("./date-range-inline-BbTCdiL0.cjs"),s=require("./delay-BR6cMb_F.cjs"),F=require("./details-DCzexjYw.cjs"),u=require("./dialog-content-DUnSEoaA.cjs"),f=require("./dialog-service-Bdaxn2t0.cjs"),b=require("./ripple-DqQrvaTe.cjs"),H=require("lit/directives/guard.js"),C=require("./discovery.service-BpGCuXPd.cjs");require("./divider-nVB0kEMZ.cjs");const P=require("./dropdown-content-CNc79RjI.cjs"),O=require("./timezone-GffBsJxM.cjs");require("./form-BLnfpLCB.cjs"),require("./icon-B38Atn5F.cjs");const j=require("./input-B-87Y5m2.cjs"),m=require("./flex-C66W_bVN.cjs"),p=require("./list-Bx4nE-9X.cjs"),o=require("./email-recipients-Uogc-X_3.cjs"),L=require("./map-ChhBWqG-.cjs");require("./menu-DkRVRYp4.cjs");const D=require("./navigation-rail-CBhirMNF.cjs"),y=require("./notification-service-BcrHAzSN.cjs"),q=require("./notify-BZLGxTpL.cjs");require("./option-CJZFrYDI.cjs"),require("./progress-C36hgIf5.cjs");const T=require("./radio-button-BEoY5yRc.cjs"),V=require("./rxjs-utils.cjs");require("rxjs"),require("./index-CCi1otmh.cjs");const Y=require("./select-C0gf-GTX.cjs");require("./sheet-CcVGEdfr.cjs");const S=require("./sheet.service-iUShtJp1.cjs"),w=require("./slider-In_OE4B9.cjs"),l=require("./schmancy-steps-container-DINAsJgP.cjs"),a=require("./context-create-CA907mdD.cjs"),e=require("./selector-hook-BWMY8npH.cjs"),I=require("./surface-Do6Jvjgs.cjs"),R=require("./table-CJAjGdP2.cjs");require("./tabs-compatibility-DRL9DJHu.cjs"),require("./textarea-D6tLCvgH.cjs");const z=require("./theme.interface-BMeNadVb.cjs"),c=require("./theme-controller-boat-6PcxsUUQ.cjs"),M=require("./theme.events-Car6U_SQ.cjs");require("./theme-button-BygpnNZP.cjs");const v=require("./tooltip-PI0IE4wA.cjs"),k=require("./tree-Cxfl4yJv.cjs"),G=require("./types.cjs"),W=require("./typewriter-BaiAOEvZ.cjs"),$=require("./typography-CtesPGRT.cjs"),K=require("./intersection-CVvaDv96.cjs"),_=require("./number-B7aCRYnH.cjs"),Q=require("./search-DWW8IoOp.cjs");exports.FINDING_MORTIES=n.FINDING_MORTIES,exports.HERE_RICKY=n.HERE_RICKY,exports.HISTORY_STRATEGY=n.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>n.SchmancyArea}),Object.defineProperty(exports,"SchmancyRoute",{enumerable:!0,get:()=>n.SchmancyRoute}),exports.area=n.area,exports.routerHistory=n.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeData=t.decodeData,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeData=t.encodeData,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.lazy=t.lazy,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationBar",{enumerable:!0,get:()=>r.SchmancyNavigationBar}),Object.defineProperty(exports,"SchmancyNavigationBarItem",{enumerable:!0,get:()=>r.SchmancyNavigationBarItem}),Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>N.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>g.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>g.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>A.SchmancyCheckboxElement}),Object.defineProperty(exports,"SchmancyAssistChip",{enumerable:!0,get:()=>i.SchmancyAssistChip}),exports.SchmancyChip=i.SchmancyFilterChip,exports.SchmancyFilterChip=i.SchmancyFilterChip,Object.defineProperty(exports,"SchmancySuggestionChip",{enumerable:!0,get:()=>i.SchmancySuggestionChip}),Object.defineProperty(exports,"SchmancyInputChip",{enumerable:!0,get:()=>x.SchmancyInputChip}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>h.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>E.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>d.SchmancyDateRange}),exports.validateInitialDateRange=d.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>B.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>s.SchmancyDelay}),exports.delayContext=s.delayContext,Object.defineProperty(exports,"SchmancyDetails",{enumerable:!0,get:()=>F.SchmancyDetails}),Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>u.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>u.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>u.SchmancyDialogContent}),exports.$dialog=f.$dialog,exports.DialogService=f.DialogService,exports.color=b.color,exports.fullHeight=b.fullHeight,exports.ripple=b.ripple,Object.defineProperty(exports,"guard",{enumerable:!0,get:()=>H.guard}),exports.discoverAnyComponent=C.discoverAnyComponent,exports.discoverComponent=C.discoverComponent,Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>P.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>P.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>O.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>O.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>j.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>j.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>m.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>m.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>m.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>m.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>p.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>p.SchmancyListItem}),exports.SchmancyListTypeContext=p.SchmancyListTypeContext,Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>o.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>o.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>o.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>o.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>o.SchmancyMailbox}),Object.defineProperty(exports,"SchmancyMap",{enumerable:!0,get:()=>L.SchmancyMap}),Object.defineProperty(exports,"SchmancyNavigationRail",{enumerable:!0,get:()=>D.SchmancyNavigationRail}),Object.defineProperty(exports,"SchmancyNavigationRailItem",{enumerable:!0,get:()=>D.SchmancyNavigationRailItem}),exports.$notify=y.$notify,exports.NotificationAudioService=y.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>y.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>y.SchmancyNotificationContainer}),exports.notify=q.notify,exports.notifyProgress=q.notifyProgress,Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>T.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>T.RadioGroup}),exports.mutationObserver=V.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>Y.SchmancySelect}),exports.SchmancySheetPosition=S.SchmancySheetPosition,exports.SheetHereMorty=S.SheetHereMorty,exports.SheetWhereAreYouRicky=S.SheetWhereAreYouRicky,exports.sheet=S.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>w.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>w.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>l.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>l.SchmancyStepsContainer}),exports.StepsController=l.StepsController,exports.stepsContext=l.stepsContext,exports.BaseStore=a.BaseStore,exports.IndexedDBStorageManager=a.IndexedDBStorageManager,exports.LocalStorageManager=a.LocalStorageManager,exports.MemoryStorageManager=a.MemoryStorageManager,exports.SchmancyArrayStore=a.SchmancyArrayStore,exports.SchmancyStoreObject=a.SchmancyStoreObject,exports.SessionStorageManager=a.SessionStorageManager,exports.StoreError=a.StoreError,exports.createArrayContext=a.createArrayContext,exports.createContext=a.createContext,exports.createStorageManager=a.createStorageManager,exports.createTestArrayContext=a.createTestArrayContext,exports.compareValues=e.compareValues,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>I.SchmancySurface}),exports.SchmancySurfaceTypeContext=I.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>R.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>R.SchmancyTableRow}),exports.SchmancyTheme=z.SchmancyTheme,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>c.SchmancyThemeComponent}),Object.defineProperty(exports,"SchmancyThemeController",{enumerable:!0,get:()=>c.SchmancyThemeController}),Object.defineProperty(exports,"SchmancyThemeControllerBoat",{enumerable:!0,get:()=>c.SchmancyThemeControllerBoat}),exports.createDarkTonalPaletteFromBaseColor=c.createDarkTonalPaletteFromBaseColor,exports.createLightTonalPaletteFromBaseColor=c.createLightTonalPaletteFromBaseColor,exports.formateTheme=c.formateTheme,exports.schmancyTheme=c.schmancyTheme,exports.tailwindStyles=c.tailwindStyles,exports.theme=c.theme,exports.themeContext=c.themeContext,exports.ThemeHereIAm=M.ThemeHereIAm,exports.ThemeWhereAreYou=M.ThemeWhereAreYou,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>v.SchmancyTooltip}),exports.tooltip=v.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>k.SchmancyTree}),exports.SchmancyEvents=G.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>W.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>$.SchmancyTypography}),exports.intersection$=K.intersection$,exports.Numbers=_.Numbers,exports.similarity=Q.similarity;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-2eNprXDV.cjs");const n=require("./area.component-DAPQYHtN.cjs"),t=require("./utils-C38P63L6.cjs");require("./autocomplete-CbsmZ0p6.cjs");const r=require("./avatar-yo2bVOKs.cjs"),N=require("./boat-pwsR3UrD.cjs");require("./spinner-DpIB845r.cjs");const g=require("./icon-button-D24NUFs7.cjs");require("./media-hFrznC-7.cjs");const A=require("./checkbox-BXpnd4MJ.cjs"),i=require("./suggestion-chip-DgwbXrI1.cjs"),x=require("./input-chip-Y6Umqn68.cjs"),h=require("./code-preview-DC1nnjD6.cjs"),E=require("./payment-card-form-C3RKAyE-.cjs"),d=require("./date-range-B1l0Wnyd.cjs"),B=require("./date-range-inline-BbTCdiL0.cjs"),s=require("./delay-BR6cMb_F.cjs"),F=require("./details-DCzexjYw.cjs"),u=require("./dialog-content-DUnSEoaA.cjs"),f=require("./dialog-service-Bdaxn2t0.cjs"),b=require("./ripple-DqQrvaTe.cjs"),H=require("lit/directives/guard.js"),C=require("./discovery.service-BpGCuXPd.cjs");require("./divider-nVB0kEMZ.cjs");const P=require("./dropdown-content-CNc79RjI.cjs"),O=require("./timezone-GffBsJxM.cjs");require("./form-BLnfpLCB.cjs"),require("./icon-B38Atn5F.cjs");const j=require("./input-B-87Y5m2.cjs"),m=require("./flex-C66W_bVN.cjs"),p=require("./list-Bx4nE-9X.cjs"),o=require("./email-recipients-OK-VdpJk.cjs"),L=require("./map-ChhBWqG-.cjs");require("./menu-DkRVRYp4.cjs");const D=require("./navigation-rail-CBhirMNF.cjs"),y=require("./notification-service-BcrHAzSN.cjs"),q=require("./notify-BZLGxTpL.cjs");require("./option-CJZFrYDI.cjs"),require("./progress-C36hgIf5.cjs");const T=require("./radio-button-BEoY5yRc.cjs"),V=require("./rxjs-utils.cjs");require("rxjs"),require("./index-CCi1otmh.cjs");const Y=require("./select-C0gf-GTX.cjs");require("./sheet-DP3mfHiD.cjs");const S=require("./sheet.service-lSWe4XK5.cjs"),w=require("./slider-In_OE4B9.cjs"),l=require("./schmancy-steps-container-DINAsJgP.cjs"),a=require("./context-create-CA907mdD.cjs"),e=require("./selector-hook-BWMY8npH.cjs"),I=require("./surface-Do6Jvjgs.cjs"),R=require("./table-CJAjGdP2.cjs");require("./tabs-compatibility-DRL9DJHu.cjs"),require("./textarea-D6tLCvgH.cjs");const z=require("./theme.interface-BMeNadVb.cjs"),c=require("./theme-controller-boat-6PcxsUUQ.cjs"),M=require("./theme.events-Car6U_SQ.cjs");require("./theme-button-BygpnNZP.cjs");const v=require("./tooltip-PI0IE4wA.cjs"),k=require("./tree-Cxfl4yJv.cjs"),G=require("./types.cjs"),W=require("./typewriter-BaiAOEvZ.cjs"),$=require("./typography-CtesPGRT.cjs"),K=require("./intersection-CVvaDv96.cjs"),_=require("./number-B7aCRYnH.cjs"),Q=require("./search-DWW8IoOp.cjs");exports.FINDING_MORTIES=n.FINDING_MORTIES,exports.HERE_RICKY=n.HERE_RICKY,exports.HISTORY_STRATEGY=n.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>n.SchmancyArea}),Object.defineProperty(exports,"SchmancyRoute",{enumerable:!0,get:()=>n.SchmancyRoute}),exports.area=n.area,exports.routerHistory=n.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeData=t.decodeData,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeData=t.encodeData,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.lazy=t.lazy,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationBar",{enumerable:!0,get:()=>r.SchmancyNavigationBar}),Object.defineProperty(exports,"SchmancyNavigationBarItem",{enumerable:!0,get:()=>r.SchmancyNavigationBarItem}),Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>N.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>g.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>g.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>A.SchmancyCheckboxElement}),Object.defineProperty(exports,"SchmancyAssistChip",{enumerable:!0,get:()=>i.SchmancyAssistChip}),exports.SchmancyChip=i.SchmancyFilterChip,exports.SchmancyFilterChip=i.SchmancyFilterChip,Object.defineProperty(exports,"SchmancySuggestionChip",{enumerable:!0,get:()=>i.SchmancySuggestionChip}),Object.defineProperty(exports,"SchmancyInputChip",{enumerable:!0,get:()=>x.SchmancyInputChip}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>h.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>E.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>d.SchmancyDateRange}),exports.validateInitialDateRange=d.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>B.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>s.SchmancyDelay}),exports.delayContext=s.delayContext,Object.defineProperty(exports,"SchmancyDetails",{enumerable:!0,get:()=>F.SchmancyDetails}),Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>u.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>u.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>u.SchmancyDialogContent}),exports.$dialog=f.$dialog,exports.DialogService=f.DialogService,exports.color=b.color,exports.fullHeight=b.fullHeight,exports.ripple=b.ripple,Object.defineProperty(exports,"guard",{enumerable:!0,get:()=>H.guard}),exports.discoverAnyComponent=C.discoverAnyComponent,exports.discoverComponent=C.discoverComponent,Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>P.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>P.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>O.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>O.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>j.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>j.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>m.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>m.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>m.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>m.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>p.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>p.SchmancyListItem}),exports.SchmancyListTypeContext=p.SchmancyListTypeContext,Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>o.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>o.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>o.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>o.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>o.SchmancyMailbox}),Object.defineProperty(exports,"SchmancyMap",{enumerable:!0,get:()=>L.SchmancyMap}),Object.defineProperty(exports,"SchmancyNavigationRail",{enumerable:!0,get:()=>D.SchmancyNavigationRail}),Object.defineProperty(exports,"SchmancyNavigationRailItem",{enumerable:!0,get:()=>D.SchmancyNavigationRailItem}),exports.$notify=y.$notify,exports.NotificationAudioService=y.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>y.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>y.SchmancyNotificationContainer}),exports.notify=q.notify,exports.notifyProgress=q.notifyProgress,Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>T.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>T.RadioGroup}),exports.mutationObserver=V.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>Y.SchmancySelect}),exports.SchmancySheetPosition=S.SchmancySheetPosition,exports.SheetHereMorty=S.SheetHereMorty,exports.SheetWhereAreYouRicky=S.SheetWhereAreYouRicky,exports.sheet=S.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>w.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>w.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>l.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>l.SchmancyStepsContainer}),exports.StepsController=l.StepsController,exports.stepsContext=l.stepsContext,exports.BaseStore=a.BaseStore,exports.IndexedDBStorageManager=a.IndexedDBStorageManager,exports.LocalStorageManager=a.LocalStorageManager,exports.MemoryStorageManager=a.MemoryStorageManager,exports.SchmancyArrayStore=a.SchmancyArrayStore,exports.SchmancyStoreObject=a.SchmancyStoreObject,exports.SessionStorageManager=a.SessionStorageManager,exports.StoreError=a.StoreError,exports.createArrayContext=a.createArrayContext,exports.createContext=a.createContext,exports.createStorageManager=a.createStorageManager,exports.createTestArrayContext=a.createTestArrayContext,exports.compareValues=e.compareValues,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>I.SchmancySurface}),exports.SchmancySurfaceTypeContext=I.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>R.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>R.SchmancyTableRow}),exports.SchmancyTheme=z.SchmancyTheme,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>c.SchmancyThemeComponent}),Object.defineProperty(exports,"SchmancyThemeController",{enumerable:!0,get:()=>c.SchmancyThemeController}),Object.defineProperty(exports,"SchmancyThemeControllerBoat",{enumerable:!0,get:()=>c.SchmancyThemeControllerBoat}),exports.createDarkTonalPaletteFromBaseColor=c.createDarkTonalPaletteFromBaseColor,exports.createLightTonalPaletteFromBaseColor=c.createLightTonalPaletteFromBaseColor,exports.formateTheme=c.formateTheme,exports.schmancyTheme=c.schmancyTheme,exports.tailwindStyles=c.tailwindStyles,exports.theme=c.theme,exports.themeContext=c.themeContext,exports.ThemeHereIAm=M.ThemeHereIAm,exports.ThemeWhereAreYou=M.ThemeWhereAreYou,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>v.SchmancyTooltip}),exports.tooltip=v.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>k.SchmancyTree}),exports.SchmancyEvents=G.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>W.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>$.SchmancyTypography}),exports.intersection$=K.intersection$,exports.Numbers=_.Numbers,exports.similarity=Q.similarity;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import "./animated-text-CCfSintu.js";
|
|
|
2
2
|
import { F as d, H as g, c as u, S as D, b as T, a as b, r as w } from "./area.component-DUGxsL2-.js";
|
|
3
3
|
import { p as R, k as v, c as M, j as N, m as A, b as B, d as E, h as F, a as H, e as L, f as P, o as k, g as O, i as $, l as j, n as z, s as V } from "./utils-CYOVFxSx.js";
|
|
4
4
|
import "./autocomplete-Dcw5go_X.js";
|
|
5
|
-
import { $ as W, H as G, a as K, v as _, S as q, g as Q, d as J, h as U, e as X, f as Z, i as aa, b as ea, c as ta, k as ra, m as oa, n as ca, r as sa, q as ma, o as na, l as Sa, p as ia, t as ha, W as ya, s as pa, j as la, u as fa } from "./avatar-
|
|
5
|
+
import { $ as W, H as G, a as K, v as _, S as q, g as Q, d as J, h as U, e as X, f as Z, i as aa, b as ea, c as ta, k as ra, m as oa, n as ca, r as sa, q as ma, o as na, l as Sa, p as ia, t as ha, W as ya, s as pa, j as la, u as fa } from "./avatar-BVT4-Eiv.js";
|
|
6
6
|
import { S as Ca } from "./boat-Ct95p20s.js";
|
|
7
7
|
import "./spinner-Db7i3EZh.js";
|
|
8
8
|
import { S as ga, a as ua } from "./icon-button-gNZEaDU2.js";
|
|
@@ -29,7 +29,7 @@ import "./icon-BAE9GvxI.js";
|
|
|
29
29
|
import { S as fe, a as xe } from "./input-Db0akZJI.js";
|
|
30
30
|
import { S as de, c as ge, a as ue, b as De } from "./flex-BeghKdy8.js";
|
|
31
31
|
import { L as be, a as we, S as Ie } from "./list-D5CL0Hmr.js";
|
|
32
|
-
import { a as ve, d as Me, c as Ne, b as Ae, S as Be } from "./email-recipients-
|
|
32
|
+
import { a as ve, d as Me, c as Ne, b as Ae, S as Be } from "./email-recipients-D7WQ6lzz.js";
|
|
33
33
|
import { S as Fe } from "./map-BgWSgSOf.js";
|
|
34
34
|
import "./menu-DqRauRjT.js";
|
|
35
35
|
import { a as Le, S as Pe } from "./navigation-rail-Ncy6rBEj.js";
|
|
@@ -42,8 +42,8 @@ import { mutationObserver as Qe } from "./rxjs-utils.js";
|
|
|
42
42
|
import "rxjs";
|
|
43
43
|
import "./index-CW6PhEkx.js";
|
|
44
44
|
import { S as Ue } from "./select-Bq_CyEe1.js";
|
|
45
|
-
import "./sheet-
|
|
46
|
-
import { S as Ze, b as at, a as et, s as tt } from "./sheet.service-
|
|
45
|
+
import "./sheet-tfwcuM1g.js";
|
|
46
|
+
import { S as Ze, b as at, a as et, s as tt } from "./sheet.service-xiXyDA0o.js";
|
|
47
47
|
import { S as ot, a as ct } from "./slider-CSC7AOPU.js";
|
|
48
48
|
import { S as mt, a as nt, b as St, s as it } from "./schmancy-steps-container-D5sbskLl.js";
|
|
49
49
|
import { B as yt, I as pt, L as lt, M as ft, S as xt, d as Ct, e as dt, g as gt, a as ut, c as Dt, f as Tt, b as bt } from "./context-create-DCiujzV2.js";
|
package/dist/mailbox.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./email-recipients-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./email-recipients-OK-VdpJk.cjs");Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>e.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>e.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>e.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>e.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>e.SchmancyMailbox});
|
|
2
2
|
//# sourceMappingURL=mailbox.cjs.map
|
package/dist/mailbox.js
CHANGED
package/dist/nav-drawer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-yo2bVOKs.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
|
|
2
2
|
//# sourceMappingURL=nav-drawer.cjs.map
|
package/dist/nav-drawer.js
CHANGED
package/dist/navigation-bar.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-yo2bVOKs.cjs");Object.defineProperty(exports,"SchmancyNavigationBar",{enumerable:!0,get:()=>e.SchmancyNavigationBar}),Object.defineProperty(exports,"SchmancyNavigationBarItem",{enumerable:!0,get:()=>e.SchmancyNavigationBarItem});
|
|
2
2
|
//# sourceMappingURL=navigation-bar.cjs.map
|
package/dist/navigation-bar.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const a=require("rxjs");require("rxjs/operators");const y=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const h=require("lit/decorators.js"),g=require("./tailwind.mixin-CfBr6oca.cjs"),u=require("lit"),E=require("./litElement.mixin-vtpQghkf.cjs"),w=require("./area.component-DAPQYHtN.cjs"),k=require("lit/directives/cache.js"),f=require("lit/directives/if-defined.js"),v=require("lit/directives/ref.js"),d=require("./sheet.service-
|
|
1
|
+
"use strict";const a=require("rxjs");require("rxjs/operators");const y=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const h=require("lit/decorators.js"),g=require("./tailwind.mixin-CfBr6oca.cjs"),u=require("lit"),E=require("./litElement.mixin-vtpQghkf.cjs"),w=require("./area.component-DAPQYHtN.cjs"),k=require("lit/directives/cache.js"),f=require("lit/directives/if-defined.js"),v=require("lit/directives/ref.js"),d=require("./sheet.service-lSWe4XK5.cjs");var x=Object.getOwnPropertyDescriptor;let b=class extends g.TailwindElement(u.css``){render(){return u.html`
|
|
2
2
|
<sch-flex class="absolute top-0 left-0 md:left-[unset] md:right-0">
|
|
3
3
|
<div class="block md:hidden flex-1 justify-start items-start">
|
|
4
4
|
<slot name="back">
|
|
@@ -53,4 +53,4 @@
|
|
|
53
53
|
</schmancy-grid>
|
|
54
54
|
</div>
|
|
55
55
|
`}};var p,m;c([h.property({type:String,reflect:!0})],r.prototype,"uid",2),c([h.property({type:Boolean,reflect:!0})],r.prototype,"open",2),c([h.property({type:String,reflect:!0})],r.prototype,"header",2),c([h.property({type:String,reflect:!0})],r.prototype,"position",2),c([h.property({type:Boolean,reflect:!0})],r.prototype,"persist",2),c([h.property({type:Boolean,reflect:!0})],r.prototype,"lock",2),c([h.property({type:Boolean,reflect:!0})],r.prototype,"handleHistory",2),c([h.property({type:String,reflect:!0})],r.prototype,"title",2),c([h.queryAssignedElements({flatten:!0})],r.prototype,"assignedElements",2),c([h.property()],r.prototype,"focusAttribute",2),c([(p="open",(t,e)=>{const{willUpdate:i}=t;m=Object.assign({waitUntilFirstUpdate:!1},m),t.willUpdate=function(o){if(i.call(this,o),o.has(p)){const s=o.get(p),n=this[p];s!==n&&(m?.waitUntilFirstUpdate&&!this.hasUpdated||this[e].call(this,s,n))}}})],r.prototype,"onOpenChange",1),r=c([h.customElement("schmancy-sheet")],r);
|
|
56
|
-
//# sourceMappingURL=sheet-
|
|
56
|
+
//# sourceMappingURL=sheet-DP3mfHiD.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet-CcVGEdfr.cjs","sources":["../src/sheet/header.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"text-[24px]\">← </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { area } from '../area'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { cache } from 'lit/directives/cache.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t// Use ref directive instead of @query\n\tprivate sheetRef = createRef<HTMLDivElement>()\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\t// Use native inert attribute to prevent focus outside sheet\n\t\t\tthis.setBackgroundInert(true)\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.setBackgroundInert(false)\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - listen on the sheet element for better event capture\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.lock && this.open) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid)\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\t\t\t\tdetail: { sheet: this },\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t}),\n\t\t)\n\n\t\t// Handle render events from sheet service\n\t\tconst render$ = fromEvent<CustomEvent>(window, 'schmancy-sheet-render').pipe(\n\t\t\ttap(e => {\n\t\t\t\tconst detail = e.detail\n\t\t\t\tif (detail.uid === this.uid) {\n\t\t\t\t\t// Use area router to handle component resolution\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.uid,\n\t\t\t\t\t\tcomponent: detail.component,\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$, render$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate setBackgroundInert(inert: boolean) {\n\t\t// Get all sibling elements and make them inert\n\t\tconst parent = this.parentElement\n\t\tif (parent) {\n\t\t\tArray.from(parent.children).forEach(child => {\n\t\t\t\tif (child !== this && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\t// Also handle body's direct children if sheet is attached to body\n\t\tif (this.parentElement === document.body) {\n\t\t\tArray.from(document.body.children).forEach(child => {\n\t\t\t\tif (child !== this && child !== parent && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheetRef.value?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheetRef.value?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\t// First try native autofocus attribute\n\t\tconst autofocusElement = this.querySelector('[autofocus]') as HTMLElement\n\t\tif (autofocusElement) {\n\t\t\tautofocusElement.focus()\n\t\t\treturn\n\t\t}\n\n\t\t// Fallback to custom focus attribute\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\tprivate handleOverlayClick = (e: Event) => {\n\t\te.stopPropagation()\n\t\tif (!this.lock) {\n\t\t\tsheet.dismiss(this.uid)\n\t\t}\n\t}\n\n\tprivate handleHeaderDismiss = (e: CustomEvent) => {\n\t\te.stopPropagation()\n\t\tsheet.dismiss(this.uid)\n\t}\n\n\trender() {\n\t\tconst sheetClasses = {\n\t\t\tsheet: true,\n\t\t\t'sheet--open': this.open,\n\t\t\t'sheet--locked': this.lock,\n\t\t}\n\n\t\tconst overlayClasses = {\n\t\t\toverlay: true,\n\t\t\t'overlay--interactive': !this.lock,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=${classMap(sheetClasses)}\n\t\t\t\trole=\"dialog\"\n\t\t\t\taria-labelledby=${ifDefined(this.header !== 'hidden' ? 'sheet-title' : undefined)}\n\t\t\t\taria-hidden=${!this.open}\n\t\t\t\taria-modal=${this.open}\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t${ref(this.sheetRef)}\n\t\t\t>\n\t\t\t\t<div class=${classMap(overlayClasses)} @click=${this.lock ? undefined : this.handleOverlayClick}></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${cache(\n\t\t\t\t\t\tthis.header !== 'hidden'\n\t\t\t\t\t\t\t? html`<schmancy-sheet-header\n\t\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t\t@dismiss=${this.handleHeaderDismiss}\n\t\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\t\ttitle=${ifDefined(this.title || undefined)}\n\t\t\t\t\t\t\t\t></schmancy-sheet-header>`\n\t\t\t\t\t\t\t: '',\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll>\n\t\t\t\t\t\t\t<schmancy-area name=${this.uid}>\n\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</schmancy-area>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheet","$LitElement","constructor","super","arguments","open","header","position","SchmancySheetPosition","Side","persist","lock","handleHistory","title","sheetRef","createRef","focusAttribute","lastFocusedElement","handleOverlayClick","e","stopPropagation","sheet","dismiss","uid","handleHeaderDismiss","_oldValue","newValue","document","activeElement","setBackgroundInert","focus","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","next","popState$","fromEvent","window","pipe","tap","preventDefault","closeSheet","of","take","keyUp$","event","key","rickyComm$","SheetWhereAreYouRicky","detail","SheetHereMorty","render$","area","push","component","historyStrategy","merge","takeUntil","subscribe","inert","parent","parentElement","Array","from","children","forEach","child","HTMLElement","setAttribute","removeAttribute","body","isShown","value","String","getFocusElement","selector","assignedElements","find","el","matches","querySelector","autofocusElement","sheetClasses","overlayClasses","overlay","classMap","ifDefined","ref","cache","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","hasUpdated"],"mappings":"ghBAKA,IAAqBA,EAArB,cAAiDC,EAAAA,gBAAgBC,EAAAA,KAAA,CAAA,CAChE,QAAAC,CACC,OAAOC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,IAAA,CACRC,KAAKC,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACA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AA,GACAJ,EAAA,CAA3CC,EAAAA,SAAS,CAAEC,KAAMG,QAASF,QAAAA,MANP/F,EAMwBgG,UAAA,OAAA,CAAA,EACAJ,EAAA,CAA3CC,EAAAA,SAAS,CAAEC,KAAMG,QAASF,UAAS,CAAA,CAAA,EAPhB/F,EAOwBgG,UAAA,gBAAA,CAAA,EACDJ,EAAA,CAA1CC,EAAAA,SAAS,CAAEC,KAAMpB,OAAQqB,QAAAA,EAAS,CAAA,CAAA,EARf/F,EAQuBgG,UAAA,QAAA,GAIOJ,EAAA,CAAjDM,wBAAsB,CAAEC,UAAS,CAAA,CAAA,EAZdnG,EAY8BgG,UAAA,mBAAA,CAAA,EAEtCJ,EAAA,CAAXC,EAAAA,YAdmB7F,EAcRgG,UAAA,iBAAA,CAAA,EAIZJ,EAAA,ECpBkBF,EDmBd,OClBG,CAACU,EAAwBC,IAAAA,CAC/B,MAAMC,WAAEA,CAAAA,EAAeF,EAEvBT,EAAUY,OAAOC,OAAO,CAAEC,qBAAAA,IAA+Bd,CAAAA,EAEzDS,EAAkBE,WAAa,SAAUI,EAAAA,CAGxC,GAFAJ,EAAWK,KAAKjH,KAAMgH,CAAAA,EAElBA,EAAaE,IAAIlB,CAAAA,EAAW,CAC/B,MAAMmB,EAAWH,EAAaI,IAAIpB,CAAAA,EAC5BhE,EAAWhC,KAAKgG,CAAAA,EAElBmB,IAAanF,IACXiE,GAASc,sBAAAA,CAAwB/G,KAAKqH,YAC1CrH,KAAK2G,GAAMM,KAAKjH,KAAMmH,EAAUnF,CAAAA,EAGnC,CACD,KDjBmB1B,EAkBpBgG,UAAA,eAAA,CAAA,EAlBoBhG,EAArB4F,EAAA,CADC7F,EAAAA,cAAc,gBAAA,CAAA,EACMC,CAAAA"}
|
|
1
|
+
{"version":3,"file":"sheet-DP3mfHiD.cjs","sources":["../src/sheet/header.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"text-[24px]\">← </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { area } from '../area'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { cache } from 'lit/directives/cache.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t// Use ref directive instead of @query\n\tprivate sheetRef = createRef<HTMLDivElement>()\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\t// Use native inert attribute to prevent focus outside sheet\n\t\t\tthis.setBackgroundInert(true)\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.setBackgroundInert(false)\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - listen on the sheet element for better event capture\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.lock && this.open) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid)\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\t\t\t\tdetail: { sheet: this },\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t}),\n\t\t)\n\n\t\t// Handle render events from sheet service\n\t\tconst render$ = fromEvent<CustomEvent>(window, 'schmancy-sheet-render').pipe(\n\t\t\ttap(e => {\n\t\t\t\tconst detail = e.detail\n\t\t\t\tif (detail.uid === this.uid) {\n\t\t\t\t\t// Use area router to handle component resolution\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.uid,\n\t\t\t\t\t\tcomponent: detail.component,\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$, render$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate setBackgroundInert(inert: boolean) {\n\t\t// Get all sibling elements and make them inert\n\t\tconst parent = this.parentElement\n\t\tif (parent) {\n\t\t\tArray.from(parent.children).forEach(child => {\n\t\t\t\tif (child !== this && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\t// Also handle body's direct children if sheet is attached to body\n\t\tif (this.parentElement === document.body) {\n\t\t\tArray.from(document.body.children).forEach(child => {\n\t\t\t\tif (child !== this && child !== parent && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheetRef.value?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheetRef.value?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\t// First try native autofocus attribute\n\t\tconst autofocusElement = this.querySelector('[autofocus]') as HTMLElement\n\t\tif (autofocusElement) {\n\t\t\tautofocusElement.focus()\n\t\t\treturn\n\t\t}\n\n\t\t// Fallback to custom focus attribute\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\tprivate handleOverlayClick = (e: Event) => {\n\t\te.stopPropagation()\n\t\tif (!this.lock) {\n\t\t\tsheet.dismiss(this.uid)\n\t\t}\n\t}\n\n\tprivate handleHeaderDismiss = (e: CustomEvent) => {\n\t\te.stopPropagation()\n\t\tsheet.dismiss(this.uid)\n\t}\n\n\trender() {\n\t\tconst sheetClasses = {\n\t\t\tsheet: true,\n\t\t\t'sheet--open': this.open,\n\t\t\t'sheet--locked': this.lock,\n\t\t}\n\n\t\tconst overlayClasses = {\n\t\t\toverlay: true,\n\t\t\t'overlay--interactive': !this.lock,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=${classMap(sheetClasses)}\n\t\t\t\trole=\"dialog\"\n\t\t\t\taria-labelledby=${ifDefined(this.header !== 'hidden' ? 'sheet-title' : undefined)}\n\t\t\t\taria-hidden=${!this.open}\n\t\t\t\taria-modal=${this.open}\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t${ref(this.sheetRef)}\n\t\t\t>\n\t\t\t\t<div class=${classMap(overlayClasses)} @click=${this.lock ? undefined : this.handleOverlayClick}></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${cache(\n\t\t\t\t\t\tthis.header !== 'hidden'\n\t\t\t\t\t\t\t? html`<schmancy-sheet-header\n\t\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t\t@dismiss=${this.handleHeaderDismiss}\n\t\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\t\ttitle=${ifDefined(this.title || undefined)}\n\t\t\t\t\t\t\t\t></schmancy-sheet-header>`\n\t\t\t\t\t\t\t: '',\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll>\n\t\t\t\t\t\t\t<schmancy-area name=${this.uid}>\n\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</schmancy-area>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheet","$LitElement","constructor","super","arguments","open","header","position","SchmancySheetPosition","Side","persist","lock","handleHistory","title","sheetRef","createRef","focusAttribute","lastFocusedElement","handleOverlayClick","e","stopPropagation","sheet","dismiss","uid","handleHeaderDismiss","_oldValue","newValue","document","activeElement","setBackgroundInert","focus","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","next","popState$","fromEvent","window","pipe","tap","preventDefault","closeSheet","of","take","keyUp$","event","key","rickyComm$","SheetWhereAreYouRicky","detail","SheetHereMorty","render$","area","push","component","historyStrategy","merge","takeUntil","subscribe","inert","parent","parentElement","Array","from","children","forEach","child","HTMLElement","setAttribute","removeAttribute","body","isShown","value","String","getFocusElement","selector","assignedElements","find","el","matches","querySelector","autofocusElement","sheetClasses","overlayClasses","overlay","classMap","ifDefined","ref","cache","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","hasUpdated"],"mappings":"ghBAKA,IAAqBA,EAArB,cAAiDC,EAAAA,gBAAgBC,EAAAA,KAAA,CAAA,CAChE,QAAAC,CACC,OAAOC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,IAAA,CACRC,KAAKC,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAAU,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAaJ,IAAA,CACRJ,KAAKC,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAAU,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWnB,CAAA,EAvCoBT,wGAArB,CADCU,EAAAA,cAAc,uBAAA,CAAA,EACMV,CAAAA,kMCerB,IAAqBW,EAArB,cAA2CC,8zCAA3C,aAAAC,CAAAC,MAAAA,GAAAC,SAAAA,EAE6CV,KAAAW,KAAAA,GACDX,KAAAY,OAA+B,UAC/BZ,KAAAa,SAAkCC,EAAA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,CAAA,EAIZJ,EAAA,ECpBkBF,EDmBd,OClBG,CAACU,EAAwBC,IAAAA,CAC/B,MAAMC,WAAEA,CAAAA,EAAeF,EAEvBT,EAAUY,OAAOC,OAAO,CAAEC,qBAAAA,IAA+Bd,CAAAA,EAEzDS,EAAkBE,WAAa,SAAUI,EAAAA,CAGxC,GAFAJ,EAAWK,KAAKjH,KAAMgH,CAAAA,EAElBA,EAAaE,IAAIlB,CAAAA,EAAW,CAC/B,MAAMmB,EAAWH,EAAaI,IAAIpB,CAAAA,EAC5BhE,EAAWhC,KAAKgG,CAAAA,EAElBmB,IAAanF,IACXiE,GAASc,sBAAAA,CAAwB/G,KAAKqH,YAC1CrH,KAAK2G,GAAMM,KAAKjH,KAAMmH,EAAUnF,CAAAA,EAGnC,CACD,KDjBmB1B,EAkBpBgG,UAAA,eAAA,CAAA,EAlBoBhG,EAArB4F,EAAA,CADC7F,EAAAA,cAAc,gBAAA,CAAA,EACMC,CAAAA"}
|
|
@@ -10,7 +10,7 @@ import { a as O } from "./area.component-DUGxsL2-.js";
|
|
|
10
10
|
import { cache as B } from "lit/directives/cache.js";
|
|
11
11
|
import { ifDefined as v } from "lit/directives/if-defined.js";
|
|
12
12
|
import { createRef as F, ref as U } from "lit/directives/ref.js";
|
|
13
|
-
import { S as j, s as m, a as D, b as H } from "./sheet.service-
|
|
13
|
+
import { S as j, s as m, a as D, b as H } from "./sheet.service-xiXyDA0o.js";
|
|
14
14
|
var P = Object.getOwnPropertyDescriptor;
|
|
15
15
|
let b = class extends S(C``) {
|
|
16
16
|
render() {
|
|
@@ -150,4 +150,4 @@ r([c({ type: String, reflect: !0 })], a.prototype, "uid", 2), r([c({ type: Boole
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
})], a.prototype, "onOpenChange", 1), a = r([g("schmancy-sheet")], a);
|
|
153
|
-
//# sourceMappingURL=sheet-
|
|
153
|
+
//# sourceMappingURL=sheet-tfwcuM1g.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet-D5-XmZs5.js","sources":["../src/sheet/header.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"text-[24px]\">← </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { area } from '../area'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { cache } from 'lit/directives/cache.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t// Use ref directive instead of @query\n\tprivate sheetRef = createRef<HTMLDivElement>()\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\t// Use native inert attribute to prevent focus outside sheet\n\t\t\tthis.setBackgroundInert(true)\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.setBackgroundInert(false)\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - listen on the sheet element for better event capture\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.lock && this.open) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid)\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\t\t\t\tdetail: { sheet: this },\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t}),\n\t\t)\n\n\t\t// Handle render events from sheet service\n\t\tconst render$ = fromEvent<CustomEvent>(window, 'schmancy-sheet-render').pipe(\n\t\t\ttap(e => {\n\t\t\t\tconst detail = e.detail\n\t\t\t\tif (detail.uid === this.uid) {\n\t\t\t\t\t// Use area router to handle component resolution\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.uid,\n\t\t\t\t\t\tcomponent: detail.component,\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$, render$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate setBackgroundInert(inert: boolean) {\n\t\t// Get all sibling elements and make them inert\n\t\tconst parent = this.parentElement\n\t\tif (parent) {\n\t\t\tArray.from(parent.children).forEach(child => {\n\t\t\t\tif (child !== this && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\t// Also handle body's direct children if sheet is attached to body\n\t\tif (this.parentElement === document.body) {\n\t\t\tArray.from(document.body.children).forEach(child => {\n\t\t\t\tif (child !== this && child !== parent && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheetRef.value?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheetRef.value?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\t// First try native autofocus attribute\n\t\tconst autofocusElement = this.querySelector('[autofocus]') as HTMLElement\n\t\tif (autofocusElement) {\n\t\t\tautofocusElement.focus()\n\t\t\treturn\n\t\t}\n\n\t\t// Fallback to custom focus attribute\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\tprivate handleOverlayClick = (e: Event) => {\n\t\te.stopPropagation()\n\t\tif (!this.lock) {\n\t\t\tsheet.dismiss(this.uid)\n\t\t}\n\t}\n\n\tprivate handleHeaderDismiss = (e: CustomEvent) => {\n\t\te.stopPropagation()\n\t\tsheet.dismiss(this.uid)\n\t}\n\n\trender() {\n\t\tconst sheetClasses = {\n\t\t\tsheet: true,\n\t\t\t'sheet--open': this.open,\n\t\t\t'sheet--locked': this.lock,\n\t\t}\n\n\t\tconst overlayClasses = {\n\t\t\toverlay: true,\n\t\t\t'overlay--interactive': !this.lock,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=${classMap(sheetClasses)}\n\t\t\t\trole=\"dialog\"\n\t\t\t\taria-labelledby=${ifDefined(this.header !== 'hidden' ? 'sheet-title' : undefined)}\n\t\t\t\taria-hidden=${!this.open}\n\t\t\t\taria-modal=${this.open}\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t${ref(this.sheetRef)}\n\t\t\t>\n\t\t\t\t<div class=${classMap(overlayClasses)} @click=${this.lock ? undefined : this.handleOverlayClick}></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${cache(\n\t\t\t\t\t\tthis.header !== 'hidden'\n\t\t\t\t\t\t\t? html`<schmancy-sheet-header\n\t\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t\t@dismiss=${this.handleHeaderDismiss}\n\t\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\t\ttitle=${ifDefined(this.title || undefined)}\n\t\t\t\t\t\t\t\t></schmancy-sheet-header>`\n\t\t\t\t\t\t\t: '',\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll>\n\t\t\t\t\t\t\t<schmancy-area name=${this.uid}>\n\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</schmancy-area>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheet","$LitElement","constructor","super","arguments","open","header","position","SchmancySheetPosition","Side","persist","lock","handleHistory","title","sheetRef","createRef","focusAttribute","lastFocusedElement","handleOverlayClick","e","stopPropagation","sheet","dismiss","uid","handleHeaderDismiss","_oldValue","newValue","document","activeElement","setBackgroundInert","focus","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","next","popState$","fromEvent","window","pipe","tap","preventDefault","closeSheet","of","take","keyUp$","event","key","rickyComm$","SheetWhereAreYouRicky","detail","SheetHereMorty","render$","area","push","component","historyStrategy","merge","takeUntil","subscribe","inert","parent","parentElement","Array","from","children","forEach","child","HTMLElement","setAttribute","removeAttribute","body","isShown","value","String","getFocusElement","selector","assignedElements","find","el","matches","querySelector","autofocusElement","sheetClasses","overlayClasses","overlay","classMap","ifDefined","ref","cache","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","hasUpdated"],"mappings":";;;;;;;;;;;;;;AAKA,IAAqBA,IAArB,cAAiDC,EAAgBC,GAAA,EAAA;AAAA,EAChE,SAAAC;AACC,WAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,MAAA;AACRC,WAAKC,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAAU,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAaJ,MAAA;AACRJ,WAAKC,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAAU,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWnB;AAAA;AAvCoBT;;;GAArB,CADCU,EAAc,uBAAA,CAAA,GACMV;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G,WAAA,SAAA,CAAA,GAIOJ,EAAA,CAAjDM,EAAsB,EAAEC,SAAAA,QAZLnG,EAY8BgG,WAAA,oBAAA,CAAA,GAEtCJ,EAAA,CAAXC,EAAAA,CAAAA,GAdmB7F,EAcRgG,WAAA,kBAAA,IAIZJ,EAAA,ECpBkBF,IDmBd,QClBG,CAACU,GAAwBC,MAAAA;AAC/B,QAAA,EAAMC,YAAEA,EAAAA,IAAeF;AAEvBT,EAAAA,IAAUY,OAAOC,OAAO,EAAEC,sBAAAA,GAAsB,GAASd,CAAAA,GAEzDS,EAAkBE,aAAa,SAAUI,GAAAA;AAGxC,QAFAJ,EAAWK,KAAKjH,MAAMgH,CAAAA,GAElBA,EAAaE,IAAIlB,CAAAA,GAAW;AAC/B,YAAMmB,IAAWH,EAAaI,IAAIpB,CAAAA,GAC5BhE,IAAWhC,KAAKgG,CAAAA;AAElBmB,MAAAA,MAAanF,MACXiE,GAASc,yBAAwB/G,KAAKqH,cAC1CrH,KAAK2G,CAAAA,EAAMM,KAAKjH,MAAMmH,GAAUnF,CAAAA;AAAAA,IAGnC;AAAA,EACD;AAAA,EAAA,GDjBmB1B,EAkBpBgG,WAAA,gBAAA,CAAA,GAlBoBhG,IAArB4F,EAAA,CADC7F,EAAc,gBAAA,CAAA,GACMC,CAAAA;"}
|
|
1
|
+
{"version":3,"file":"sheet-tfwcuM1g.js","sources":["../src/sheet/header.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span class=\"text-[24px]\">← </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { area } from '../area'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { cache } from 'lit/directives/cache.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t// Use ref directive instead of @query\n\tprivate sheetRef = createRef<HTMLDivElement>()\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\t// Use native inert attribute to prevent focus outside sheet\n\t\t\tthis.setBackgroundInert(true)\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.setBackgroundInert(false)\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - listen on the sheet element for better event capture\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.lock && this.open) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid)\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\t\t\t\tdetail: { sheet: this },\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t}),\n\t\t)\n\n\t\t// Handle render events from sheet service\n\t\tconst render$ = fromEvent<CustomEvent>(window, 'schmancy-sheet-render').pipe(\n\t\t\ttap(e => {\n\t\t\t\tconst detail = e.detail\n\t\t\t\tif (detail.uid === this.uid) {\n\t\t\t\t\t// Use area router to handle component resolution\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.uid,\n\t\t\t\t\t\tcomponent: detail.component,\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$, render$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate setBackgroundInert(inert: boolean) {\n\t\t// Get all sibling elements and make them inert\n\t\tconst parent = this.parentElement\n\t\tif (parent) {\n\t\t\tArray.from(parent.children).forEach(child => {\n\t\t\t\tif (child !== this && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\t// Also handle body's direct children if sheet is attached to body\n\t\tif (this.parentElement === document.body) {\n\t\t\tArray.from(document.body.children).forEach(child => {\n\t\t\t\tif (child !== this && child !== parent && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheetRef.value?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheetRef.value?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\t// First try native autofocus attribute\n\t\tconst autofocusElement = this.querySelector('[autofocus]') as HTMLElement\n\t\tif (autofocusElement) {\n\t\t\tautofocusElement.focus()\n\t\t\treturn\n\t\t}\n\n\t\t// Fallback to custom focus attribute\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\tprivate handleOverlayClick = (e: Event) => {\n\t\te.stopPropagation()\n\t\tif (!this.lock) {\n\t\t\tsheet.dismiss(this.uid)\n\t\t}\n\t}\n\n\tprivate handleHeaderDismiss = (e: CustomEvent) => {\n\t\te.stopPropagation()\n\t\tsheet.dismiss(this.uid)\n\t}\n\n\trender() {\n\t\tconst sheetClasses = {\n\t\t\tsheet: true,\n\t\t\t'sheet--open': this.open,\n\t\t\t'sheet--locked': this.lock,\n\t\t}\n\n\t\tconst overlayClasses = {\n\t\t\toverlay: true,\n\t\t\t'overlay--interactive': !this.lock,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=${classMap(sheetClasses)}\n\t\t\t\trole=\"dialog\"\n\t\t\t\taria-labelledby=${ifDefined(this.header !== 'hidden' ? 'sheet-title' : undefined)}\n\t\t\t\taria-hidden=${!this.open}\n\t\t\t\taria-modal=${this.open}\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t${ref(this.sheetRef)}\n\t\t\t>\n\t\t\t\t<div class=${classMap(overlayClasses)} @click=${this.lock ? undefined : this.handleOverlayClick}></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${cache(\n\t\t\t\t\t\tthis.header !== 'hidden'\n\t\t\t\t\t\t\t? html`<schmancy-sheet-header\n\t\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t\t@dismiss=${this.handleHeaderDismiss}\n\t\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\t\ttitle=${ifDefined(this.title || undefined)}\n\t\t\t\t\t\t\t\t></schmancy-sheet-header>`\n\t\t\t\t\t\t\t: '',\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll>\n\t\t\t\t\t\t\t<schmancy-area name=${this.uid}>\n\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</schmancy-area>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheet","$LitElement","constructor","super","arguments","open","header","position","SchmancySheetPosition","Side","persist","lock","handleHistory","title","sheetRef","createRef","focusAttribute","lastFocusedElement","handleOverlayClick","e","stopPropagation","sheet","dismiss","uid","handleHeaderDismiss","_oldValue","newValue","document","activeElement","setBackgroundInert","focus","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","next","popState$","fromEvent","window","pipe","tap","preventDefault","closeSheet","of","take","keyUp$","event","key","rickyComm$","SheetWhereAreYouRicky","detail","SheetHereMorty","render$","area","push","component","historyStrategy","merge","takeUntil","subscribe","inert","parent","parentElement","Array","from","children","forEach","child","HTMLElement","setAttribute","removeAttribute","body","isShown","value","String","getFocusElement","selector","assignedElements","find","el","matches","querySelector","autofocusElement","sheetClasses","overlayClasses","overlay","classMap","ifDefined","ref","cache","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","hasUpdated"],"mappings":";;;;;;;;;;;;;;AAKA,IAAqBA,IAArB,cAAiDC,EAAgBC,GAAA,EAAA;AAAA,EAChE,SAAAC;AACC,WAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,MAAA;AACRC,WAAKC,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAAU,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAaJ,MAAA;AACRJ,WAAKC,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAAU,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWnB;AAAA;AAvCoBT;;;GAArB,CADCU,EAAc,uBAAA,CAAA,GACMV;;;;;ACerB,IAAqBW,IAArB,cAA2CC;EAA3C,cAAAC;AAAAC,UAAAA,GAAAC,SAAAA,GAE6CV,KAAAW,OAAAA,IACDX,KAAAY,SAA+B,WAC/BZ,KAAAa,WAAkCC,EAAsBC,MACvDf,KAAAgB,UAAAA,IACAhB,KAAAiB,OAAAA,IACAjB,KAAAkB,gBAAAA,IACDlB,KAAAmB,QAAQ,IAGnDnB,KAAQoB,WAAWC,EAAAA,GAGPrB,KAAAsB,iBAAiB,aAC7BtB,KAAQuB,qBAAyC,MAwIjDvB,KAAQwB,qBAAsBC,OAAAA;AAC7BA,QAAEC,gBAAAA,GACG1B,KAAKiB,QACTU,EAAMC,QA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AAAA,GAElBA,EAAaE,IAAIlB,CAAAA,GAAW;AAC/B,YAAMmB,IAAWH,EAAaI,IAAIpB,CAAAA,GAC5BhE,IAAWhC,KAAKgG,CAAAA;AAElBmB,MAAAA,MAAanF,MACXiE,GAASc,yBAAwB/G,KAAKqH,cAC1CrH,KAAK2G,CAAAA,EAAMM,KAAKjH,MAAMmH,GAAUnF,CAAAA;AAAAA,IAGnC;AAAA,EACD;AAAA,EAAA,GDjBmB1B,EAkBpBgG,WAAA,gBAAA,CAAA,GAlBoBhG,IAArB4F,EAAA,CADC7F,EAAc,gBAAA,CAAA,GACMC,CAAAA;"}
|
package/dist/sheet.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./sheet-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./sheet-DP3mfHiD.cjs");const e=require("./sheet.service-lSWe4XK5.cjs");exports.SchmancySheetPosition=e.SchmancySheetPosition,exports.SheetHereMorty=e.SheetHereMorty,exports.SheetWhereAreYouRicky=e.SheetWhereAreYouRicky,exports.sheet=e.sheet;
|
|
2
2
|
//# sourceMappingURL=sheet.cjs.map
|
package/dist/sheet.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./sheet-
|
|
2
|
-
import { S as r, b as s, a, s as h } from "./sheet.service-
|
|
1
|
+
import "./sheet-tfwcuM1g.js";
|
|
2
|
+
import { S as r, b as s, a, s as h } from "./sheet.service-xiXyDA0o.js";
|
|
3
3
|
export {
|
|
4
4
|
r as SchmancySheetPosition,
|
|
5
5
|
s as SheetHereMorty,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("rxjs"),p=require("./theme.events-Car6U_SQ.cjs");var d=(t=>(t.Side="side",t.Bottom="bottom",t))(d||{});const a="are-you-there-sheet",c="yes-here",m=new class{constructor(){this.bottomSheet=new e.Subject,this.$dismiss=new e.Subject,this.activeSheets=new Set,this.popStateListenerActive=!1,this.setupSheetOpeningLogic(),this.setupSheetDismissLogic(),this.setupPopStateListener()}setupSheetOpeningLogic(){this.bottomSheet.pipe(e.switchMap(t=>e.forkJoin([e.fromEvent(window,c).pipe(e.takeUntil(e.timer(50)),e.map(i=>i.detail),e.defaultIfEmpty(void 0)),e.fromEvent(window,p.ThemeHereIAm).pipe(e.takeUntil(e.timer(50)),e.map(i=>i.detail.theme),e.defaultIfEmpty(void 0)),e.of(t).pipe(e.tap(()=>{const i=t.uid??`sheet-${Date.now()}`;window.dispatchEvent(new CustomEvent(a,{detail:{uid:i},bubbles:!0,composed:!0})),window.dispatchEvent(new CustomEvent(p.ThemeWhereAreYou,{bubbles:!0,composed:!0}))}))])),e.map(([t,i,o])=>{let n,s=t?.sheet;if(s)n=s.parentElement;else{n=i||document.querySelector("schmancy-theme")||document.body;const r=o.uid??`sheet-${Date.now()}`;s=document.createElement("schmancy-sheet"),s.setAttribute("uid",r),n.appendChild(s)}o.lock&&s.setAttribute("lock","true");const h=o.position||(window.innerWidth>=768?"side":"bottom");return s.setAttribute("position",h),o.persist&&s.setAttribute("persist",String(o.persist)),document.body.style.overflow="hidden",{target:o,sheet:s}}),e.delay(20),e.tap(({target:t,sheet:i})=>{window.dispatchEvent(new CustomEvent("schmancy-sheet-render",{detail:{component:t.component,uid:i.getAttribute("uid")},bubbles:!0,composed:!0}))}),e.delay(1),e.tap(({target:t,sheet:i})=>{i?.setAttribute("open","true");const o=t.uid
|
|
2
|
-
//# sourceMappingURL=sheet.service-
|
|
1
|
+
"use strict";const e=require("rxjs"),p=require("./theme.events-Car6U_SQ.cjs");var d=(t=>(t.Side="side",t.Bottom="bottom",t))(d||{});const a="are-you-there-sheet",c="yes-here",m=new class{constructor(){this.bottomSheet=new e.Subject,this.$dismiss=new e.Subject,this.activeSheets=new Set,this.popStateListenerActive=!1,this.setupSheetOpeningLogic(),this.setupSheetDismissLogic(),this.setupPopStateListener()}setupSheetOpeningLogic(){this.bottomSheet.pipe(e.switchMap(t=>e.forkJoin([e.fromEvent(window,c).pipe(e.takeUntil(e.timer(50)),e.map(i=>i.detail),e.defaultIfEmpty(void 0)),e.fromEvent(window,p.ThemeHereIAm).pipe(e.takeUntil(e.timer(50)),e.map(i=>i.detail.theme),e.defaultIfEmpty(void 0)),e.of(t).pipe(e.tap(()=>{const i=t.uid??`sheet-${Date.now()}`;window.dispatchEvent(new CustomEvent(a,{detail:{uid:i},bubbles:!0,composed:!0})),window.dispatchEvent(new CustomEvent(p.ThemeWhereAreYou,{bubbles:!0,composed:!0}))}))])),e.map(([t,i,o])=>{let n,s=t?.sheet;if(s)n=s.parentElement;else{n=i||document.querySelector("schmancy-theme")||document.body;const r=o.uid??`sheet-${Date.now()}`;s=document.createElement("schmancy-sheet"),s.setAttribute("uid",r),n.appendChild(s)}o.lock&&s.setAttribute("lock","true");const h=o.position||(window.innerWidth>=768?"side":"bottom");return s.setAttribute("position",h),o.persist&&s.setAttribute("persist",String(o.persist)),document.body.style.overflow="hidden",{target:o,sheet:s}}),e.delay(20),e.tap(({target:t,sheet:i})=>{window.dispatchEvent(new CustomEvent("schmancy-sheet-render",{detail:{component:t.component,uid:i.getAttribute("uid")},bubbles:!0,composed:!0}))}),e.delay(1),e.tap(({target:t,sheet:i})=>{i?.setAttribute("open","true");const o=i.getAttribute("uid")||t.uid||`sheet-${Date.now()}`;this.activeSheets.add(o),e.fromEvent(i,"close").pipe(e.take(1)).pipe(e.delay(300)).subscribe(n=>{const s=i;if(s){const h=s.getAttribute("uid");h&&this.activeSheets.delete(h);const r=s.getAttribute("persist");(!r||r==="false")&&s.remove()}document.body.style.overflow="auto"})})).subscribe()}setupSheetDismissLogic(){this.$dismiss.pipe(e.mergeMap(t=>e.forkJoin([e.fromEvent(window,c).pipe(e.takeUntil(e.timer(100)),e.map(i=>i.detail),e.defaultIfEmpty(void 0)),e.of(t).pipe(e.tap(()=>{window.dispatchEvent(new CustomEvent(a,{detail:{uid:t}}))}))])),e.tap(([t,i])=>{t?.sheet&&(t.sheet.closeSheet(),this.activeSheets.delete(i))})).subscribe()}setupPopStateListener(){this.popStateListenerActive||(e.fromEvent(window,"popstate").subscribe(t=>{if(this.activeSheets.size>0){const i=Array.from(this.activeSheets).pop();i&&(this.dismiss(i),t.state&&t.state.schmancySheet&&history.pushState({},"",window.location.href))}}),this.popStateListenerActive=!0)}dismiss(t){if(!t&&this.activeSheets.size>0){const i=Array.from(this.activeSheets);t=i[i.length-1]}t&&this.$dismiss.next(t)}open(t){this.bottomSheet.next(t)}isOpen(t){return this.activeSheets.has(t)}closeAll(){Array.from(this.activeSheets).forEach(t=>{this.dismiss(t)})}};exports.SchmancySheetPosition=d,exports.SheetHereMorty=c,exports.SheetWhereAreYouRicky=a,exports.sheet=m;
|
|
2
|
+
//# sourceMappingURL=sheet.service-lSWe4XK5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.service-lSWe4XK5.cjs","sources":["../src/sheet/sheet.service.ts"],"sourcesContent":["import {\n\tdefaultIfEmpty,\n\tdelay,\n\tforkJoin,\n\tfromEvent,\n\tmap,\n\tmergeMap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimer,\n} from 'rxjs'\nimport { ComponentType } from '../area/router.types'\nimport { ThemeHereIAm, ThemeHereIAmEvent, ThemeWhereAreYou } from '../theme/theme.events'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n}\n\nexport type SheetConfig = {\n\tcomponent: ComponentType\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tlock?: boolean // Controls both ESC and overlay click dismissal\n\tonBeforeOpen?: (component: HTMLElement) => void\n\tonAfterOpen?: (component: HTMLElement) => void\n}\n\n// Keep old name for backward compatibility\ntype BottomSheeetTarget = SheetConfig\n\n// Events for communication between bottom-sheet component and bottom-sheet.service\nexport type SheetWhereAreYouRickyEvent = CustomEvent<{\n\tuid: string\n}>\nexport const SheetWhereAreYouRicky = 'are-you-there-sheet'\n\nexport type SheetHereMortyEvent = CustomEvent<{\n\tsheet?: SchmancySheet\n\ttheme?: HTMLElement\n}>\nexport const SheetHereMorty = 'yes-here'\n\n// Function to determine the position based on screen size\nconst getPosition = (): SchmancySheetPosition => {\n\treturn window.innerWidth >= 768 ? SchmancySheetPosition.Side : SchmancySheetPosition.Bottom // Adjust 768 as needed for your breakpoint\n}\n\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\t// Track currently open sheets\n\tprivate activeSheets = new Set<string>()\n\t// To track if we've set up the popstate listener\n\tprivate popStateListenerActive = false\n\n\tconstructor() {\n\t\tthis.setupSheetOpeningLogic()\n\t\tthis.setupSheetDismissLogic()\n\t\tthis.setupPopStateListener()\n\t}\n\n\t/**\n\t * Sets up the main sheet opening logic\n\t */\n\tprivate setupSheetOpeningLogic() {\n\t\tthis.bottomSheet\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\t// First check for existing sheet\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(50)),\n\t\t\t\t\t\t\tmap(e => e.detail),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t// Then find theme container\n\t\t\t\t\t\tfromEvent<ThemeHereIAmEvent>(window, ThemeHereIAm).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(50)),\n\t\t\t\t\t\t\tmap(e => e.detail.theme),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\t// Determine uid - use provided uid or generate one\n\t\t\t\t\t\t\t\tconst uid = target.uid ?? `sheet-${Date.now()}`\n\n\t\t\t\t\t\t\t\t// First ask for existing sheet\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(SheetWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid },\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t// Then ask for theme container\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(ThemeWhereAreYou, {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\n\t\t\t\tmap(([existingSheet, theme, target]) => {\n\t\t\t\t\tlet sheet = existingSheet?.sheet\n\t\t\t\t\tlet targetContainer: HTMLElement\n\n\t\t\t\t\tif (sheet) {\n\t\t\t\t\t\t// Use existing sheet\n\t\t\t\t\t\ttargetContainer = sheet.parentElement as HTMLElement\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Determine container - use theme from discovery or fallback\n\t\t\t\t\t\ttargetContainer = theme || (document.querySelector('schmancy-theme') as HTMLElement) || document.body\n\n\t\t\t\t\t\t// Create new sheet\n\t\t\t\t\t\tconst uid = target.uid ?? `sheet-${Date.now()}`\n\t\t\t\t\t\tsheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\tsheet.setAttribute('uid', uid)\n\t\t\t\t\t\ttargetContainer.appendChild(sheet)\n\t\t\t\t\t}\n\n\t\t\t\t\ttarget.lock && sheet.setAttribute('lock', 'true')\n\n\t\t\t\t\t// Use the dynamic position function here\n\t\t\t\t\tconst position = target.position || getPosition()\n\t\t\t\t\tsheet.setAttribute('position', position)\n\n\t\t\t\t\ttarget.persist && sheet.setAttribute('persist', String(target.persist))\n\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t\treturn { target, sheet: sheet as SchmancySheet }\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\t// Always dispatch render event - area router handles duplicate prevention\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('schmancy-sheet-render', {\n\t\t\t\t\t\t\tdetail: { component: target.component, uid: sheet.getAttribute('uid') },\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\n\t\t\t\t\t// Add to active sheets tracking\n\t\t\t\t\tconst uid = sheet.getAttribute('uid') || target.uid || `sheet-${Date.now()}`\n\t\t\t\t\tthis.activeSheets.add(uid)\n\n\t\t\t\t\t// Set up close event listener (always, not just for new sheets)\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1))\n\t\t\t\t\t\t.pipe(delay(300))\n\t\t\t\t\t\t.subscribe(_ => {\n\t\t\t\t\t\t\t// Use the sheet reference directly, not e.target\n\t\t\t\t\t\t\tconst sheetElement = sheet as SchmancySheet\n\n\t\t\t\t\t\t\t// Remove from active sheets tracking\n\t\t\t\t\t\t\tif (sheetElement) {\n\t\t\t\t\t\t\t\tconst uid = sheetElement.getAttribute('uid')\n\t\t\t\t\t\t\t\tif (uid) {\n\t\t\t\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Only keep sheet if persist is explicitly set to a truthy value\n\t\t\t\t\t\t\t\tconst persistAttr = sheetElement.getAttribute('persist')\n\t\t\t\t\t\t\t\tconst shouldRemove = !persistAttr || persistAttr === 'false'\n\n\t\t\t\t\t\t\t\tif (shouldRemove) {\n\t\t\t\t\t\t\t\t\tsheetElement.remove()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tdocument.body.style.overflow = 'auto' // unlock the scroll of the host\n\t\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Sets up the sheet closing/dismissal logic\n\t */\n\tprivate setupSheetDismissLogic() {\n\t\tthis.$dismiss\n\t\t\t.pipe(\n\t\t\t\tmergeMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\tmap(e => e.detail),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(SheetWhereAreYouRicky, { detail: { uid } }))\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([response, uid]) => {\n\t\t\t\t\tif (response?.sheet) {\n\t\t\t\t\t\tresponse.sheet.closeSheet()\n\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t} else {\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Sets up the popstate listener to handle browser back button\n\t */\n\tprivate setupPopStateListener() {\n\t\tif (this.popStateListenerActive) return\n\n\t\tfromEvent<PopStateEvent>(window, 'popstate').subscribe(event => {\n\t\t\t// If we have active sheets, close the most recently opened one\n\t\t\tif (this.activeSheets.size > 0) {\n\t\t\t\t// Get the last sheet (Set maintains insertion order)\n\t\t\t\tconst lastSheet = Array.from(this.activeSheets).pop()\n\t\t\t\tif (lastSheet) {\n\t\t\t\t\tthis.dismiss(lastSheet)\n\n\t\t\t\t\t// Prevent default navigation behavior by pushing a new state\n\t\t\t\t\t// This effectively cancels out the back navigation\n\t\t\t\t\tif (event.state && event.state.schmancySheet) {\n\t\t\t\t\t\thistory.pushState({}, '', window.location.href)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.popStateListenerActive = true\n\t}\n\n\t/**\n\t * Dismiss a sheet by uid, or dismiss the most recently opened sheet if no uid provided\n\t */\n\tdismiss(uid?: string) {\n\t\tif (!uid && this.activeSheets.size > 0) {\n\t\t\t// Get the last sheet opened (Set maintains insertion order)\n\t\t\tconst sheetsArray = Array.from(this.activeSheets)\n\t\t\tuid = sheetsArray[sheetsArray.length - 1]\n\t\t}\n\n\t\tif (uid) {\n\t\t\tthis.$dismiss.next(uid)\n\t\t}\n\t}\n\n\t/**\n\t * Open a sheet with the given target configuration\n\t */\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n\n\t/**\n\t * Check if a sheet is currently open by uid\n\t */\n\tisOpen(uid: string): boolean {\n\t\treturn this.activeSheets.has(uid)\n\t}\n\n\t/**\n\t * Close all open sheets\n\t */\n\tcloseAll() {\n\t\t// Copy the set to avoid modification during iteration\n\t\tArray.from(this.activeSheets).forEach(uid => {\n\t\t\tthis.dismiss(uid)\n\t\t})\n\t}\n\n}\nexport const sheet = new BottomSheetService()\n"],"names":["SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","constructor","this","bottomSheet","Subject","$dismiss","activeSheets","Set","popStateListenerActive","setupSheetOpeningLogic","setupSheetDismissLogic","setupPopStateListener","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","ThemeHereIAm","theme","of","target","tap","uid","Date","now","dispatchEvent","CustomEvent","bubbles","composed","ThemeWhereAreYou","existingSheet","targetContainer","parentElement","document","querySelector","body","createElement","setAttribute","appendChild","lock","position","innerWidth","persist","String","style","overflow","delay","component","getAttribute","add","take","subscribe","_","sheetElement","delete","persistAttr","remove","mergeMap","response","closeSheet","event","size","lastSheet","Array","from","pop","dismiss","state","schmancySheet","history","pushState","location","href","sheetsArray","length","next","has","closeAll","forEach"],"mappings":"8EAmBO,IAAKA,GAAAA,IACXA,EAAA,KAAO,OACPA,EAAA,OAAS,SAFEA,IAAAA,GAAA,CAAA,CAAA,EAuBL,MAAMC,EAAwB,sBAMxBC,EAAiB,WAkPjBC,EAAQ,IA3OrB,KAAA,CAQC,aAAAC,CAPAC,KAAAC,YAAc,IAAIC,UAClBF,KAAAG,SAAW,IAAID,UAEfF,KAAQI,iBAAmBC,IAE3BL,KAAQM,uBAAAA,GAGPN,KAAKO,uBAAAA,EACLP,KAAKQ,uBAAAA,EACLR,KAAKS,sBAAAA,CACN,CAKQ,wBAAAF,CACPP,KAAKC,YACHS,KACAC,EAAAA,aACCC,EAAAA,SAAS,CAERC,YAA+BC,OAAQjB,CAAAA,EAAgBa,KACtDK,YAAUC,EAAAA,MAAM,EAAA,CAAA,EAChBC,EAAAA,IAAIC,GAAKA,EAAEC,MAAAA,EACXC,EAAAA,eAAAA,MAAe,CAAA,EAGhBP,YAA6BC,OAAQO,EAAAA,YAAAA,EAAcX,KAClDK,YAAUC,EAAAA,MAAM,EAAA,CAAA,EAChBC,EAAAA,IAAIC,GAAKA,EAAEC,OAAOG,KAAAA,EAClBF,EAAAA,eAAAA,MAAe,CAAA,EAEhBG,EAAAA,GAAGC,CAAAA,EAAQd,KACVe,EAAAA,IAAI,IAAA,CAEH,MAAMC,EAAMF,EAAOE,KAAO,SAASC,KAAKC,IAAAA,CAAAA,GAGxCd,OAAOe,cACN,IAAIC,YAAYlC,EAAuB,CACtCuB,OAAQ,CAAEO,IAAAA,CAA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AA,CAAAA,EAK3B6B,UAAAA,CACH,CAKQ,uBAAA9C,CACHT,KAAKM,yBAETO,EAAAA,UAAyBC,OAAQ,UAAA,EAAYyC,UAAUS,GAAAA,CAEtD,GAAIhE,KAAKI,aAAa6D,KAAO,EAAG,CAE/B,MAAMC,EAAYC,MAAMC,KAAKpE,KAAKI,YAAAA,EAAciE,IAAAA,EAC5CH,IACHlE,KAAKsE,QAAQJ,CAAAA,EAITF,EAAMO,OAASP,EAAMO,MAAMC,eAC9BC,QAAQC,UAAU,CAAA,EAAI,GAAI5D,OAAO6D,SAASC,IAAAA,EAG7C,CAAA,CAAA,EAGD5E,KAAKM,uBAAAA,GACN,CAKA,QAAQoB,EAAAA,CACP,GAAA,CAAKA,GAAO1B,KAAKI,aAAa6D,KAAO,EAAG,CAEvC,MAAMY,EAAcV,MAAMC,KAAKpE,KAAKI,YAAAA,EACpCsB,EAAMmD,EAAYA,EAAYC,OAAS,CAAA,CACxC,CAEIpD,GACH1B,KAAKG,SAAS4E,KAAKrD,CAAAA,CAErB,CAKA,KAAKF,EAAAA,CACJxB,KAAKC,YAAY8E,KAAKvD,CAAAA,CACvB,CAKA,OAAOE,EAAAA,CACN,OAAO1B,KAAKI,aAAa4E,IAAItD,CAAAA,CAC9B,CAKA,UAAAuD,CAECd,MAAMC,KAAKpE,KAAKI,YAAAA,EAAc8E,QAAQxD,GAAAA,CACrC1B,KAAKsE,QAAQ5C,CAAAA,CAAAA,CAAAA,CAEf,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Subject as b, switchMap as f, forkJoin as l, fromEvent as o, of as w, takeUntil as
|
|
1
|
+
import { Subject as b, switchMap as f, forkJoin as l, fromEvent as o, of as w, takeUntil as p, timer as d, map as c, defaultIfEmpty as u, tap as n, delay as m, take as y, mergeMap as g } from "rxjs";
|
|
2
2
|
import { a as A, T as E } from "./theme.events-CPSLaOlR.js";
|
|
3
3
|
var L = ((e) => (e.Side = "side", e.Bottom = "bottom", e))(L || {});
|
|
4
4
|
const S = "are-you-there-sheet", v = "yes-here", C = new class {
|
|
@@ -6,16 +6,16 @@ const S = "are-you-there-sheet", v = "yes-here", C = new class {
|
|
|
6
6
|
this.bottomSheet = new b(), this.$dismiss = new b(), this.activeSheets = /* @__PURE__ */ new Set(), this.popStateListenerActive = !1, this.setupSheetOpeningLogic(), this.setupSheetDismissLogic(), this.setupPopStateListener();
|
|
7
7
|
}
|
|
8
8
|
setupSheetOpeningLogic() {
|
|
9
|
-
this.bottomSheet.pipe(f((e) => l([o(window, v).pipe(
|
|
9
|
+
this.bottomSheet.pipe(f((e) => l([o(window, v).pipe(p(d(50)), c((t) => t.detail), u(void 0)), o(window, A).pipe(p(d(50)), c((t) => t.detail.theme), u(void 0)), w(e).pipe(n(() => {
|
|
10
10
|
const t = e.uid ?? `sheet-${Date.now()}`;
|
|
11
11
|
window.dispatchEvent(new CustomEvent(S, { detail: { uid: t }, bubbles: !0, composed: !0 })), window.dispatchEvent(new CustomEvent(E, { bubbles: !0, composed: !0 }));
|
|
12
|
-
}))])),
|
|
12
|
+
}))])), c(([e, t, i]) => {
|
|
13
13
|
let a, s = e?.sheet;
|
|
14
14
|
if (s) a = s.parentElement;
|
|
15
15
|
else {
|
|
16
16
|
a = t || document.querySelector("schmancy-theme") || document.body;
|
|
17
|
-
const
|
|
18
|
-
s = document.createElement("schmancy-sheet"), s.setAttribute("uid",
|
|
17
|
+
const r = i.uid ?? `sheet-${Date.now()}`;
|
|
18
|
+
s = document.createElement("schmancy-sheet"), s.setAttribute("uid", r), a.appendChild(s);
|
|
19
19
|
}
|
|
20
20
|
i.lock && s.setAttribute("lock", "true");
|
|
21
21
|
const h = i.position || (window.innerWidth >= 768 ? "side" : "bottom");
|
|
@@ -24,21 +24,21 @@ const S = "are-you-there-sheet", v = "yes-here", C = new class {
|
|
|
24
24
|
window.dispatchEvent(new CustomEvent("schmancy-sheet-render", { detail: { component: e.component, uid: t.getAttribute("uid") }, bubbles: !0, composed: !0 }));
|
|
25
25
|
}), m(1), n(({ target: e, sheet: t }) => {
|
|
26
26
|
t?.setAttribute("open", "true");
|
|
27
|
-
const i = e.uid
|
|
27
|
+
const i = t.getAttribute("uid") || e.uid || `sheet-${Date.now()}`;
|
|
28
28
|
this.activeSheets.add(i), o(t, "close").pipe(y(1)).pipe(m(300)).subscribe((a) => {
|
|
29
29
|
const s = t;
|
|
30
30
|
if (s) {
|
|
31
31
|
const h = s.getAttribute("uid");
|
|
32
32
|
h && this.activeSheets.delete(h);
|
|
33
|
-
const
|
|
34
|
-
(!
|
|
33
|
+
const r = s.getAttribute("persist");
|
|
34
|
+
(!r || r === "false") && s.remove();
|
|
35
35
|
}
|
|
36
36
|
document.body.style.overflow = "auto";
|
|
37
37
|
});
|
|
38
38
|
})).subscribe();
|
|
39
39
|
}
|
|
40
40
|
setupSheetDismissLogic() {
|
|
41
|
-
this.$dismiss.pipe(g((e) => l([o(window, v).pipe(
|
|
41
|
+
this.$dismiss.pipe(g((e) => l([o(window, v).pipe(p(d(100)), c((t) => t.detail), u(void 0)), w(e).pipe(n(() => {
|
|
42
42
|
window.dispatchEvent(new CustomEvent(S, { detail: { uid: e } }));
|
|
43
43
|
}))])), n(([e, t]) => {
|
|
44
44
|
e?.sheet && (e.sheet.closeSheet(), this.activeSheets.delete(t));
|
|
@@ -77,4 +77,4 @@ export {
|
|
|
77
77
|
v as b,
|
|
78
78
|
C as s
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=sheet.service-
|
|
80
|
+
//# sourceMappingURL=sheet.service-xiXyDA0o.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.service-xiXyDA0o.js","sources":["../src/sheet/sheet.service.ts"],"sourcesContent":["import {\n\tdefaultIfEmpty,\n\tdelay,\n\tforkJoin,\n\tfromEvent,\n\tmap,\n\tmergeMap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimer,\n} from 'rxjs'\nimport { ComponentType } from '../area/router.types'\nimport { ThemeHereIAm, ThemeHereIAmEvent, ThemeWhereAreYou } from '../theme/theme.events'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n}\n\nexport type SheetConfig = {\n\tcomponent: ComponentType\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tlock?: boolean // Controls both ESC and overlay click dismissal\n\tonBeforeOpen?: (component: HTMLElement) => void\n\tonAfterOpen?: (component: HTMLElement) => void\n}\n\n// Keep old name for backward compatibility\ntype BottomSheeetTarget = SheetConfig\n\n// Events for communication between bottom-sheet component and bottom-sheet.service\nexport type SheetWhereAreYouRickyEvent = CustomEvent<{\n\tuid: string\n}>\nexport const SheetWhereAreYouRicky = 'are-you-there-sheet'\n\nexport type SheetHereMortyEvent = CustomEvent<{\n\tsheet?: SchmancySheet\n\ttheme?: HTMLElement\n}>\nexport const SheetHereMorty = 'yes-here'\n\n// Function to determine the position based on screen size\nconst getPosition = (): SchmancySheetPosition => {\n\treturn window.innerWidth >= 768 ? SchmancySheetPosition.Side : SchmancySheetPosition.Bottom // Adjust 768 as needed for your breakpoint\n}\n\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\t// Track currently open sheets\n\tprivate activeSheets = new Set<string>()\n\t// To track if we've set up the popstate listener\n\tprivate popStateListenerActive = false\n\n\tconstructor() {\n\t\tthis.setupSheetOpeningLogic()\n\t\tthis.setupSheetDismissLogic()\n\t\tthis.setupPopStateListener()\n\t}\n\n\t/**\n\t * Sets up the main sheet opening logic\n\t */\n\tprivate setupSheetOpeningLogic() {\n\t\tthis.bottomSheet\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\t// First check for existing sheet\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(50)),\n\t\t\t\t\t\t\tmap(e => e.detail),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t// Then find theme container\n\t\t\t\t\t\tfromEvent<ThemeHereIAmEvent>(window, ThemeHereIAm).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(50)),\n\t\t\t\t\t\t\tmap(e => e.detail.theme),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\t// Determine uid - use provided uid or generate one\n\t\t\t\t\t\t\t\tconst uid = target.uid ?? `sheet-${Date.now()}`\n\n\t\t\t\t\t\t\t\t// First ask for existing sheet\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(SheetWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid },\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t// Then ask for theme container\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(ThemeWhereAreYou, {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\n\t\t\t\tmap(([existingSheet, theme, target]) => {\n\t\t\t\t\tlet sheet = existingSheet?.sheet\n\t\t\t\t\tlet targetContainer: HTMLElement\n\n\t\t\t\t\tif (sheet) {\n\t\t\t\t\t\t// Use existing sheet\n\t\t\t\t\t\ttargetContainer = sheet.parentElement as HTMLElement\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Determine container - use theme from discovery or fallback\n\t\t\t\t\t\ttargetContainer = theme || (document.querySelector('schmancy-theme') as HTMLElement) || document.body\n\n\t\t\t\t\t\t// Create new sheet\n\t\t\t\t\t\tconst uid = target.uid ?? `sheet-${Date.now()}`\n\t\t\t\t\t\tsheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\tsheet.setAttribute('uid', uid)\n\t\t\t\t\t\ttargetContainer.appendChild(sheet)\n\t\t\t\t\t}\n\n\t\t\t\t\ttarget.lock && sheet.setAttribute('lock', 'true')\n\n\t\t\t\t\t// Use the dynamic position function here\n\t\t\t\t\tconst position = target.position || getPosition()\n\t\t\t\t\tsheet.setAttribute('position', position)\n\n\t\t\t\t\ttarget.persist && sheet.setAttribute('persist', String(target.persist))\n\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t\treturn { target, sheet: sheet as SchmancySheet }\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\t// Always dispatch render event - area router handles duplicate prevention\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('schmancy-sheet-render', {\n\t\t\t\t\t\t\tdetail: { component: target.component, uid: sheet.getAttribute('uid') },\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\n\t\t\t\t\t// Add to active sheets tracking\n\t\t\t\t\tconst uid = sheet.getAttribute('uid') || target.uid || `sheet-${Date.now()}`\n\t\t\t\t\tthis.activeSheets.add(uid)\n\n\t\t\t\t\t// Set up close event listener (always, not just for new sheets)\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1))\n\t\t\t\t\t\t.pipe(delay(300))\n\t\t\t\t\t\t.subscribe(_ => {\n\t\t\t\t\t\t\t// Use the sheet reference directly, not e.target\n\t\t\t\t\t\t\tconst sheetElement = sheet as SchmancySheet\n\n\t\t\t\t\t\t\t// Remove from active sheets tracking\n\t\t\t\t\t\t\tif (sheetElement) {\n\t\t\t\t\t\t\t\tconst uid = sheetElement.getAttribute('uid')\n\t\t\t\t\t\t\t\tif (uid) {\n\t\t\t\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Only keep sheet if persist is explicitly set to a truthy value\n\t\t\t\t\t\t\t\tconst persistAttr = sheetElement.getAttribute('persist')\n\t\t\t\t\t\t\t\tconst shouldRemove = !persistAttr || persistAttr === 'false'\n\n\t\t\t\t\t\t\t\tif (shouldRemove) {\n\t\t\t\t\t\t\t\t\tsheetElement.remove()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tdocument.body.style.overflow = 'auto' // unlock the scroll of the host\n\t\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Sets up the sheet closing/dismissal logic\n\t */\n\tprivate setupSheetDismissLogic() {\n\t\tthis.$dismiss\n\t\t\t.pipe(\n\t\t\t\tmergeMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\tmap(e => e.detail),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(SheetWhereAreYouRicky, { detail: { uid } }))\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([response, uid]) => {\n\t\t\t\t\tif (response?.sheet) {\n\t\t\t\t\t\tresponse.sheet.closeSheet()\n\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t} else {\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Sets up the popstate listener to handle browser back button\n\t */\n\tprivate setupPopStateListener() {\n\t\tif (this.popStateListenerActive) return\n\n\t\tfromEvent<PopStateEvent>(window, 'popstate').subscribe(event => {\n\t\t\t// If we have active sheets, close the most recently opened one\n\t\t\tif (this.activeSheets.size > 0) {\n\t\t\t\t// Get the last sheet (Set maintains insertion order)\n\t\t\t\tconst lastSheet = Array.from(this.activeSheets).pop()\n\t\t\t\tif (lastSheet) {\n\t\t\t\t\tthis.dismiss(lastSheet)\n\n\t\t\t\t\t// Prevent default navigation behavior by pushing a new state\n\t\t\t\t\t// This effectively cancels out the back navigation\n\t\t\t\t\tif (event.state && event.state.schmancySheet) {\n\t\t\t\t\t\thistory.pushState({}, '', window.location.href)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.popStateListenerActive = true\n\t}\n\n\t/**\n\t * Dismiss a sheet by uid, or dismiss the most recently opened sheet if no uid provided\n\t */\n\tdismiss(uid?: string) {\n\t\tif (!uid && this.activeSheets.size > 0) {\n\t\t\t// Get the last sheet opened (Set maintains insertion order)\n\t\t\tconst sheetsArray = Array.from(this.activeSheets)\n\t\t\tuid = sheetsArray[sheetsArray.length - 1]\n\t\t}\n\n\t\tif (uid) {\n\t\t\tthis.$dismiss.next(uid)\n\t\t}\n\t}\n\n\t/**\n\t * Open a sheet with the given target configuration\n\t */\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n\n\t/**\n\t * Check if a sheet is currently open by uid\n\t */\n\tisOpen(uid: string): boolean {\n\t\treturn this.activeSheets.has(uid)\n\t}\n\n\t/**\n\t * Close all open sheets\n\t */\n\tcloseAll() {\n\t\t// Copy the set to avoid modification during iteration\n\t\tArray.from(this.activeSheets).forEach(uid => {\n\t\t\tthis.dismiss(uid)\n\t\t})\n\t}\n\n}\nexport const sheet = new BottomSheetService()\n"],"names":["SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","this","bottomSheet","Subject","$dismiss","activeSheets","Set","popStateListenerActive","setupSheetOpeningLogic","setupSheetDismissLogic","setupPopStateListener","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","ThemeHereIAm","theme","of","target","tap","uid","Date","now","dispatchEvent","CustomEvent","bubbles","composed","ThemeWhereAreYou","existingSheet","targetContainer","parentElement","document","querySelector","body","createElement","setAttribute","appendChild","lock","position","innerWidth","persist","String","style","overflow","delay","component","getAttribute","add","take","subscribe","_","sheetElement","delete","persistAttr","remove","mergeMap","response","closeSheet","event","size","lastSheet","Array","from","pop","dismiss","state","schmancySheet","history","pushState","location","href","sheetsArray","length","next","has","forEach"],"mappings":";;AAmBO,IAAKA,KAAAA,CAAAA,OACXA,EAAA,OAAO,QACPA,EAAA,SAAS,UAFEA,IAAAA,KAAA,CAAA,CAAA;AAuBL,MAAMC,IAAwB,uBAMxBC,IAAiB,YAkPjBC,IAAQ,IA3OrB,MAAA;AAAA,EAQC;AAPAC,SAAAC,cAAc,IAAIC,KAClBF,KAAAG,WAAW,IAAID,KAEfF,KAAQI,mCAAmBC,OAE3BL,KAAQM,yBAAAA,IAGPN,KAAKO,uBAAAA,GACLP,KAAKQ,uBAAAA,GACLR,KAAKS,sBAAAA;AAAAA,EACN;AAAA,EAKQ,yBAAAF;AACPP,SAAKC,YACHS,KACAC,SACCC,EAAS,CAERC,EAA+BC,QAAQhB,CAAAA,EAAgBY,KACtDK,EAAUC,EAAM,EAAA,CAAA,GAChBC,EAAIC,OAAKA,EAAEC,MAAAA,GAC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AAA,EAAc6E,QAAQvD,CAAAA,MAAAA;AACrC1B,WAAKsE,QAAQ5C,CAAAA;AAAAA,IAAAA,CAAAA;AAAAA,EAEf;AAAA;"}
|
package/dist/teleport.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-yo2bVOKs.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
|
|
2
2
|
//# sourceMappingURL=teleport.cjs.map
|
package/dist/teleport.js
CHANGED