@pod-os/elements 0.36.0 → 0.37.0-rc.0b98c3c.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-FtbhZr1d.js} +2 -2
- package/dist/cjs/{chunk.XQ2OKYYA-DEkhm1i7.js → chunk.XQ2OKYYA-BpcNJ_Ey.js} +3 -3
- package/dist/cjs/{chunk.ZGGPD2XJ-uKZZdqOH.js → chunk.ZGGPD2XJ-DZsyTFqB.js} +1 -1
- package/dist/cjs/{class-map-DAZXfKKA.js → class-map-CF_MMTnq.js} +1 -1
- package/dist/cjs/elements.cjs.js +3 -3
- package/dist/cjs/{index-DCpu_nnH.js → index-CtUr8eOE.js} +525 -1988
- package/dist/cjs/{index-FUnpyb19.js → index-LDTTta4S.js} +863 -551
- package/dist/cjs/{jsonld-V2RB47OZ-BerQ9IRa.js → jsonld-V2RB47OZ-BWMHCZBW.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} +109 -61
- 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 +2 -2
- 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 +2 -2
- 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 +4 -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-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 +100 -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-make-findable2.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 +1 -1
- package/dist/components/pos-user-menu2.js +6 -25
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-9ad80b52.entry.js → p-07347eaf.entry.js} +1 -1
- package/dist/elements/{p-a9a18aa8.entry.js → p-23465966.entry.js} +1 -1
- package/dist/elements/{p-c8ee910c.entry.js → p-3ab681fe.entry.js} +1 -1
- package/dist/elements/{p-dff14248.entry.js → p-43ec0395.entry.js} +1 -1
- package/dist/elements/p-48f3b092.entry.js +1 -0
- package/dist/elements/{p-fe628201.entry.js → p-5b3f911d.entry.js} +1 -1
- package/dist/elements/{p-6561f1b7.entry.js → p-5d3c9c45.entry.js} +1 -1
- package/dist/elements/p-76e4882d.entry.js +1 -0
- package/dist/elements/{p-701f2c84.entry.js → p-780b0e14.entry.js} +34 -34
- package/dist/elements/p-9827b860.entry.js +1 -0
- package/dist/elements/p-98f9f7d6.entry.js +1 -0
- package/dist/elements/p-BKjkoLi4.js +2 -0
- package/dist/elements/{p-BkAnMOpW.js → p-Bc1EKYmT.js} +4 -4
- package/dist/elements/{p-Doy_38_j.js → p-CdRXVHZH.js} +1 -1
- package/dist/elements/p-CelEckSK.js +11 -0
- package/dist/elements/p-DEDHdpnD.js +67 -0
- package/dist/elements/{p-CrxYqX8r.js → p-Db6M_T3c.js} +7 -7
- package/dist/elements/{p-a20b72d8.entry.js → p-c0a8227e.entry.js} +1 -1
- package/dist/elements/{p-0e7413e6.entry.js → p-d56da833.entry.js} +1 -1
- package/dist/elements/{p-3e18b5dd.entry.js → p-db535410.entry.js} +1 -1
- package/dist/elements/p-df626ff5.entry.js +1 -0
- package/dist/elements/{p-b5d64c6f.entry.js → p-e2b0460d.entry.js} +1 -1
- package/dist/elements/{p-9b74c400.entry.js → p-e3e41963.entry.js} +1 -1
- package/dist/elements/{p-b363349c.entry.js → p-f5eacaa1.entry.js} +1 -1
- package/dist/elements/{p-52a612ed.entry.js → p-f61ab5a9.entry.js} +1 -1
- package/dist/elements/{p-8q-RA2Uq.js → p-k0sEkqnd.js} +3 -3
- package/dist/esm/{chunk.URTPIBTY-CNA3-SLq.js → chunk.URTPIBTY-IRBXSr44.js} +2 -2
- package/dist/esm/{chunk.XQ2OKYYA-CXNlpYUG.js → chunk.XQ2OKYYA-DeSebP8q.js} +3 -3
- package/dist/esm/{chunk.ZGGPD2XJ-BjT6fS1o.js → chunk.ZGGPD2XJ-DNRLq49v.js} +1 -1
- package/dist/esm/{class-map-CUYFUkXU.js → class-map-CdQEGha6.js} +1 -1
- package/dist/esm/elements.js +4 -4
- package/dist/esm/{index-DFqG64hG.js → index-BF-69-JC.js} +863 -551
- package/dist/esm/{index-VMHzF3uY.js → index-BKjkoLi4.js} +525 -1988
- package/dist/esm/{jsonld-V2RB47OZ-CaIJ08AA.js → jsonld-V2RB47OZ-CWZbzWzV.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} +109 -62
- 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 +2 -2
- 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 +2 -2
- 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-share/openNewTab.d.ts +1 -0
- package/dist/types/components/pos-share/pos-share.d.ts +26 -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 +50 -2
- package/package.json +5 -4
- package/dist/elements/p-0a087865.entry.js +0 -1
- package/dist/elements/p-637a38d9.entry.js +0 -1
- package/dist/elements/p-8ggjG2YF.js +0 -11
- 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 s,HTMLElement as t,createEvent as e,h as o,Host as r,transformTag as i}from"@stencil/core/internal/client";import{l as a}from"./index2.js";import{s as l}from"./PodOsAware.js";import{s as n}from"./ResourceAware.js";import{d as c}from"./pos-select-term2.js";const d=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.subscribePodOs=e(this,"pod-os:init",7),this.subscribeResource=e(this,"pod-os:resource",7),this.addedLiteralValue=e(this,"pod-os:added-literal-value",7),this.error=e(this,"pod-os:error",7),this.receiveResource=s=>{this.resource=s},this.receivePodOs=async s=>{this.os=s}}setName(){}componentWillLoad(){n(this),l(this)}async save(){try{await this.os.addPropertyValue(this.resource,this.selectedTermUri,this.currentValue);const s={predicate:this.selectedTermUri,label:a(this.selectedTermUri),values:[this.currentValue]};this.addedLiteralValue.emit(s),this.currentValue=""}catch(s){this.error.emit(s)}}onTermSelected(s){this.selectedTermUri=s.detail.uri,this.valueInput.focus()}render(){var s;if(null===(s=this.resource)||void 0===s?void 0:s.editable)return o(r,null,o("sl-icon",{name:"plus-circle"}),o("pos-select-term",{placeholder:"Add literal","onPod-os:term-selected":s=>this.onTermSelected(s)}),o("input",{ref:s=>this.valueInput=s,value:this.currentValue,placeholder:"",onInput:s=>this.currentValue=s.target.value,onChange:()=>this.save()}))}static get watchers(){return{os:[{setName:0}]}}static get style(){return":host{display:flex;align-items:center;gap:0.2rem}input{padding:var(--size-2);background-color:transparent;color:var(--pos-normal-text-color);border:none}input:focus{outline:2px solid var(--pos-primary-color);background-color:var(--pos-input-background-color);transition:outline 0.1s
|
|
1
|
+
import{proxyCustomElement as s,HTMLElement as t,createEvent as e,h as o,Host as r,transformTag as i}from"@stencil/core/internal/client";import{l as a}from"./index2.js";import{s as l}from"./PodOsAware.js";import{s as n}from"./ResourceAware.js";import{d as c}from"./pos-select-term2.js";const d=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.subscribePodOs=e(this,"pod-os:init",7),this.subscribeResource=e(this,"pod-os:resource",7),this.addedLiteralValue=e(this,"pod-os:added-literal-value",7),this.error=e(this,"pod-os:error",7),this.receiveResource=s=>{this.resource=s},this.receivePodOs=async s=>{this.os=s}}setName(){}componentWillLoad(){n(this),l(this)}async save(){try{await this.os.addPropertyValue(this.resource,this.selectedTermUri,this.currentValue);const s={predicate:this.selectedTermUri,label:a(this.selectedTermUri),values:[this.currentValue]};this.addedLiteralValue.emit(s),this.currentValue=""}catch(s){this.error.emit(s)}}onTermSelected(s){this.selectedTermUri=s.detail.uri,this.valueInput.focus()}render(){var s;if(null===(s=this.resource)||void 0===s?void 0:s.editable)return o(r,null,o("sl-icon",{name:"plus-circle"}),o("pos-select-term",{placeholder:"Add literal","onPod-os:term-selected":s=>this.onTermSelected(s)}),o("input",{ref:s=>this.valueInput=s,value:this.currentValue,placeholder:"",onInput:s=>this.currentValue=s.target.value,onChange:()=>this.save()}))}static get watchers(){return{os:[{setName:0}]}}static get style(){return":host{display:flex;align-items:center;gap:0.2rem}input{padding:var(--size-2);background-color:transparent;color:var(--pos-normal-text-color);border:none}input:focus{outline:2px solid var(--pos-primary-color);background-color:var(--pos-input-background-color);transition:outline 0.1s, background-color 0.1s}"}},[1,"pos-add-literal-value",{os:[32],resource:[32],currentValue:[32],selectedTermUri:[32]},void 0,{os:[{setName:0}]}]);function h(){"undefined"!=typeof customElements&&["pos-add-literal-value","pos-select-term"].forEach((s=>{switch(s){case"pos-add-literal-value":customElements.get(i(s))||customElements.define(i(s),d);break;case"pos-select-term":customElements.get(i(s))||c()}}))}export{d as P,h as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as s,h as o,Host as r,transformTag as t}from"@stencil/core/internal/client";import{s as a}from"./session.js";import{d as p}from"./pos-add-new-thing2.js";import{d as i}from"./pos-app2.js";import{d as n}from"./pos-app-dashboard2.js";import{d as m}from"./pos-app-settings2.js";import{d}from"./pos-description2.js";import{d as c}from"./pos-dialog2.js";import{d as l}from"./pos-error-toast2.js";import{d as f}from"./pos-example-resources2.js";import{d as u}from"./pos-getting-started2.js";import{d as b}from"./pos-image2.js";import{d as g}from"./pos-internal-router2.js";import{d as h}from"./pos-label2.js";import{d as k}from"./pos-login2.js";import{d as j}from"./pos-login-form2.js";import{d as v}from"./pos-make-findable2.js";import{d as y}from"./pos-navigation2.js";import{d as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as s,h as o,Host as r,transformTag as t}from"@stencil/core/internal/client";import{s as a}from"./session.js";import{d as p}from"./pos-add-new-thing2.js";import{d as i}from"./pos-app2.js";import{d as n}from"./pos-app-dashboard2.js";import{d as m}from"./pos-app-settings2.js";import{d}from"./pos-description2.js";import{d as c}from"./pos-dialog2.js";import{d as l}from"./pos-error-toast2.js";import{d as f}from"./pos-example-resources2.js";import{d as u}from"./pos-getting-started2.js";import{d as b}from"./pos-image2.js";import{d as g}from"./pos-internal-router2.js";import{d as h}from"./pos-label2.js";import{d as k}from"./pos-login2.js";import{d as j}from"./pos-login-form2.js";import{d as v}from"./pos-make-findable2.js";import{d as y}from"./pos-navigation2.js";import{d as E}from"./pos-navigation-bar2.js";import{d as w}from"./pos-new-thing-form2.js";import{d as x}from"./pos-picture2.js";import{d as L}from"./pos-predicate2.js";import{d as z}from"./pos-resource2.js";import{d as B}from"./pos-rich-link2.js";import{d as P}from"./pos-router2.js";import{d as C}from"./pos-select-term2.js";import{d as M}from"./pos-setting-offline-cache2.js";import{d as S}from"./pos-share2.js";import{d as Z}from"./pos-tool-select2.js";import{d as D}from"./pos-type-index-entries2.js";import{d as F}from"./pos-type-router2.js";import{d as I}from"./pos-upload2.js";import{d as O}from"./pos-user-menu2.js";const U=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.restorePreviousSession=!1,this.mode="standalone",this.uri=""}render(){return o(r,{key:"08b186d2f354d6c07df02707eb4ada81aef7dec3"},o("pos-app",{key:"54c372343e916ab5d77584381b3965c925ae0cd0",restorePreviousSession:this.restorePreviousSession},o("pos-error-toast",{key:"ab63e18121ca16670f81da141219a782dde0694b"},o("pos-router",{key:"69b6f3bf8ce3720c6c39cdb4be69e640e27ccc5b",mode:this.mode,"onPod-os:route-changed":e=>this.uri=e.detail},o("header",{key:"5cd3412caf13b6d99da517ae7e6f5877234e65d7"},o("pos-add-new-thing",{key:"9b83b3cf03b7038303975386176df539b35ff547",referenceUri:this.uri}),o("pos-navigation",{key:"26bfed9b1c8dd1be018babc6ef40ae42808a5c42",uri:"pod-os:dashboard"===this.uri?"":this.uri}),o("pos-login",{key:"e29f18dcde866d8ac1e317fcd7b71ef584e69034"},o("pos-user-menu",{key:"be796f0914649eb4e8525a9d8acdfd535626303c",webId:a.state.webId,slot:"if-logged-in"}))),o("main",{key:"f99dfb2d43e949528bc767b94801c99bf04a7eea"},this.mainContent()),o("footer",{key:"64744d1246356fa00da9c6b561785e2b794a7907"},o(q,{key:"a648f7f88e12c79348bda33152f2759d2b93e738"}),o("span",{key:"f22e2f9904ba517fc2e579a05018704b5ade6302"},"PodOS Browser"))))))}mainContent(){return""===this.uri?null:this.uri.startsWith("pod-os:")?o("pos-internal-router",{uri:this.uri}):o("pos-resource",{key:this.uri,uri:this.uri},o("pos-type-router",null))}static get style(){return"pos-router{margin:0;padding:0;display:flex;flex-direction:column;height:100%}pos-navigation{max-width:var(--width-lg);margin:0;min-width:var(--size-32);flex-shrink:1;}pos-add-new-thing,pos-login{flex:0 1 auto;flex-shrink:0;}header,footer{display:flex;gap:var(--size-1);height:auto;justify-content:center;align-items:center;padding:var(--size-1)}footer svg{width:var(--size-5);height:var(--size-5)}footer{font-size:var(--scale-fluid-000);.settings{padding:0 var(--size-1);text-decoration:none;background-color:var(--pos-background-color);border:1px solid var(--pos-secondary-border-color);color:var(--pos-secondary-border-color);border-radius:var(--radius-xs);&:hover{background-color:var(--pos-secondary-border-color);color:var(--pos-background-color)}}}header{flex-wrap:nowrap;padding:var(--size-1) var(--size-8)}main{flex:1;max-height:100vh;overflow:auto}@media (max-width: 640px){header{padding:var(--size-1);justify-content:space-between}footer{display:none}}"}},[0,"pos-app-browser",{restorePreviousSession:[4,"restore-previous-session"],mode:[1],uri:[32]}]),q=()=>o("svg",{viewBox:"0 0 400 400",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"M50 350 L50 100 L200 50 L350 100 L350 350 Z",style:{fill:"#008BF8",stroke:"#008BF8","stroke-width":"70"},"stroke-linejoin":"round"}),o("path",{d:"M100 300 L100 150 L200 120 L300 150 L300 300 L130 300 L130 370 L100 370Z",style:{fill:"white",stroke:"white","stroke-width":"45"},"stroke-linejoin":"round"}),o("path",{d:"M150 250 L150 200 L200 180 L250 200 L250 250 Z",style:{fill:"#DC0073",stroke:"#DC0073","stroke-width":"20"},"stroke-linejoin":"round"})),A=U,G=function(){"undefined"!=typeof customElements&&["pos-app-browser","pos-add-new-thing","pos-app","pos-app-dashboard","pos-app-settings","pos-description","pos-dialog","pos-error-toast","pos-example-resources","pos-getting-started","pos-image","pos-internal-router","pos-label","pos-login","pos-login-form","pos-make-findable","pos-navigation","pos-navigation-bar","pos-new-thing-form","pos-picture","pos-predicate","pos-resource","pos-rich-link","pos-router","pos-select-term","pos-setting-offline-cache","pos-share","pos-tool-select","pos-type-index-entries","pos-type-router","pos-upload","pos-user-menu"].forEach((e=>{switch(e){case"pos-app-browser":customElements.get(t(e))||customElements.define(t(e),U);break;case"pos-add-new-thing":customElements.get(t(e))||p();break;case"pos-app":customElements.get(t(e))||i();break;case"pos-app-dashboard":customElements.get(t(e))||n();break;case"pos-app-settings":customElements.get(t(e))||m();break;case"pos-description":customElements.get(t(e))||d();break;case"pos-dialog":customElements.get(t(e))||c();break;case"pos-error-toast":customElements.get(t(e))||l();break;case"pos-example-resources":customElements.get(t(e))||f();break;case"pos-getting-started":customElements.get(t(e))||u();break;case"pos-image":customElements.get(t(e))||b();break;case"pos-internal-router":customElements.get(t(e))||g();break;case"pos-label":customElements.get(t(e))||h();break;case"pos-login":customElements.get(t(e))||k();break;case"pos-login-form":customElements.get(t(e))||j();break;case"pos-make-findable":customElements.get(t(e))||v();break;case"pos-navigation":customElements.get(t(e))||y();break;case"pos-navigation-bar":customElements.get(t(e))||E();break;case"pos-new-thing-form":customElements.get(t(e))||w();break;case"pos-picture":customElements.get(t(e))||x();break;case"pos-predicate":customElements.get(t(e))||L();break;case"pos-resource":customElements.get(t(e))||z();break;case"pos-rich-link":customElements.get(t(e))||B();break;case"pos-router":customElements.get(t(e))||P();break;case"pos-select-term":customElements.get(t(e))||C();break;case"pos-setting-offline-cache":customElements.get(t(e))||M();break;case"pos-share":customElements.get(t(e))||S();break;case"pos-tool-select":customElements.get(t(e))||Z();break;case"pos-type-index-entries":customElements.get(t(e))||D();break;case"pos-type-router":customElements.get(t(e))||F();break;case"pos-upload":customElements.get(t(e))||I();break;case"pos-user-menu":customElements.get(t(e))||O()}}))};export{A as PosAppBrowser,G as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as o,HTMLElement as s,h as e,Host as r,transformTag as t}from"@stencil/core/internal/client";import{d as a}from"./pos-description2.js";import{d as c}from"./pos-label2.js";import{d as n}from"./pos-resource2.js";import{d as l}from"./pos-rich-link2.js";function i(o){return new Promise((s=>{o.dispatchEvent(new CustomEvent("pod-os:resource",{bubbles:!0,composed:!0,cancelable:!0,detail:o=>{s(o)}}))}))}const d=o(class extends s{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow()}async addToList(o){this.attachments=[...this.attachments,Object.assign(Object.assign({},o),{newlyAdded:!0})]}async componentWillLoad(){this.resource=await i(this.el),this.attachments=this.resource.attachments()}render(){return 0===this.attachments.length?e(r,null,"No attachments found."):e("ul",null,this.attachments.map((o=>e("li",{class:{new:o.newlyAdded}},e("pos-rich-link",{uri:o.uri})))))}get el(){return this}static get style(){return":host{--background-base-color:color-mix(in srgb, var(--pos-background-color), var(--color-grey-800) 10%);--background-color-even:hsl(from var(--background-base-color) h s calc(l + 7));--background-color-odd:hsl(from var(--background-base-color) h s calc(l + 10));--border-color:var(--background-base-color);ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:var(--size-1);li{padding:var(--size-1);&:nth-child(even){background-color:var(--background-color-even)}&:nth-child(odd){background-color:var(--background-color-odd)}&.new{animation:newItemBounce 0.8s ease-out
|
|
1
|
+
import{proxyCustomElement as o,HTMLElement as s,h as e,Host as r,transformTag as t}from"@stencil/core/internal/client";import{d as a}from"./pos-description2.js";import{d as c}from"./pos-label2.js";import{d as n}from"./pos-resource2.js";import{d as l}from"./pos-rich-link2.js";function i(o){return new Promise((s=>{o.dispatchEvent(new CustomEvent("pod-os:resource",{bubbles:!0,composed:!0,cancelable:!0,detail:o=>{s(o)}}))}))}const d=o(class extends s{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow()}async addToList(o){this.attachments=[...this.attachments,Object.assign(Object.assign({},o),{newlyAdded:!0})]}async componentWillLoad(){this.resource=await i(this.el),this.attachments=this.resource.attachments()}render(){return 0===this.attachments.length?e(r,null,"No attachments found."):e("ul",null,this.attachments.map((o=>e("li",{class:{new:o.newlyAdded}},e("pos-rich-link",{uri:o.uri})))))}get el(){return this}static get style(){return":host{--background-base-color:color-mix(in srgb, var(--pos-background-color), var(--color-grey-800) 10%);--background-color-even:hsl(from var(--background-base-color) h s calc(l + 7));--background-color-odd:hsl(from var(--background-base-color) h s calc(l + 10));--border-color:var(--background-base-color);ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:var(--size-1);li{padding:var(--size-1);&:nth-child(even){background-color:var(--background-color-even)}&:nth-child(odd){background-color:var(--background-color-odd)}&.new{animation:newItemBounce 0.8s ease-out, highlightFlash 2.5s ease-in-out}}}}@keyframes newItemBounce{0%{transform:scale(0.95);opacity:0}60%{transform:scale(1.02)}100%{transform:scale(1);opacity:1}}@keyframes highlightFlash{0%{box-shadow:0 0 20px var(--pos-primary-color)}100%{box-shadow:0 0 0 transparent}}"}},[1,"pos-attachments",{resource:[32],attachments:[32],addToList:[64]}]);function m(){"undefined"!=typeof customElements&&["pos-attachments","pos-description","pos-label","pos-resource","pos-rich-link"].forEach((o=>{switch(o){case"pos-attachments":customElements.get(t(o))||customElements.define(t(o),d);break;case"pos-description":customElements.get(t(o))||a();break;case"pos-label":customElements.get(t(o))||c();break;case"pos-resource":customElements.get(t(o))||n();break;case"pos-rich-link":customElements.get(t(o))||l()}}))}export{d as P,m as d,i as u}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PosCase extends Components.PosCase, HTMLElement {}
|
|
4
|
+
export const PosCase: {
|
|
5
|
+
prototype: PosCase;
|
|
6
|
+
new (): PosCase;
|
|
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 e,HTMLElement as t,transformTag as s}from"@stencil/core/internal/client";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.error=null}componentWillLoad(){null==this.host.querySelector("template")&&(this.error="No template element found")}render(){return this.error?this.error:null}get host(){return this}},[0,"pos-case",{ifTypeof:[1,"if-typeof"],not:[4],else:[4],error:[32]}]),o=n,l=function(){"undefined"!=typeof customElements&&["pos-case"].forEach((e=>{"pos-case"===e&&(customElements.get(s(e))||customElements.define(s(e),n))}))};export{o as PosCase,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as s,HTMLElement as t,createEvent as e,h as o,Host as i,transformTag as r}from"@stencil/core/internal/client";import{a as n}from"./index2.js";import{s as a}from"./PodOsAware.js";import{s as l}from"./session.js";import"./chunk.HVTXQL7M.js";import"./chunk.5JY5FUCG.js";import"./chunk.6CTB5ZDJ.js";import"./chunk.4TUIT776.js";import"./chunk.YHLNUJ7P.js";import{d as c}from"./pos-label2.js";import{d as h}from"./pos-resource2.js";const d=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.subscribePodOs=e(this,"pod-os:init",7),this.errorEmitter=e(this,"pod-os:error",7),this.indexUpdatedEmitter=e(this,"pod-os:search:index-updated",7),this.indexCreatedEmitter=e(this,"pod-os:search:index-created",7),this.indexes=[],this.showOptions=!1,this.isIndexed=!1,this.receivePodOs=async s=>{this.os=s,this.thing=this.os.store.get(this.uri),this.getLabelIndexes(l.state.profile),this.unsubscribeSessionChange=l.onChange("profile",(s=>{this.getLabelIndexes(s)}))}}componentWillLoad(){a(this)}disconnectedCallback(){this.unsubscribeSessionChange&&this.unsubscribeSessionChange()}updateUri(s){this.thing=this.os.store.get(s),this.isIndexed=this.checkIfIndexed(s)}checkIfIndexed(s){return this.indexes.some((t=>t.contains(s)))}getLabelIndexes(s){s&&(this.indexes=s.getPrivateLabelIndexes().map((s=>this.os.store.get(s).assume(n))),this.showOptions=this.indexes.length>1,this.isIndexed=this.checkIfIndexed(this.uri))}async onClick(s){if(s.preventDefault(),1===this.indexes.length){const s=this.indexes[0];await this.addToLabelIndex(s),this.indexUpdatedEmitter.emit(s)}else if(0===this.indexes.length){const s=await this.createDefaultLabelIndex();await this.addToLabelIndex(s),this.indexCreatedEmitter.emit(s)}}async addToLabelIndex(s){try{await this.os.addToLabelIndex(this.thing,s),this.isIndexed=!0}catch(s){this.errorEmitter.emit(s)}}async createDefaultLabelIndex(){try{return await this.os.createDefaultLabelIndex(l.state.profile)}catch(s){this.errorEmitter.emit(s)}}render(){if(!l.state.isLoggedIn||!this.uri)return null;const s="Make this findable",t=o("button",{type:"button",slot:"trigger","aria-label":s,class:{main:!0,success:this.isIndexed},onClick:s=>this.onClick(s),title:""},o(this.isIndexed?p:u,null),o("p",null,s));return this.showOptions?o(i,null,o("sl-dropdown",null,t,o("sl-menu",{role:"listbox"},this.indexes.map((s=>o("sl-menu-item",{role:"option",value:s,type:"checkbox",checked:s.contains(this.uri)},o("pos-resource",{uri:s.uri,lazy:!0},o("pos-label",null)))))))):t}async onSelect(s){const t=s.detail.item.value;s.preventDefault(),await this.addToLabelIndex(t),this.indexUpdatedEmitter.emit(t)}get el(){return this}static get watchers(){return{uri:[{updateUri:0}]}}static get style(){return"button.main{display:flex;transition:width 200ms
|
|
1
|
+
import{proxyCustomElement as s,HTMLElement as t,createEvent as e,h as o,Host as i,transformTag as r}from"@stencil/core/internal/client";import{a as n}from"./index2.js";import{s as a}from"./PodOsAware.js";import{s as l}from"./session.js";import"./chunk.HVTXQL7M.js";import"./chunk.5JY5FUCG.js";import"./chunk.6CTB5ZDJ.js";import"./chunk.4TUIT776.js";import"./chunk.YHLNUJ7P.js";import{d as c}from"./pos-label2.js";import{d as h}from"./pos-resource2.js";const d=s(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.subscribePodOs=e(this,"pod-os:init",7),this.errorEmitter=e(this,"pod-os:error",7),this.indexUpdatedEmitter=e(this,"pod-os:search:index-updated",7),this.indexCreatedEmitter=e(this,"pod-os:search:index-created",7),this.indexes=[],this.showOptions=!1,this.isIndexed=!1,this.receivePodOs=async s=>{this.os=s,this.thing=this.os.store.get(this.uri),this.getLabelIndexes(l.state.profile),this.unsubscribeSessionChange=l.onChange("profile",(s=>{this.getLabelIndexes(s)}))}}componentWillLoad(){a(this)}disconnectedCallback(){this.unsubscribeSessionChange&&this.unsubscribeSessionChange()}updateUri(s){this.thing=this.os.store.get(s),this.isIndexed=this.checkIfIndexed(s)}checkIfIndexed(s){return this.indexes.some((t=>t.contains(s)))}getLabelIndexes(s){s&&(this.indexes=s.getPrivateLabelIndexes().map((s=>this.os.store.get(s).assume(n))),this.showOptions=this.indexes.length>1,this.isIndexed=this.checkIfIndexed(this.uri))}async onClick(s){if(s.preventDefault(),1===this.indexes.length){const s=this.indexes[0];await this.addToLabelIndex(s),this.indexUpdatedEmitter.emit(s)}else if(0===this.indexes.length){const s=await this.createDefaultLabelIndex();await this.addToLabelIndex(s),this.indexCreatedEmitter.emit(s)}}async addToLabelIndex(s){try{await this.os.addToLabelIndex(this.thing,s),this.isIndexed=!0}catch(s){this.errorEmitter.emit(s)}}async createDefaultLabelIndex(){try{return await this.os.createDefaultLabelIndex(l.state.profile)}catch(s){this.errorEmitter.emit(s)}}render(){if(!l.state.isLoggedIn||!this.uri)return null;const s="Make this findable",t=o("button",{type:"button",slot:"trigger","aria-label":s,class:{main:!0,success:this.isIndexed},onClick:s=>this.onClick(s),title:""},o(this.isIndexed?p:u,null),o("p",null,s));return this.showOptions?o(i,null,o("sl-dropdown",null,t,o("sl-menu",{role:"listbox"},this.indexes.map((s=>o("sl-menu-item",{role:"option",value:s,type:"checkbox",checked:s.contains(this.uri)},o("pos-resource",{uri:s.uri,lazy:!0},o("pos-label",null)))))))):t}async onSelect(s){const t=s.detail.item.value;s.preventDefault(),await this.addToLabelIndex(t),this.indexUpdatedEmitter.emit(t)}get el(){return this}static get watchers(){return{uri:[{updateUri:0}]}}static get style(){return"button.main{display:flex;transition:width 200ms, background-color 500ms, color 500ms, border-color 500ms;max-width:var(--size-40);flex-direction:row;overflow:hidden;height:var(--pos-navigation-bar-height);width:var(--pos-navigation-bar-height);align-items:center;justify-content:center;border-radius:var(--radius-md);color:var(--pos-subtle-text-color);border:var(--size-px) dashed var(--pos-subtle-text-color);background-color:var(--pos-background-color);p{padding:0;margin:0;display:none;white-space:nowrap}&.success{color:var(--color-green-700);border-color:var(--color-green-700);border-style:solid;background-color:var(--color-green-100)}&:active{transform:scale(0.99);filter:brightness(90%)}&:focus{outline:var(--pos-input-focus-outline)}}svg{display:inline-block;height:var(--size-6);flex-shrink:0;flex-grow:0;width:var(--size-6)}button.main:hover,sl-dropdown[open] button{width:var(--size-full);height:var(--pos-navigation-bar-height);background:var(--pos-background-color);color:var(--pos-normal-text-color);&.success{background:var(--color-green-200);color:var(--color-green-700)}p{display:inline-block}}"}},[1,"pos-make-findable",{uri:[1],os:[32],thing:[32],indexes:[32],unsubscribeSessionChange:[32],showOptions:[32],isIndexed:[32]},[[0,"sl-select","onSelect"]],{uri:[{updateUri:0}]}]),u=()=>o("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"})),p=()=>o("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"}));function m(){"undefined"!=typeof customElements&&["pos-make-findable","pos-label","pos-resource"].forEach((s=>{switch(s){case"pos-make-findable":customElements.get(r(s))||customElements.define(r(s),d);break;case"pos-label":customElements.get(r(s))||c();break;case"pos-resource":customElements.get(r(s))||h()}}))}export{d as P,m as d}
|
|
@@ -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);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 n}from"./usePodOS.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.apps=[]}async componentWillLoad(){this.os=await n(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:"29aa438dc2598ae0ca874cebbddb56798587d03a"},s("button",{key:"e3faedf0eb0613563281634ce597c7c6feaf6eee",slot:"trigger","aria-label":"Share",part:"button"},s("sl-icon",{key:"6b932bd7a91f47a6e406e99b074ecb3108a1c611",name:"share"})),s("sl-menu",{key:"e17beb4fc2709ec701618b26f446964460ffe2e1"},s("sl-menu-item",{key:"34cef924cd9a503f87214df50cb6ec0ecc6402ed",value:"copy-uri"},s("sl-icon",{key:"db7910538c61bf6ad0e9591f77f353ff5209933e",slot:"prefix",name:"copy"}),"Copy URI"),this.apps.length>0&&s(c,{key:"5ae82ba277c26ce5d99ddb68ff6616c5a3c43d96",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]},[[0,"sl-select","onSelect"]],{uri:[{updateApps:0}]}]);function c({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 r(){"undefined"!=typeof customElements&&["pos-share"].forEach((e=>{"pos-share"===e&&(customElements.get(i(e))||customElements.define(i(e),a))}))}export{a as P,r 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}
|