@pod-os/contacts 0.3.0-rc.56dcc33.0 → 0.3.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.
Files changed (140) hide show
  1. package/dist/cjs/{chunk.5JY5FUCG-CFIgnv-x.js → chunk.5JY5FUCG-BJJbNIiG.js} +2 -2
  2. package/dist/cjs/{chunk.HVTXQL7M-B2hdsTMl.js → chunk.HVTXQL7M-C6x_EQ24.js} +4 -4
  3. package/dist/cjs/{chunk.URTPIBTY-CPXM3gIp.js → chunk.URTPIBTY-BiNv2Ckb.js} +3 -3
  4. package/dist/cjs/{chunk.XQ2OKYYA-CKucQDxS.js → chunk.XQ2OKYYA-CDJtWcvs.js} +4 -4
  5. package/dist/cjs/{chunk.YHLNUJ7P-BGyxk38j.js → chunk.YHLNUJ7P-CoQhYOM2.js} +1 -1
  6. package/dist/cjs/chunk.ZGGPD2XJ-C--tZiyf.js +5 -0
  7. package/dist/cjs/{class-map-C14RM4yW.js → class-map-CyEFRZYn.js} +1 -1
  8. package/dist/cjs/contacts.cjs.js +2 -2
  9. package/dist/cjs/{if-defined-CVUFZlGQ.js → if-defined-TQmAS6tz.js} +1 -1
  10. package/dist/cjs/{index-B1s9BObP.js → index-CpATWk39.js} +1 -1
  11. package/dist/cjs/{index-FUnpyb19.js → index-D1Wk2cIF.js} +2 -2
  12. package/dist/cjs/{index-DxlhmANy.js → index-DdRXU5II.js} +24 -15
  13. package/dist/cjs/{jsonld-V2RB47OZ-BerQ9IRa.js → jsonld-V2RB47OZ-DDsC42qL.js} +1 -1
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/pos-add-literal-value_3.cjs.entry.js +7 -7
  16. package/dist/cjs/pos-add-new-thing_7.cjs.entry.js +9 -9
  17. package/dist/cjs/pos-app-browser.cjs.entry.js +2 -2
  18. package/dist/cjs/pos-app-dashboard_6.cjs.entry.js +4 -4
  19. package/dist/cjs/pos-app-document-viewer.cjs.entry.js +1 -1
  20. package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
  21. package/dist/cjs/pos-app-image-viewer.cjs.entry.js +1 -1
  22. package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
  23. package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
  24. package/dist/cjs/pos-app_24.cjs.entry.js +309 -178
  25. package/dist/cjs/pos-attachments.cjs.entry.js +1 -1
  26. package/dist/cjs/pos-container-contents.cjs.entry.js +2 -2
  27. package/dist/cjs/pos-container-item_3.cjs.entry.js +6 -6
  28. package/dist/cjs/pos-description_2.cjs.entry.js +1 -1
  29. package/dist/cjs/pos-document.cjs.entry.js +6 -6
  30. package/dist/cjs/pos-list.cjs.entry.js +1 -1
  31. package/dist/cjs/pos-make-findable_2.cjs.entry.js +8 -8
  32. package/dist/cjs/pos-markdown-document.cjs.entry.js +443 -2328
  33. package/dist/cjs/pos-new-thing-form.cjs.entry.js +1 -1
  34. package/dist/cjs/pos-predicate.cjs.entry.js +6 -6
  35. package/dist/cjs/pos-relations_2.cjs.entry.js +1 -1
  36. package/dist/cjs/pos-select-term.cjs.entry.js +1 -1
  37. package/dist/cjs/pos-subjects.cjs.entry.js +2 -2
  38. package/dist/cjs/pos-tool-attachments.cjs.entry.js +1 -1
  39. package/dist/cjs/pos-tool-select.cjs.entry.js +3 -3
  40. package/dist/cjs/pos-value.cjs.entry.js +1 -1
  41. package/dist/cjs/{session-BayaHLZG.js → session-kBhmup9r.js} +1 -1
  42. package/dist/cjs/{settings--hJ8vEsE.js → settings-CpwCCkhx.js} +1 -1
  43. package/dist/collection/collection-manifest.json +2 -1
  44. package/dist/collection/components/open-address-book/open-address-book.js +2 -2
  45. package/dist/components/index2.js +1 -1
  46. package/dist/components/open-address-book.js +1 -1
  47. package/dist/components/pos-markdown-document2.js +1 -1
  48. package/dist/components/pos-upload2.js +12 -3
  49. package/dist/contacts/contacts.esm.js +1 -1
  50. package/dist/contacts/{p-23a9e3f7.entry.js → p-26248da8.entry.js} +1 -1
  51. package/dist/contacts/{p-8c22dd58.entry.js → p-40b2d792.entry.js} +1 -1
  52. package/dist/contacts/{p-9cc08d5d.entry.js → p-46f8861e.entry.js} +1 -1
  53. package/dist/contacts/{p-f2069948.entry.js → p-4ef3891c.entry.js} +1 -1
  54. package/dist/contacts/{p-Doy_38_j.js → p-5LNPeQkx.js} +1 -1
  55. package/dist/contacts/p-5e11ce90.entry.js +1 -0
  56. package/dist/contacts/{p-3db3697c.entry.js → p-649e7365.entry.js} +1 -1
  57. package/dist/contacts/{p-D5yyEaQc.js → p-68gi0rt1.js} +2 -2
  58. package/dist/contacts/{p-a912b0c5.entry.js → p-6d4ec7e5.entry.js} +1 -1
  59. package/dist/contacts/{p-e7d3c1ec.entry.js → p-76382e6a.entry.js} +1 -1
  60. package/dist/contacts/{p-2cba9598.entry.js → p-78715d17.entry.js} +1 -1
  61. package/dist/contacts/{p-b191df94.entry.js → p-7a01c820.entry.js} +1 -1
  62. package/dist/contacts/{p-c688c2a7.entry.js → p-7d796ba8.entry.js} +12 -12
  63. package/dist/contacts/{p-28e5a0f3.entry.js → p-7f565d49.entry.js} +1 -1
  64. package/dist/contacts/{p-ed50effa.entry.js → p-84fdbc1a.entry.js} +1 -1
  65. package/dist/contacts/{p-9953edcd.entry.js → p-8bc26fd9.entry.js} +1 -1
  66. package/dist/contacts/{p-9a2ac1bb.entry.js → p-92fcdd59.entry.js} +1 -1
  67. package/dist/contacts/p-B0L5m2PZ.js +67 -0
  68. package/dist/contacts/{p-BXKgr5Gu.js → p-B0_xZCeV.js} +3 -3
  69. package/dist/contacts/{p-QQ9ip321.js → p-BXcFVJku.js} +2 -2
  70. package/dist/contacts/{p-DABKSnsL.js → p-BXdS2klL.js} +2 -2
  71. package/dist/contacts/p-Bk6kpzHk.js +1 -0
  72. package/dist/contacts/{p-ME8pvwBs.js → p-BkeypvMo.js} +9 -9
  73. package/dist/contacts/{p-ClvXnhwM.js → p-Bug_w-vi.js} +1 -1
  74. package/dist/contacts/{p-GC4mMmic.js → p-C1XsyD29.js} +1 -1
  75. package/dist/contacts/{p-CgKErROC.js → p-C8LPXtIR.js} +2 -2
  76. package/dist/contacts/{p-C0nMaA5M.js → p-DScSUBy-.js} +2 -2
  77. package/dist/contacts/p-D_nUMgR-.js +11 -0
  78. package/dist/contacts/{p-BipFV89J.js → p-SrdKoY3I.js} +1 -1
  79. package/dist/contacts/{p-f6f09502.entry.js → p-a3082900.entry.js} +1 -1
  80. package/dist/contacts/{p-4130d85e.entry.js → p-a629ae72.entry.js} +1 -1
  81. package/dist/contacts/{p-32a0edb2.entry.js → p-a9d03996.entry.js} +1 -1
  82. package/dist/contacts/{p-77de4a33.entry.js → p-ae43e046.entry.js} +1 -1
  83. package/dist/contacts/{p-da5393cd.entry.js → p-c306d8ca.entry.js} +1 -1
  84. package/dist/contacts/{p-b5511f50.entry.js → p-c4a1c42a.entry.js} +1 -1
  85. package/dist/contacts/{p-5084bf63.entry.js → p-c89722f1.entry.js} +1 -1
  86. package/dist/contacts/{p-8df7b579.entry.js → p-ce6b4a9a.entry.js} +1 -1
  87. package/dist/contacts/p-d510fa6c.entry.js +127 -0
  88. package/dist/contacts/{p-eec9bbc3.entry.js → p-ecf8719a.entry.js} +1 -1
  89. package/dist/contacts/{p-e65c6072.entry.js → p-f8517ff2.entry.js} +1 -1
  90. package/dist/esm/{chunk.5JY5FUCG-B52nDptl.js → chunk.5JY5FUCG-B58l5Mdn.js} +2 -2
  91. package/dist/esm/{chunk.HVTXQL7M-BNA8hmQ6.js → chunk.HVTXQL7M-DXJDg6h_.js} +4 -4
  92. package/dist/esm/{chunk.URTPIBTY-CgZBKlLz.js → chunk.URTPIBTY-C1YI_wtI.js} +3 -3
  93. package/dist/esm/{chunk.XQ2OKYYA-U9jWa1BO.js → chunk.XQ2OKYYA-B0surOUs.js} +4 -4
  94. package/dist/esm/{chunk.YHLNUJ7P-Ci86SrOv.js → chunk.YHLNUJ7P-B10Qbx9i.js} +1 -1
  95. package/dist/esm/chunk.ZGGPD2XJ-CxH68zCl.js +3 -0
  96. package/dist/esm/{class-map-CEX3Xp6h.js → class-map-DcKoKhP0.js} +1 -1
  97. package/dist/esm/contacts.js +3 -3
  98. package/dist/esm/{if-defined-DwqmnOlO.js → if-defined-TtuUo8or.js} +1 -1
  99. package/dist/esm/{index-DFqG64hG.js → index-D-Cg1uHv.js} +2 -2
  100. package/dist/esm/{index-DrN7LBTM.js → index-D4tjvI9D.js} +1 -1
  101. package/dist/esm/{index-C0nMaA5M.js → index-DScSUBy-.js} +23 -14
  102. package/dist/esm/{jsonld-V2RB47OZ-CaIJ08AA.js → jsonld-V2RB47OZ-BA1jAPl4.js} +1 -1
  103. package/dist/esm/loader.js +2 -2
  104. package/dist/esm/pos-add-literal-value_3.entry.js +7 -7
  105. package/dist/esm/pos-add-new-thing_7.entry.js +9 -9
  106. package/dist/esm/pos-app-browser.entry.js +2 -2
  107. package/dist/esm/pos-app-dashboard_6.entry.js +4 -4
  108. package/dist/esm/pos-app-document-viewer.entry.js +1 -1
  109. package/dist/esm/pos-app-generic.entry.js +1 -1
  110. package/dist/esm/pos-app-image-viewer.entry.js +1 -1
  111. package/dist/esm/pos-app-ldp-container.entry.js +1 -1
  112. package/dist/esm/pos-app-rdf-document.entry.js +1 -1
  113. package/dist/esm/pos-app_24.entry.js +309 -178
  114. package/dist/esm/pos-attachments.entry.js +1 -1
  115. package/dist/esm/pos-container-contents.entry.js +2 -2
  116. package/dist/esm/pos-container-item_3.entry.js +6 -6
  117. package/dist/esm/pos-description_2.entry.js +1 -1
  118. package/dist/esm/pos-document.entry.js +6 -6
  119. package/dist/esm/pos-list.entry.js +1 -1
  120. package/dist/esm/pos-make-findable_2.entry.js +8 -8
  121. package/dist/esm/pos-markdown-document.entry.js +443 -2328
  122. package/dist/esm/pos-new-thing-form.entry.js +1 -1
  123. package/dist/esm/pos-predicate.entry.js +6 -6
  124. package/dist/esm/pos-relations_2.entry.js +1 -1
  125. package/dist/esm/pos-select-term.entry.js +1 -1
  126. package/dist/esm/pos-subjects.entry.js +2 -2
  127. package/dist/esm/pos-tool-attachments.entry.js +1 -1
  128. package/dist/esm/pos-tool-select.entry.js +3 -3
  129. package/dist/esm/pos-value.entry.js +1 -1
  130. package/dist/esm/{session-D6pii58K.js → session-CtUoUtdF.js} +1 -1
  131. package/dist/esm/{settings-WH1FmNcN.js → settings-Cnw1mSJw.js} +1 -1
  132. package/dist/types/stencil-public-runtime.d.ts +3 -1
  133. package/package.json +2 -2
  134. package/dist/cjs/chunk.ZGGPD2XJ-Dbqm_hZB.js +0 -5
  135. package/dist/contacts/p-9500c1b4.entry.js +0 -118
  136. package/dist/contacts/p-DHzCjlyY.js +0 -11
  137. package/dist/contacts/p-DjDNFMT3.js +0 -1
  138. package/dist/contacts/p-LoCE14bN.js +0 -67
  139. package/dist/contacts/p-bb96c175.entry.js +0 -1
  140. package/dist/esm/chunk.ZGGPD2XJ-CBFc8fGl.js +0 -3
