@pod-os/elements 0.39.0 → 0.40.0-rc.2ccf9a2.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.
@@ -3973,7 +3973,7 @@ const PosLabel = class {
3973
3973
  }
3974
3974
  };
3975
3975
 
3976
- const posLoginCss = () => `.container{display:flex;align-items:center;gap:var(--size-2)}.user-data{align-items:center;display:inline-flex;gap:10px}.user-data pos-picture{--width:40px;--height:40px;--border-radius:50%}pos-login-form{margin:var(--size-2)}dialog{margin-top:var(--size-10)}button#login,button#logout{outline:none;font-weight:var(--weight-bold);letter-spacing:var(--letter-xl);border:none;box-sizing:border-box;border-radius:var(--radius-xs);padding:var(--size-2);box-shadow:var(--shadow-sm);color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}button#login:focus-within,button#logout:focus-within{outline:var(--pos-input-focus-outline)}button#login:focus,button#login:hover,button#logout:focus,button#logout:hover{filter:brightness(110%);box-shadow:var(--shadow-md)}`;
3976
+ const posLoginCss = () => `.container { display: flex; align-items: center; gap: var(--size-2); > pos-resource { display: flex; } } .user-data { align-items: center; display: inline-flex; gap: 10px; } .user-data pos-picture { --width: 40px; --height: 40px; --border-radius: 50%; } pos-login-form { margin: var(--size-2); } dialog { margin-top: var(--size-10); } button#login, button#logout { outline: none; font-weight: var(--weight-bold); letter-spacing: var(--letter-xl); border: none; box-sizing: border-box; border-radius: var(--radius-xs); padding: var(--size-2); box-shadow: var(--shadow-sm); color: var(--pos-primary-text-color); background-color: var(--pos-primary-color); } button#login:focus-within, button#logout:focus-within { outline: var(--pos-input-focus-outline); } button#login:focus, button#login:hover, button#logout:focus, button#logout:hover { filter: brightness(110%); box-shadow: var(--shadow-md); } `;
3977
3977
 
