@pod-os/elements 0.41.0-rc.fcadbb6.0 → 0.41.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-CyUQzrtC.js → chunk.URTPIBTY-C9cOc4B-.js} +2 -2
- package/dist/cjs/{chunk.XQ2OKYYA-Dfzydh50.js → chunk.XQ2OKYYA-CTZvRtz3.js} +3 -3
- package/dist/cjs/{chunk.ZGGPD2XJ-BhNheC5q.js → chunk.ZGGPD2XJ-BvGHEYp6.js} +1 -1
- package/dist/cjs/{class-map-DFvbJjpM.js → class-map-C9P5WsLw.js} +1 -1
- package/dist/cjs/elements.cjs.js +2 -2
- package/dist/cjs/{index-BP03J2RA.js → index-BPvAwpRj.js} +137 -33
- package/dist/cjs/{index-CFcC3IGM.js → index-CjKppELa.js} +2 -2
- package/dist/cjs/{jsonld-V2RB47OZ-B6QDxKa1.js → jsonld-V2RB47OZ-C8WVLsWC.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pos-add-literal-value_3.cjs.entry.js +5 -5
- package/dist/cjs/pos-add-new-thing_32.cjs.entry.js +27 -10
- package/dist/cjs/pos-add-relation.cjs.entry.js +3 -3
- 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 +1 -1
- package/dist/cjs/pos-case.cjs.entry.js +1 -1
- 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 +412 -122
- 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 +1 -1
- package/dist/cjs/pos-tool-attachments.cjs.entry.js +1 -1
- package/dist/cjs/pos-value.cjs.entry.js +22 -2
- package/dist/collection/components/pos-description/pos-description.js +18 -3
- package/dist/collection/components/pos-label/pos-label.js +15 -4
- package/dist/collection/components/pos-value/pos-value.js +27 -4
- package/dist/components/index2.js +2 -2
- package/dist/components/pos-description2.js +1 -1
- package/dist/components/pos-label2.js +1 -1
- package/dist/components/pos-markdown-document2.js +1 -1
- package/dist/components/pos-value.js +1 -1
- package/dist/custom-elements.json +5 -3
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-33783890.entry.js → p-1b8c9b61.entry.js} +1 -1
- package/dist/elements/p-1bcdde10.entry.js +1 -0
- package/dist/elements/{p-2f122da6.entry.js → p-1e98efdc.entry.js} +1 -1
- package/dist/elements/{p-3ef3a9a9.entry.js → p-380d72c2.entry.js} +1 -1
- package/dist/elements/{p-31370224.entry.js → p-440a8508.entry.js} +1 -1
- package/dist/elements/{p-aca646a4.entry.js → p-4d349a89.entry.js} +1 -1
- package/dist/elements/{p-a234b3fe.entry.js → p-52443feb.entry.js} +1 -1
- package/dist/elements/{p-513f7548.entry.js → p-641e64fd.entry.js} +1 -1
- package/dist/elements/{p-DqO-cIHe.js → p-7TsXf0Xj.js} +1 -1
- package/dist/elements/{p-a78df72b.entry.js → p-941b9b51.entry.js} +1 -1
- package/dist/elements/{p-5506bf9a.entry.js → p-9b5c45b6.entry.js} +1 -1
- package/dist/elements/{p-DPNKR_cm.js → p-BKLehMby.js} +5 -5
- package/dist/elements/p-BzjgviTt.js +67 -0
- package/dist/elements/{p-DO6v4X9H.js → p-C-Ke6Sdx.js} +3 -3
- package/dist/elements/{p-spEUIGXI.js → p-CsdCh9hf.js} +1 -1
- package/dist/elements/{p-Bz2zblgU.js → p-KLP10Ef6.js} +7 -7
- package/dist/elements/{p-d31c55b9.entry.js → p-a62af5eb.entry.js} +1 -1
- package/dist/elements/{p-1e0bd264.entry.js → p-b30e9b9c.entry.js} +9 -9
- package/dist/elements/{p-5f8df3c2.entry.js → p-c1cb97ef.entry.js} +1 -1
- package/dist/elements/p-c60dc303.entry.js +1 -0
- package/dist/elements/{p-c4034954.entry.js → p-c697bb3c.entry.js} +1 -1
- package/dist/elements/{p-0febf76e.entry.js → p-c83d76f9.entry.js} +1 -1
- package/dist/elements/{p-4fa32d10.entry.js → p-ccfbad21.entry.js} +1 -1
- package/dist/elements/{p-e4eae182.entry.js → p-eadbef6c.entry.js} +1 -1
- package/dist/elements/p-f26842e5.entry.js +1 -0
- package/dist/elements/{p-17d63fec.entry.js → p-f57e26b7.entry.js} +1 -1
- package/dist/elements/{p-DpbuT47x.js → p-jSCnU8fW.js} +1 -1
- package/dist/esm/{chunk.URTPIBTY-DGDKVdvN.js → chunk.URTPIBTY-CndE5cVS.js} +2 -2
- package/dist/esm/{chunk.XQ2OKYYA-DY8d9BRU.js → chunk.XQ2OKYYA-BBXcL00i.js} +3 -3
- package/dist/esm/{chunk.ZGGPD2XJ-CLV8PNGL.js → chunk.ZGGPD2XJ-DGIJXk11.js} +1 -1
- package/dist/esm/{class-map-CtuZET5H.js → class-map-BaV3g1im.js} +1 -1
- package/dist/esm/elements.js +3 -3
- package/dist/esm/{index-CMbRpNym.js → index-CmKOSDim.js} +137 -33
- package/dist/esm/{index-spEUIGXI.js → index-CsdCh9hf.js} +1 -1
- package/dist/esm/{jsonld-V2RB47OZ-zn531VHn.js → jsonld-V2RB47OZ-CIDz9zb9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pos-add-literal-value_3.entry.js +5 -5
- package/dist/esm/pos-add-new-thing_32.entry.js +27 -10
- package/dist/esm/pos-add-relation.entry.js +3 -3
- 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 +1 -1
- package/dist/esm/pos-case.entry.js +1 -1
- 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 +412 -122
- 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 +1 -1
- package/dist/esm/pos-tool-attachments.entry.js +1 -1
- package/dist/esm/pos-value.entry.js +22 -2
- package/dist/types/components/pos-description/pos-description.d.ts +9 -2
- package/dist/types/components/pos-label/pos-label.d.ts +6 -2
- package/dist/types/components/pos-value/pos-value.d.ts +7 -2
- package/dist/types/components.d.ts +32 -8
- package/package.json +7 -7
- package/dist/elements/p-624503dd.entry.js +0 -1
- package/dist/elements/p-d6e9d178.entry.js +0 -1
- package/dist/elements/p-f9c10964.entry.js +0 -1
- package/dist/elements/p-sVi8GCz5.js +0 -67
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as s,createEvent as t,transformTag as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as s,createEvent as t,transformTag as i}from"@stencil/core/internal/client";import{s as o}from"./ResourceAware.js";import{c as r}from"./index3.js";const n=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.subscribeResource=t(this,"pod-os:resource",7),this.disconnected$=new r.Subject,this.receiveResource=e=>{this.resource=e,this.observeAnyValue()}}componentWillLoad(){o(this)}observeAnyValue(){this.disconnected$.next(),this.resource.observeAnyValue(this.predicate).pipe(r.takeUntil(this.disconnected$)).subscribe((e=>this.value=e))}render(){var e;return null!==(e=this.value)&&void 0!==e?e:null}disconnectedCallback(){this.disconnected$.next(),this.disconnected$.complete()}static get watchers(){return{predicate:[{observeAnyValue:0}]}}},[1,"pos-value",{predicate:[513],resource:[32],value:[32]},void 0,{predicate:[{observeAnyValue:0}]}]),c=n,l=function(){"undefined"!=typeof customElements&&["pos-value"].forEach((e=>{"pos-value"===e&&(customElements.get(i(e))||customElements.define(i(e),n))}))};export{c as PosValue,l as defineCustomElement}
|
|
@@ -920,6 +920,7 @@
|
|
|
920
920
|
"customElement": true,
|
|
921
921
|
"tagName": "pos-description",
|
|
922
922
|
"name": "PosDescription",
|
|
923
|
+
"description": "Displays a description of the resource, as provided by [Thing.description()](https://pod-os.org/reference/core/classes/thing/#description).\n\nRe-renders when data in the store changes using [Thing.observeDescription()](https://pod-os.org/reference/core/classes/thing/#observeDescription).",
|
|
923
924
|
"events": [
|
|
924
925
|
{
|
|
925
926
|
"name": "pod-os:resource",
|
|
@@ -1377,7 +1378,7 @@
|
|
|
1377
1378
|
"customElement": true,
|
|
1378
1379
|
"tagName": "pos-label",
|
|
1379
1380
|
"name": "PosLabel",
|
|
1380
|
-
"description": "Displays a human-readable label of the resource, provided by [Thing.label()](https://pod-os.org/reference/core/classes/thing/#label)",
|
|
1381
|
+
"description": "Displays a human-readable label of the resource, as provided by [Thing.label()](https://pod-os.org/reference/core/classes/thing/#label).\n\nRe-renders when data in the store changes using [Thing.observeLabel()](https://pod-os.org/reference/core/classes/thing/#observeLabel).",
|
|
1381
1382
|
"events": [
|
|
1382
1383
|
{
|
|
1383
1384
|
"name": "pod-os:resource",
|
|
@@ -3144,7 +3145,7 @@
|
|
|
3144
3145
|
"customElement": true,
|
|
3145
3146
|
"tagName": "pos-value",
|
|
3146
3147
|
"name": "PosValue",
|
|
3147
|
-
"description": "Shows a single value linked to the resource using the given predicate.\nThe value is determined by [Thing.
|
|
3148
|
+
"description": "Shows a single value linked to the resource using the given predicate.\nThe value is determined by [Thing.observeAnyValue()](https://pod-os.org/reference/core/classes/thing/#observeanyvalue)\nand re-renders when data in the store changes",
|
|
3148
3149
|
"attributes": [
|
|
3149
3150
|
{
|
|
3150
3151
|
"name": "predicate",
|
|
@@ -3164,7 +3165,8 @@
|
|
|
3164
3165
|
"text": "string"
|
|
3165
3166
|
},
|
|
3166
3167
|
"readonly": true,
|
|
3167
|
-
"attribute": "predicate"
|
|
3168
|
+
"attribute": "predicate",
|
|
3169
|
+
"reflects": true
|
|
3168
3170
|
}
|
|
3169
3171
|
],
|
|
3170
3172
|
"events": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,B as o,d as r,w as t,N as a,e as i,g as n,b as p}from"./p-
|
|
1
|
+
import{p as e,B as o,d as r,w as t,N as a,e as i,g as n,b as p}from"./p-CsdCh9hf.js";export{s as setNonce}from"./p-CsdCh9hf.js";var d=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const s=o.call(this,!1),r=this.childNodes;if(e)for(let e=0;e<r.length;e++)2!==r[e].nodeType&&s.appendChild(r[e].cloneNode(!0));return s}};(()=>{o.isDev&&!o.isTesting&&r("Running in development mode."),o.cloneNodeFix&&d(i.prototype);const s=o.scriptDataOpts?t.document&&Array.from(t.document.querySelectorAll("script")).find((e=>new RegExp(`/${a}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===a)):null,n=import.meta.url,p=o.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==n&&(p.resourcesUrl=new URL(".",n).href),e(p)})().then((async e=>(await n(),p([["p-52443feb",[[1,"pos-app-generic"]]],["p-eadbef6c",[[1,"pos-app-ldp-container"]]],["p-ccfbad21",[[1,"pos-app-rdf-document"]]],["p-941b9b51",[[1,"pos-app-image-viewer",{resource:[32]}]]],["p-c83d76f9",[[1,"pos-tool-attachments",{os:[32],resource:[32]}]]],["p-1b8c9b61",[[1,"pos-app-document-viewer",{resource:[32]}]]],["p-f57e26b7",[[0,"pos-list",{rel:[1],ifTypeof:[1,"if-typeof"],fetch:[4],error:[32],os:[32],resource:[32],items:[32],templateString:[32]}]]],["p-4d349a89",[[0,"pos-case",{ifTypeof:[1,"if-typeof"],ifProperty:[1,"if-property"],ifRev:[1,"if-rev"],not:[4],else:[4],error:[32]}]]],["p-440a8508",[[0,"pos-switch",{error:[32],resource:[32],caseElements:[32],types:[32],relations:[32],reverseRelations:[32]}]]],["p-1bcdde10",[[1,"pos-value",{predicate:[513],resource:[32],value:[32]},null,{predicate:[{observeAnyValue:0}]}]]],["p-c1cb97ef",[[1,"pos-attachments",{resource:[32],attachments:[32],addToList:[64]}]]],["p-a62af5eb",[[1,"pos-container-contents",{container:[32],contents:[32],loading:[32],createNewItem:[32]},[[0,"keydown","handleKeyDown"]]]]],["p-1e98efdc",[[1,"pos-document",{src:[1],alt:[1],os:[32],file:[32],brokenFile:[32],error:[32],saveStatus:[32],loading:[32],isEditable:[32]},[[0,"pod-os:document-modified","handleDocumentModified"]],{os:[{fetchBlob:0}],src:[{fetchBlob:0}]}]]],["p-b30e9b9c",[[0,"pos-app-browser",{restorePreviousSession:[4,"restore-previous-session"],mode:[1],uri:[32]}],[0,"pos-internal-router",{uri:[1]}],[257,"pos-login",{os:[32],customLoggedInComponent:[32]},[[4,"pod-os:logout","logout"],[4,"pod-os:login","onLogin"]]],[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}]}],[1,"pos-user-menu",{webId:[1,"web-id"]},[[0,"sl-select","onSelect"]]],[1,"pos-add-new-thing",{referenceUri:[1,"reference-uri"]}],[1,"pos-type-router",{initialTool:[32],availableTools:[32],oldTool:[32],currentTool:[32],transitioning:[32]},[[0,"pod-os:tool-selected","handleToolSelected"]]],[257,"pos-app",{restorePreviousSession:[4,"restore-previous-session"],os:[32],unsubscribeSettings:[32],loading:[32]},[[0,"pod-os:init","initializeOs"],[0,"pod-os:module","loadModule"]]],[257,"pos-error-toast",{title:[32],message:[32]},[[8,"unhandledrejection","unhandledRejection"],[0,"pod-os:error","catchError"]]],[260,"pos-router",{mode:[1],uri:[32]},[[0,"pod-os:link","linkClicked"],[8,"pod-os:session-restored","sessionRestored"]]],[1,"pos-app-dashboard"],[1,"pos-navigation-bar",{current:[16],searchIndexReady:[4,"search-index-ready"]},[[4,"keydown","activate"]]],[1,"pos-app-settings"],[17,"pos-new-thing-form",{referenceUri:[1,"reference-uri"],os:[32],newUri:[32],name:[32],selectedTypeUri:[32],canSubmit:[32]},null,{name:[{validate:0}],selectedTypeUri:[{validate:0}]}],[17,"pos-login-form",{idpUrl:[32],canSubmit:[32],rememberMe:[32]},null,{idpUrl:[{validate:0}]}],[1,"pos-tool-select",{selected:[16],tools:[16]}],[1,"pos-type-index-entries",{uri:[1],entries:[32]}],[1,"pos-example-resources"],[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}]}],[260,"pos-dialog",{showModal:[64],close:[64]}],[1,"pos-getting-started"],[1,"pos-setting-offline-cache"],[1,"pos-share",{uri:[1],apps:[32],os:[32]},[[4,"pod-os:resource-loaded","resourceLoaded"],[0,"sl-select","onSelect"]],{uri:[{updateApps:0}]}],[257,"pos-picture",{blurredBackground:[4,"blurred-background"],noUpload:[4,"no-upload"],resource:[32],os:[32],isUploading:[32]}],[1,"pos-image",{src:[1],alt:[1],blurredBackground:[4,"blurred-background"],os:[32],dataUri:[32],brokenFile:[32],networkError:[32],imageError:[32],loading:[32]},null,{os:[{fetchBlob:0}],src:[{fetchBlob:0}]}],[1,"pos-upload",{accept:[16],uploader:[16]}],[1,"pos-predicate",{uri:[1],label:[1],expanded:[32]}],[17,"pos-select-term",{placeholder:[1],value:[1],os:[32],terms:[32]},null,{os:[{setTerms:0}]}],[257,"pos-rich-link",{uri:[1],rel:[1],rev:[1],link:[32],followPredicate:[32],error:[32],showCustomContent:[32]}],[1,"pos-description",{description:[32]}],[1,"pos-label",{label:[32]}],[257,"pos-resource",{uri:[1],lazy:[4],os:[32],resource:[32],consumers:[32],error:[32],loading:[32],fetch:[64]},[[0,"pod-os:resource","provideResource"]],{os:[{loadResource:0}],uri:[{loadResource:0}]}]]],["p-c697bb3c",[[1,"pos-relations",{data:[32]}],[1,"pos-reverse-relations",{data:[32]}]]],["p-380d72c2",[[1,"pos-subjects",{data:[32]}]]],["p-c60dc303",[[1,"pos-add-relation",{os:[32],resource:[32],selectedTermUri:[32],currentValue:[32]}]]],["p-f26842e5",[[1,"pos-markdown-document",{file:[16],saveStatus:[1,"save-status"],editable:[4],markdown:[32],isModified:[32],isEditing:[32],startEditing:[64],stopEditing:[64]}]]],["p-641e64fd",[[257,"pos-container-item",{resource:[32]}],[1,"pos-container-toolbar"],[1,"pos-create-new-container-item",{type:[1],container:[16],os:[32],name:[32]}]]],["p-9b5c45b6",[[1,"pos-literals",{data:[32]}],[1,"pos-type-badges",{data:[32],typeLabels:[32],isExpanded:[32]}],[1,"pos-add-literal-value",{os:[32],resource:[32],currentValue:[32],selectedTermUri:[32]},null,{os:[{setName:0}]}]]]],e))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as i,h as r,H as e}from"./p-
|
|
1
|
+
import{r as s,c as i,h as r,H as e}from"./p-CsdCh9hf.js";import{s as o}from"./p-BW_CkW1K.js";const a=class{constructor(r){s(this,r),this.subscribeResource=i(this,"pod-os:resource",7),this.receiveResource=s=>{this.resource=s}}componentWillLoad(){o(this)}render(){return this.resource?r(e,null,r("section",null,r("pos-document",{src:this.resource.uri}))):null}};a.style=":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}}}";export{a as pos_app_document_viewer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t}from"./p-CsdCh9hf.js";import{s as i}from"./p-BW_CkW1K.js";import{c as r}from"./p-vFMstSdt.js";const e=class{constructor(i){s(this,i),this.subscribeResource=t(this,"pod-os:resource",7),this.disconnected$=new r.Subject,this.receiveResource=s=>{this.resource=s,this.observeAnyValue()}}componentWillLoad(){i(this)}observeAnyValue(){this.disconnected$.next(),this.resource.observeAnyValue(this.predicate).pipe(r.takeUntil(this.disconnected$)).subscribe((s=>this.value=s))}render(){var s;return null!==(s=this.value)&&void 0!==s?s:null}disconnectedCallback(){this.disconnected$.next(),this.disconnected$.complete()}static get watchers(){return{predicate:[{observeAnyValue:0}]}}};export{e as pos_value}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s}from"./p-
|
|
1
|
+
import{r as t,c as e,h as s}from"./p-CsdCh9hf.js";import{s as i,B as o}from"./p-C-Ke6Sdx.js";import"./p-KLP10Ef6.js";import"./p-jSCnU8fW.js";const h=class{constructor(s){t(this,s),this.initializeOsEmitter=e(this,"pod-os:init",7),this.resourceLoadedEmitter=e(this,"pod-os:resource-loaded",7),this.errorEmitter=e(this,"pod-os:error",7),this.saveStatus="idle",this.loading=!0,this.isEditable=!1,this.setOs=async t=>{this.os=t}}componentWillLoad(){i.onChange("isLoggedIn",(()=>this.fetchBlob())),this.initializeOsEmitter.emit(this.setOs)}async handleDocumentModified(t){const{file:e,newContent:s}=t.detail;try{this.saveStatus="saving";const t=await this.os.files().putFile(e,s);if(t.ok)this.saveStatus="idle";else{this.saveStatus="failed";const e=new Error(`Failed to save file: ${t.status} ${t.statusText}`);this.errorEmitter.emit(e)}}catch(t){this.saveStatus="failed",this.errorEmitter.emit(t)}}async fetchBlob(){try{this.loading=!0;const t=await this.os.files().fetchFile(this.src),e=this.os.store.get(this.src);this.isEditable=null==e?void 0:e.editable,this.resourceLoadedEmitter.emit(this.src),t.blob()?(this.file=t,this.error=null):this.brokenFile=t}catch(t){this.error=t}finally{this.loading=!1}}render(){return this.loading?s(r,null):this.error?s("div",{class:"error"},this.error.message):this.brokenFile?s(o,{file:this.brokenFile}):"text/markdown"===this.file.blob().type?s("pos-markdown-document",{editable:this.isEditable,saveStatus:this.saveStatus,file:this.file}):s("iframe",{src:URL.createObjectURL(this.file.blob())})}static get watchers(){return{os:[{fetchBlob:0}],src:[{fetchBlob:0}]}}};function r(){return s("div",{class:"skeleton"},s("sl-skeleton",{effect:"sheen"}),s("sl-skeleton",{effect:"sheen"}),s("sl-skeleton",{effect:"sheen"}),s("sl-skeleton",{effect:"sheen"}),s("sl-skeleton",{effect:"sheen"}),s("sl-skeleton",{effect:"sheen"}))}h.style="iframe{background-color:var(--pos-background-color);width:100%;height:100vh}.error{display:flex;opacity:0.8;background:repeating-linear-gradient(-45deg, rgba(150, 0, 0, 0.1), rgba(150, 0, 0, 0.1) 10px, #fff 5px, #fff 25px);flex-direction:column;border:1px solid red;color:black;align-items:center;justify-content:center;word-break:break-all;padding:1rem;box-sizing:border-box}.error{color:#282828;font-size:calc(var(--width) / 2)}a{text-decoration:none;width:var(--width);height:var(--height)}.code{font-weight:bold;font-size:calc(var(--width) / 8)}.text{font-size:calc(var(--width) / 20)}.skeleton{display:flex;gap:var(--size-2);flex-direction:column;sl-skeleton{&:nth-child(2){width:95%}&:nth-child(4){width:90%}&:last-child{width:50%}}}";export{h as pos_document}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as r,h as s}from"./p-
|
|
1
|
+
import{r as o,c as r,h as s}from"./p-CsdCh9hf.js";import{R as c}from"./p-BzjgviTt.js";import{s as l}from"./p-BW_CkW1K.js";const a=class{constructor(s){o(this,s),this.subscribeResource=r(this,"pod-os:resource",7),this.data=[],this.receiveResource=o=>{const r=o.assume(c);this.data=r.subjects()}}componentWillLoad(){l(this)}render(){const o=this.data.map((o=>s("li",null,s("pos-rich-link",{uri:o.uri}))));return this.data.length>0?s("ul",null,o):null}};a.style=":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{display:flex;flex-direction:column;gap:var(--size-2);margin:0;padding:0;li{border:var(--size-px) solid var(--border-color);padding:var(--size-4);list-style-type:none;&:nth-child(even){background-color:var(--background-color-even)}&:nth-child(odd){background-color:var(--background-color-odd)}}}";export{a as pos_subjects}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,a as
|
|
1
|
+
import{r as t,c as s,h as i,H as e,a as h}from"./p-CsdCh9hf.js";import{s as o}from"./p-BW_CkW1K.js";import{c as r}from"./p-vFMstSdt.js";const n=class{constructor(i){t(this,i),this.subscribeResource=s(this,"pod-os:resource",7),this.error=null,this.disconnected$=new r.Subject,this.receiveResource=t=>{this.disconnected$.next(),this.resource=void 0;let s=[];if(this.caseElements.some((t=>t.hasAttribute("if-typeof")))){const i=t.observeTypes().pipe(r.takeUntil(this.disconnected$));i.subscribe((t=>{this.types=t})),s.push(i)}if(this.caseElements.some((t=>t.hasAttribute("if-property")))){const i=t.observeRelations().pipe(r.takeUntil(this.disconnected$));i.subscribe((t=>{this.relations=t})),s.push(i)}if(this.caseElements.some((t=>t.hasAttribute("if-rev")))){const i=t.observeReverseRelations().pipe(r.takeUntil(this.disconnected$));i.subscribe((t=>{this.reverseRelations=t})),s.push(i)}r.firstValueFrom(r.combineLatest(s)).then((()=>this.resource=t))}}componentWillLoad(){const t=this.host.querySelectorAll("pos-case");0==t.length?this.error="No pos-case elements found":(this.caseElements=Array.from(t),o(this))}test(t){let s=null;return null!==t.getAttribute("if-typeof")&&(s=this.types.map((t=>t.uri)).includes(t.getAttribute("if-typeof"))),null!==t.getAttribute("if-property")&&(s=this.relations.map((t=>t.predicate)).includes(t.getAttribute("if-property"))),null!==t.getAttribute("if-rev")&&(s=this.reverseRelations.map((t=>t.predicate)).includes(t.getAttribute("if-rev"))),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((i=>{const e=this.test(i),h=!0!==t||null===i.getAttribute("else");e&&h&&(t=e,s.push(i)),null===e&&h&&s.push(i)}));const h=s.map((t=>t.querySelector("template").innerHTML)).join("\n");return i(e,{innerHTML:h})}disconnectedCallback(){this.disconnected$.next(),this.disconnected$.complete()}get host(){return h(this)}};export{n as pos_switch}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,a as s}from"./p-
|
|
1
|
+
import{r as t,a as s}from"./p-CsdCh9hf.js";const e=class{constructor(s){t(this,s),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 s(this)}};export{e as pos_case}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a,H as d}from"./p-
|
|
1
|
+
import{r as e,h as a,H as d}from"./p-CsdCh9hf.js";const c=class{constructor(a){e(this,a)}render(){return a(d,{key:"8e29bb7745cec5493c102c2262b14291eb9fb62a"},a("section",{key:"2da95db7a410290cb89f7d3bebaae29c35e05785"},a("article",{key:"00d74d2f184cc32711f05c4729d85b324157aefd","aria-labelledby":"thing-title"},a("header",{key:"6e5e770f2dfe63cad9ecfb1a4bfa00d6a3c8f367"},a("pos-picture",{key:"8b96bdc83505c8e0a9ca27dfb4dcd9f9a750cac2",blurredBackground:!0}),a("h1",{key:"1190b2d13425f69220b364c0be60622eab32a58b",id:"thing-title"},a("pos-label",{key:"3d326707131bd2aa78efce0a1f7d30a9579c382a"})),a("pos-type-badges",{key:"142231486b4eafdd64592f38ccf021f5877dff1a"})),a("main",{key:"bdc3cbb8d7d6b81c3ca46d1568be1a7b421e50c1"},a("pos-description",{key:"1f7751b5b1f27b48c0729189c417945b1df5e657"})))),a("section",{key:"23b415a0f702c122bd736d7f3cd094adf2fca6c0"},a("pos-literals",{key:"f8518f73b5a189fb8b68997ca000aaeb0f5b47a4"})),a("section",{key:"c118b3e4dea9c007cbccfe4972a9c68d02d8451e"},a("pos-relations",{key:"6e06c6dbf7f537bb945c9b35fdd59993518c2eb5"}),a("pos-reverse-relations",{key:"d20aba82f29d87ee3b22dcb71d92ea4f8318f544"})))}};c.style=":host{--gap-size:var(--size-1);display:flex;flex-direction:column;gap:var(--gap-size);margin:var(--gap-size)}article{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;pos-picture{--object-fit:contain;--width:100%;--height:auto;--max-height:300px;border-radius:var(--radius-sm) var(--radius-sm) 0 0;--border-radius:var(--radius-sm) var(--radius-sm) 0 0}h1,pos-type-badges{margin:var(--size-2)}}main{padding:var(--size-2);pos-description{color:var(--pos-secondary-text-color);font-weight:var(--weight-light)}}}@media (min-width: 640px){:host{flex-direction:row;flex-wrap:wrap;section:first-of-type{flex:0 0 25%}section:not(:first-of-type){flex:1}}}";export{c as pos_app_generic}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s,H as o,a}from"./p-
|
|
1
|
+
import{r as e,c as t,h as s,H as o,a}from"./p-CsdCh9hf.js";import{s as r}from"./p-BW_CkW1K.js";import"./p-KLP10Ef6.js";import"./p-BKLehMby.js";import{u as i}from"./p-D0uCfr1-.js";import"./p-jSCnU8fW.js";function n(e,t){return e.some((e=>e.uri===t))}const l=class{constructor(s){e(this,s),this.linkEmitter=t(this,"pod-os:link",7),this.subscribeResource=t(this,"pod-os:resource",7),this.receiveResource=e=>{this.resource=e}}componentWillLoad(){r(this)}render(){if(!this.resource)return null;const e=n(t=this.resource.types(),"http://www.w3.org/ns/ldp#Container")?"folder2":n(t,"http://www.w3.org/ns/ldp#Resource")?"file-earmark":"question-diamond";var t;return s("a",{href:this.resource.uri,onClick:e=>{e.preventDefault(),this.linkEmitter.emit(this.resource.uri)}},s("sl-icon",{name:e,slot:"start"}),s("slot",null))}};l.style=":host{display:flex}a{display:flex;text-decoration:none;padding:var(--size-4);width:var(--size-full);gap:var(--size-2);color:var(--pos-normal-text-color);background-color:var(--pos-background-color);&:hover{background-color:var(--pos-border-color)}}";const c=class{constructor(s){e(this,s),this.createNewFile=t(this,"pod-os:create-new-file",7),this.createNewFolder=t(this,"pod-os:create-new-folder",7)}render(){return s(o,{key:"e1d54dfcda6e524c222eb31f8fa799504e6279ba",role:"toolbar","aria-label":"Container actions"},s("sl-tooltip",{key:"44807305749f92f1fd124e55034bdd3332dfde64",content:"Create new file"},s("button",{key:"9e14fab58d54e2ebb3ca8252e02aa78b2cdcba77","aria-label":"Create new file",onClick:()=>this.createNewFile.emit()},s("sl-icon",{key:"f54684a26fb30d40a59d12c89f369748b901b084",name:"file-earmark-plus"}))),s("sl-tooltip",{key:"b97b05975037478df3af44b1ba5f83e69b4b2013",content:"Create new folder"},s("button",{key:"d1b7187b016554afe9924fd71cff4154b4966888","aria-label":"Create new folder",onClick:()=>this.createNewFolder.emit()},s("sl-icon",{key:"8b19ce8ab8ab968516a22621367282f5e8c6e583",name:"folder-plus"}))))}};c.style=":host{display:flex;gap:var(--size-1);padding-bottom:var(--size-1);button{padding:var(--size-2);aspect-ratio:1/1;display:flex}}";const d=class{constructor(s){e(this,s),this.linkEmitter=t(this,"pod-os:link",7),this.errorEmitter=t(this,"pod-os:error",7),this.handleInput=e=>{this.name=e.target.value}}async componentWillLoad(){this.os=await i(this.el)}componentDidLoad(){this.input.focus()}render(){const e=`Enter ${this.type} name`;return s("form",{key:"0144661eaae4e4cace6098477b6e3d5a88dee2e5",onSubmit:e=>this.submit(e)},s("sl-icon",{key:"c48b373fae21914fd379d8e98b83a1d9f97ecc9e",name:this.getIcon()}),s("input",{key:"da220ae7d719a4213e84bb156ebba719f596a069",type:"text",value:this.name,onInput:e=>this.handleInput(e),placeholder:e,ref:e=>this.input=e}))}getIcon(){return"file"===this.type?"file-earmark-plus":"folder-plus"}async submit(e){e.preventDefault();let t=await this.createNew();t.isOk()?this.linkEmitter.emit(t.value.url):this.errorEmitter.emit(t.error)}async createNew(){return"file"===this.type?this.os.files().createNewFile(this.container,this.name):this.os.files().createNewFolder(this.container,this.name)}get el(){return a(this)}};d.style=":host{form{display:flex;align-items:center;gap:var(--size-2);padding:var(--size-4);background-color:var(--pos-background-color)}}";export{l as pos_container_item,c as pos_container_toolbar,d as pos_create_new_container_item}
|