@mhmo91/schmancy 0.2.106 → 0.2.108
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/area.cjs +1 -1
- package/dist/area.component--h6lcDbh.cjs +8 -0
- package/dist/area.component--h6lcDbh.cjs.map +1 -0
- package/dist/{area.component-8AQUkma0.js → area.component-D9jjR4-z.js} +32 -32
- package/dist/area.component-D9jjR4-z.js.map +1 -0
- package/dist/area.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{chips-CR5QTRYd.js → chips-BL6vlm9-.js} +12 -12
- package/dist/{chips-CR5QTRYd.js.map → chips-BL6vlm9-.js.map} +1 -1
- package/dist/chips.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{delay-DE7SE2Lx.cjs → delay-_tsTZ2IL.cjs} +2 -2
- package/dist/{delay-DE7SE2Lx.cjs.map → delay-_tsTZ2IL.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +40 -41
- package/dist/index.js.map +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +5 -6
- package/dist/notification.js.map +1 -1
- package/dist/outlet-IKjizKaN.cjs +30 -0
- package/dist/outlet-IKjizKaN.cjs.map +1 -0
- package/dist/outlet-Us3Wi-TE.js +81 -0
- package/dist/outlet-Us3Wi-TE.js.map +1 -0
- package/dist/rxjs-utils.js +4 -4
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-CDsX-2Mg.js → teleport.component-Brodt-vU.js} +9 -10
- package/dist/{teleport.component-CDsX-2Mg.js.map → teleport.component-Brodt-vU.js.map} +1 -1
- package/dist/{teleport.component-BokvDfBn.cjs → teleport.component-DeCJJ0wk.cjs} +2 -2
- package/dist/{teleport.component-BokvDfBn.cjs.map → teleport.component-DeCJJ0wk.cjs.map} +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{typewriter-SgYEA2OC.js → typewriter-Dn4nHKtu.js} +11 -11
- package/dist/{typewriter-SgYEA2OC.js.map → typewriter-Dn4nHKtu.js.map} +1 -1
- package/dist/{typewriter-CAmStzUa.cjs → typewriter-I6nigRrM.cjs} +2 -2
- package/dist/{typewriter-CAmStzUa.cjs.map → typewriter-I6nigRrM.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/package.json +1 -1
- package/types/src/area/area.component.d.ts +17 -8
- package/dist/_notification-BMl7x5RW.cjs +0 -2
- package/dist/_notification-BMl7x5RW.cjs.map +0 -1
- package/dist/_notification-D5MEzxBs.js +0 -21
- package/dist/_notification-D5MEzxBs.js.map +0 -1
- package/dist/area.component-8AQUkma0.js.map +0 -1
- package/dist/area.component-nkE9S6b3.cjs +0 -8
- package/dist/area.component-nkE9S6b3.cjs.map +0 -1
- package/dist/outlet-B16Pt3na.js +0 -62
- package/dist/outlet-B16Pt3na.js.map +0 -1
- package/dist/outlet-CT1apG_R.cjs +0 -30
- package/dist/outlet-CT1apG_R.cjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"area.component-nkE9S6b3.cjs","sources":["../src/area/area.service.ts","../src/area/router.types.ts","../src/area/area.component.ts"],"sourcesContent":["import { ReplaySubject, Subject, bufferTime, fromEvent, map, of, tap, timeout, zip } from 'rxjs'\nimport { SchmancyTeleportation } from '../teleport'\nimport { ActiveRoute, RouteAction } from './router.types'\n\nexport const routerHistory = new Subject<RouteAction>()\n\nexport const FINDING_MORTIES = 'FINDING_MORTIES'\nexport const HERE_RICKY = 'HERE_RICKY'\nexport type HERE_RICKY_EVENT = CustomEvent<{\n\tcomponent: SchmancyTeleportation\n}>\nexport type FINDING_MORTIES_EVENT = CustomEvent<{\n\tcomponent: SchmancyTeleportation\n}>\n\nclass AreaService {\n\tprivate static instance: AreaService\n\tpublic prettyURL = false\n\tpublic mode: 'SILENT' | 'HISTORY' = 'HISTORY'\n\tpublic request = new ReplaySubject<RouteAction>(1)\n\tpublic current = new Map<string, ActiveRoute>()\n\tpublic $current = new ReplaySubject<Map<string, ActiveRoute>>(1)\n\tpublic enableHistoryMode = true\n\tprivate findingMortiesEvent = new CustomEvent<FINDING_MORTIES_EVENT['detail']>(FINDING_MORTIES)\n\n\tconstructor() {\n\t\tthis.$current.next(this.current)\n\t}\n\n\tfind() {\n\t\treturn zip([\n\t\t\tfromEvent<HERE_RICKY_EVENT>(window, HERE_RICKY).pipe(\n\t\t\t\tmap(e => e.detail),\n\t\t\t\tbufferTime(0),\n\t\t\t\ttap(console.log),\n\t\t\t),\n\t\t\tof(1).pipe(tap(() => window.dispatchEvent(this.findingMortiesEvent))),\n\t\t]).pipe(\n\t\t\tmap(([component]) => component),\n\t\t\ttimeout(1),\n\t\t)\n\t}\n\n\tpush(r: RouteAction) {\n\t\tthis.request.next(r)\n\t}\n\n\tpop(name: string) {\n\t\tconst newState = JSON.parse(JSON.stringify(area.state))\n\t\tdelete newState[name]\n\t\tconsole.log(area.state, newState)\n\t\thistory.replaceState(null, '', encodeURIComponent(JSON.stringify(newState)))\n\t}\n\tstatic getInstance() {\n\t\tif (!AreaService.instance) {\n\t\t\tAreaService.instance = new AreaService()\n\t\t}\n\t\treturn AreaService.instance\n\t}\n\n\tget state() {\n\t\tconst pathname = location.pathname.split('/').pop()\n\t\tlet areaState = {}\n\t\ttry {\n\t\t\tareaState = pathname ? JSON.parse(decodeURIComponent(pathname)) : {}\n\t\t} catch {\n\t\t\tareaState = {}\n\t\t}\n\t\treturn areaState\n\t}\n}\n\nexport const area = AreaService.getInstance()\nexport default area\n","export type RouteAction = {\n\tcomponent: CustomElementConstructor | string | HTMLElement\n\tarea: string\n\tstate?: object\n\thistoryStrategy?: THistoryStrategy\n\tclearQueryParams?: string[] | null\n}\n\nexport type ActiveRoute = {\n\tcomponent: string\n\tarea: string\n\tstate?: object\n}\n\nexport type THistoryStrategy = 'push' | 'replace' | 'pop' | 'silent'\n\nexport enum HISTORY_STRATEGY {\n\tpush = 'push',\n\treplace = 'replace',\n\tpop = 'pop',\n\tsilent = 'silent',\n}\n","import { $LitElement } from '@mixins/index'\nimport { TemplateResult, css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport {\n\tEMPTY,\n\tbufferTime,\n\tcatchError,\n\tdistinctUntilChanged,\n\tfilter,\n\tfrom,\n\tfromEvent,\n\tmap,\n\tmerge,\n\tof,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimeout,\n} from 'rxjs'\nimport { isPresent } from 'ts-is-present'\nimport area from './area.service'\nimport { HISTORY_STRATEGY, RouteAction } from './router.types'\n\n/**\n * Type describing the route for an area.\n */\ntype TRouteArea = {\n\tcomponent: string\n\tstate: object | undefined\n}\n\n/**\n * Type for a mapping entry. Each mapping specifies a pathname and an array of route definitions.\n * Each route definition contains an area name, a component (or promise/constructor/template),\n * and optionally, a state.\n */\nexport type AreaPathnames = {\n\tpathname: string\n\troutes: Array<{\n\t\tarea: string\n\t\tcomponent: string | Promise<NodeModule> | CustomElementConstructor | TemplateResult<1>\n\t\tstate?: object\n\t}>\n}\n\n@customElement('schmancy-area')\nexport class SchmancyArea extends $LitElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tdisplay: block;\n\t\tinset: 0;\n\t}\n`) {\n\t/**\n\t * The name of the router outlet.\n\t * @attr\n\t * @type {string}\n\t * @public\n\t * @required\n\t */\n\t@property() name!: string\n\n\t/**\n\t * The default component to use if no matching route is found.\n\t */\n\t@property() default!: string | Promise<NodeModule> | CustomElementConstructor | TemplateResult<1>\n\n\t/**\n\t * An optional array of route mappings that can be passed into the component.\n\t * Each mapping specifies a pathname and an array of routes mapping area names to components.\n\t *\n\t * Example:\n\t * [\n\t * {\n\t * pathname: '/home',\n\t * routes: [\n\t * { area: 'main', component: 'home-view', state: { foo: 'bar' } },\n\t * { area: 'sidebar', component: 'menu-view' }\n\t * ]\n\t * },\n\t * {\n\t * pathname: '/about',\n\t * routes: [\n\t * { area: 'main', component: 'about-view' },\n\t * { area: 'sidebar', component: 'info-view' }\n\t * ]\n\t * }\n\t * ]\n\t */\n\t@property({ type: Array })\n\tmappings: AreaPathnames[] = []\n\n\t/**\n\t * New API: Returns an observable emitting a RouteAction based on the passed mappings.\n\t *\n\t * It looks for a mapping that matches the current location’s pathname, then selects\n\t * the route whose area matches this component’s name.\n\t *\n\t * @param mappings - Array of route mapping objects.\n\t * @param historyStrategy - The history strategy to use (e.g. PUSH, REPLACE, SILENT).\n\t * @returns An RxJS Observable that emits a RouteAction.\n\t */\n\tpublic getComponentFromMappings(mappings: AreaPathnames[], historyStrategy: HISTORY_STRATEGY) {\n\t\treturn of(location.pathname).pipe(\n\t\t\tmap(currentPath => {\n\t\t\t\tconst mapping = mappings.find(m => m.pathname === currentPath)\n\t\t\t\tif (!mapping) {\n\t\t\t\t\tthrow new Error(`No mapping found for pathname: ${currentPath}`)\n\t\t\t\t}\n\t\t\t\tconst routeForArea = mapping.routes.find(route => route.area === this.name)\n\t\t\t\tif (!routeForArea) {\n\t\t\t\t\tthrow new Error(`No route found for area: ${this.name} in pathname: ${currentPath}`)\n\t\t\t\t}\n\t\t\t\treturn routeForArea\n\t\t\t}),\n\t\t\tmap(\n\t\t\t\troute =>\n\t\t\t\t\t({\n\t\t\t\t\t\tarea: this.name,\n\t\t\t\t\t\tcomponent: route.component || this.default,\n\t\t\t\t\t\tstate: route.state,\n\t\t\t\t\t\thistoryStrategy,\n\t\t\t\t\t}) as RouteAction,\n\t\t\t),\n\t\t\tcatchError(() =>\n\t\t\t\tthis.default\n\t\t\t\t\t? of({\n\t\t\t\t\t\t\tarea: this.name,\n\t\t\t\t\t\t\tcomponent: this.default,\n\t\t\t\t\t\t\thistoryStrategy,\n\t\t\t\t\t\t} as RouteAction)\n\t\t\t\t\t: EMPTY,\n\t\t\t),\n\t\t)\n\t}\n\n\t/**\n\t * Existing API: Returns an observable that emits a RouteAction based on the provided pathname.\n\t *\n\t * @param pathname - Pathname from the browser location API.\n\t * @param historyStrategy - The history strategy to use for the route (PUSH, REPLACE, SILENT).\n\t * @returns An observable emitting the RouteAction.\n\t */\n\tgetComponentFromPathname(pathname: string, historyStrategy: HISTORY_STRATEGY) {\n\t\treturn of(pathname).pipe(\n\t\t\tmap(path => path.split('/').pop() ?? ''),\n\t\t\tmap(path => decodeURIComponent(path)),\n\t\t\tmap(path => JSON.parse(path)),\n\t\t\tmap(routes => routes[this.name] as TRouteArea),\n\t\t\tmap(component =>\n\t\t\t\t!component && this.default\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tcomponent: this.default,\n\t\t\t\t\t\t\tstate: undefined,\n\t\t\t\t\t\t}\n\t\t\t\t\t: component,\n\t\t\t),\n\t\t\tfilter(x => isPresent(x)),\n\t\t\tmap((component: TRouteArea) => ({\n\t\t\t\tarea: this.name,\n\t\t\t\tcomponent: component.component ?? this.default,\n\t\t\t\tstate: component.state,\n\t\t\t\thistoryStrategy,\n\t\t\t})),\n\t\t\tmap(x => x as RouteAction),\n\t\t\tcatchError(() => {\n\t\t\t\treturn this.default\n\t\t\t\t\t? of({\n\t\t\t\t\t\t\tarea: this.name,\n\t\t\t\t\t\t\tcomponent: this.default,\n\t\t\t\t\t\t\thistoryStrategy,\n\t\t\t\t\t\t} as RouteAction)\n\t\t\t\t\t: EMPTY\n\t\t\t}),\n\t\t)\n\t}\n\n\tprotected firstUpdated(): void {\n\t\tif (!this.name) {\n\t\t\t// TODO: maybe enforce this to be unique\n\t\t\tthrow new Error('Area name or default component not set')\n\t\t}\n\n\t\t// The route resolution now checks for a non-empty mappings property.\n\t\t// If mappings are provided, they override the normal parsing logic for the current URL.\n\t\tmerge(\n\t\t\t// 1) Initial load from location.pathname.\n\t\t\tof(location.pathname).pipe(\n\t\t\t\tswitchMap(pathname => {\n\t\t\t\t\tif (this.mappings && this.mappings.length) {\n\t\t\t\t\t\treturn this.getComponentFromMappings(this.mappings, HISTORY_STRATEGY.silent)\n\t\t\t\t\t}\n\t\t\t\t\treturn this.getComponentFromPathname(pathname, HISTORY_STRATEGY.silent)\n\t\t\t\t}),\n\t\t\t\ttake(1),\n\t\t\t),\n\t\t\t// 2) Requests to change the route for this area.\n\t\t\tarea.request.pipe(filter(({ area }) => area === this.name)),\n\t\t\t// 3) Popstate events (back, forward).\n\t\t\tfromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\tmap(e => (e.target as Window).location.pathname),\n\t\t\t\tswitchMap(pathname => {\n\t\t\t\t\tif (this.mappings && this.mappings.length) {\n\t\t\t\t\t\treturn this.getComponentFromMappings(this.mappings, HISTORY_STRATEGY.silent)\n\t\t\t\t\t}\n\t\t\t\t\treturn this.getComponentFromPathname(pathname, HISTORY_STRATEGY.silent)\n\t\t\t\t}),\n\t\t\t),\n\t\t)\n\t\t\t.pipe(\n\t\t\t\tfilter(request => !!request.component),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdistinctUntilChanged((a, b) => {\n\t\t\t\t\tlet aComponent, bComponent\n\t\t\t\t\tif (typeof a.component === 'function') return false\n\t\t\t\t\telse if (typeof a.component === 'string') aComponent = a.component\n\n\t\t\t\t\tif (typeof b.component === 'function') return false\n\t\t\t\t\telse if (typeof b.component === 'string') bComponent = b.component\n\n\t\t\t\t\treturn bComponent?.replaceAll('-', '').toLowerCase() === aComponent?.replaceAll('-', '').toLowerCase()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(route => {\n\t\t\t\t\tconst c = route.component\n\t\t\t\t\tif (c instanceof Promise) {\n\t\t\t\t\t\t// Dynamic import module.\n\t\t\t\t\t\treturn from(c).pipe(\n\t\t\t\t\t\t\tmap(x => ({\n\t\t\t\t\t\t\t\tcomponent: x.exports.default as CustomElementConstructor,\n\t\t\t\t\t\t\t\troute,\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t)\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Already a string, function, or element.\n\t\t\t\t\t\treturn of({ component: c, route })\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tmap(({ component, route }) => {\n\t\t\t\t\tif (typeof component === 'string') {\n\t\t\t\t\t\t// Tag name.\n\t\t\t\t\t\treturn { component: document.createElement(component), route }\n\t\t\t\t\t} else if (component instanceof HTMLElement) {\n\t\t\t\t\t\t// Already an element instance.\n\t\t\t\t\t\treturn { component, route }\n\t\t\t\t\t} else if (typeof component === 'function') {\n\t\t\t\t\t\t// Custom element constructor.\n\t\t\t\t\t\treturn { component: new component(), route }\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tdistinctUntilChanged((prev, curr) => prev.component.tagName === curr.component.tagName),\n\t\t\t\t// Create the new view and add it to the DOM.\n\t\t\t\tmap(({ component, route }) => {\n\t\t\t\t\tconst oldView = this.shadowRoot?.children[0]\n\t\t\t\t\tconst oldViewExists = !!oldView\n\n\t\t\t\t\t// Remove the old view (if any).\n\t\t\t\t\toldView.remove()\n\t\t\t\t\t// Native Web Animations API - fade in.\n\t\t\t\t\tcomponent.classList.add('opacity-0')\n\t\t\t\t\tthis.shadowRoot?.append(component)\n\t\t\t\t\tcomponent.animate([{ opacity: 0 }, { opacity: 1 }], {\n\t\t\t\t\t\tduration: oldViewExists ? 150 : 100,\n\t\t\t\t\t\teasing: 'cubic-bezier(0.25, 0.8, 0.25, 1)',\n\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t})\n\n\t\t\t\t\treturn { component, route }\n\t\t\t\t}),\n\t\t\t\ttap(({ component, route }) => {\n\t\t\t\t\t// Handle history updates.\n\t\t\t\t\tif (typeof route.historyStrategy === 'undefined' || route.historyStrategy === 'push') {\n\t\t\t\t\t\thistory.pushState(route.state, '', this.newPath(component.tagName, route))\n\t\t\t\t\t} else if (route.historyStrategy && ['replace', 'pop'].includes(route.historyStrategy)) {\n\t\t\t\t\t\thistory.replaceState(route.state, '', this.newPath(component.tagName, route))\n\t\t\t\t\t}\n\t\t\t\t\tarea.current.set(this.name, {\n\t\t\t\t\t\tcomponent: component.tagName,\n\t\t\t\t\t\tstate: route.state,\n\t\t\t\t\t\tarea: this.name,\n\t\t\t\t\t})\n\n\t\t\t\t\tarea.$current.next(area.current)\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Computes a new URL path for the given component and route.\n\t */\n\tnewPath(tag: string, route: RouteAction) {\n\t\tconst oldPathname = location.pathname.split('/').pop()\n\t\tlet oldAreaState = {}\n\t\ttry {\n\t\t\toldAreaState = oldPathname ? JSON.parse(decodeURIComponent(oldPathname)) : {}\n\t\t} catch {\n\t\t\toldAreaState = {}\n\t\t}\n\t\troute.state = route.state ?? {}\n\t\tconst queryParams = route.clearQueryParams ? this.queryParamClear(route.clearQueryParams) : document.location.search\n\n\t\treturn encodeURIComponent(\n\t\t\tJSON.stringify({\n\t\t\t\t...oldAreaState,\n\t\t\t\t[this.name]: { component: tag.toLowerCase(), state: route.state },\n\t\t\t}),\n\t\t).concat(`${queryParams}`)\n\t}\n\n\t/**\n\t * Removes specified query parameters from the current URL.\n\t */\n\tqueryParamClear(params?: string[]) {\n\t\tif (!params) {\n\t\t\treturn ''\n\t\t}\n\t\t// Get query params from URL.\n\t\tconst urlParams = new URLSearchParams(location.search)\n\t\t// Remove query params.\n\t\tparams.forEach(param => urlParams.delete(param))\n\t\tif (urlParams.toString() === '') return ''\n\t\treturn `?${urlParams.toString()}`\n\t}\n\n\t/**\n\t * Checks for teleportation requests (FLIP_REQUEST events) and dispatches a FLIP_STARTED event.\n\t */\n\tcheckForTeleportationRequests() {\n\t\treturn fromEvent<CustomEvent>(window, 'FLIP_REQUEST').pipe(\n\t\t\tmap(e => e.detail),\n\t\t\tbufferTime(0),\n\t\t\ttap(() => {\n\t\t\t\tthis.dispatchEvent(new CustomEvent('FLIP_STARTED'))\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t\ttimeout(0),\n\t\t\tcatchError(() => of(null)),\n\t\t)\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\trender() {\n\t\treturn html` <slot> </slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-area': SchmancyArea\n\t}\n}\n"],"names":["routerHistory","Subject","FINDING_MORTIES","HERE_RICKY","AreaService","constructor","this","prettyURL","mode","request","ReplaySubject","current","Map","$current","enableHistoryMode","findingMortiesEvent","CustomEvent","next","zip","fromEvent","window","pipe","map","e","detail","bufferTime","tap","console","log","of","dispatchEvent","component","timeout","r","name","newState","JSON","parse","stringify","area","state","history","replaceState","encodeURIComponent","getInstance","instance","pathname","location","split","pop","areaState","decodeURIComponent","HISTORY_STRATEGY","SchmancyArea","$LitElement","css","super","arguments","mappings","historyStrategy","currentPath","mapping","find","m","Error","routeForArea","routes","route","default","catchError","EMPTY","path","filter","x","isPresent","libExports","merge","switchMap","length","getComponentFromMappings","silent","getComponentFromPathname","take","target","takeUntil","disconnecting","distinctUntilChanged","a","b","aComponent","bComponent","replaceAll","toLowerCase","c","Promise","from","exports","document","createElement","HTMLElement","prev","curr","tagName","oldView","shadowRoot","children","oldViewExists","remove","classList","add","append","animate","opacity","duration","easing","fill","pushState","newPath","includes","set","subscribe","tag","oldPathname","oldAreaState","queryParams","clearQueryParams","queryParamClear","search","concat","params","urlParams","URLSearchParams","forEach","param","delete","toString","disconnectedCallback","html","__decorateClass","property","prototype","type","Array","customElement"],"mappings":"qSAIaA,EAAAA,EAAgB,IAAIC,EAAqBA,QAEzCC,EAAkB,kBAClBC,EAAa,aAQ1B,MAAMC,CAAAA,CAUL,aAAAC,CARAC,KAAOC,UAAAA,GACPD,KAAOE,KAA6B,UAC7BF,KAAAG,QAAU,IAAIC,EAAAA,cAA2B,CACzCJ,EAAAA,KAAAK,YAAcC,IACdN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import "lit/directives/style-map.js";
|
|
4
|
-
import { T as p } from "./tailwind.mixin-ECkyl80C.js";
|
|
5
|
-
import { html as m } from "lit";
|
|
6
|
-
import { property as u, customElement as d } from "lit/decorators.js";
|
|
7
|
-
var v = Object.defineProperty, f = Object.getOwnPropertyDescriptor, a = (n, e, i, r) => {
|
|
8
|
-
for (var s, t = r > 1 ? void 0 : r ? f(e, i) : e, o = n.length - 1; o >= 0; o--) (s = n[o]) && (t = (r ? s(e, i, t) : s(t)) || t);
|
|
9
|
-
return r && t && v(e, i, t), t;
|
|
10
|
-
};
|
|
11
|
-
let c = class extends p() {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments), this.type = "success";
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
return m`
|
|
17
|
-
<div
|
|
18
|
-
class="pointer-events-auto w-full max-w-sm
|
|
19
|
-
rounded-lg bg-surface-container shadow-lg
|
|
20
|
-
ring-1 ring-outlineVariant ring-opacity-5 p-3"
|
|
21
|
-
>
|
|
22
|
-
<!-- Icon + Text + Close Button, etc. -->
|
|
23
|
-
<div class="flex items-center">
|
|
24
|
-
<!-- Icon -->
|
|
25
|
-
<div class="shrink-0 mr-2">
|
|
26
|
-
<!-- Show different icons depending on this.type -->
|
|
27
|
-
<!-- e.g., success, error, etc. -->
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<!-- Text slot -->
|
|
31
|
-
<div class="flex-1">
|
|
32
|
-
<slot></slot>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<!-- Close -->
|
|
36
|
-
<schmancy-icon-button
|
|
37
|
-
@click=${() => this.dispatchEvent(new CustomEvent("close"))}
|
|
38
|
-
variant="outlined"
|
|
39
|
-
class="ml-2 text-sm"
|
|
40
|
-
>Close</schmancy-icon-button
|
|
41
|
-
>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
`;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
a([u({ type: String })], c.prototype, "type", 2), c = a([d("schmancy-notification")], c);
|
|
48
|
-
var g = Object.getOwnPropertyDescriptor;
|
|
49
|
-
let l = class extends p() {
|
|
50
|
-
render() {
|
|
51
|
-
return m` <slot></slot> `;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
l = ((n, e, i, r) => {
|
|
55
|
-
for (var s, t = r > 1 ? void 0 : r ? g(e, i) : e, o = n.length - 1; o >= 0; o--) (s = n[o]) && (t = s(t) || t);
|
|
56
|
-
return t;
|
|
57
|
-
})([d("schmancy-notification-outlet")], l);
|
|
58
|
-
export {
|
|
59
|
-
c as S,
|
|
60
|
-
l as a
|
|
61
|
-
};
|
|
62
|
-
//# sourceMappingURL=outlet-B16Pt3na.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"outlet-B16Pt3na.js","sources":["../src/notification/notification.ts","../src/notification/outlet.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-notification')\nexport class SchmancyNotification extends TailwindElement() {\n\t@property({ type: String })\n\ttype: 'success' | 'error' | 'warning' | 'info' = 'success'\n\n\trender() {\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"pointer-events-auto w-full max-w-sm\n rounded-lg bg-surface-container shadow-lg\n ring-1 ring-outlineVariant ring-opacity-5 p-3\"\n\t\t\t>\n\t\t\t\t<!-- Icon + Text + Close Button, etc. -->\n\t\t\t\t<div class=\"flex items-center\">\n\t\t\t\t\t<!-- Icon -->\n\t\t\t\t\t<div class=\"shrink-0 mr-2\">\n\t\t\t\t\t\t<!-- Show different icons depending on this.type -->\n\t\t\t\t\t\t<!-- e.g., success, error, etc. -->\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Text slot -->\n\t\t\t\t\t<div class=\"flex-1\">\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Close -->\n\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t@click=${() => this.dispatchEvent(new CustomEvent('close'))}\n\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\tclass=\"ml-2 text-sm\"\n\t\t\t\t\t\t>Close</schmancy-icon-button\n\t\t\t\t\t>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-notification': SchmancyNotification\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-notification-outlet')\nexport class SchmancyNotificationOutlet extends TailwindElement() {\n\trender() {\n\t\treturn html` <slot></slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-notification-outlet': SchmancyNotificationOutlet\n\t}\n}\n"],"names":["SchmancyNotification","TailwindElement","constructor","super","arguments","this","type","render","html","dispatchEvent","CustomEvent","__decorateClass","property","String","prototype","customElement","SchmancyNotificationOutlet"],"mappings":";;;;;;;;;;AAKa,IAAAA,IAAN,cAAmCC;EAAnC,cAAAC;AAAAC,UAAAC,GAAAA,SAAAA,GAE2CC,KAAAC,OAAA;AAAA,EAAA;AAAA,EAEjD,SAAAC;AACQ,WAAAC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,eAqBM,MAAMH,KAAKI,cAAc,IAAIC,YAAY,OAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAS;AAAA;AAxBhEC,EAAA,CADCC,EAAS,EAAEN,MAAMO,OADNb,CAAAA,CAAAA,GAAAA,EAEZc,WAAA,QAAA,CAFYd,GAAAA,IAANW,EAAA,CADNI,EAAc,uBACFf,CAAAA,GAAAA,CAAAA;;ACAA,IAAAgB,IAAN,cAAyCf,EAC/C,EAAA;AAAA,EAAA,SACQ;AAAA,WAAAO;AAAAA,EAAA;AAAA;AAFIQ;;;GAAN,CADND,EAAc,8BAAA,CAAA,GACFC;"}
|
package/dist/outlet-CT1apG_R.cjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const l=require("./tailwind.mixin-DFM3jd9q.cjs"),u=require("lit"),s=require("lit/decorators.js");var m=Object.defineProperty,d=Object.getOwnPropertyDescriptor,a=(c,e,o,i)=>{for(var r,t=i>1?void 0:i?d(e,o):e,n=c.length-1;n>=0;n--)(r=c[n])&&(t=(i?r(e,o,t):r(t))||t);return i&&t&&m(e,o,t),t};exports.SchmancyNotification=class extends l.TailwindElement(){constructor(){super(...arguments),this.type="success"}render(){return u.html`
|
|
2
|
-
<div
|
|
3
|
-
class="pointer-events-auto w-full max-w-sm
|
|
4
|
-
rounded-lg bg-surface-container shadow-lg
|
|
5
|
-
ring-1 ring-outlineVariant ring-opacity-5 p-3"
|
|
6
|
-
>
|
|
7
|
-
<!-- Icon + Text + Close Button, etc. -->
|
|
8
|
-
<div class="flex items-center">
|
|
9
|
-
<!-- Icon -->
|
|
10
|
-
<div class="shrink-0 mr-2">
|
|
11
|
-
<!-- Show different icons depending on this.type -->
|
|
12
|
-
<!-- e.g., success, error, etc. -->
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
<!-- Text slot -->
|
|
16
|
-
<div class="flex-1">
|
|
17
|
-
<slot></slot>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<!-- Close -->
|
|
21
|
-
<schmancy-icon-button
|
|
22
|
-
@click=${()=>this.dispatchEvent(new CustomEvent("close"))}
|
|
23
|
-
variant="outlined"
|
|
24
|
-
class="ml-2 text-sm"
|
|
25
|
-
>Close</schmancy-icon-button
|
|
26
|
-
>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
`}},a([s.property({type:String})],exports.SchmancyNotification.prototype,"type",2),exports.SchmancyNotification=a([s.customElement("schmancy-notification")],exports.SchmancyNotification);var h=Object.getOwnPropertyDescriptor;exports.SchmancyNotificationOutlet=class extends l.TailwindElement(){render(){return u.html` <slot></slot> `}},exports.SchmancyNotificationOutlet=((c,e,o,i)=>{for(var r,t=i>1?void 0:i?h(e,o):e,n=c.length-1;n>=0;n--)(r=c[n])&&(t=r(t)||t);return t})([s.customElement("schmancy-notification-outlet")],exports.SchmancyNotificationOutlet);
|
|
30
|
-
//# sourceMappingURL=outlet-CT1apG_R.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"outlet-CT1apG_R.cjs","sources":["../src/notification/notification.ts","../src/notification/outlet.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-notification')\nexport class SchmancyNotification extends TailwindElement() {\n\t@property({ type: String })\n\ttype: 'success' | 'error' | 'warning' | 'info' = 'success'\n\n\trender() {\n\t\treturn html`\n\t\t\t<div\n\t\t\t\tclass=\"pointer-events-auto w-full max-w-sm\n rounded-lg bg-surface-container shadow-lg\n ring-1 ring-outlineVariant ring-opacity-5 p-3\"\n\t\t\t>\n\t\t\t\t<!-- Icon + Text + Close Button, etc. -->\n\t\t\t\t<div class=\"flex items-center\">\n\t\t\t\t\t<!-- Icon -->\n\t\t\t\t\t<div class=\"shrink-0 mr-2\">\n\t\t\t\t\t\t<!-- Show different icons depending on this.type -->\n\t\t\t\t\t\t<!-- e.g., success, error, etc. -->\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Text slot -->\n\t\t\t\t\t<div class=\"flex-1\">\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- Close -->\n\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t@click=${() => this.dispatchEvent(new CustomEvent('close'))}\n\t\t\t\t\t\tvariant=\"outlined\"\n\t\t\t\t\t\tclass=\"ml-2 text-sm\"\n\t\t\t\t\t\t>Close</schmancy-icon-button\n\t\t\t\t\t>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-notification': SchmancyNotification\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-notification-outlet')\nexport class SchmancyNotificationOutlet extends TailwindElement() {\n\trender() {\n\t\treturn html` <slot></slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-notification-outlet': SchmancyNotificationOutlet\n\t}\n}\n"],"names":["SchmancyNotification","TailwindElement","constructor","super","arguments","this","type","html","dispatchEvent","CustomEvent","__decorateClass","property","String","prototype","customElement","SchmancyNotificationOutlet"],"mappings":"4YAKaA,QAAAA,qBAAN,cAAmCC,EAAAA,kBAAnC,aAAAC,CAAAC,SAAAC,SAE2CC,EAAAA,KAAAC,KAAA,SAAA,CAEjD,QACQ,CAAA,OAAAC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,eAqBM,IAAMF,KAAKG,cAAc,IAAIC,YAAY,OAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAAS,CAAA,EAxBhEC,EAAA,CADCC,WAAS,CAAEL,KAAMM,MADNZ,CAAAA,CAAAA,EAAAA,6BAEZa,UAAA,OAAA,CAFYb,EAAAA,QAANA,qBAAAU,EAAA,CADNI,EAAAA,cAAc,uBACFd,CAAAA,EAAAA,oECAAe,QAAAA,2BAAN,cAAyCd,EAAAA,gBAAAA,CAAAA,CAC/C,QACQ,CAAA,OAAAM,EAAAA,qBAAA,GAFIQ,QAANA,iIAAA,CADND,EAAAA,cAAc,iCACFC"}
|