3978
3978
  const PosLogin = class {
3979
3979
  constructor(hostRef) {
@@ -2,6 +2,9 @@
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: var(--size-2);
5
+ > pos-resource {
6
+ display: flex;
7
+ }
5
8
  }
6
9
  .user-data {
7
10
  align-items: center;
@@ -1 +1 @@
1
- import{proxyCustomElement as o,HTMLElement as s,createEvent as t,h as e,Host as i,transformTag as n}from"@stencil/core/internal/client";import{s as r}from"./session.js";import{d as a}from"./pos-dialog2.js";import{d as l}from"./pos-image2.js";import{d as c}from"./pos-label2.js";import{d as p}from"./pos-login-form2.js";import{d as u}from"./pos-picture2.js";import{d}from"./pos-resource2.js";import{d as g}from"./pos-upload2.js";const m=o(class extends s{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.initializeOsEmitter=t(this,"pod-os:init",7),this.customLoggedInComponent=!1,this.setOs=async o=>{this.os=o}}componentWillLoad(){this.customLoggedInComponent=!!this.host.querySelector('[slot="if-logged-in"]'),this.initializeOsEmitter.emit(this.setOs)}login(o){this.os.login(o.detail)}logout(){this.os.logout()}onLogin(){this.openDialog()}openDialog(){this.dialog.showModal()}render(){return e(i,{key:"9c0cb63442db7acea4e60b09528bf4fc25afe2de"},e("div",{key:"ca56c2b730f371da27c1ac0a465a45d87071722f",class:"container"},r.state.isLoggedIn?this.loggedInComponents():e("button",{id:"login",onClick:()=>this.openDialog()},"Login")),e("pos-dialog",{key:"97b7d80acd6b57980641f189e3c2a67e8e45df44",ref:o=>this.dialog=o},e("span",{key:"3296c22755474e139546491890a5cc35c7a07be9",slot:"title"},"Sign in to your Pod"),e("pos-login-form",{key:"cb68b44a0a7541c116d3711c3ce8d0141515e815","onPod-os:idp-url-selected":o=>this.login(o),slot:"content"})))}loggedInComponents(){return this.customLoggedInComponent?e("slot",{name:"if-logged-in"}):this.defaultLoggedInComponents()}defaultLoggedInComponents(){return[e("pos-resource",{uri:r.state.webId},e("span",{class:"user-data"},e("pos-picture",{"no-upload":!0}),e("pos-label",null))),e("button",{id:"logout",onClick:()=>this.logout()},"Logout")]}get host(){return this}static get style(){return".container{display:flex;align-items:center;gap:var(--size-2)}.user-data{align-items:center;display:inline-flex;gap:10px}.user-data pos-picture{--width:40px;--height:40px;--border-radius:50%}pos-login-form{margin:var(--size-2)}dialog{margin-top:var(--size-10)}button#login,button#logout{outline:none;font-weight:var(--weight-bold);letter-spacing:var(--letter-xl);border:none;box-sizing:border-box;border-radius:var(--radius-xs);padding:var(--size-2);box-shadow:var(--shadow-sm);color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}button#login:focus-within,button#logout:focus-within{outline:var(--pos-input-focus-outline)}button#login:focus,button#login:hover,button#logout:focus,button#logout:hover{filter:brightness(110%);box-shadow:var(--shadow-md)}"}},[257,"pos-login",{os:[32],customLoggedInComponent:[32]},[[4,"pod-os:logout","logout"],[4,"pod-os:login","onLogin"]]]);function b(){"undefined"!=typeof customElements&&["pos-login","pos-dialog","pos-image","pos-label","pos-login-form","pos-picture","pos-resource","pos-upload"].forEach((o=>{switch(o){case"pos-login":customElements.get(n(o))||customElements.define(n(o),m);break;case"pos-dialog":customElements.get(n(o))||a();break;case"pos-image":customElements.get(n(o))||l();break;case"pos-label":customElements.get(n(o))||c();break;case"pos-login-form":customElements.get(n(o))||p();break;case"pos-picture":customElements.get(n(o))||u();break;case"pos-resource":customElements.get(n(o))||d();break;case"pos-upload":customElements.get(n(o))||g()}}))}export{m as P,b as d}
1
+ import{proxyCustomElement as o,HTMLElement as s,createEvent as t,h as e,Host as i,transformTag as n}from"@stencil/core/internal/client";import{s as r}from"./session.js";import{d as a}from"./pos-dialog2.js";import{d as l}from"./pos-image2.js";import{d as p}from"./pos-label2.js";import{d as c}from"./pos-login-form2.js";import{d as u}from"./pos-picture2.js";import{d}from"./pos-resource2.js";import{d as g}from"./pos-upload2.js";const m=o(class extends s{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.initializeOsEmitter=t(this,"pod-os:init",7),this.customLoggedInComponent=!1,this.setOs=async o=>{this.os=o}}componentWillLoad(){this.customLoggedInComponent=!!this.host.querySelector('[slot="if-logged-in"]'),this.initializeOsEmitter.emit(this.setOs)}login(o){this.os.login(o.detail)}logout(){this.os.logout()}onLogin(){this.openDialog()}openDialog(){this.dialog.showModal()}render(){return e(i,{key:"9c0cb63442db7acea4e60b09528bf4fc25afe2de"},e("div",{key:"ca56c2b730f371da27c1ac0a465a45d87071722f",class:"container"},r.state.isLoggedIn?this.loggedInComponents():e("button",{id:"login",onClick:()=>this.openDialog()},"Login")),e("pos-dialog",{key:"97b7d80acd6b57980641f189e3c2a67e8e45df44",ref:o=>this.dialog=o},e("span",{key:"3296c22755474e139546491890a5cc35c7a07be9",slot:"title"},"Sign in to your Pod"),e("pos-login-form",{key:"cb68b44a0a7541c116d3711c3ce8d0141515e815","onPod-os:idp-url-selected":o=>this.login(o),slot:"content"})))}loggedInComponents(){return this.customLoggedInComponent?e("slot",{name:"if-logged-in"}):this.defaultLoggedInComponents()}defaultLoggedInComponents(){return[e("pos-resource",{uri:r.state.webId},e("span",{class:"user-data"},e("pos-picture",{"no-upload":!0}),e("pos-label",null))),e("button",{id:"logout",onClick:()=>this.logout()},"Logout")]}get host(){return this}static get style(){return".container { display: flex; align-items: center; gap: var(--size-2); > pos-resource { display: flex; } } .user-data { align-items: center; display: inline-flex; gap: 10px; } .user-data pos-picture { --width: 40px; --height: 40px; --border-radius: 50%; } pos-login-form { margin: var(--size-2); } dialog { margin-top: var(--size-10); } button#login, button#logout { outline: none; font-weight: var(--weight-bold); letter-spacing: var(--letter-xl); border: none; box-sizing: border-box; border-radius: var(--radius-xs); padding: var(--size-2); box-shadow: var(--shadow-sm); color: var(--pos-primary-text-color); background-color: var(--pos-primary-color); } button#login:focus-within, button#logout:focus-within { outline: var(--pos-input-focus-outline); } button#login:focus, button#login:hover, button#logout:focus, button#logout:hover { filter: brightness(110%); box-shadow: var(--shadow-md); } "}},[257,"pos-login",{os:[32],customLoggedInComponent:[32]},[[4,"pod-os:logout","logout"],[4,"pod-os:login","onLogin"]]]);function b(){"undefined"!=typeof customElements&&["pos-login","pos-dialog","pos-image","pos-label","pos-login-form","pos-picture","pos-resource","pos-upload"].forEach((o=>{switch(o){case"pos-login":customElements.get(n(o))||customElements.define(n(o),m);break;case"pos-dialog":customElements.get(n(o))||a();break;case"pos-image":customElements.get(n(o))||l();break;case"pos-label":customElements.get(n(o))||p();break;case"pos-login-form":customElements.get(n(o))||c();break;case"pos-picture":customElements.get(n(o))||u();break;case"pos-resource":customElements.get(n(o))||d();break;case"pos-upload":customElements.get(n(o))||g()}}))}export{m as P,b as d}
@@ -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-spEUIGXI.js";export{s as setNonce}from"./p-spEUIGXI.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-a234b3fe",[[1,"pos-app-generic"]]],["p-e4eae182",[[1,"pos-app-ldp-container"]]],["p-4fa32d10",[[1,"pos-app-rdf-document"]]],["p-a78df72b",[[1,"pos-app-image-viewer",{resource:[32]}]]],["p-ceeba057",[[1,"pos-tool-attachments",{os:[32],resource:[32]}]]],["p-33783890",[[1,"pos-app-document-viewer",{resource:[32]}]]],["p-17d63fec",[[0,"pos-list",{rel:[1],ifTypeof:[1,"if-typeof"],fetch:[4],error:[32],os:[32],resource:[32],items:[32],templateString:[32]}]]],["p-aca646a4",[[0,"pos-case",{ifTypeof:[1,"if-typeof"],ifProperty:[1,"if-property"],ifRev:[1,"if-rev"],not:[4],else:[4],error:[32]}]]],["p-31370224",[[0,"pos-switch",{error:[32],resource:[32],caseElements:[32],types:[32],relations:[32],reverseRelations:[32]}]]],["p-624503dd",[[1,"pos-value",{predicate:[1],resource:[32]}]]],["p-5f8df3c2",[[1,"pos-attachments",{resource:[32],attachments:[32],addToList:[64]}]]],["p-ed1d9d77",[[1,"pos-container-contents",{container:[32],contents:[32],loading:[32],createNewItem:[32]},[[0,"keydown","handleKeyDown"]]]]],["p-2f122da6",[[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-1910fa2d",[[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]},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",{resource:[32]}],[1,"pos-label",{resource:[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-780eb6aa",[[1,"pos-relations",{data:[32]}],[1,"pos-reverse-relations",{data:[32]}]]],["p-a8628eb4",[[1,"pos-subjects",{data:[32]}]]],["p-2ee1efdb",[[1,"pos-add-relation",{os:[32],resource:[32],selectedTermUri:[32],currentValue:[32]}]]],["p-80c897c2",[[1,"pos-markdown-document",{file:[16],saveStatus:[1,"save-status"],editable:[4],markdown:[32],isModified:[32],isEditing:[32],startEditing:[64],stopEditing:[64]}]]],["p-513f7548",[[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-f6da714c",[[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
+ 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-spEUIGXI.js";export{s as setNonce}from"./p-spEUIGXI.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-a234b3fe",[[1,"pos-app-generic"]]],["p-e4eae182",[[1,"pos-app-ldp-container"]]],["p-4fa32d10",[[1,"pos-app-rdf-document"]]],["p-a78df72b",[[1,"pos-app-image-viewer",{resource:[32]}]]],["p-ceeba057",[[1,"pos-tool-attachments",{os:[32],resource:[32]}]]],["p-33783890",[[1,"pos-app-document-viewer",{resource:[32]}]]],["p-17d63fec",[[0,"pos-list",{rel:[1],ifTypeof:[1,"if-typeof"],fetch:[4],error:[32],os:[32],resource:[32],items:[32],templateString:[32]}]]],["p-aca646a4",[[0,"pos-case",{ifTypeof:[1,"if-typeof"],ifProperty:[1,"if-property"],ifRev:[1,"if-rev"],not:[4],else:[4],error:[32]}]]],["p-31370224",[[0,"pos-switch",{error:[32],resource:[32],caseElements:[32],types:[32],relations:[32],reverseRelations:[32]}]]],["p-624503dd",[[1,"pos-value",{predicate:[1],resource:[32]}]]],["p-5f8df3c2",[[1,"pos-attachments",{resource:[32],attachments:[32],addToList:[64]}]]],["p-ed1d9d77",[[1,"pos-container-contents",{container:[32],contents:[32],loading:[32],createNewItem:[32]},[[0,"keydown","handleKeyDown"]]]]],["p-2f122da6",[[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-5f98bf3b",[[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]},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",{resource:[32]}],[1,"pos-label",{resource:[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-780eb6aa",[[1,"pos-relations",{data:[32]}],[1,"pos-reverse-relations",{data:[32]}]]],["p-a8628eb4",[[1,"pos-subjects",{data:[32]}]]],["p-2ee1efdb",[[1,"pos-add-relation",{os:[32],resource:[32],selectedTermUri:[32],currentValue:[32]}]]],["p-80c897c2",[[1,"pos-markdown-document",{file:[16],saveStatus:[1,"save-status"],editable:[4],markdown:[32],isModified:[32],isEditing:[32],startEditing:[64],stopEditing:[64]}]]],["p-513f7548",[[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-f6da714c",[[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))));
@@ -362,7 +362,7 @@ import{r as e,h as t,H as i,c as r,a as o,i as s,j as a}from"./p-spEUIGXI.js";im
362
362
  </div>
363
363
  `:""}
364
364
  </div>
365
- `}};ci.styles=[p,hi],ci.dependencies={"sl-icon-button":di},h([z('[part~="base"]')],ci.prototype,"base",2),h([z(".alert__countdown-elapsed")],ci.prototype,"countdownElement",2),h([c({type:Boolean,reflect:!0})],ci.prototype,"open",2),h([c({type:Boolean,reflect:!0})],ci.prototype,"closable",2),h([c({reflect:!0})],ci.prototype,"variant",2),h([c({type:Number})],ci.prototype,"duration",2),h([c({type:String,reflect:!0})],ci.prototype,"countdown",2),h([b()],ci.prototype,"remainingTime",2),h([y("open",{waitUntilFirstUpdate:!0})],ci.prototype,"handleOpenChange",1),h([y("duration")],ci.prototype,"handleDurationChange",1);var ui=ci;F("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),F("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),ui.define("sl-alert");const fi=class{constructor(t){e(this,t)}async unhandledRejection(e){e.stopPropagation(),console.error("unhandled promise rejection",e),this.title="Unhandled promise rejection",this.message=e.reason.toString()}async catchError(e){if(e.stopPropagation(),console.error(e.detail),e.detail instanceof Error)this.title="Error",this.message=e.detail.message;else{const t=e.detail;this.title=t.title,this.message=t.detail}await this.alert.toast()}render(){return t(i,{key:"a2c2db82c085541f2912861ff715633c1a50872e"},t("sl-alert",{key:"af7e56dacdd8c2cdacfe4eb5020d59e8111e9947",ref:e=>this.alert=e,variant:"danger",duration:"10000",closable:!0},t("sl-icon",{key:"f50b8c321b0844c2f3cac2886f23b758e18500b1",slot:"icon",name:"exclamation-octagon"}),t("strong",{key:"0f7c7880b08366a16baaa1385df12614d6a6cddf"},this.title),t("br",{key:"5660dbabfa1162590b386087231301ee3920a415"}),this.message),t("slot",{key:"671026ea140044dfbeb63dee5c08a65591464668"}))}},mi=class{constructor(t){e(this,t)}render(){return t(i,{key:"edfbfc18bef5794e03385a6712cd6301b9f7fb56"},t("div",{key:"cb211969daa03f9377b9cc91d32983305d8efc8f"},t("h2",{key:"df34f7358c8b232d6d4874069c3a93491332589e"},"Try these... 💡"),t("p",{key:"512f37a9d3ba9f7492ab1770472732d3027751d4"},"No idea where to start? Try these example resources, and follow your nose 👃"),t("div",{key:"70c3dd35ffb296cfa535df0e74a1142c825d24a2",class:"links"},t("pos-rich-link",{key:"441945b22665c8688efb69bdb90fb61c13e41192",uri:"https://pod-os.solidcommunity.net/profile/card#me"}),t("pos-rich-link",{key:"d159b08661afd4c3dcc1d305f51c0a71dd8d1556",uri:"https://angelo.veltens.org/profile/card#me"}),t("pos-rich-link",{key:"82bf392405f612530d5de60d93e2201fae53f8fd",uri:"https://angelo.veltens.org/public/bookmarks"}),t("pos-rich-link",{key:"6f2151ad44f7659e723cb31f33b1a26170fbe37b",uri:"https://solidos.solidcommunity.net/profile/card#me"}))))}};mi.style=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}.links{display:flex;flex-direction:column;gap:var(--size-3);max-width:80vw}";const bi=class{constructor(t){e(this,t),this.login=r(this,"pod-os:login",7)}render(){return t(i,{key:"7486f4d04e3b7bd341fd2d9c02b85360079c5d5a"},t("div",{key:"710c84685022c9a55c821a421642cbff24c7ba5a"},t("h2",{key:"f01aa189a05ea101c61eecdc68d6fa1db9fefbb3"},"Getting started 🚀"),t("p",{key:"0e3320c4297a3438b2cdda02e27f0517a0ac2a85"},"🔎 Enter a URL into the above navigation bar to browse through the web of data. "),t("p",{key:"f99d218c35b6aa698bba807dc0f3b272ecd81416"},"🔐"," ",t("button",{key:"7091693cc439ddb12f35ef2f3be54f649c47e4ce",class:"login",onClick:()=>this.login.emit()},"Sign in")," ","to access private resources on your Solid Pod or those of your friends or coworkers.")),t("div",{key:"643c46009b4a962548ac501b3bca912a5163f4d3"},t("p",{key:"7fb4a75e5eb6f55a6b8d25825b39f8f82bcadeb9",class:"question"},"New to Solid?"),t("p",{key:"e7dd87fc055ad8981f28f00eb29a65c9e67f7a96"},t("a",{key:"1ad84ef46c7320e4adbb1ce573a8c6b97f60b8ec",href:"https://solidproject.org/for-developers#hosted-pod-services"},"Get a Pod →"))),t("div",{key:"bf50fd05a28e6536aae13cd6c7245c4b487850a6"},t("p",{key:"911eec270cee7a1dcc40320fb43298ad61b01206",class:"question"},"Want to dig deeper into PodOS?"),t("p",{key:"d1f7f4215577f50f1186b48ea0d48670eee53c22"},t("a",{key:"18c487f6e1ea48289654005286816b18e741c8a0",href:"http://pod-os.org"},"Learn more →"))))}};bi.style=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}.question{font-weight:var(--weight-semibold)}a{font-weight:var(--weight-bold);color:var(--pos-primary-color)}button.login{background:none;color:var(--pos-primary-color);display:inline;text-decoration:underline;border:none;padding:0;margin:0;cursor:pointer;font-size:unset}";const yi=class{constructor(t){e(this,t),this.initializeOsEmitter=r(this,"pod-os:init",7),this.resourceLoadedEmitter=r(this,"pod-os:resource-loaded",7),this.blurredBackground=!1,this.loading=!0,this.setOs=async e=>{this.os=e}}componentWillLoad(){x.onChange("isLoggedIn",(()=>this.fetchBlob())),this.initializeOsEmitter.emit(this.setOs)}async fetchBlob(){try{this.loading=!0,this.imageError=null,this.networkError=null,this.brokenFile=null;const e=await this.os.files().fetchFile(this.src);this.resourceLoadedEmitter.emit(this.src),e.blob()?this.dataUri=URL.createObjectURL(e.blob()):this.brokenFile=e}catch(e){this.networkError=e}finally{this.loading=!1}}onImageError(e){this.networkError=null,this.imageError=e}render(){return this.loading?t("sl-skeleton",{effect:"sheen"}):this.networkError?t("img",{alt:this.alt,src:this.src,onError:e=>this.onImageError(e)}):this.brokenFile?t(k,{file:this.brokenFile}):this.imageError?t("div",{class:"error"},t("a",{href:this.src},this.src)):t(i,{style:{backgroundImage:this.blurredBackground?`url('${this.dataUri}')`:null}},t("img",{src:this.dataUri,alt:this.alt}))}static get watchers(){return{os:[{fetchBlob:0}],src:[{fetchBlob:0}]}}};yi.style=":host{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;border-radius:inherit}img,div.error{border-radius:var(--border-radius);width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);object-fit:var(--object-fit)}img{backdrop-filter:var(--blur-xl)}.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 sl-icon{color:#282828;font-size:calc(var(--width) / 2)}a.error{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)}sl-skeleton{--border-radius:inherit;width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);aspect-ratio:16 / 9}";const gi=class{constructor(t){e(this,t),this.uri="pod-os:dashboard"}render(){return t("pod-os:settings"===this.uri?"pos-app-settings":"pos-app-dashboard",null)}},vi=class{constructor(t){e(this,t),this.subscribeResource=r(this,"pod-os:resource",7),this.receiveResource=e=>{this.resource=e}}componentWillLoad(){$(this)}render(){return this.resource?this.resource.label():null}},wi=class{constructor(t){e(this,t),this.initializeOsEmitter=r(this,"pod-os:init",7),this.customLoggedInComponent=!1,this.setOs=async e=>{this.os=e}}componentWillLoad(){this.customLoggedInComponent=!!this.host.querySelector('[slot="if-logged-in"]'),this.initializeOsEmitter.emit(this.setOs)}login(e){this.os.login(e.detail)}logout(){this.os.logout()}onLogin(){this.openDialog()}openDialog(){this.dialog.showModal()}render(){return t(i,{key:"9c0cb63442db7acea4e60b09528bf4fc25afe2de"},t("div",{key:"ca56c2b730f371da27c1ac0a465a45d87071722f",class:"container"},x.state.isLoggedIn?this.loggedInComponents():t("button",{id:"login",onClick:()=>this.openDialog()},"Login")),t("pos-dialog",{key:"97b7d80acd6b57980641f189e3c2a67e8e45df44",ref:e=>this.dialog=e},t("span",{key:"3296c22755474e139546491890a5cc35c7a07be9",slot:"title"},"Sign in to your Pod"),t("pos-login-form",{key:"cb68b44a0a7541c116d3711c3ce8d0141515e815","onPod-os:idp-url-selected":e=>this.login(e),slot:"content"})))}loggedInComponents(){return this.customLoggedInComponent?t("slot",{name:"if-logged-in"}):this.defaultLoggedInComponents()}defaultLoggedInComponents(){return[t("pos-resource",{uri:x.state.webId},t("span",{class:"user-data"},t("pos-picture",{"no-upload":!0}),t("pos-label",null))),t("button",{id:"logout",onClick:()=>this.logout()},"Logout")]}get host(){return o(this)}};wi.style=".container{display:flex;align-items:center;gap:var(--size-2)}.user-data{align-items:center;display:inline-flex;gap:10px}.user-data pos-picture{--width:40px;--height:40px;--border-radius:50%}pos-login-form{margin:var(--size-2)}dialog{margin-top:var(--size-10)}button#login,button#logout{outline:none;font-weight:var(--weight-bold);letter-spacing:var(--letter-xl);border:none;box-sizing:border-box;border-radius:var(--radius-xs);padding:var(--size-2);box-shadow:var(--shadow-sm);color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}button#login:focus-within,button#logout:focus-within{outline:var(--pos-input-focus-outline)}button#login:focus,button#login:hover,button#logout:focus,button#logout:hover{filter:brightness(110%);box-shadow:var(--shadow-md)}";const xi=class{constructor(t){e(this,t),this.idpUrlSelected=r(this,"pod-os:idp-url-selected",7),this.idpUrl="",this.canSubmit=!1}validate(){this.canSubmit=Boolean(this.idpUrl)}render(){return t("form",{key:"15b515887ebceff9ed2adb03f05e4725d5b1d4da",method:"dialog",onSubmit:()=>this.handleSubmit()},t("label",{key:"2278fd2cd0629dfc8d0bc3dc1c10223383131e15",htmlFor:"idpUrl"},"Please enter your Identity Provider"),t("input",{key:"2e63bb5aa1d16393abd46d042fd78a8e70dbc476",id:"idpUrl",type:"url",value:this.idpUrl,required:!0,onInput:e=>this.handleChange(e),list:"suggestedIssuers",placeholder:"Type to search..."}),t("datalist",{key:"16de93f77ee4f756c76fd5e58d84cf8a96b7fafb",id:"suggestedIssuers"},t("option",{key:"c6612878e0dc7be06ba9c88266ba746cc41bbcbd",value:"https://solidcommunity.net/"},"solidcommunity.net"),t("option",{key:"c93e6a9e2cad61c5247a048a4261079daca2655d",value:"https://solidweb.me/"},"solidweb.me"),t("option",{key:"d051f96a34bafa0d8c55e0ea1b9bfc7a5eb4f59a",value:"https://login.inrupt.com"},"Inrupt PodSpaces"),t("option",{key:"c793826a68676e176714898363ad06daa023a2f3",value:"https://trinpod.us"},"trinpod.us"),t("option",{key:"8ed729faba2a6c7b9fbc53d96511ec4ebc0db340",value:"https://trinpod.eu"},"trinpod.eu"),t("option",{key:"e683f8901b359e8bf82cb3e6d196817ac1150134",value:"https://solid.redpencil.io/"},"redpencil.io"),t("option",{key:"ddbad19605db043fc6f19ca5d4fc7bfd1d96b743",value:"https://teamid.live/"},"teamid.live")),t("input",{key:"ac9ebfdcfe6e1053fde4f890abd3e1183621060c",id:"login",type:"submit",value:"Login",disabled:!this.canSubmit}))}handleChange(e){this.validate(),this.idpUrl=e.target.value}async handleSubmit(){this.idpUrlSelected.emit(this.idpUrl)}static get delegatesFocus(){return!0}static get watchers(){return{idpUrl:[{validate:0}]}}};xi.style=":host{display:block;margin:0}form{display:flex;flex-direction:column;gap:var(--size-4)}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{outline:var(--pos-input-focus-outline)}input#login{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#login:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#login:hover:not(:disabled),input#login:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}";var ki=n`
365
+ `}};ci.styles=[p,hi],ci.dependencies={"sl-icon-button":di},h([z('[part~="base"]')],ci.prototype,"base",2),h([z(".alert__countdown-elapsed")],ci.prototype,"countdownElement",2),h([c({type:Boolean,reflect:!0})],ci.prototype,"open",2),h([c({type:Boolean,reflect:!0})],ci.prototype,"closable",2),h([c({reflect:!0})],ci.prototype,"variant",2),h([c({type:Number})],ci.prototype,"duration",2),h([c({type:String,reflect:!0})],ci.prototype,"countdown",2),h([b()],ci.prototype,"remainingTime",2),h([y("open",{waitUntilFirstUpdate:!0})],ci.prototype,"handleOpenChange",1),h([y("duration")],ci.prototype,"handleDurationChange",1);var ui=ci;F("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),F("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),ui.define("sl-alert");const fi=class{constructor(t){e(this,t)}async unhandledRejection(e){e.stopPropagation(),console.error("unhandled promise rejection",e),this.title="Unhandled promise rejection",this.message=e.reason.toString()}async catchError(e){if(e.stopPropagation(),console.error(e.detail),e.detail instanceof Error)this.title="Error",this.message=e.detail.message;else{const t=e.detail;this.title=t.title,this.message=t.detail}await this.alert.toast()}render(){return t(i,{key:"a2c2db82c085541f2912861ff715633c1a50872e"},t("sl-alert",{key:"af7e56dacdd8c2cdacfe4eb5020d59e8111e9947",ref:e=>this.alert=e,variant:"danger",duration:"10000",closable:!0},t("sl-icon",{key:"f50b8c321b0844c2f3cac2886f23b758e18500b1",slot:"icon",name:"exclamation-octagon"}),t("strong",{key:"0f7c7880b08366a16baaa1385df12614d6a6cddf"},this.title),t("br",{key:"5660dbabfa1162590b386087231301ee3920a415"}),this.message),t("slot",{key:"671026ea140044dfbeb63dee5c08a65591464668"}))}},mi=class{constructor(t){e(this,t)}render(){return t(i,{key:"edfbfc18bef5794e03385a6712cd6301b9f7fb56"},t("div",{key:"cb211969daa03f9377b9cc91d32983305d8efc8f"},t("h2",{key:"df34f7358c8b232d6d4874069c3a93491332589e"},"Try these... 💡"),t("p",{key:"512f37a9d3ba9f7492ab1770472732d3027751d4"},"No idea where to start? Try these example resources, and follow your nose 👃"),t("div",{key:"70c3dd35ffb296cfa535df0e74a1142c825d24a2",class:"links"},t("pos-rich-link",{key:"441945b22665c8688efb69bdb90fb61c13e41192",uri:"https://pod-os.solidcommunity.net/profile/card#me"}),t("pos-rich-link",{key:"d159b08661afd4c3dcc1d305f51c0a71dd8d1556",uri:"https://angelo.veltens.org/profile/card#me"}),t("pos-rich-link",{key:"82bf392405f612530d5de60d93e2201fae53f8fd",uri:"https://angelo.veltens.org/public/bookmarks"}),t("pos-rich-link",{key:"6f2151ad44f7659e723cb31f33b1a26170fbe37b",uri:"https://solidos.solidcommunity.net/profile/card#me"}))))}};mi.style=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}.links{display:flex;flex-direction:column;gap:var(--size-3);max-width:80vw}";const bi=class{constructor(t){e(this,t),this.login=r(this,"pod-os:login",7)}render(){return t(i,{key:"7486f4d04e3b7bd341fd2d9c02b85360079c5d5a"},t("div",{key:"710c84685022c9a55c821a421642cbff24c7ba5a"},t("h2",{key:"f01aa189a05ea101c61eecdc68d6fa1db9fefbb3"},"Getting started 🚀"),t("p",{key:"0e3320c4297a3438b2cdda02e27f0517a0ac2a85"},"🔎 Enter a URL into the above navigation bar to browse through the web of data. "),t("p",{key:"f99d218c35b6aa698bba807dc0f3b272ecd81416"},"🔐"," ",t("button",{key:"7091693cc439ddb12f35ef2f3be54f649c47e4ce",class:"login",onClick:()=>this.login.emit()},"Sign in")," ","to access private resources on your Solid Pod or those of your friends or coworkers.")),t("div",{key:"643c46009b4a962548ac501b3bca912a5163f4d3"},t("p",{key:"7fb4a75e5eb6f55a6b8d25825b39f8f82bcadeb9",class:"question"},"New to Solid?"),t("p",{key:"e7dd87fc055ad8981f28f00eb29a65c9e67f7a96"},t("a",{key:"1ad84ef46c7320e4adbb1ce573a8c6b97f60b8ec",href:"https://solidproject.org/for-developers#hosted-pod-services"},"Get a Pod →"))),t("div",{key:"bf50fd05a28e6536aae13cd6c7245c4b487850a6"},t("p",{key:"911eec270cee7a1dcc40320fb43298ad61b01206",class:"question"},"Want to dig deeper into PodOS?"),t("p",{key:"d1f7f4215577f50f1186b48ea0d48670eee53c22"},t("a",{key:"18c487f6e1ea48289654005286816b18e741c8a0",href:"http://pod-os.org"},"Learn more →"))))}};bi.style=":host{border:var(--size-px) solid var(--pos-border-color);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--pos-card-background)}.question{font-weight:var(--weight-semibold)}a{font-weight:var(--weight-bold);color:var(--pos-primary-color)}button.login{background:none;color:var(--pos-primary-color);display:inline;text-decoration:underline;border:none;padding:0;margin:0;cursor:pointer;font-size:unset}";const yi=class{constructor(t){e(this,t),this.initializeOsEmitter=r(this,"pod-os:init",7),this.resourceLoadedEmitter=r(this,"pod-os:resource-loaded",7),this.blurredBackground=!1,this.loading=!0,this.setOs=async e=>{this.os=e}}componentWillLoad(){x.onChange("isLoggedIn",(()=>this.fetchBlob())),this.initializeOsEmitter.emit(this.setOs)}async fetchBlob(){try{this.loading=!0,this.imageError=null,this.networkError=null,this.brokenFile=null;const e=await this.os.files().fetchFile(this.src);this.resourceLoadedEmitter.emit(this.src),e.blob()?this.dataUri=URL.createObjectURL(e.blob()):this.brokenFile=e}catch(e){this.networkError=e}finally{this.loading=!1}}onImageError(e){this.networkError=null,this.imageError=e}render(){return this.loading?t("sl-skeleton",{effect:"sheen"}):this.networkError?t("img",{alt:this.alt,src:this.src,onError:e=>this.onImageError(e)}):this.brokenFile?t(k,{file:this.brokenFile}):this.imageError?t("div",{class:"error"},t("a",{href:this.src},this.src)):t(i,{style:{backgroundImage:this.blurredBackground?`url('${this.dataUri}')`:null}},t("img",{src:this.dataUri,alt:this.alt}))}static get watchers(){return{os:[{fetchBlob:0}],src:[{fetchBlob:0}]}}};yi.style=":host{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;border-radius:inherit}img,div.error{border-radius:var(--border-radius);width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);object-fit:var(--object-fit)}img{backdrop-filter:var(--blur-xl)}.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 sl-icon{color:#282828;font-size:calc(var(--width) / 2)}a.error{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)}sl-skeleton{--border-radius:inherit;width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);aspect-ratio:16 / 9}";const gi=class{constructor(t){e(this,t),this.uri="pod-os:dashboard"}render(){return t("pod-os:settings"===this.uri?"pos-app-settings":"pos-app-dashboard",null)}},vi=class{constructor(t){e(this,t),this.subscribeResource=r(this,"pod-os:resource",7),this.receiveResource=e=>{this.resource=e}}componentWillLoad(){$(this)}render(){return this.resource?this.resource.label():null}},wi=class{constructor(t){e(this,t),this.initializeOsEmitter=r(this,"pod-os:init",7),this.customLoggedInComponent=!1,this.setOs=async e=>{this.os=e}}componentWillLoad(){this.customLoggedInComponent=!!this.host.querySelector('[slot="if-logged-in"]'),this.initializeOsEmitter.emit(this.setOs)}login(e){this.os.login(e.detail)}logout(){this.os.logout()}onLogin(){this.openDialog()}openDialog(){this.dialog.showModal()}render(){return t(i,{key:"9c0cb63442db7acea4e60b09528bf4fc25afe2de"},t("div",{key:"ca56c2b730f371da27c1ac0a465a45d87071722f",class:"container"},x.state.isLoggedIn?this.loggedInComponents():t("button",{id:"login",onClick:()=>this.openDialog()},"Login")),t("pos-dialog",{key:"97b7d80acd6b57980641f189e3c2a67e8e45df44",ref:e=>this.dialog=e},t("span",{key:"3296c22755474e139546491890a5cc35c7a07be9",slot:"title"},"Sign in to your Pod"),t("pos-login-form",{key:"cb68b44a0a7541c116d3711c3ce8d0141515e815","onPod-os:idp-url-selected":e=>this.login(e),slot:"content"})))}loggedInComponents(){return this.customLoggedInComponent?t("slot",{name:"if-logged-in"}):this.defaultLoggedInComponents()}defaultLoggedInComponents(){return[t("pos-resource",{uri:x.state.webId},t("span",{class:"user-data"},t("pos-picture",{"no-upload":!0}),t("pos-label",null))),t("button",{id:"logout",onClick:()=>this.logout()},"Logout")]}get host(){return o(this)}};wi.style=".container { display: flex; align-items: center; gap: var(--size-2); > pos-resource { display: flex; } } .user-data { align-items: center; display: inline-flex; gap: 10px; } .user-data pos-picture { --width: 40px; --height: 40px; --border-radius: 50%; } pos-login-form { margin: var(--size-2); } dialog { margin-top: var(--size-10); } button#login, button#logout { outline: none; font-weight: var(--weight-bold); letter-spacing: var(--letter-xl); border: none; box-sizing: border-box; border-radius: var(--radius-xs); padding: var(--size-2); box-shadow: var(--shadow-sm); color: var(--pos-primary-text-color); background-color: var(--pos-primary-color); } button#login:focus-within, button#logout:focus-within { outline: var(--pos-input-focus-outline); } button#login:focus, button#login:hover, button#logout:focus, button#logout:hover { filter: brightness(110%); box-shadow: var(--shadow-md); } ";const xi=class{constructor(t){e(this,t),this.idpUrlSelected=r(this,"pod-os:idp-url-selected",7),this.idpUrl="",this.canSubmit=!1}validate(){this.canSubmit=Boolean(this.idpUrl)}render(){return t("form",{key:"15b515887ebceff9ed2adb03f05e4725d5b1d4da",method:"dialog",onSubmit:()=>this.handleSubmit()},t("label",{key:"2278fd2cd0629dfc8d0bc3dc1c10223383131e15",htmlFor:"idpUrl"},"Please enter your Identity Provider"),t("input",{key:"2e63bb5aa1d16393abd46d042fd78a8e70dbc476",id:"idpUrl",type:"url",value:this.idpUrl,required:!0,onInput:e=>this.handleChange(e),list:"suggestedIssuers",placeholder:"Type to search..."}),t("datalist",{key:"16de93f77ee4f756c76fd5e58d84cf8a96b7fafb",id:"suggestedIssuers"},t("option",{key:"c6612878e0dc7be06ba9c88266ba746cc41bbcbd",value:"https://solidcommunity.net/"},"solidcommunity.net"),t("option",{key:"c93e6a9e2cad61c5247a048a4261079daca2655d",value:"https://solidweb.me/"},"solidweb.me"),t("option",{key:"d051f96a34bafa0d8c55e0ea1b9bfc7a5eb4f59a",value:"https://login.inrupt.com"},"Inrupt PodSpaces"),t("option",{key:"c793826a68676e176714898363ad06daa023a2f3",value:"https://trinpod.us"},"trinpod.us"),t("option",{key:"8ed729faba2a6c7b9fbc53d96511ec4ebc0db340",value:"https://trinpod.eu"},"trinpod.eu"),t("option",{key:"e683f8901b359e8bf82cb3e6d196817ac1150134",value:"https://solid.redpencil.io/"},"redpencil.io"),t("option",{key:"ddbad19605db043fc6f19ca5d4fc7bfd1d96b743",value:"https://teamid.live/"},"teamid.live")),t("input",{key:"ac9ebfdcfe6e1053fde4f890abd3e1183621060c",id:"login",type:"submit",value:"Login",disabled:!this.canSubmit}))}handleChange(e){this.validate(),this.idpUrl=e.target.value}async handleSubmit(){this.idpUrlSelected.emit(this.idpUrl)}static get delegatesFocus(){return!0}static get watchers(){return{idpUrl:[{validate:0}]}}};xi.style=":host{display:block;margin:0}form{display:flex;flex-direction:column;gap:var(--size-4)}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{outline:var(--pos-input-focus-outline)}input#login{outline:none;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}input#login:disabled{cursor:default;color:var(--pos-disabled-text-color);background-color:var(--pos-disabled-color);box-shadow:none}input#login:hover:not(:disabled),input#login:focus{filter:brightness(110%);box-shadow:var(--shadow-md)}";var ki=n`
366
366
  :host {
367
367
  display: inline-block;
368
368
  }
@@ -3971,7 +3971,7 @@ const PosLabel = class {
3971
3971
  }
3972
3972
  };
3973
3973
 
3974
- const posLoginCss = () => `.container{display:flex;align-items:center;gap:var(--size-2)}.user-data{align-items:center;display:inline-flex;gap:10px}.user-data pos-picture{--width:40px;--height:40px;--border-radius:50%}pos-login-form{margin:var(--size-2)}dialog{margin-top:var(--size-10)}button#login,button#logout{outline:none;font-weight:var(--weight-bold);letter-spacing:var(--letter-xl);border:none;box-sizing:border-box;border-radius:var(--radius-xs);padding:var(--size-2);box-shadow:var(--shadow-sm);color:var(--pos-primary-text-color);background-color:var(--pos-primary-color)}button#login:focus-within,button#logout:focus-within{outline:var(--pos-input-focus-outline)}button#login:focus,button#login:hover,button#logout:focus,button#logout:hover{filter:brightness(110%);box-shadow:var(--shadow-md)}`;
3974
+ const posLoginCss = () => `.container { display: flex; align-items: center; gap: var(--size-2); > pos-resource { display: flex; } } .user-data { align-items: center; display: inline-flex; gap: 10px; } .user-data pos-picture { --width: 40px; --height: 40px; --border-radius: 50%; } pos-login-form { margin: var(--size-2); } dialog { margin-top: var(--size-10); } button#login, button#logout { outline: none; font-weight: var(--weight-bold); letter-spacing: var(--letter-xl); border: none; box-sizing: border-box; border-radius: var(--radius-xs); padding: var(--size-2); box-shadow: var(--shadow-sm); color: var(--pos-primary-text-color); background-color: var(--pos-primary-color); } button#login:focus-within, button#logout:focus-within { outline: var(--pos-input-focus-outline); } button#login:focus, button#login:hover, button#logout:focus, button#logout:hover { filter: brightness(110%); box-shadow: var(--shadow-md); } `;
3975
3975
 
3976
3976
  const PosLogin = class {
3977
3977
  constructor(hostRef) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pod-os/elements",
3
- "version": "0.39.0",
3
+ "version": "0.40.0-rc.2ccf9a2.0",
4
4
  "description": "Custom elements for usage with Solid Pods",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "generate": "stencil generate"
23
23
  },
24
24
  "dependencies": {
25
- "@pod-os/core": "^0.28.0",
25
+ "@pod-os/core": "v0.29.0-rc.2ccf9a2.0",
26
26
  "@shoelace-style/shoelace": "^2.20.1",
27
27
  "@stencil/core": "^4.43.2",
28
28
  "@stencil/store": "^2.2.2",