@pod-os/elements 0.37.0-rc.c8b54d1.0 → 0.37.0
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/cjs/{chunk.URTPIBTY-DdK9pL5v.js → chunk.URTPIBTY-DcQsb_nW.js} +2 -2
- package/dist/cjs/{chunk.XQ2OKYYA-DEkhm1i7.js → chunk.XQ2OKYYA-D224sdKt.js} +3 -3
- package/dist/cjs/{chunk.ZGGPD2XJ-uKZZdqOH.js → chunk.ZGGPD2XJ-Cj6xUx2M.js} +1 -1
- package/dist/cjs/{class-map-DAZXfKKA.js → class-map-Nx8L8ElN.js} +1 -1
- package/dist/cjs/elements.cjs.js +3 -3
- package/dist/cjs/{index-DCpu_nnH.js → index-Be_lnf0w.js} +547 -2001
- package/dist/cjs/{index-FUnpyb19.js → index-OR1wNkjG.js} +1052 -489
- package/dist/cjs/{jsonld-V2RB47OZ-BerQ9IRa.js → jsonld-V2RB47OZ-B82QNsYZ.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pos-add-literal-value_3.cjs.entry.js +6 -6
- package/dist/cjs/{pos-add-new-thing_31.cjs.entry.js → pos-add-new-thing_32.cjs.entry.js} +411 -227
- package/dist/cjs/pos-app-document-viewer.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-image-viewer.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
- package/dist/cjs/pos-attachments.cjs.entry.js +2 -2
- package/dist/cjs/pos-case.cjs.entry.js +24 -0
- package/dist/cjs/pos-container-contents.cjs.entry.js +13 -4
- package/dist/cjs/pos-container-item_3.cjs.entry.js +4 -4
- package/dist/cjs/pos-document.cjs.entry.js +4 -4
- package/dist/cjs/pos-list.cjs.entry.js +1 -1
- package/dist/cjs/pos-markdown-document.cjs.entry.js +442 -2327
- package/dist/cjs/pos-relations_2.cjs.entry.js +1 -1
- package/dist/cjs/pos-subjects.cjs.entry.js +2 -2
- package/dist/cjs/pos-switch.cjs.entry.js +64 -0
- package/dist/cjs/pos-tool-attachments.cjs.entry.js +2 -2
- package/dist/cjs/pos-value.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +5 -1
- package/dist/collection/components/pos-app/pos-app.js +2 -1
- package/dist/collection/components/pos-attachments/pos-attachments.js +2 -1
- package/dist/collection/components/pos-container-contents/pos-container-contents.js +10 -1
- package/dist/collection/components/pos-container-contents/pos-create-new-container-item/pos-create-new-container-item.js +4 -2
- package/dist/collection/components/pos-markdown-document/pos-markdown-document.js +2 -1
- package/dist/collection/components/pos-navigation/bar/pos-navigation-bar.css +42 -22
- package/dist/collection/components/pos-navigation/bar/pos-navigation-bar.js +3 -2
- package/dist/collection/components/pos-new-thing-form/pos-new-thing-form.js +1 -1
- package/dist/collection/components/pos-router/pos-router.js +1 -1
- package/dist/collection/components/pos-select-term/pos-select-term.js +1 -1
- package/dist/collection/components/pos-share/openNewTab.js +3 -0
- package/dist/collection/components/pos-share/pos-share.css +36 -0
- package/dist/collection/components/pos-share/pos-share.js +111 -0
- package/dist/collection/components/pos-switch/pos-case/pos-case.js +88 -0
- package/dist/collection/components/pos-switch/pos-switch.js +89 -0
- package/dist/collection/components/pos-tool-select/pos-tool-select.js +6 -3
- package/dist/collection/components/pos-upload/pos-upload.js +7 -4
- package/dist/collection/components/pos-user-menu/pos-user-menu.js +1 -1
- package/dist/collection/tools/pos-tool-attachments/pos-tool-attachments.js +1 -1
- package/dist/components/chunk.IVVHNXMC.js +20 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/components/pos-add-literal-value2.js +1 -1
- package/dist/components/pos-app-browser.js +1 -1
- package/dist/components/pos-attachments2.js +1 -1
- package/dist/components/pos-case.d.ts +11 -0
- package/dist/components/pos-case.js +1 -0
- package/dist/components/pos-container-contents2.js +1 -1
- package/dist/components/pos-make-findable2.js +1 -1
- package/dist/components/pos-markdown-document2.js +1 -1
- package/dist/components/pos-navigation-bar2.js +1 -1
- package/dist/components/pos-navigation2.js +1 -1
- package/dist/components/pos-new-thing-form2.js +1 -1
- package/dist/components/pos-router2.js +1 -1
- package/dist/components/pos-select-term2.js +1 -1
- package/dist/components/pos-share.d.ts +11 -0
- package/dist/components/pos-share.js +1 -0
- package/dist/components/pos-share2.js +1 -0
- package/dist/components/pos-switch.d.ts +11 -0
- package/dist/components/pos-switch.js +1 -0
- package/dist/components/pos-tool-attachments.js +1 -1
- package/dist/components/pos-tool-select2.js +1 -1
- package/dist/components/pos-type-index-entries2.js +1 -1
- package/dist/components/pos-upload2.js +12 -3
- package/dist/components/pos-user-menu2.js +6 -25
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-6561f1b7.entry.js → p-03464a71.entry.js} +1 -1
- package/dist/elements/{p-52a612ed.entry.js → p-272209e3.entry.js} +1 -1
- package/dist/elements/{p-a9a18aa8.entry.js → p-38aa17bc.entry.js} +1 -1
- package/dist/elements/p-3a890f5f.entry.js +1 -0
- package/dist/elements/{p-9ad80b52.entry.js → p-4cd2f9da.entry.js} +1 -1
- package/dist/elements/{p-0e7413e6.entry.js → p-5126fb6e.entry.js} +1 -1
- package/dist/elements/p-53610ccd.entry.js +1 -0
- package/dist/elements/{p-b5d64c6f.entry.js → p-631976a8.entry.js} +1 -1
- package/dist/elements/{p-fe628201.entry.js → p-6d628d74.entry.js} +1 -1
- package/dist/elements/{p-b363349c.entry.js → p-7c3785d8.entry.js} +1 -1
- package/dist/elements/p-8934c5ea.entry.js +1 -0
- package/dist/elements/p-8e76e9dc.entry.js +1 -0
- package/dist/elements/{p-3e18b5dd.entry.js → p-9bf6c310.entry.js} +1 -1
- package/dist/elements/{p-Doy_38_j.js → p-BLUiM5OK.js} +1 -1
- package/dist/elements/{p-BkAnMOpW.js → p-CSTMd_cW.js} +2 -2
- package/dist/elements/{p-CrxYqX8r.js → p-CVwgVrbO.js} +7 -7
- package/dist/elements/{p-8ggjG2YF.js → p-CnIOZlf7.js} +1 -1
- package/dist/elements/p-DHl0QGLf.js +67 -0
- package/dist/elements/p-DzbCx-pP.js +2 -0
- package/dist/elements/{p-c8ee910c.entry.js → p-a1dd6b42.entry.js} +1 -1
- package/dist/elements/p-ab4eba43.entry.js +859 -0
- package/dist/elements/{p-dff14248.entry.js → p-c7032012.entry.js} +1 -1
- package/dist/elements/{p-a20b72d8.entry.js → p-d396cc56.entry.js} +1 -1
- package/dist/elements/p-dc4c38c8.entry.js +1 -0
- package/dist/elements/{p-0a087865.entry.js → p-e0660718.entry.js} +1 -1
- package/dist/elements/{p-8q-RA2Uq.js → p-mIPOXLnA.js} +3 -3
- package/dist/esm/{chunk.URTPIBTY-CNA3-SLq.js → chunk.URTPIBTY-yxgfEQ1K.js} +2 -2
- package/dist/esm/{chunk.XQ2OKYYA-CXNlpYUG.js → chunk.XQ2OKYYA-Cr3bMzqn.js} +3 -3
- package/dist/esm/{chunk.ZGGPD2XJ-BjT6fS1o.js → chunk.ZGGPD2XJ-SJISSXOc.js} +1 -1
- package/dist/esm/{class-map-CUYFUkXU.js → class-map-DEweE_Cr.js} +1 -1
- package/dist/esm/elements.js +4 -4
- package/dist/esm/{index-DFqG64hG.js → index-CXK32bJz.js} +1052 -489
- package/dist/esm/{index-VMHzF3uY.js → index-DzbCx-pP.js} +547 -2001
- package/dist/esm/{jsonld-V2RB47OZ-CaIJ08AA.js → jsonld-V2RB47OZ-BbN7F0s8.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pos-add-literal-value_3.entry.js +6 -6
- package/dist/esm/{pos-add-new-thing_31.entry.js → pos-add-new-thing_32.entry.js} +411 -228
- package/dist/esm/pos-app-document-viewer.entry.js +1 -1
- package/dist/esm/pos-app-generic.entry.js +1 -1
- package/dist/esm/pos-app-image-viewer.entry.js +1 -1
- package/dist/esm/pos-app-ldp-container.entry.js +1 -1
- package/dist/esm/pos-app-rdf-document.entry.js +1 -1
- package/dist/esm/pos-attachments.entry.js +2 -2
- package/dist/esm/pos-case.entry.js +22 -0
- package/dist/esm/pos-container-contents.entry.js +12 -3
- package/dist/esm/pos-container-item_3.entry.js +4 -4
- package/dist/esm/pos-document.entry.js +4 -4
- package/dist/esm/pos-list.entry.js +1 -1
- package/dist/esm/pos-markdown-document.entry.js +442 -2327
- package/dist/esm/pos-relations_2.entry.js +1 -1
- package/dist/esm/pos-subjects.entry.js +2 -2
- package/dist/esm/pos-switch.entry.js +62 -0
- package/dist/esm/pos-tool-attachments.entry.js +2 -2
- package/dist/esm/pos-value.entry.js +1 -1
- package/dist/jest-setup.js +4 -0
- package/dist/types/components/pos-container-contents/pos-container-contents.d.ts +2 -0
- package/dist/types/components/pos-share/openNewTab.d.ts +1 -0
- package/dist/types/components/pos-share/pos-share.d.ts +28 -0
- package/dist/types/components/pos-switch/pos-case/pos-case.d.ts +22 -0
- package/dist/types/components/pos-switch/pos-switch.d.ts +19 -0
- package/dist/types/components.d.ts +300 -74
- package/dist/types/stencil-public-runtime.d.ts +52 -2
- package/package.json +13 -12
- package/dist/elements/p-637a38d9.entry.js +0 -1
- package/dist/elements/p-701f2c84.entry.js +0 -850
- package/dist/elements/p-9b74c400.entry.js +0 -1
- package/dist/elements/p-LoCE14bN.js +0 -67
- package/dist/elements/p-VMHzF3uY.js +0 -2
- package/dist/elements/p-ac17ed6a.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as o,createEvent as r,h as s,transformTag as t}from"@stencil/core/internal/client";import{d as a}from"./pos-label2.js";import{d as i}from"./pos-make-findable2.js";import{d as n}from"./pos-resource2.js";import{d as c}from"./pos-share2.js";const l=e(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.navigate=r(this,"pod-os:navigate",7)}onClick(){this.navigate.emit(this.current)}activate(e){(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),this.navigate.emit(this.current))}render(){const e=this.current?`${this.current.label()} (Click to search or enter URI)`:"Search or enter URI";return s("section",{key:"5f49aa9dad9d07550ee8ffbee90036cbc1efda55",class:"current"},this.current&&this.searchIndexReady&&s("pos-make-findable",{key:"85974a4772aaf8cad3a11cdcd49e6df10141bfe3",uri:this.current.uri}),s("button",{key:"40660a3455b0f3392c68d7aea0075b102a1762a2","aria-label":e,onClick:()=>this.onClick()},s("div",{key:"9ab8922175d701f714f72aefb95745cf5ae4bb95"},this.current?this.current.label():"Search or enter URI"),this.icon()),this.current&&s("pos-share",{key:"3b80c1987f9f5138b11b8a106171fc73a236f426",uri:this.current.uri}))}icon(){return s("svg",{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}static get style(){return"section.current{display:flex;align-items:center;box-sizing:border-box;padding:0 var(--size-2) 0 0;height:var(--pos-navigation-bar-height);flex-grow:1;gap:0;background-color:var(--pos-input-background-color);border-radius:var(--radius-md);width:100%;&:focus-within{outline:var(--pos-input-focus-outline)}button{cursor:pointer;font-size:var(--scale-1);display:flex;align-items:center;justify-content:center;flex-grow:1;background:none;color:var(--pos-normal-text-color);outline:none;border:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&:focus{text-decoration:underline}:first-child{flex-grow:1}svg{width:var(--size-6);color:var(--pos-subtle-text-color)}}pos-share{height:80%;&:hover{&::part(button){color:var(--pos-primary-color);background-color:var(--pos-border-color);border-radius:var(--radius-full)}}&::part(button){font-size:var(--size-4);background:none;outline:none;border:none;color:var(--pos-subtle-text-color)}}}"}},[1,"pos-navigation-bar",{current:[16],searchIndexReady:[4,"search-index-ready"]},[[4,"keydown","activate"]]]);function d(){"undefined"!=typeof customElements&&["pos-navigation-bar","pos-label","pos-make-findable","pos-resource","pos-share"].forEach((e=>{switch(e){case"pos-navigation-bar":customElements.get(t(e))||customElements.define(t(e),l);break;case"pos-label":customElements.get(t(e))||a();break;case"pos-make-findable":customElements.get(t(e))||i();break;case"pos-resource":customElements.get(t(e))||n();break;case"pos-share":customElements.get(t(e))||c()}}))}export{l as P,d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as o,HTMLElement as
|
|
1
|
+
import{proxyCustomElement as o,HTMLElement as s,createEvent as i,h as e,transformTag as t}from"@stencil/core/internal/client";import{c as a}from"./index3.js";import{s as r}from"./session.js";import{s as n}from"./PodOsAware.js";import{d as l}from"./pos-description2.js";import{d}from"./pos-label2.js";import{d as c}from"./pos-make-findable2.js";import{d as h}from"./pos-navigation-bar2.js";import{d as p}from"./pos-resource2.js";import{d as u}from"./pos-rich-link2.js";import{d as m}from"./pos-share2.js";const g=o(class extends s{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.subscribePodOs=i(this,"pod-os:init",7),this.linkEmitter=i(this,"pod-os:link",7),this.uri="",this.inputValue=this.uri,this.searchIndex=void 0,this.suggestions=[],this.selectedIndex=-1,this.resource=null,this.changeEvents=new a.Subject,this.debouncedSearch=null,this.receivePodOs=async o=>{this.os=o}}updateResource(){var o;try{this.resource=this.uri?null===(o=this.os)||void 0===o?void 0:o.store.get(this.uri):null}catch(o){this.resource=null}}componentWillLoad(){n(this),this.updateResource(),r.onChange("isLoggedIn",(async o=>{o?await this.buildSearchIndex():this.clearSearchIndex()})),this.debouncedSearch=this.changeEvents.pipe(a.debounceTime(300)).subscribe((()=>this.search()))}disconnectedCallback(){var o;null===(o=this.debouncedSearch)||void 0===o||o.unsubscribe()}async buildSearchIndex(){this.searchIndex=await this.os.buildSearchIndex(r.state.profile)}rebuildSearchIndex(){this.searchIndex.rebuild()}openNavigationDialog(o){var s,i;this.resource=o.detail,o.detail&&(this.inputValue=o.detail.uri,this.search()),null===(s=this.inputRef)||void 0===s||s.select(),null===(i=this.dialogRef)||void 0===i||i.show()}clearSearchIndex(){var o;null===(o=this.searchIndex)||void 0===o||o.clear()}onChange(o){this.inputValue=o.target.value,this.changeEvents.next()}closeDialog(){var o;null===(o=this.dialogRef)||void 0===o||o.close(),this.selectedIndex=-1}clearSuggestions(){var o;this.suggestions=[],null===(o=this.dialogRef)||void 0===o||o.close(),this.selectedIndex=-1}onClickSelf(o){o.stopPropagation()}handleKeyDown(o){"Escape"===o.key?this.closeDialog():"ArrowDown"===o.key?(o.preventDefault(),this.selectedIndex=Math.min(this.selectedIndex+1,this.suggestions.length-1)):"ArrowUp"===o.key&&(o.preventDefault(),this.selectedIndex=Math.max(this.selectedIndex-1,0))}search(){this.searchIndex&&(this.suggestions=this.inputValue?this.searchIndex.search(this.inputValue):[])}onSubmit(){this.linkEmitter.emit(this.suggestions&&this.selectedIndex>-1?this.suggestions[this.selectedIndex].ref:this.inputValue)}render(){return e("nav",{key:"d5ad4841674cf172e9401a63fc50e58900ca5b1f"},e("search",{key:"8daf86774c49234d10637160fd983681ac483b44"},e("pos-navigation-bar",{key:"200137643dbc0aa1f120c231dc70a0d3f71b596a",searchIndexReady:void 0!==this.searchIndex,current:this.resource}),e("dialog",{key:"f2fb1d3e4a38d17efb6bd80ca791e8a30fafab66",ref:o=>this.dialogRef=o},e("form",{key:"e54698d8fb968a5ee6007cc4d5644fec36bf74f3",method:"dialog",onSubmit:()=>this.onSubmit()},e("input",{key:"633a4030c6296b5c94e2661bd73168afc1e04438",ref:o=>this.inputRef=o,enterkeyhint:"search","aria-label":"Search or enter URI",placeholder:"Search or enter URI",value:this.uri,onChange:o=>this.onChange(o),onInput:o=>this.onChange(o),role:"combobox","aria-autocomplete":"list","aria-expanded":this.suggestions.length>0,"aria-controls":"suggestions-list","aria-activedescendant":this.selectedIndex>=0?`option-${this.selectedIndex}`:null}),this.suggestions.length>0?e("div",{class:"suggestions"},e("ol",{id:"suggestions-list",role:"listbox","aria-label":"Search results"},this.suggestions.map(((o,s)=>e("li",{id:`option-${s}`,role:"option","aria-selected":s===this.selectedIndex?"true":"false"},e("pos-rich-link",{uri:o.ref})))))):null))))}static get watchers(){return{uri:[{updateResource:0}],os:[{updateResource:0}]}}static get style(){return":host{--pos-navigation-bar-height:var(--size-10)}search{position:relative}.suggestions ol{border:1px solid var(--pos-border-color);display:flex;flex-direction:column;margin:0;padding:0;list-style-type:none}.suggestions{width:100%;overflow-y:auto;max-height:90dvh;li{padding:1rem;background-color:var(--pos-background-color);pos-rich-link{--background-color:inherit}&[aria-selected='true']{background-color:var(--pos-primary-color);&:hover{background-color:var(--pos-primary-color)}}&:hover{background-color:var(--pos-border-color)}}}.suggestions li.selected pos-rich-link{--label-color:white;--description-color:var(--pos-border-color);--uri-color:var(--pos-subtle-text-color)}dialog{position:absolute;margin-top:calc(-1 * var(--pos-navigation-bar-height));padding:0;width:100%;max-width:100%;min-width:100%;overflow:hidden;max-height:100dvh;background-color:var(--pos-background-color);color:var(--pos-normal-text-color);border:var(--pos-border-color);border-radius:var(--radius-md);box-shadow:var(--shadow-md);form{display:flex;flex-direction:column;height:100%;width:100%;align-items:center;input{display:flex;font-size:var(--scale-1);height:var(--pos-navigation-bar-height);border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md);padding-left:var(--size-2);width:100%;border:none;outline:none;color:var(--pos-normal-text-color);background-color:var(--pos-input-background-color);box-sizing:border-box}}}dialog[open]{display:flex;z-index:var(--layer-top);animation:slideIn 100ms ease-out}@media (max-width: 640px){search{position:unset}dialog{margin-top:var(--size-1);top:0;width:95dvw;max-width:unset;min-width:unset;form{input{height:var(--size-12);font-size:var(--scale-fluid-3)}}}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}"}},[1,"pos-navigation",{uri:[1],os:[32],inputValue:[32],searchIndex:[32],suggestions:[32],selectedIndex:[32],resource:[32]},[[0,"pod-os:search:index-created","buildSearchIndex"],[0,"pod-os:search:index-updated","rebuildSearchIndex"],[0,"pod-os:navigate","openNavigationDialog"],[4,"click","closeDialog"],[0,"pod-os:link","clearSuggestions"],[0,"click","onClickSelf"],[0,"keydown","handleKeyDown"]],{uri:[{updateResource:0}],os:[{updateResource:0}]}]);function b(){"undefined"!=typeof customElements&&["pos-navigation","pos-description","pos-label","pos-make-findable","pos-navigation-bar","pos-resource","pos-rich-link","pos-share"].forEach((o=>{switch(o){case"pos-navigation":customElements.get(t(o))||customElements.define(t(o),g);break;case"pos-description":customElements.get(t(o))||l();break;case"pos-label":customElements.get(t(o))||d();break;case"pos-make-findable":customElements.get(t(o))||c();break;case"pos-navigation-bar":customElements.get(t(o))||h();break;case"pos-resource":customElements.get(t(o))||p();break;case"pos-rich-link":customElements.get(t(o))||u();break;case"pos-share":customElements.get(t(o))||m()}}))}export{g as P,b as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as s,h as i,transformTag as o}from"@stencil/core/internal/client";import{s as r}from"./PodOsAware.js";import{d as a}from"./pos-select-term2.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.linkEmitter=s(this,"pod-os:link",7),this.errorEmitter=s(this,"pod-os:error",7),this.subscribePodOs=s(this,"pod-os:init",7),this.canSubmit=!1,this.receivePodOs=async e=>{this.os=e}}validate(){this.canSubmit=Boolean(this.name&&this.selectedTypeUri)}componentWillLoad(){r(this)}render(){return i("form",{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as s,h as i,transformTag as o}from"@stencil/core/internal/client";import{s as r}from"./PodOsAware.js";import{d as a}from"./pos-select-term2.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.linkEmitter=s(this,"pod-os:link",7),this.errorEmitter=s(this,"pod-os:error",7),this.subscribePodOs=s(this,"pod-os:init",7),this.canSubmit=!1,this.receivePodOs=async e=>{this.os=e}}validate(){this.canSubmit=Boolean(this.name&&this.selectedTypeUri)}componentWillLoad(){r(this)}render(){return i("form",{key:"64781cfb0e570d2368325d674c6637c581bb87c2",method:"dialog",onSubmit:e=>this.handleSubmit(e)},i("label",{key:"409e04f147430042eb334024fc7061574ab543cf",htmlFor:"type"},"Type"),i("pos-select-term",{key:"8d5d580ee1f1e2e2c60cac0cc06798e94a0d28c3",id:"type",placeholder:"",value:this.selectedTypeUri,"onPod-os:term-selected":e=>this.onTermSelected(e)}),i("label",{key:"a45199618751e24b7d4a1bc13ad85c599cc93d1c",htmlFor:"name"},"Name"),i("input",{key:"bee3be7a680abbffc08caa5c549b68b1e653872d",id:"name",type:"text",value:this.name,onInput:e=>this.handleChange(e)}),this.newUri?i("div",{id:"new-uri",title:"This will be the URI of the new thing"},this.newUri):null,i("input",{key:"e8fab4d442188f7f2f325ff7bde3dce6d3f772f6",id:"create",type:"submit",value:"Create",disabled:!this.canSubmit}))}handleChange(e){this.name=e.target.value,this.newUri=this.os.proposeUriForNewThing(this.referenceUri,this.name)}onTermSelected(e){this.selectedTypeUri=e.detail.uri}async handleSubmit(e){try{await this.os.addNewThing(this.newUri,this.name,this.selectedTypeUri),this.linkEmitter.emit(this.newUri),this.reset()}catch(t){e.preventDefault(),this.errorEmitter.emit(t)}}reset(){this.name="",this.newUri="",this.selectedTypeUri=""}static get delegatesFocus(){return!0}static get watchers(){return{name:[{validate:0}],selectedTypeUri:[{validate:0}]}}static get style(){return":host{display:block}form{display:grid;grid-template-columns:var(--size-16) 1fr;grid-gap:var(--scale-0)}label{grid-column:1 / 2;display:flex;align-items:center;justify-content:flex-end}input,pos-select-term,button{grid-column:2 / 3}input,pos-select-term::part(input){outline:var(--pos-input-outline);padding:var(--scale-000);border:none;border-radius:var(--radius-xs);width:var(--size-full);box-sizing:border-box;background:var(--pos-input-background-color);color:var(--pos-normal-text-color)}input:focus-within,pos-select-term::part(input):focus-within{outline:var(--pos-input-focus-outline)}#new-uri{grid-column:1/3;cursor:default;word-break:break-all;color:var(--pos-normal-text-color);font-weight:var(--weight-light);background:var(--pos-disabled-color);padding:var(--scale-000);border-radius:var(--radius-xs)}input#create{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#create:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#create:hover:not(:disabled),input#create:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}"}},[17,"pos-new-thing-form",{referenceUri:[1,"reference-uri"],os:[32],newUri:[32],name:[32],selectedTypeUri:[32],canSubmit:[32]},void 0,{name:[{validate:0}],selectedTypeUri:[{validate:0}]}]);function c(){"undefined"!=typeof customElements&&["pos-new-thing-form","pos-select-term"].forEach((e=>{switch(e){case"pos-new-thing-form":customElements.get(o(e))||customElements.define(o(e),n);break;case"pos-select-term":customElements.get(o(e))||a()}}))}export{n as P,c as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getRenderingRef as e,forceUpdate as t,proxyCustomElement as n,HTMLElement as s,createEvent as o,h as r,transformTag as i}from"@stencil/core/internal/client";const c=e=>!("isConnected"in e)||e.isConnected,u=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(c))})(...t)}),2e3)}})(),a=(e,t)=>{if("string"==typeof t){if(t===e)return{}}else if("function"==typeof t){const n=t(e);if(n)return!0===n?{}:{...n}}else{const n=t.exec(e);if(n)return t.lastIndex=0,{...n}}},l=e=>e.pathname.toLowerCase(),d=(()=>{const n=window,s=new URL(n.location.href),o=l,{state:r,onChange:i,dispose:c}=((n,s)=>{const o=((e,t=(e,t)=>e!==t)=>{let n=new Map(Object.entries(null!=e?e:{}));const s={dispose:[],get:[],set:[],reset:[]},o=()=>{n=new Map(Object.entries(null!=e?e:{})),s.reset.forEach((e=>e()))},r=e=>(s.get.forEach((t=>t(e))),n.get(e)),i=(e,o)=>{const r=n.get(e);t(o,r,e)&&(n.set(e,o),s.set.forEach((t=>t(e,o,r))))},c="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>r(t),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>n.has(t),set:(e,t,n)=>(i(t,n),!0)}),u=(e,t)=>(s[e].push(t),()=>{((e,t)=>{const n=e.indexOf(t);n>=0&&(e[n]=e[e.length-1],e.length--)})(s[e],t)});return{state:c,get:r,set:i,on:u,onChange:(t,n)=>{const s=u("set",((e,s)=>{e===t&&n(s)})),o=u("reset",(()=>n(e[t])));return()=>{s(),o()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(u("set",t.set)),t.get&&e.push(u("get",t.get)),t.reset&&e.push(u("reset",t.reset)),t.dispose&&e.push(u("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{s.dispose.forEach((e=>e())),o()},reset:o,forceUpdate:e=>{const t=n.get(e);s.set.forEach((n=>n(e,t,t)))}}})(n,s);return o.use((()=>{if("function"!=typeof e)return{};const n=new Map;return{dispose:()=>n.clear(),get:t=>{const s=e();s&&((e,t,n)=>{const s=e.get(t);s?s.includes(n)||s.push(n):e.set(t,[n])})(n,t,s)},set:e=>{const s=n.get(e);s&&n.set(e,s.filter(t)),u(n)},reset:()=>{n.forEach((e=>e.forEach(t))),u(n)}}})()),o})({url:s,activePath:o(s)},((e,t,n)=>"url"===n?e.href!==t.href:e!==t)),d=e=>{history.pushState(null,null,e);const t=new URL(e,document.baseURI);r.url=t,r.activePath=o(t)},p=e=>{const{activePath:t}=r;for(let n of e){const s=a(t,n.path);if(s){if(null!=n.to){const s="string"==typeof n.to?n.to:n.to(t);return d(s),p(e)}return{params:s,route:n}}}},f=()=>{const e=new URL(n.location.href);r.url=e,r.activePath=o(e)},h={Switch:(e,t)=>{const n=p(t);if(n)return"function"==typeof n.route.jsx?n.route.jsx(n.params):n.route.jsx},get url(){return r.url},get activePath(){return r.activePath},push:d,onChange:i,dispose:()=>{n.removeEventListener("popstate",f),c()}};return f(),n.addEventListener("popstate",f),h})(),p=n(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.routeChanged=o(this,"pod-os:route-changed",7),this.mode="standalone"}linkClicked(e){this.navigate(e.detail)}sessionRestored(e){d.push(e.detail.url)}componentWillLoad(){this.updateUri(),d.onChange("url",(()=>{this.updateUri()}))}navigate(e){d.push("?uri="+encodeURIComponent(e))}updateUri(){this.uri=new URLSearchParams(window.location.search).get("uri")||("standalone"===this.mode?"pod-os:dashboard":window.location.href),this.routeChanged.emit(this.uri)}render(){return r("slot",{key:"
|
|
1
|
+
import{getRenderingRef as e,forceUpdate as t,proxyCustomElement as n,HTMLElement as s,createEvent as o,h as r,transformTag as i}from"@stencil/core/internal/client";const c=e=>!("isConnected"in e)||e.isConnected,u=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(c))})(...t)}),2e3)}})(),a=(e,t)=>{if("string"==typeof t){if(t===e)return{}}else if("function"==typeof t){const n=t(e);if(n)return!0===n?{}:{...n}}else{const n=t.exec(e);if(n)return t.lastIndex=0,{...n}}},l=e=>e.pathname.toLowerCase(),d=(()=>{const n=window,s=new URL(n.location.href),o=l,{state:r,onChange:i,dispose:c}=((n,s)=>{const o=((e,t=(e,t)=>e!==t)=>{let n=new Map(Object.entries(null!=e?e:{}));const s={dispose:[],get:[],set:[],reset:[]},o=()=>{n=new Map(Object.entries(null!=e?e:{})),s.reset.forEach((e=>e()))},r=e=>(s.get.forEach((t=>t(e))),n.get(e)),i=(e,o)=>{const r=n.get(e);t(o,r,e)&&(n.set(e,o),s.set.forEach((t=>t(e,o,r))))},c="undefined"==typeof Proxy?{}:new Proxy(e,{get:(e,t)=>r(t),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>n.has(t),set:(e,t,n)=>(i(t,n),!0)}),u=(e,t)=>(s[e].push(t),()=>{((e,t)=>{const n=e.indexOf(t);n>=0&&(e[n]=e[e.length-1],e.length--)})(s[e],t)});return{state:c,get:r,set:i,on:u,onChange:(t,n)=>{const s=u("set",((e,s)=>{e===t&&n(s)})),o=u("reset",(()=>n(e[t])));return()=>{s(),o()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(u("set",t.set)),t.get&&e.push(u("get",t.get)),t.reset&&e.push(u("reset",t.reset)),t.dispose&&e.push(u("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{s.dispose.forEach((e=>e())),o()},reset:o,forceUpdate:e=>{const t=n.get(e);s.set.forEach((n=>n(e,t,t)))}}})(n,s);return o.use((()=>{if("function"!=typeof e)return{};const n=new Map;return{dispose:()=>n.clear(),get:t=>{const s=e();s&&((e,t,n)=>{const s=e.get(t);s?s.includes(n)||s.push(n):e.set(t,[n])})(n,t,s)},set:e=>{const s=n.get(e);s&&n.set(e,s.filter(t)),u(n)},reset:()=>{n.forEach((e=>e.forEach(t))),u(n)}}})()),o})({url:s,activePath:o(s)},((e,t,n)=>"url"===n?e.href!==t.href:e!==t)),d=e=>{history.pushState(null,null,e);const t=new URL(e,document.baseURI);r.url=t,r.activePath=o(t)},p=e=>{const{activePath:t}=r;for(let n of e){const s=a(t,n.path);if(s){if(null!=n.to){const s="string"==typeof n.to?n.to:n.to(t);return d(s),p(e)}return{params:s,route:n}}}},f=()=>{const e=new URL(n.location.href);r.url=e,r.activePath=o(e)},h={Switch:(e,t)=>{const n=p(t);if(n)return"function"==typeof n.route.jsx?n.route.jsx(n.params):n.route.jsx},get url(){return r.url},get activePath(){return r.activePath},push:d,onChange:i,dispose:()=>{n.removeEventListener("popstate",f),c()}};return f(),n.addEventListener("popstate",f),h})(),p=n(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.routeChanged=o(this,"pod-os:route-changed",7),this.mode="standalone"}linkClicked(e){this.navigate(e.detail)}sessionRestored(e){d.push(e.detail.url)}componentWillLoad(){this.updateUri(),d.onChange("url",(()=>{this.updateUri()}))}navigate(e){d.push("?uri="+encodeURIComponent(e))}updateUri(){this.uri=new URLSearchParams(window.location.search).get("uri")||("standalone"===this.mode?"pod-os:dashboard":window.location.href),this.routeChanged.emit(this.uri)}render(){return r("slot",{key:"2775fc2835158ccd8d540e4f27edfd497eafe7a9"})}static get style(){return".toolbar{display:flex;flex-direction:row;gap:0;align-items:center;margin-left:0.5rem}pos-navigation{flex-grow:1}"}},[260,"pos-router",{mode:[1],uri:[32]},[[0,"pod-os:link","linkClicked"],[8,"pod-os:session-restored","sessionRestored"]]]);function f(){"undefined"!=typeof customElements&&["pos-router"].forEach((e=>{"pos-router"===e&&(customElements.get(i(e))||customElements.define(i(e),p))}))}export{p as P,f as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as o,Host as r,transformTag as i}from"@stencil/core/internal/client";import{s as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as o,Host as r,transformTag as i}from"@stencil/core/internal/client";import{s as n}from"./PodOsAware.js";const a=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.subscribePodOs=s(this,"pod-os:init",7),this.termSelected=s(this,"pod-os:term-selected",7),this.placeholder="Type to search...",this.value="",this.terms=[],this.receivePodOs=async t=>{this.os=t}}componentWillLoad(){n(this)}setTerms(){this.terms=this.os.listKnownTerms()}handleChange(t){this.termSelected.emit({uri:t.target.value})}render(){return o(r,{key:"a4050d72acd62d907f0fd4c3b90c54194700871c"},o("input",{key:"99b35c4a14a2623599ba237bb4af0b79c0761196",part:"input",list:"terms",placeholder:this.placeholder,value:this.value,onChange:t=>this.handleChange(t)}),o("datalist",{key:"d64ad5ea83200014c6de5cd4720f29922494982c",part:"terms",id:"terms"},this.terms.map((t=>o("option",{value:t.uri},t.shorthand)))))}static get delegatesFocus(){return!0}static get watchers(){return{os:[{setTerms:0}]}}static get style(){return":host{display:block}input{background-color:transparent;color:var(--pos-normal-text-color);border:none;padding-top:1rem;padding-bottom:1rem}input:focus{outline:none}"}},[17,"pos-select-term",{placeholder:[1],value:[1],os:[32],terms:[32]},void 0,{os:[{setTerms:0}]}]);function c(){"undefined"!=typeof customElements&&["pos-select-term"].forEach((t=>{"pos-select-term"===t&&(customElements.get(i(t))||customElements.define(i(t),a))}))}export{a as P,c as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PosShare extends Components.PosShare, HTMLElement {}
|
|
4
|
+
export const PosShare: {
|
|
5
|
+
prototype: PosShare;
|
|
6
|
+
new (): PosShare;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{P as s,d as o}from"./pos-share2.js";const r=s,a=o;export{r as PosShare,a as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as s,transformTag as i}from"@stencil/core/internal/client";import"./chunk.ZGGPD2XJ.js";import"./chunk.YHLNUJ7P.js";import"./chunk.4TUIT776.js";import"./chunk.HVTXQL7M.js";import"./chunk.5JY5FUCG.js";import"./chunk.6CTB5ZDJ.js";import"./chunk.IVVHNXMC.js";import{u as a}from"./usePodOS.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.apps=[]}async resourceLoaded(e){e.detail===this.uri&&await this.updateApps()}async componentWillLoad(){this.os=await a(this.el),await this.updateApps()}async updateApps(){const e=this.os.store.get(this.uri);this.apps=this.os.proposeAppsFor(e)}onSelect(e){const{value:t}=e.detail.item;var s;"copy-uri"===t?navigator.clipboard.writeText(this.uri):(s=t.urlTemplate.expand({uri:this.uri}),window.open(s.toString(),"_blank"))}render(){return s("sl-dropdown",{key:"67ce5a1f7e5630ff40a6e79eaa9ab7f32b5f1a00"},s("button",{key:"6c946718e7af9f0ef212c3853641f06a24d79474",slot:"trigger","aria-label":"Share",part:"button"},s("sl-icon",{key:"effc4e9bdf4236451636f1b4622605c87746d414",name:"share"})),s("sl-menu",{key:"2f1c8e707e71a699803c2897fda8f1e79ccd5267"},s("sl-menu-item",{key:"5a59cffe8351c23389620b38b60f8ccd24dce351",value:"copy-uri"},s("sl-icon",{key:"ab9b9d7f8a2a91e0a4f5ac657b9ff390418948cc",slot:"prefix",name:"copy"}),"Copy URI"),this.apps.length>0&&s(r,{key:"718fbda37b7171df356afe02e6d6f7f1e8e8cd26",apps:this.apps})))}get el(){return this}static get watchers(){return{uri:[{updateApps:0}]}}static get style(){return":host{display:flex;aspect-ratio:1/1;height:var(--size-8);align-items:center;justify-content:center}sl-dropdown{height:100%;width:100%;display:flex;align-items:center;justify-content:center;&::part(trigger){height:100%;width:100%}button{display:flex;align-items:center;justify-content:center;height:100%;width:100%;cursor:pointer;padding:0;margin:0}}sl-menu-item[disabled]{&::part(base){cursor:default;opacity:1}}"}},[1,"pos-share",{uri:[1],apps:[32],os:[32]},[[4,"pod-os:resource-loaded","resourceLoaded"],[0,"sl-select","onSelect"]],{uri:[{updateApps:0}]}]);function r({apps:e}){return[s("sl-divider",null),s("sl-menu-item",{disabled:!0},"Open with..."),e.map((e=>s("sl-menu-item",{value:e},e.name)))]}function c(){"undefined"!=typeof customElements&&["pos-share"].forEach((e=>{"pos-share"===e&&(customElements.get(i(e))||customElements.define(i(e),n))}))}export{n as P,c as d}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PosSwitch extends Components.PosSwitch, HTMLElement {}
|
|
4
|
+
export const PosSwitch: {
|
|
5
|
+
prototype: PosSwitch;
|
|
6
|
+
new (): PosSwitch;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as n,Host as o,transformTag as i}from"@stencil/core/internal/client";import{s as r}from"./ResourceAware.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.subscribeResource=e(this,"pod-os:resource",7),this.error=null,this.receiveResource=t=>{this.resource=t}}componentWillLoad(){r(this);const t=this.host.querySelectorAll("pos-case");0==t.length?this.error="No pos-case elements found":this.caseElements=t}test(t){let s=null;return null!==t.getAttribute("if-typeof")&&(s=this.resource.types().map((t=>t.uri)).includes(t.getAttribute("if-typeof"))),null!=t.getAttribute("not")&&(s=!s),s}render(){if(this.error)return this.error;if(!this.resource)return null;let t=null,s=[];this.caseElements.forEach((e=>{const n=this.test(e),o=!0!==t||null===e.getAttribute("else");n&&o&&(t=n,s.push(e)),null===n&&o&&s.push(e)}));const e=s.map((t=>t.querySelector("template").innerHTML)).join("\n");return n(o,{innerHTML:e})}get host(){return this}},[0,"pos-switch",{error:[32],resource:[32],caseElements:[32],templateString:[32]}]),c=l,u=function(){"undefined"!=typeof customElements&&["pos-switch"].forEach((t=>{"pos-switch"===t&&(customElements.get(i(t))||customElements.define(i(t),l))}))};export{c as PosSwitch,u as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as s,h as a,Host as o,transformTag as t}from"@stencil/core/internal/client";import{u as r}from"./usePodOS.js";import{u as i,d as c}from"./pos-attachments2.js";import{d as n}from"./pos-description2.js";import{d as l}from"./pos-label2.js";import{d as p}from"./pos-resource2.js";import{d}from"./pos-rich-link2.js";import{d as m}from"./pos-upload2.js";const
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as s,h as a,Host as o,transformTag as t}from"@stencil/core/internal/client";import{u as r}from"./usePodOS.js";import{u as i,d as c}from"./pos-attachments2.js";import{d as n}from"./pos-description2.js";import{d as l}from"./pos-label2.js";import{d as p}from"./pos-resource2.js";import{d}from"./pos-rich-link2.js";import{d as m}from"./pos-upload2.js";const f=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}async componentWillLoad(){this.os=await r(this.el),this.resource=await i(this.el)}render(){var e;return a(o,{key:"90a688233dde6bed413d57c11d89833629e1e2c8"},a("section",{key:"d47427736806216b35cb5e77bcabf12b82a03b31"},a("article",{key:"a77c2f9e41165effdc6e41fed79fa6b48dcc753e"},a("h2",{key:"5e4d9a23ceb3c88075ef7785ca1b6fba201714ca"},"Attachments"),a("pos-attachments",{key:"6a1001d633b0cad66178818b7a32c76ebbc4e46c",ref:e=>this.attachmentsElement=e}))),a("section",{key:"ea6c933f2a5fb67d6e63ca799c14920361eafe1f"},(null===(e=this.resource)||void 0===e?void 0:e.editable)?a("pos-upload",{accept:["*/*"],uploader:e=>{const s=this.os.attachments().uploadAndAddAttachment(this.resource,e);return s.map((s=>{this.attachmentsElement.addToList({uri:s.url,label:e.name})})),s}}):null))}get el(){return this}static get style(){return":host{display:flex;flex-direction:column;gap:var(--size-1);h2{margin:0;padding:0;font-size:var(--scale-2)}}:host{--gap-size:var(--size-1);display:flex;flex-direction:column;gap:var(--gap-size);margin:var(--gap-size)}section{display:flex;flex-direction:column;gap:var(--gap-size)}@media (min-width: 640px){:host{--gap-size:var(--size-4);flex-direction:row;flex-wrap:wrap;section{&:first-of-type{flex:1}}section:not(:first-of-type){flex:0 0 30%}}}article{padding:var(--size-2);display:flex;flex-direction:column;gap:var(--size-2);outline:var(--pos-border-solid);border-radius:var(--radius-sm);box-shadow:var(--shadow-md);background-color:var(--pos-card-background);header{display:flex;flex-direction:column;gap:var(--size-2);h1{margin:0}}}"}},[1,"pos-tool-attachments",{os:[32],resource:[32]}]),u=f,h=function(){"undefined"!=typeof customElements&&["pos-tool-attachments","pos-attachments","pos-description","pos-label","pos-resource","pos-rich-link","pos-upload"].forEach((e=>{switch(e){case"pos-tool-attachments":customElements.get(t(e))||customElements.define(t(e),f);break;case"pos-attachments":customElements.get(t(e))||c();break;case"pos-description":customElements.get(t(e))||n();break;case"pos-label":customElements.get(t(e))||l();break;case"pos-resource":customElements.get(t(e))||p();break;case"pos-rich-link":customElements.get(t(e))||d();break;case"pos-upload":customElements.get(t(e))||m()}}))};export{u as PosToolAttachments,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as o,createEvent as e,h as r,transformTag as i}from"@stencil/core/internal/client";import"./chunk.ZGGPD2XJ.js";import"./chunk.YHLNUJ7P.js";import"./chunk.4TUIT776.js";const s=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.toolSelected=e(this,"pod-os:tool-selected",7),this.tools=[]}render(){return this.tools.length>1?r("div",{role:"tablist","aria-label":"Tools","aria-multiselectable":"false"},this.tools.map((t=>{var o;return r("button",{role:"tab","aria-selected":(null===(o=this.selected)||void 0===o?void 0:o.element)===t.element,onClick:()=>this.toolSelected.emit(t)},r("sl-icon",{name:t.icon}),r("span",{class:"text"},t.label))}))):null}static get style(){return":host { --button-size: var(--size-16); display: block; position: sticky; align-self: flex-start; top: 0; overflow: auto; min-width: var(--button-size); z-index: var(--layer-1); } [role='tablist'] { display: flex; flex-direction: column; justify-content: center; border-right: var(--size-px) solid var(--pos-border-color); button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; font-size: var(--size-6); position: relative; overflow: hidden; outline: none; border: none; width: var(--button-size); min-width: var(--button-size); height: var(--button-size); min-height: var(--button-size); color: var(--pos-normal-text-color); background-color: var(--pos-background-color); &::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 100%; background: color-mix(in srgb, var(--pos-primary-color), transparent 50%); transform: translate(-50%, -50%); opacity: 1; } &:active::after, &:focus::after { width: calc(var(--button-size) * 1.5); height: calc(var(--button-size) * 1.5); opacity: 0; transition: width 0.5s ease-out, height 0.5s ease-out, opacity 1s ease-out; } &:focus-visible { border: var(--size-px) solid var(--pos-primary-color); } @media (min-width: 640px) { &[aria-selected] { border-right: var(--size-1) solid var(--pos-primary-color); } } .text { font-size: var(--size-3); white-space: nowrap; text-overflow: ellipsis; width: 100%; overflow: hidden; } } } @media (max-width: 640px) { :host { position: fixed; top: unset; bottom: 0; width: 100dvw; } [role='tablist'] { flex-direction: row; background-color: var(--pos-background-color); border-top: var(--size-px) solid var(--pos-border-color); button { &[aria-selected] { border-top: var(--size-1) solid var(--pos-primary-color); } } } } "}},[1,"pos-tool-select",{selected:[16],tools:[16]}]);function a(){"undefined"!=typeof customElements&&["pos-tool-select"].forEach((t=>{"pos-tool-select"===t&&(customElements.get(i(t))||customElements.define(i(t),s))}))}export{s as P,a as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as s,HTMLElement as e,h as t,transformTag as
|
|
1
|
+
import{proxyCustomElement as s,HTMLElement as e,h as t,transformTag as o}from"@stencil/core/internal/client";import{u as i}from"./usePodOS.js";import{T as r}from"./index2.js";import{d as n}from"./pos-description2.js";import{d as l}from"./pos-label2.js";import{d as c}from"./pos-predicate2.js";import{d as p}from"./pos-resource2.js";import{d as a}from"./pos-rich-link2.js";const m=s(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow()}async componentWillLoad(){const s=await i(this.el);s.store.get(this.uri);const e=s.store.get(this.uri).assume(r);this.entries=e.listAll()}render(){if(0===this.entries.length)return null;const s=this.entries.map((s=>t("div",null,t("dt",null,t("pos-predicate",{uri:s.forClass,label:s.label})),s.targets.map((s=>t("dd",null,t("pos-rich-link",{uri:s.uri})))))));return t("dl",null,s)}get el(){return this}static get style(){return"dl { > * { display: flex; flex-direction: column; gap: var(--size-1); } display: flex; flex-direction: column; gap: var(--size-4); dd { margin: 0; } } "}},[1,"pos-type-index-entries",{uri:[1],entries:[32]}]);function d(){"undefined"!=typeof customElements&&["pos-type-index-entries","pos-description","pos-label","pos-predicate","pos-resource","pos-rich-link"].forEach((s=>{switch(s){case"pos-type-index-entries":customElements.get(o(s))||customElements.define(o(s),m);break;case"pos-description":customElements.get(o(s))||n();break;case"pos-label":customElements.get(o(s))||l();break;case"pos-predicate":customElements.get(o(s))||c();break;case"pos-resource":customElements.get(o(s))||p();break;case"pos-rich-link":customElements.get(o(s))||a()}}))}export{m as P,d}
|