@@ -1 +1 @@
1
- import{r as e,c as t,h as s,e as o,a}from"./p-C0nMaA5M.js";import{s as r}from"./p-BW_CkW1K.js";import"./p-DjDNFMT3.js";import"./p-CgKErROC.js";import"./p-BXKgr5Gu.js";import"./p-DABKSnsL.js";import"./p-BnGEOH37.js";import{u as i}from"./p-D0uCfr1-.js";import"./p-DHzCjlyY.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}
1
+ import{r as e,c as t,h as s,e as o,a}from"./p-DScSUBy-.js";import{s as r}from"./p-BW_CkW1K.js";import"./p-Bk6kpzHk.js";import"./p-C8LPXtIR.js";import"./p-B0_xZCeV.js";import"./p-BXdS2klL.js";import"./p-BnGEOH37.js";import{u as i}from"./p-D0uCfr1-.js";import"./p-D_nUMgR-.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}
@@ -1,4 +1,4 @@
1
- import{h as e}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js";import{i as o,c as r,_ as s,n as i,a,x as t}from"./p-CgKErROC.js";import{e as n}from"./p-DHzCjlyY.js";const l=({file:o})=>{const r=function(e){switch(e.code){case 401:case 403:return"lock";case 404:return"question-circle";default:return"exclamation-circle"}}(o.status);return e("div",null,e("a",{class:"error",href:o.url},e("div",null,e("sl-icon",{name:r})),e("div",{class:"code"},o.status.code),e("div",{class:"text"},o.status.text)))};var c=o`
1
+ import{h as e}from"./p-DScSUBy-.js";import"./p-Bk6kpzHk.js";import{i as o,c as r,_ as s,n as i,a as t,x as a}from"./p-C8LPXtIR.js";import{e as n}from"./p-D_nUMgR-.js";const l=({file:o})=>{const r=function(e){switch(e.code){case 401:case 403:return"lock";case 404:return"question-circle";default:return"exclamation-circle"}}(o.status);return e("div",null,e("a",{class:"error",href:o.url},e("div",null,e("sl-icon",{name:r})),e("div",{class:"code"},o.status.code),e("div",{class:"text"},o.status.text)))};var c=o`
2
2
  :host {
3
3
  --border-radius: var(--sl-border-radius-pill);
4
4
  --color: var(--sl-color-neutral-200);
@@ -58,7 +58,7 @@ import{h as e}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js";import{i as o,c as r
58
58
  opacity: 1;
59
59
  }
60
60
  }
61
- `,d=class extends a{constructor(){super(...arguments),this.effect="none"}render(){return t`
61
+ `,d=class extends t{constructor(){super(...arguments),this.effect="none"}render(){return a`
62
62
  <div
63
63
  part="base"
64
64
  class=${n({skeleton:!0,"skeleton--pulse":"pulse"===this.effect,"skeleton--sheen":"sheen"===this.effect})}
@@ -1 +1 @@
1
- import{r as o,h as a,e as r,a as s}from"./p-C0nMaA5M.js";import{u as n}from"./p-yVO4JQ9P.js";const c=class{constructor(a){o(this,a)}async addToList(o){this.attachments=[...this.attachments,Object.assign(Object.assign({},o),{newlyAdded:!0})]}async componentWillLoad(){this.resource=await n(this.el),this.attachments=this.resource.attachments()}render(){return 0===this.attachments.length?a(r,null,"No attachments found."):a("ul",null,this.attachments.map((o=>a("li",{class:{new:o.newlyAdded}},a("pos-rich-link",{uri:o.uri})))))}get el(){return s(this)}};c.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{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}}";export{c as pos_attachments}
1
+ import{r as o,h as r,e as a,a as s}from"./p-DScSUBy-.js";import{u as c}from"./p-yVO4JQ9P.js";const e=class{constructor(r){o(this,r)}async addToList(o){this.attachments=[...this.attachments,Object.assign(Object.assign({},o),{newlyAdded:!0})]}async componentWillLoad(){this.resource=await c(this.el),this.attachments=this.resource.attachments()}render(){return 0===this.attachments.length?r(a,null,"No attachments found."):r("ul",null,this.attachments.map((o=>r("li",{class:{new:o.newlyAdded}},r("pos-rich-link",{uri:o.uri})))))}get el(){return s(this)}};e.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{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}}";export{e as pos_attachments}
@@ -1 +1 @@
1
- import{r as s,c as t,h as i,a as h}from"./p-C0nMaA5M.js";import{s as o}from"./p-BW_CkW1K.js";import{s as r}from"./p-jlzl8vRd.js";import{c as e}from"./p-vFMstSdt.js";const n=class{constructor(i){s(this,i),this.subscribeResource=t(this,"pod-os:resource",7),this.subscribePodOs=t(this,"pod-os:init",7),this.fetch=!1,this.error=null,this.items=[],this.disconnected$=new e.Subject,this.receiveResource=s=>{this.items=[],this.rel&&(this.items=s.relations(this.rel).flatMap((s=>s.uris)))},this.receivePodOs=async s=>{s.store.observeFindMembers(this.ifTypeof).pipe(e.takeUntil(this.disconnected$)).subscribe((s=>this.items=s))}}componentWillLoad(){this.rel&&o(this),this.ifTypeof&&r(this);const s=this.host.querySelector("template");null==s?this.error="No template element found":this.templateString=s.innerHTML}render(){if(this.error)return this.error;const s=this.items.map((s=>i("pos-resource",{uri:s,lazy:!this.fetch,innerHTML:this.templateString,about:s})));return this.items.length>0?s:null}disconnectedCallback(){this.disconnected$.next(),this.disconnected$.unsubscribe()}get host(){return h(this)}};export{n as pos_list}
1
+ import{r as s,c as t,h as i,a as h}from"./p-DScSUBy-.js";import{s as o}from"./p-BW_CkW1K.js";import{s as r}from"./p-jlzl8vRd.js";import{c as e}from"./p-vFMstSdt.js";const n=class{constructor(i){s(this,i),this.subscribeResource=t(this,"pod-os:resource",7),this.subscribePodOs=t(this,"pod-os:init",7),this.fetch=!1,this.error=null,this.items=[],this.disconnected$=new e.Subject,this.receiveResource=s=>{this.items=[],this.rel&&(this.items=s.relations(this.rel).flatMap((s=>s.uris)))},this.receivePodOs=async s=>{s.store.observeFindMembers(this.ifTypeof).pipe(e.takeUntil(this.disconnected$)).subscribe((s=>this.items=s))}}componentWillLoad(){this.rel&&o(this),this.ifTypeof&&r(this);const s=this.host.querySelector("template");null==s?this.error="No template element found":this.templateString=s.innerHTML}render(){if(this.error)return this.error;const s=this.items.map((s=>i("pos-resource",{uri:s,lazy:!this.fetch,innerHTML:this.templateString,about:s})));return this.items.length>0?s:null}disconnectedCallback(){this.disconnected$.next(),this.disconnected$.unsubscribe()}get host(){return h(this)}};export{n as pos_list}
@@ -1 +1 @@
1
- import{r as s,c as i,h as e,e as r}from"./p-C0nMaA5M.js";import{s as o}from"./p-BW_CkW1K.js";const a=class{constructor(e){s(this,e),this.subscribeResource=i(this,"pod-os:resource",7),this.receiveResource=s=>{this.resource=s}}componentWillLoad(){o(this)}render(){return this.resource?e(r,null,e("section",null,e("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}
1
+ import{r as s,c as i,h as e,e as r}from"./p-DScSUBy-.js";import{s as o}from"./p-BW_CkW1K.js";const a=class{constructor(e){s(this,e),this.subscribeResource=i(this,"pod-os:resource",7),this.receiveResource=s=>{this.resource=s}}componentWillLoad(){o(this)}render(){return this.resource?e(r,null,e("section",null,e("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}
@@ -1 +1 @@
1
- import{r as o,c as t,h as r}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js";import"./p-CgKErROC.js";const e=class{constructor(r){o(this,r),this.toolSelected=t(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((o=>{var t;return r("button",{role:"tab","aria-selected":(null===(t=this.selected)||void 0===t?void 0:t.element)===o.element,onClick:()=>this.toolSelected.emit(o)},r("sl-icon",{name:o.icon}),r("span",{class:"text"},o.label))}))):null}};e.style=":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); } } } } ";export{e as pos_tool_select}
1
+ import{r as o,c as t,h as r}from"./p-DScSUBy-.js";import"./p-Bk6kpzHk.js";import"./p-C8LPXtIR.js";const e=class{constructor(r){o(this,r),this.toolSelected=t(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((o=>{var t;return r("button",{role:"tab","aria-selected":(null===(t=this.selected)||void 0===t?void 0:t.element)===o.element,onClick:()=>this.toolSelected.emit(o)},r("sl-icon",{name:o.icon}),r("span",{class:"text"},o.label))}))):null}};e.style=":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); } } } } ";export{e as pos_tool_select}
@@ -1,4 +1,4 @@
1
- import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js";import{i as s,x as a,c as r,S as n,_ as l,r as c,n as d,a as h,w as u}from"./p-CgKErROC.js";import{e as p}from"./p-DHzCjlyY.js";import{o as b}from"./p-QQ9ip321.js";import{e as v,s as m,a as g,g as f,b as w,w as y}from"./p-DABKSnsL.js";import{H as _}from"./p-ME8pvwBs.js";import{L as k}from"./p-BnGEOH37.js";import{c as x}from"./p-vFMstSdt.js";import{s as $}from"./p-ClvXnhwM.js";import{s as z}from"./p-jlzl8vRd.js";import{c as C}from"./p-BipFV89J.js";import{s as j}from"./p-BW_CkW1K.js";const S=class{constructor(e){t(this,e)}openDialog(){this.dialog.showModal()}render(){return e(i,{key:"9a60547270fcc455679acdfe6de75da57e513b1f"},e("button",{key:"32a8ba00ef511587024c843663e281e2b6930c19",id:"new",title:"Add a new thing",onClick:()=>this.openDialog()},e("sl-icon",{key:"6faf99cef999b441410770b0509f5a8d6a10f7e9",name:"plus-circle"})),e("pos-dialog",{key:"f6cd827c19d3dfe33500f03e561f399e11d728ce",ref:t=>this.dialog=t},e("span",{key:"ff40b8f28a349a1ad6db11e2d427d74ea5fbd300",slot:"title"},"Add a new thing"),e("pos-new-thing-form",{key:"e48257160d78d025e6213bd61c4953261d4829c2",slot:"content",referenceUri:this.referenceUri})))}};S.style=":host{font-family:var(--font-sans);display:block}button#new{cursor:pointer;display:flex;align-items:center;justify-content:center;border:none;width:var(--size-10);height:var(--size-10);background-color:var(--pos-primary-color);color:var(--pos-primary-text-color);font-size:var(--scale-6);border-radius:var(--radius-xs);padding:var(--size-2)}button#new:hover,button#new:focus{outline:none;filter:brightness(110%);box-shadow:var(--shadow-sm)}pos-new-thing-form{margin:var(--scale-3)}";var I=s`
1
+ import{r as t,h as e,e as i,c as o}from"./p-DScSUBy-.js";import"./p-Bk6kpzHk.js";import{i as s,x as r,c as a,S as n,_ as l,r as c,n as d,a as h,w as u}from"./p-C8LPXtIR.js";import{e as p}from"./p-D_nUMgR-.js";import{o as b}from"./p-BXcFVJku.js";import{e as v,s as m,a as g,g as f,b as w,w as y}from"./p-BXdS2klL.js";import{H as _}from"./p-BkeypvMo.js";import{L as k}from"./p-BnGEOH37.js";import{c as x}from"./p-vFMstSdt.js";import{s as $}from"./p-Bug_w-vi.js";import{s as z}from"./p-jlzl8vRd.js";import{c as S}from"./p-SrdKoY3I.js";import{s as C}from"./p-BW_CkW1K.js";const j=class{constructor(e){t(this,e)}openDialog(){this.dialog.showModal()}render(){return e(i,{key:"9a60547270fcc455679acdfe6de75da57e513b1f"},e("button",{key:"32a8ba00ef511587024c843663e281e2b6930c19",id:"new",title:"Add a new thing",onClick:()=>this.openDialog()},e("sl-icon",{key:"6faf99cef999b441410770b0509f5a8d6a10f7e9",name:"plus-circle"})),e("pos-dialog",{key:"f6cd827c19d3dfe33500f03e561f399e11d728ce",ref:t=>this.dialog=t},e("span",{key:"ff40b8f28a349a1ad6db11e2d427d74ea5fbd300",slot:"title"},"Add a new thing"),e("pos-new-thing-form",{key:"e48257160d78d025e6213bd61c4953261d4829c2",slot:"content",referenceUri:this.referenceUri})))}};j.style=":host{font-family:var(--font-sans);display:block}button#new{cursor:pointer;display:flex;align-items:center;justify-content:center;border:none;width:var(--size-10);height:var(--size-10);background-color:var(--pos-primary-color);color:var(--pos-primary-text-color);font-size:var(--scale-6);border-radius:var(--radius-xs);padding:var(--size-2)}button#new:hover,button#new:focus{outline:none;filter:brightness(110%);box-shadow:var(--shadow-sm)}pos-new-thing-form{margin:var(--scale-3)}";var I=s`
2
2
  :host {
3
3
  display: inline-block;
4
4
  color: var(--sl-color-neutral-600);
@@ -50,7 +50,7 @@ import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js"
50
50
  * @license
51
51
  * Copyright 2020 Google LLC
52
52
  * SPDX-License-Identifier: BSD-3-Clause
53
- */;const D=Symbol.for(""),R=t=>{if(t?.r===D)return t?._$litStatic$},U=(t,...e)=>({_$litStatic$:e.reduce(((e,i,o)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[o+1]),t[0]),r:D}),A=new Map,E=(L=a,(t,...e)=>{const i=e.length;let o,s;const a=[],r=[];let n,l=0,c=!1;for(;l<i;){for(n=t[l];l<i&&void 0!==(s=e[l],o=R(s));)n+=o+t[++l],c=!0;l!==i&&r.push(s),a.push(n),l++}if(l===i&&a.push(t[i]),c){const i=a.join("$$lit$$");void 0===(t=A.get(i))&&(a.raw=a,A.set(i,t=a)),e=r}return L(t,...e)});var L,B=class extends h{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t=!!this.href,e=t?U`a`:U`button`;return E`
53
+ */;const D=Symbol.for(""),R=t=>{if(t?.r===D)return t?._$litStatic$},U=(t,...e)=>({_$litStatic$:e.reduce(((e,i,o)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[o+1]),t[0]),r:D}),B=new Map,L=(A=r,(t,...e)=>{const i=e.length;let o,s;const r=[],a=[];let n,l=0,c=!1;for(;l<i;){for(n=t[l];l<i&&void 0!==(s=e[l],o=R(s));)n+=o+t[++l],c=!0;l!==i&&a.push(s),r.push(n),l++}if(l===i&&r.push(t[i]),c){const i=r.join("$$lit$$");void 0===(t=B.get(i))&&(r.raw=r,B.set(i,t=r)),e=a}return A(t,...e)});var A,E=class extends h{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t=!!this.href,e=t?U`a`:U`button`;return L`
54
54
  <${e}
55
55
  part="base"
56
56
  class=${p({"icon-button":!0,"icon-button--disabled":!t&&this.disabled,"icon-button--focused":this.hasFocus})}
@@ -76,7 +76,7 @@ import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js"
76
76
  aria-hidden="true"
77
77
  ></sl-icon>
78
78
  </${e}>
79
- `}};B.styles=[r,I],B.dependencies={"sl-icon":n},l([v(".icon-button")],B.prototype,"button",2),l([c()],B.prototype,"hasFocus",2),l([d()],B.prototype,"name",2),l([d()],B.prototype,"library",2),l([d()],B.prototype,"src",2),l([d()],B.prototype,"href",2),l([d()],B.prototype,"target",2),l([d()],B.prototype,"download",2),l([d()],B.prototype,"label",2),l([d({type:Boolean,reflect:!0})],B.prototype,"disabled",2);var M=s`
79
+ `}};E.styles=[a,I],E.dependencies={"sl-icon":n},l([v(".icon-button")],E.prototype,"button",2),l([c()],E.prototype,"hasFocus",2),l([d()],E.prototype,"name",2),l([d()],E.prototype,"library",2),l([d()],E.prototype,"src",2),l([d()],E.prototype,"href",2),l([d()],E.prototype,"target",2),l([d()],E.prototype,"download",2),l([d()],E.prototype,"label",2),l([d({type:Boolean,reflect:!0})],E.prototype,"disabled",2);var F=s`
80
80
  :host {
81
81
  display: contents;
82
82
 
@@ -216,7 +216,7 @@ import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js"
216
216
  .alert__timer {
217
217
  display: none;
218
218
  }
219
- `,F=class t extends h{constructor(){super(...arguments),this.hasSlotController=new _(this,"icon","suffix"),this.localize=new k(this),this.open=!1,this.closable=!1,this.variant="primary",this.duration=1/0,this.remainingTime=this.duration}static get toastStack(){return this.currentToastStack||(this.currentToastStack=Object.assign(document.createElement("div"),{className:"sl-toast-stack"})),this.currentToastStack}firstUpdated(){this.base.hidden=!this.open}restartAutoHide(){this.handleCountdownChange(),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration),this.remainingTime=this.duration,this.remainingTimeInterval=window.setInterval((()=>{this.remainingTime-=100}),100))}pauseAutoHide(){var t;null==(t=this.countdownAnimation)||t.pause(),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval)}resumeAutoHide(){var t;this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.remainingTime),this.remainingTimeInterval=window.setInterval((()=>{this.remainingTime-=100}),100),null==(t=this.countdownAnimation)||t.play())}handleCountdownChange(){if(this.open&&this.duration<1/0&&this.countdown){const{countdownElement:t}=this;this.countdownAnimation=t.animate([{width:"100%"},{width:"0"}],{duration:this.duration,easing:"linear"})}}handleCloseClick(){this.hide()}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.duration<1/0&&this.restartAutoHide(),await g(this.base),this.base.hidden=!1;const{keyframes:t,options:e}=f(this,"alert.show",{dir:this.localize.dir()});await w(this.base,t,e),this.emit("sl-after-show")}else{(t=>{var e;const{activeElement:i}=document;i&&t.contains(i)&&(null==(e=document.activeElement)||e.blur())})(this),this.emit("sl-hide"),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval),await g(this.base);const{keyframes:t,options:e}=f(this,"alert.hide",{dir:this.localize.dir()});await w(this.base,t,e),this.base.hidden=!0,this.emit("sl-after-hide")}}handleDurationChange(){this.restartAutoHide()}async show(){if(!this.open)return this.open=!0,y(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,y(this,"sl-after-hide")}async toast(){return new Promise((e=>{this.handleCountdownChange(),null===t.toastStack.parentElement&&document.body.append(t.toastStack),t.toastStack.appendChild(this),requestAnimationFrame((()=>{this.show()})),this.addEventListener("sl-after-hide",(()=>{t.toastStack.removeChild(this),e(),null===t.toastStack.querySelector("sl-alert")&&t.toastStack.remove()}),{once:!0})}))}render(){return a`
219
+ `,O=class t extends h{constructor(){super(...arguments),this.hasSlotController=new _(this,"icon","suffix"),this.localize=new k(this),this.open=!1,this.closable=!1,this.variant="primary",this.duration=1/0,this.remainingTime=this.duration}static get toastStack(){return this.currentToastStack||(this.currentToastStack=Object.assign(document.createElement("div"),{className:"sl-toast-stack"})),this.currentToastStack}firstUpdated(){this.base.hidden=!this.open}restartAutoHide(){this.handleCountdownChange(),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration),this.remainingTime=this.duration,this.remainingTimeInterval=window.setInterval((()=>{this.remainingTime-=100}),100))}pauseAutoHide(){var t;null==(t=this.countdownAnimation)||t.pause(),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval)}resumeAutoHide(){var t;this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.remainingTime),this.remainingTimeInterval=window.setInterval((()=>{this.remainingTime-=100}),100),null==(t=this.countdownAnimation)||t.play())}handleCountdownChange(){if(this.open&&this.duration<1/0&&this.countdown){const{countdownElement:t}=this;this.countdownAnimation=t.animate([{width:"100%"},{width:"0"}],{duration:this.duration,easing:"linear"})}}handleCloseClick(){this.hide()}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.duration<1/0&&this.restartAutoHide(),await g(this.base),this.base.hidden=!1;const{keyframes:t,options:e}=f(this,"alert.show",{dir:this.localize.dir()});await w(this.base,t,e),this.emit("sl-after-show")}else{(t=>{var e;const{activeElement:i}=document;i&&t.contains(i)&&(null==(e=document.activeElement)||e.blur())})(this),this.emit("sl-hide"),clearTimeout(this.autoHideTimeout),clearInterval(this.remainingTimeInterval),await g(this.base);const{keyframes:t,options:e}=f(this,"alert.hide",{dir:this.localize.dir()});await w(this.base,t,e),this.base.hidden=!0,this.emit("sl-after-hide")}}handleDurationChange(){this.restartAutoHide()}async show(){if(!this.open)return this.open=!0,y(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,y(this,"sl-after-hide")}async toast(){return new Promise((e=>{this.handleCountdownChange(),null===t.toastStack.parentElement&&document.body.append(t.toastStack),t.toastStack.appendChild(this),requestAnimationFrame((()=>{this.show()})),this.addEventListener("sl-after-hide",(()=>{t.toastStack.removeChild(this),e(),null===t.toastStack.querySelector("sl-alert")&&t.toastStack.remove()}),{once:!0})}))}render(){return r`
220
220
  <div
221
221
  part="base"
222
222
  class=${p({alert:!0,"alert--open":this.open,"alert--closable":this.closable,"alert--has-countdown":!!this.countdown,"alert--has-icon":this.hasSlotController.test("icon"),"alert--primary":"primary"===this.variant,"alert--success":"success"===this.variant,"alert--neutral":"neutral"===this.variant,"alert--warning":"warning"===this.variant,"alert--danger":"danger"===this.variant})}
@@ -233,7 +233,7 @@ import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js"
233
233
  <slot></slot>
234
234
  </div>
235
235
 
236
- ${this.closable?a`
236
+ ${this.closable?r`
237
237
  <sl-icon-button
238
238
  part="close-button"
239
239
  exportparts="base:close-button__base"
@@ -247,7 +247,7 @@ import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js"
247
247
 
248
248
  <div role="timer" class="alert__timer">${this.remainingTime}</div>
249
249
 
250
- ${this.countdown?a`
250
+ ${this.countdown?r`
251
251
  <div
252
252
  class=${p({alert__countdown:!0,"alert__countdown--ltr":"ltr"===this.countdown})}
253
253
  >
@@ -255,7 +255,7 @@ import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js"
255
255
  </div>
256
256
  `:""}
257
257
  </div>
258
- `}};F.styles=[r,M],F.dependencies={"sl-icon-button":B},l([v('[part~="base"]')],F.prototype,"base",2),l([v(".alert__countdown-elapsed")],F.prototype,"countdownElement",2),l([d({type:Boolean,reflect:!0})],F.prototype,"open",2),l([d({type:Boolean,reflect:!0})],F.prototype,"closable",2),l([d({reflect:!0})],F.prototype,"variant",2),l([d({type:Number})],F.prototype,"duration",2),l([d({type:String,reflect:!0})],F.prototype,"countdown",2),l([c()],F.prototype,"remainingTime",2),l([u("open",{waitUntilFirstUpdate:!0})],F.prototype,"handleOpenChange",1),l([u("duration")],F.prototype,"handleDurationChange",1);var O=F;m("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),m("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),O.define("sl-alert");const T=class{constructor(e){t(this,e)}async unhandledRejection(t){t.stopPropagation(),console.error("unhandled promise rejection",t),this.title="Unhandled promise rejection",this.message=t.reason.toString()}async catchError(t){if(t.stopPropagation(),console.error(t.detail),t.detail instanceof Error)this.title="Error",this.message=t.detail.message;else{const e=t.detail;this.title=e.title,this.message=e.detail}await this.alert.toast()}render(){return e(i,{key:"a2c2db82c085541f2912861ff715633c1a50872e"},e("sl-alert",{key:"af7e56dacdd8c2cdacfe4eb5020d59e8111e9947",ref:t=>this.alert=t,variant:"danger",duration:"10000",closable:!0},e("sl-icon",{key:"f50b8c321b0844c2f3cac2886f23b758e18500b1",slot:"icon",name:"exclamation-octagon"}),e("strong",{key:"0f7c7880b08366a16baaa1385df12614d6a6cddf"},this.title),e("br",{key:"5660dbabfa1162590b386087231301ee3920a415"}),this.message),e("slot",{key:"671026ea140044dfbeb63dee5c08a65591464668"}))}},H=class{constructor(e){t(this,e),this.uri="pod-os:dashboard"}render(){return e("pod-os:settings"===this.uri?"pos-app-settings":"pos-app-dashboard",null)}},V=class{constructor(e){t(this,e),this.subscribePodOs=o(this,"pod-os:init",7),this.linkEmitter=o(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 x.Subject,this.debouncedSearch=null,this.receivePodOs=async t=>{this.os=t}}updateResource(){var t;try{this.resource=this.uri?null===(t=this.os)||void 0===t?void 0:t.store.get(this.uri):null}catch(t){this.resource=null}}componentWillLoad(){z(this),this.updateResource(),$.onChange("isLoggedIn",(async t=>{t?await this.buildSearchIndex():this.clearSearchIndex()})),this.debouncedSearch=this.changeEvents.pipe(x.debounceTime(300)).subscribe((()=>this.search()))}disconnectedCallback(){var t;null===(t=this.debouncedSearch)||void 0===t||t.unsubscribe()}async buildSearchIndex(){this.searchIndex=await this.os.buildSearchIndex($.state.profile)}rebuildSearchIndex(){this.searchIndex.rebuild()}openNavigationDialog(t){var e,i;this.resource=t.detail,t.detail&&(this.inputValue=t.detail.uri,this.search()),null===(e=this.inputRef)||void 0===e||e.select(),null===(i=this.dialogRef)||void 0===i||i.show()}clearSearchIndex(){var t;null===(t=this.searchIndex)||void 0===t||t.clear()}onChange(t){this.inputValue=t.target.value,this.changeEvents.next()}closeDialog(){var t;null===(t=this.dialogRef)||void 0===t||t.close(),this.selectedIndex=-1}clearSuggestions(){var t;this.suggestions=[],null===(t=this.dialogRef)||void 0===t||t.close(),this.selectedIndex=-1}onClickSelf(t){t.stopPropagation()}handleKeyDown(t){"Escape"===t.key?this.closeDialog():"ArrowDown"===t.key?(t.preventDefault(),this.selectedIndex=Math.min(this.selectedIndex+1,this.suggestions.length-1)):"ArrowUp"===t.key&&(t.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:t=>this.dialogRef=t},e("form",{key:"e54698d8fb968a5ee6007cc4d5644fec36bf74f3",method:"dialog",onSubmit:()=>this.onSubmit()},e("input",{key:"633a4030c6296b5c94e2661bd73168afc1e04438",ref:t=>this.inputRef=t,enterkeyhint:"search","aria-label":"Search or enter URI",placeholder:"Search or enter URI",value:this.uri,onChange:t=>this.onChange(t),onInput:t=>this.onChange(t),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(((t,i)=>e("li",{id:`option-${i}`,role:"option","aria-selected":i===this.selectedIndex?"true":"false"},e("pos-rich-link",{uri:t.ref})))))):null))))}static get watchers(){return{uri:[{updateResource:0}],os:[{updateResource:0}]}}};V.style=":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}}";const W=C(),q=class{constructor(e){t(this,e),this.routeChanged=o(this,"pod-os:route-changed",7),this.mode="standalone"}linkClicked(t){this.navigate(t.detail)}sessionRestored(t){W.push(t.detail.url)}componentWillLoad(){this.updateUri(),W.onChange("url",(()=>{this.updateUri()}))}navigate(t){W.push("?uri="+encodeURIComponent(t))}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 e("slot",{key:"8b09de3dbbd253665cd541b9f264b0dcdc774354"})}};q.style=".toolbar{display:flex;flex-direction:row;gap:0;align-items:center;margin-left:0.5rem}pos-navigation{flex-grow:1}";const K={Generic:{element:"pos-app-generic",label:"Data",icon:"list-ul",types:[]},Attachments:{element:"pos-tool-attachments",label:"Attach",icon:"paperclip",types:[]},RdfDocument:{element:"pos-app-rdf-document",label:"Things",icon:"diagram-2",types:[{uri:"http://www.w3.org/2007/ont/link#RDFDocument",priority:20}]},DocumentViewer:{element:"pos-app-document-viewer",label:"Doc",icon:"file-text",types:[{uri:"http://www.w3.org/ns/iana/media-types/application/pdf#Resource",priority:30},{uri:"http://www.w3.org/2007/ont/link#Document",priority:10}]},ImageViewer:{element:"pos-app-image-viewer",label:"Pic",icon:"file-image",types:[{uri:"http://purl.org/dc/terms/Image",priority:20}]},LdpContainer:{element:"pos-app-ldp-container",label:"Content",icon:"folder",types:[{uri:"http://www.w3.org/ns/ldp#Container",priority:30}]}};function N(t,e){return t.filter((t=>e.has(t.uri))).reduce(((t,e)=>Math.max(t,e.priority)),0)}const P=t=>t.priority>0,G=(t,e)=>e.priority-t.priority,Q=class{constructor(e){t(this,e),this.subscribeResource=o(this,"pod-os:resource",7),this.transitioning=!1,this.receiveResource=t=>{var e;const i=t.types();this.availableTools=function(t){const e=new Set(t.map((t=>t.uri)));return Object.values(K).map((t=>e=>({tool:e,priority:N(e.types,t)}))(e)).filter(P).toSorted(G).map((t=>t.tool)).concat(K.Generic).concat(K.Attachments)}(i),this.currentTool=null!==(e=this.availableTools.find((t=>t.element===this.initialTool)))&&void 0!==e?e:this.availableTools[0]}}componentWillLoad(){j(this);const t=new URLSearchParams(window.location.search).get("tool");t&&(this.initialTool=t)}handleToolSelected(t){this.oldTool=this.currentTool,this.currentTool=t.detail,this.transitioning=!0;const e=new URL(window.location.href);e.searchParams.set("tool",t.detail.element),window.history.replaceState({},"",e.toString())}render(){return this.availableTools?this.renderApp():null}renderApp(){var t;const i=this.currentTool.element,o=null===(t=this.oldTool)||void 0===t?void 0:t.element;return e("section",null,e("pos-tool-select",{selected:this.currentTool,tools:this.availableTools}),e("div",{class:{tools:!0,transition:this.transitioning},onAnimationEnd:()=>this.removeOldTool()},o&&e(o,{class:"tool hidden"}),e(i,{class:"tool visible"})))}removeOldTool(){this.oldTool=null,this.transitioning=!1}};Q.style="section{display:flex;flex-direction:row}.tools{flex-grow:1;&.transition{position:relative;.tool{position:absolute}}}.tool{top:0;right:0;left:0;bottom:0;&.visible{animation:fadeIn 300ms ease-in}&.hidden{animation:fadeOut 300ms ease-in}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@media (max-width: 640px){section{--toolbar-size:var(--size-16);flex-direction:column-reverse;padding-bottom:var(--toolbar-size);pos-tool-select{--button-size:var(--toolbar-size)}}}";var X=s`
258
+ `}};O.styles=[a,F],O.dependencies={"sl-icon-button":E},l([v('[part~="base"]')],O.prototype,"base",2),l([v(".alert__countdown-elapsed")],O.prototype,"countdownElement",2),l([d({type:Boolean,reflect:!0})],O.prototype,"open",2),l([d({type:Boolean,reflect:!0})],O.prototype,"closable",2),l([d({reflect:!0})],O.prototype,"variant",2),l([d({type:Number})],O.prototype,"duration",2),l([d({type:String,reflect:!0})],O.prototype,"countdown",2),l([c()],O.prototype,"remainingTime",2),l([u("open",{waitUntilFirstUpdate:!0})],O.prototype,"handleOpenChange",1),l([u("duration")],O.prototype,"handleDurationChange",1);var M=O;m("alert.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),m("alert.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),M.define("sl-alert");const T=class{constructor(e){t(this,e)}async unhandledRejection(t){t.stopPropagation(),console.error("unhandled promise rejection",t),this.title="Unhandled promise rejection",this.message=t.reason.toString()}async catchError(t){if(t.stopPropagation(),console.error(t.detail),t.detail instanceof Error)this.title="Error",this.message=t.detail.message;else{const e=t.detail;this.title=e.title,this.message=e.detail}await this.alert.toast()}render(){return e(i,{key:"a2c2db82c085541f2912861ff715633c1a50872e"},e("sl-alert",{key:"af7e56dacdd8c2cdacfe4eb5020d59e8111e9947",ref:t=>this.alert=t,variant:"danger",duration:"10000",closable:!0},e("sl-icon",{key:"f50b8c321b0844c2f3cac2886f23b758e18500b1",slot:"icon",name:"exclamation-octagon"}),e("strong",{key:"0f7c7880b08366a16baaa1385df12614d6a6cddf"},this.title),e("br",{key:"5660dbabfa1162590b386087231301ee3920a415"}),this.message),e("slot",{key:"671026ea140044dfbeb63dee5c08a65591464668"}))}},H=class{constructor(e){t(this,e),this.uri="pod-os:dashboard"}render(){return e("pod-os:settings"===this.uri?"pos-app-settings":"pos-app-dashboard",null)}},V=class{constructor(e){t(this,e),this.subscribePodOs=o(this,"pod-os:init",7),this.linkEmitter=o(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 x.Subject,this.debouncedSearch=null,this.receivePodOs=async t=>{this.os=t}}updateResource(){var t;try{this.resource=this.uri?null===(t=this.os)||void 0===t?void 0:t.store.get(this.uri):null}catch(t){this.resource=null}}componentWillLoad(){z(this),this.updateResource(),$.onChange("isLoggedIn",(async t=>{t?await this.buildSearchIndex():this.clearSearchIndex()})),this.debouncedSearch=this.changeEvents.pipe(x.debounceTime(300)).subscribe((()=>this.search()))}disconnectedCallback(){var t;null===(t=this.debouncedSearch)||void 0===t||t.unsubscribe()}async buildSearchIndex(){this.searchIndex=await this.os.buildSearchIndex($.state.profile)}rebuildSearchIndex(){this.searchIndex.rebuild()}openNavigationDialog(t){var e,i;this.resource=t.detail,t.detail&&(this.inputValue=t.detail.uri,this.search()),null===(e=this.inputRef)||void 0===e||e.select(),null===(i=this.dialogRef)||void 0===i||i.show()}clearSearchIndex(){var t;null===(t=this.searchIndex)||void 0===t||t.clear()}onChange(t){this.inputValue=t.target.value,this.changeEvents.next()}closeDialog(){var t;null===(t=this.dialogRef)||void 0===t||t.close(),this.selectedIndex=-1}clearSuggestions(){var t;this.suggestions=[],null===(t=this.dialogRef)||void 0===t||t.close(),this.selectedIndex=-1}onClickSelf(t){t.stopPropagation()}handleKeyDown(t){"Escape"===t.key?this.closeDialog():"ArrowDown"===t.key?(t.preventDefault(),this.selectedIndex=Math.min(this.selectedIndex+1,this.suggestions.length-1)):"ArrowUp"===t.key&&(t.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:t=>this.dialogRef=t},e("form",{key:"e54698d8fb968a5ee6007cc4d5644fec36bf74f3",method:"dialog",onSubmit:()=>this.onSubmit()},e("input",{key:"633a4030c6296b5c94e2661bd73168afc1e04438",ref:t=>this.inputRef=t,enterkeyhint:"search","aria-label":"Search or enter URI",placeholder:"Search or enter URI",value:this.uri,onChange:t=>this.onChange(t),onInput:t=>this.onChange(t),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(((t,i)=>e("li",{id:`option-${i}`,role:"option","aria-selected":i===this.selectedIndex?"true":"false"},e("pos-rich-link",{uri:t.ref})))))):null))))}static get watchers(){return{uri:[{updateResource:0}],os:[{updateResource:0}]}}};V.style=":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}}";const P=S(),W=class{constructor(e){t(this,e),this.routeChanged=o(this,"pod-os:route-changed",7),this.mode="standalone"}linkClicked(t){this.navigate(t.detail)}sessionRestored(t){P.push(t.detail.url)}componentWillLoad(){this.updateUri(),P.onChange("url",(()=>{this.updateUri()}))}navigate(t){P.push("?uri="+encodeURIComponent(t))}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 e("slot",{key:"8b09de3dbbd253665cd541b9f264b0dcdc774354"})}};W.style=".toolbar{display:flex;flex-direction:row;gap:0;align-items:center;margin-left:0.5rem}pos-navigation{flex-grow:1}";const q={Generic:{element:"pos-app-generic",label:"Data",icon:"list-ul",types:[]},Attachments:{element:"pos-tool-attachments",label:"Attach",icon:"paperclip",types:[]},RdfDocument:{element:"pos-app-rdf-document",label:"Things",icon:"diagram-2",types:[{uri:"http://www.w3.org/2007/ont/link#RDFDocument",priority:20}]},DocumentViewer:{element:"pos-app-document-viewer",label:"Doc",icon:"file-text",types:[{uri:"http://www.w3.org/ns/iana/media-types/application/pdf#Resource",priority:30},{uri:"http://www.w3.org/2007/ont/link#Document",priority:10}]},ImageViewer:{element:"pos-app-image-viewer",label:"Pic",icon:"file-image",types:[{uri:"http://purl.org/dc/terms/Image",priority:20}]},LdpContainer:{element:"pos-app-ldp-container",label:"Content",icon:"folder",types:[{uri:"http://www.w3.org/ns/ldp#Container",priority:30}]}};function X(t,e){return t.filter((t=>e.has(t.uri))).reduce(((t,e)=>Math.max(t,e.priority)),0)}const K=t=>t.priority>0,N=(t,e)=>e.priority-t.priority,G=class{constructor(e){t(this,e),this.subscribeResource=o(this,"pod-os:resource",7),this.transitioning=!1,this.receiveResource=t=>{var e;const i=t.types();this.availableTools=function(t){const e=new Set(t.map((t=>t.uri)));return Object.values(q).map((t=>e=>({tool:e,priority:X(e.types,t)}))(e)).filter(K).toSorted(N).map((t=>t.tool)).concat(q.Generic).concat(q.Attachments)}(i),this.currentTool=null!==(e=this.availableTools.find((t=>t.element===this.initialTool)))&&void 0!==e?e:this.availableTools[0]}}componentWillLoad(){C(this);const t=new URLSearchParams(window.location.search).get("tool");t&&(this.initialTool=t)}handleToolSelected(t){this.oldTool=this.currentTool,this.currentTool=t.detail,this.transitioning=!0;const e=new URL(window.location.href);e.searchParams.set("tool",t.detail.element),window.history.replaceState({},"",e.toString())}render(){return this.availableTools?this.renderApp():null}renderApp(){var t;const i=this.currentTool.element,o=null===(t=this.oldTool)||void 0===t?void 0:t.element;return e("section",null,e("pos-tool-select",{selected:this.currentTool,tools:this.availableTools}),e("div",{class:{tools:!0,transition:this.transitioning},onAnimationEnd:()=>this.removeOldTool()},o&&e(o,{class:"tool hidden"}),e(i,{class:"tool visible"})))}removeOldTool(){this.oldTool=null,this.transitioning=!1}};G.style="section{display:flex;flex-direction:row}.tools{flex-grow:1;&.transition{position:relative;.tool{position:absolute}}}.tool{top:0;right:0;left:0;bottom:0;&.visible{animation:fadeIn 300ms ease-in}&.hidden{animation:fadeOut 300ms ease-in}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}@media (max-width: 640px){section{--toolbar-size:var(--size-16);flex-direction:column-reverse;padding-bottom:var(--toolbar-size);pos-tool-select{--button-size:var(--toolbar-size)}}}";var J=s`
259
259
  :host {
260
260
  display: inline-block;
261
261
 
@@ -318,7 +318,7 @@ import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js"
318
318
  object-fit: cover;
319
319
  overflow: hidden;
320
320
  }
321
- `,J=class extends h{constructor(){super(...arguments),this.hasError=!1,this.image="",this.label="",this.initials="",this.loading="eager",this.shape="circle"}handleImageChange(){this.hasError=!1}handleImageLoadError(){this.hasError=!0,this.emit("sl-error")}render(){const t=a`
321
+ `,Y=class extends h{constructor(){super(...arguments),this.hasError=!1,this.image="",this.label="",this.initials="",this.loading="eager",this.shape="circle"}handleImageChange(){this.hasError=!1}handleImageLoadError(){this.hasError=!0,this.emit("sl-error")}render(){const t=r`
322
322
  <img
323
323
  part="image"
324
324
  class="avatar__image"
@@ -327,13 +327,13 @@ import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js"
327
327
  alt=""
328
328
  @error="${this.handleImageLoadError}"
329
329
  />
330
- `;let e=a``;return e=this.initials?a`<div part="initials" class="avatar__initials">${this.initials}</div>`:a`
330
+ `;let e=r``;return e=this.initials?r`<div part="initials" class="avatar__initials">${this.initials}</div>`:r`
331
331
  <div part="icon" class="avatar__icon" aria-hidden="true">
332
332
  <slot name="icon">
333
333
  <sl-icon name="person-fill" library="system"></sl-icon>
334
334
  </slot>
335
335
  </div>
336
- `,a`
336
+ `,r`
337
337
  <div
338
338
  part="base"
339
339
  class=${p({avatar:!0,"avatar--circle":"circle"===this.shape,"avatar--rounded":"rounded"===this.shape,"avatar--square":"square"===this.shape})}
@@ -342,7 +342,7 @@ import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js"
342
342
  >
343
343
  ${this.image&&!this.hasError?t:e}
344
344
  </div>
345
- `}};J.styles=[r,X],J.dependencies={"sl-icon":n},l([c()],J.prototype,"hasError",2),l([d()],J.prototype,"image",2),l([d()],J.prototype,"label",2),l([d()],J.prototype,"initials",2),l([d()],J.prototype,"loading",2),l([d({reflect:!0})],J.prototype,"shape",2),l([u("image")],J.prototype,"handleImageChange",1),J.define("sl-avatar");var Y=s`
345
+ `}};Y.styles=[a,J],Y.dependencies={"sl-icon":n},l([c()],Y.prototype,"hasError",2),l([d()],Y.prototype,"image",2),l([d()],Y.prototype,"label",2),l([d()],Y.prototype,"initials",2),l([d()],Y.prototype,"loading",2),l([d({reflect:!0})],Y.prototype,"shape",2),l([u("image")],Y.prototype,"handleImageChange",1),Y.define("sl-avatar");var Q=s`
346
346
  :host {
347
347
  --color: var(--sl-panel-border-color);
348
348
  --width: var(--sl-panel-border-width);
@@ -361,4 +361,4 @@ import{r as t,h as e,e as i,c as o}from"./p-C0nMaA5M.js";import"./p-DjDNFMT3.js"
361
361
  border-left: solid var(--width) var(--color);
362
362
  margin: 0 var(--spacing);
363
363
  }
364
- `,Z=class extends h{constructor(){super(...arguments),this.vertical=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}handleVerticalChange(){this.setAttribute("aria-orientation",this.vertical?"vertical":"horizontal")}};Z.styles=[r,Y],l([d({type:Boolean,reflect:!0})],Z.prototype,"vertical",2),l([u("vertical")],Z.prototype,"handleVerticalChange",1),Z.define("sl-divider");const tt=class{constructor(e){t(this,e),this.logout=o(this,"pod-os:logout",7),this.link=o(this,"pod-os:link",7)}onSelect(t){const{value:e}=t.detail.item;"logout"===e?this.logout.emit():"profile"===e?this.link.emit(this.webId):"dashboard"===e?this.link.emit("pod-os:dashboard"):"settings"===e&&this.link.emit("pod-os:settings")}render(){return this.webId?e("pos-resource",{uri:this.webId},e("sl-dropdown",null,e("button",{slot:"trigger","aria-label":"User menu"},e("pos-picture",{"no-upload":!0},e("sl-avatar",null))),e("sl-menu",null,e("sl-menu-item",{value:"dashboard"},"Dashboard"),e("sl-menu-item",{value:"profile"},e("pos-label",null)),e("sl-menu-item",{value:"settings"},"Settings"),e("sl-divider",null),e("sl-menu-item",{value:"logout"},"Logout")))):null}};tt.style="button{display:flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:none;cursor:pointer;border-radius:50%;pos-picture{--width:40px;--height:40px;--border-radius:50%}sl-avatar{--size:40px}}sl-dropdown{display:block}";export{S as pos_add_new_thing,T as pos_error_toast,H as pos_internal_router,V as pos_navigation,q as pos_router,Q as pos_type_router,tt as pos_user_menu}
364
+ `,Z=class extends h{constructor(){super(...arguments),this.vertical=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}handleVerticalChange(){this.setAttribute("aria-orientation",this.vertical?"vertical":"horizontal")}};Z.styles=[a,Q],l([d({type:Boolean,reflect:!0})],Z.prototype,"vertical",2),l([u("vertical")],Z.prototype,"handleVerticalChange",1),Z.define("sl-divider");const tt=class{constructor(e){t(this,e),this.logout=o(this,"pod-os:logout",7),this.link=o(this,"pod-os:link",7)}onSelect(t){const{value:e}=t.detail.item;"logout"===e?this.logout.emit():"profile"===e?this.link.emit(this.webId):"dashboard"===e?this.link.emit("pod-os:dashboard"):"settings"===e&&this.link.emit("pod-os:settings")}render(){return this.webId?e("pos-resource",{uri:this.webId},e("sl-dropdown",null,e("button",{slot:"trigger","aria-label":"User menu"},e("pos-picture",{"no-upload":!0},e("sl-avatar",null))),e("sl-menu",null,e("sl-menu-item",{value:"dashboard"},"Dashboard"),e("sl-menu-item",{value:"profile"},e("pos-label",null)),e("sl-menu-item",{value:"settings"},"Settings"),e("sl-divider",null),e("sl-menu-item",{value:"logout"},"Logout")))):null}};tt.style="button{display:flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:none;cursor:pointer;border-radius:50%;pos-picture{--width:40px;--height:40px;--border-radius:50%}sl-avatar{--size:40px}}sl-dropdown{display:block}";export{j as pos_add_new_thing,T as pos_error_toast,H as pos_internal_router,V as pos_navigation,W as pos_router,G as pos_type_router,tt as pos_user_menu}
@@ -1 +1 @@
1
- import{r as a,h as e,e as i,a as s}from"./p-C0nMaA5M.js";import{u as r}from"./p-D0uCfr1-.js";import{u as t}from"./p-yVO4JQ9P.js";const o=class{constructor(e){a(this,e)}async componentWillLoad(){this.os=await r(this.el),this.resource=await t(this.el)}render(){var a;return e(i,{key:"c7670fa2c000099af02d33a702a404e9889d4552"},e("section",{key:"1b3ce82d5101ec4c0b6e6df26ede473c7287b747"},e("article",{key:"b9929952d801ab53a848985af7ed08c18072a662"},e("h2",{key:"dc39c20da1730c6ea01b32a99dc8b0680a33b6c2"},"Attachments"),e("pos-attachments",{key:"65fd33e592be78e1a15ac9c2238321973a3f8612",ref:a=>this.attachmentsElement=a}))),e("section",{key:"4ebe089659ed2c517440a9ff06141f332e44c56d"},(null===(a=this.resource)||void 0===a?void 0:a.editable)?e("pos-upload",{accept:["*/*"],uploader:a=>{const e=this.os.attachments().uploadAndAddAttachment(this.resource,a);return e.map((e=>{this.attachmentsElement.addToList({uri:e.url,label:a.name})})),e}}):null))}get el(){return s(this)}};o.style=":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}}}";export{o as pos_tool_attachments}
1
+ import{r as a,h as e,e as i,a as s}from"./p-DScSUBy-.js";import{u as r}from"./p-D0uCfr1-.js";import{u as t}from"./p-yVO4JQ9P.js";const o=class{constructor(e){a(this,e)}async componentWillLoad(){this.os=await r(this.el),this.resource=await t(this.el)}render(){var a;return e(i,{key:"c7670fa2c000099af02d33a702a404e9889d4552"},e("section",{key:"1b3ce82d5101ec4c0b6e6df26ede473c7287b747"},e("article",{key:"b9929952d801ab53a848985af7ed08c18072a662"},e("h2",{key:"dc39c20da1730c6ea01b32a99dc8b0680a33b6c2"},"Attachments"),e("pos-attachments",{key:"65fd33e592be78e1a15ac9c2238321973a3f8612",ref:a=>this.attachmentsElement=a}))),e("section",{key:"4ebe089659ed2c517440a9ff06141f332e44c56d"},(null===(a=this.resource)||void 0===a?void 0:a.editable)?e("pos-upload",{accept:["*/*"],uploader:a=>{const e=this.os.attachments().uploadAndAddAttachment(this.resource,a);return e.map((e=>{this.attachmentsElement.addToList({uri:e.url,label:a.name})})),e}}):null))}get el(){return s(this)}};o.style=":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}}}";export{o as pos_tool_attachments}
@@ -1 +1 @@
1
- import{r as o,c as r,h as s}from"./p-C0nMaA5M.js";import{R as c}from"./p-LoCE14bN.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
+ import{r as o,c as r,h as s}from"./p-DScSUBy-.js";import{R as c}from"./p-B0L5m2PZ.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 s,c as o,h as t,e}from"./p-C0nMaA5M.js";import{l as i}from"./p-LoCE14bN.js";import{s as l}from"./p-jlzl8vRd.js";import{s as r}from"./p-BW_CkW1K.js";import"./p-DjDNFMT3.js";import"./p-CgKErROC.js";import"./p-BXKgr5Gu.js";import"./p-DABKSnsL.js";import"./p-BnGEOH37.js";import"./p-DHzCjlyY.js";const a=class{constructor(t){s(this,t),this.subscribePodOs=o(this,"pod-os:init",7),this.subscribeResource=o(this,"pod-os:resource",7),this.addedLiteralValue=o(this,"pod-os:added-literal-value",7),this.error=o(this,"pod-os:error",7),this.receiveResource=s=>{this.resource=s},this.receivePodOs=async s=>{this.os=s}}setName(){}componentWillLoad(){r(this),l(this)}async save(){try{await this.os.addPropertyValue(this.resource,this.selectedTermUri,this.currentValue);const s={predicate:this.selectedTermUri,label:i(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 t(e,null,t("sl-icon",{name:"plus-circle"}),t("pos-select-term",{placeholder:"Add literal","onPod-os:term-selected":s=>this.onTermSelected(s)}),t("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}]}}};a.style=":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}";const n=class{constructor(t){s(this,t),this.subscribeResource=o(this,"pod-os:resource",7),this.data=[],this.receiveResource=s=>{this.data=s.literals()}}componentWillLoad(){r(this)}literalValueAdded(s){const o=this.data.find((o=>o.predicate===s.predicate));this.data=o?this.data.map((t=>t.predicate===o.predicate?{predicate:o.predicate,label:o.label,values:[...o.values,...s.values]}:t)):[...this.data,s]}render(){return t(e,{key:"79a29288f727943c57b62ffc4f3090ecf236f693"},this.data.length>0?t("dl",null,this.data.map((s=>t("div",{class:"predicate-values"},t("dt",null,t("pos-predicate",{uri:s.predicate,label:s.label})),t("div",{class:"values"},s.values.map((s=>t("dd",null,s)))))))):null,t("pos-add-literal-value",{key:"68d1936aca1dff7ff11493266aaf8e3c4d6d67e6","onPod-os:added-literal-value":s=>this.literalValueAdded(s.detail)}))}};n.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)}dd{padding:0;margin:0}dl{padding:0;margin:0;display:flex;flex-direction:column;gap:var(--size-1)}dt{margin-bottom:var(--size-1)}.predicate-values:nth-child(odd){background-color:var(--background-color-odd)}.predicate-values:nth-child(even){background-color:var(--background-color-even)}.predicate-values{display:flex;flex-direction:column;border:var(--size-px) solid var(--border-color);padding:var(--size-2);gap:var(--size-1);.values{display:flex;flex-direction:column;gap:var(--size-2)}}";const c=class{constructor(t){s(this,t),this.subscribeResource=o(this,"pod-os:resource",7),this.data=[],this.typeLabels=[],this.isExpanded=!1,this.receiveResource=s=>{this.data=s.types(),this.typeLabels=[...new Set(s.types().map((s=>s.label)))]}}componentWillLoad(){r(this)}toggleDetails(){this.isExpanded=!this.isExpanded}render(){return 0==this.data.length?null:this.isExpanded?t("div",{class:"types expanded"},t("sl-tooltip",{content:"Collapse types"},t("button",{class:"toggle",onClick:()=>this.toggleDetails()},t("sl-icon",{name:"arrows-collapse"}))),t("ul",null,this.data.map((s=>t("li",null,s.uri))))):t(e,null,t("div",{class:"types"},t("ul",null,this.typeLabels.map((s=>t("li",null,s)))),t("sl-tooltip",{content:"Expand types"},t("button",{class:"toggle",onClick:()=>this.toggleDetails()},t("sl-icon",{name:"arrows-expand"})))))}};c.style=".types{display:flex;gap:var(--size-1)}.expanded{flex-direction:column;justify-content:flex-start;align-items:flex-start;ul{flex-direction:column}}button.toggle{display:flex;cursor:pointer;justify-content:center;align-items:center;aspect-ratio:1 / 1}ul{margin:0;padding:0;display:flex;flex-direction:row;font-size:var(--size-3);gap:var(--size-2);li{cursor:default;display:inline-flex;align-items:center;padding:var(--size-1);border-radius:var(--radius-sm);background-color:var(--pos-subtle-text-color);color:var(--pos-background-color);list-style:none}}";export{a as pos_add_literal_value,n as pos_literals,c as pos_type_badges}
1
+ import{r as s,c as o,h as t,e}from"./p-DScSUBy-.js";import{l as i}from"./p-B0L5m2PZ.js";import{s as l}from"./p-jlzl8vRd.js";import{s as r}from"./p-BW_CkW1K.js";import"./p-Bk6kpzHk.js";import"./p-C8LPXtIR.js";import"./p-B0_xZCeV.js";import"./p-BXdS2klL.js";import"./p-BnGEOH37.js";import"./p-D_nUMgR-.js";const a=class{constructor(t){s(this,t),this.subscribePodOs=o(this,"pod-os:init",7),this.subscribeResource=o(this,"pod-os:resource",7),this.addedLiteralValue=o(this,"pod-os:added-literal-value",7),this.error=o(this,"pod-os:error",7),this.receiveResource=s=>{this.resource=s},this.receivePodOs=async s=>{this.os=s}}setName(){}componentWillLoad(){r(this),l(this)}async save(){try{await this.os.addPropertyValue(this.resource,this.selectedTermUri,this.currentValue);const s={predicate:this.selectedTermUri,label:i(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 t(e,null,t("sl-icon",{name:"plus-circle"}),t("pos-select-term",{placeholder:"Add literal","onPod-os:term-selected":s=>this.onTermSelected(s)}),t("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}]}}};a.style=":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}";const n=class{constructor(t){s(this,t),this.subscribeResource=o(this,"pod-os:resource",7),this.data=[],this.receiveResource=s=>{this.data=s.literals()}}componentWillLoad(){r(this)}literalValueAdded(s){const o=this.data.find((o=>o.predicate===s.predicate));this.data=o?this.data.map((t=>t.predicate===o.predicate?{predicate:o.predicate,label:o.label,values:[...o.values,...s.values]}:t)):[...this.data,s]}render(){return t(e,{key:"79a29288f727943c57b62ffc4f3090ecf236f693"},this.data.length>0?t("dl",null,this.data.map((s=>t("div",{class:"predicate-values"},t("dt",null,t("pos-predicate",{uri:s.predicate,label:s.label})),t("div",{class:"values"},s.values.map((s=>t("dd",null,s)))))))):null,t("pos-add-literal-value",{key:"68d1936aca1dff7ff11493266aaf8e3c4d6d67e6","onPod-os:added-literal-value":s=>this.literalValueAdded(s.detail)}))}};n.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)}dd{padding:0;margin:0}dl{padding:0;margin:0;display:flex;flex-direction:column;gap:var(--size-1)}dt{margin-bottom:var(--size-1)}.predicate-values:nth-child(odd){background-color:var(--background-color-odd)}.predicate-values:nth-child(even){background-color:var(--background-color-even)}.predicate-values{display:flex;flex-direction:column;border:var(--size-px) solid var(--border-color);padding:var(--size-2);gap:var(--size-1);.values{display:flex;flex-direction:column;gap:var(--size-2)}}";const c=class{constructor(t){s(this,t),this.subscribeResource=o(this,"pod-os:resource",7),this.data=[],this.typeLabels=[],this.isExpanded=!1,this.receiveResource=s=>{this.data=s.types(),this.typeLabels=[...new Set(s.types().map((s=>s.label)))]}}componentWillLoad(){r(this)}toggleDetails(){this.isExpanded=!this.isExpanded}render(){return 0==this.data.length?null:this.isExpanded?t("div",{class:"types expanded"},t("sl-tooltip",{content:"Collapse types"},t("button",{class:"toggle",onClick:()=>this.toggleDetails()},t("sl-icon",{name:"arrows-collapse"}))),t("ul",null,this.data.map((s=>t("li",null,s.uri))))):t(e,null,t("div",{class:"types"},t("ul",null,this.typeLabels.map((s=>t("li",null,s)))),t("sl-tooltip",{content:"Expand types"},t("button",{class:"toggle",onClick:()=>this.toggleDetails()},t("sl-icon",{name:"arrows-expand"})))))}};c.style=".types{display:flex;gap:var(--size-1)}.expanded{flex-direction:column;justify-content:flex-start;align-items:flex-start;ul{flex-direction:column}}button.toggle{display:flex;cursor:pointer;justify-content:center;align-items:center;aspect-ratio:1 / 1}ul{margin:0;padding:0;display:flex;flex-direction:row;font-size:var(--size-3);gap:var(--size-2);li{cursor:default;display:inline-flex;align-items:center;padding:var(--size-1);border-radius:var(--radius-sm);background-color:var(--pos-subtle-text-color);color:var(--pos-background-color);list-style:none}}";export{a as pos_add_literal_value,n as pos_literals,c as pos_type_badges}
@@ -1 +1 @@
1
- import{r as e,h as a,e as d}from"./p-C0nMaA5M.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
+ import{r as e,h as a,e as d}from"./p-DScSUBy-.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}