@pod-os/elements 0.26.1-rc.82a37be.0 → 0.26.1-rc.b9287e0.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 (121) hide show
  1. package/dist/cjs/app-globals-97a7ec18.js +23 -0
  2. package/dist/cjs/app-globals-97a7ec18.js.map +1 -0
  3. package/dist/cjs/elements.cjs.js +2 -2
  4. package/dist/cjs/ion-badge_5.cjs.entry.js +1 -1
  5. package/dist/cjs/ion-icon_32.cjs.entry.js +9157 -0
  6. package/dist/cjs/ion-icon_32.cjs.entry.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
  9. package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
  10. package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
  11. package/dist/collection/apps/pos-app-browser/pos-app-browser.js +2 -1
  12. package/dist/collection/apps/pos-app-browser/pos-app-browser.js.map +1 -1
  13. package/dist/collection/apps/pos-app-dashboard/pos-app-dashboard.js +1 -1
  14. package/dist/collection/apps/pos-app-dashboard/pos-example-resources/pos-example-resources.js +1 -1
  15. package/dist/collection/apps/pos-app-dashboard/pos-getting-started/pos-getting-started.js +1 -1
  16. package/dist/collection/apps/pos-app-generic/pos-app-generic.js +1 -1
  17. package/dist/collection/apps/pos-app-ldp-container/pos-app-ldp-container.js +1 -1
  18. package/dist/collection/apps/pos-app-rdf-document/pos-app-rdf-document.js +1 -1
  19. package/dist/collection/apps/pos-app-settings/pos-app-settings.js +1 -1
  20. package/dist/collection/apps/pos-app-settings/pos-setting-offline-cache/pos-setting-offline-cache.js +1 -1
  21. package/dist/collection/collection-manifest.json +1 -0
  22. package/dist/collection/components/pos-add-new-thing/pos-add-new-thing.js +1 -1
  23. package/dist/collection/components/pos-app/pos-app.js +1 -1
  24. package/dist/collection/components/pos-dialog/pos-dialog.js +1 -1
  25. package/dist/collection/components/pos-error-toast/pos-error-toast.js +1 -1
  26. package/dist/collection/components/pos-literals/pos-literals.js +1 -1
  27. package/dist/collection/components/pos-login/pos-login.js +7 -1
  28. package/dist/collection/components/pos-login/pos-login.js.map +1 -1
  29. package/dist/collection/components/pos-login-form/pos-login-form.js +1 -1
  30. package/dist/collection/components/pos-navigation/bar/pos-navigation-bar.js +1 -1
  31. package/dist/collection/components/pos-navigation/pos-navigation.js +1 -1
  32. package/dist/collection/components/pos-new-thing-form/pos-new-thing-form.js +1 -1
  33. package/dist/collection/components/pos-picture/pos-picture.js +1 -1
  34. package/dist/collection/components/pos-picture/pos-picture.js.map +1 -1
  35. package/dist/collection/components/pos-rich-link/pos-rich-link.js +2 -2
  36. package/dist/collection/components/pos-router/pos-router.js +1 -1
  37. package/dist/collection/components/pos-select-term/pos-select-term.js +1 -1
  38. package/dist/collection/components/pos-user-menu/pos-user-menu.css +24 -0
  39. package/dist/collection/components/pos-user-menu/pos-user-menu.js +102 -0
  40. package/dist/collection/components/pos-user-menu/pos-user-menu.js.map +1 -0
  41. package/dist/collection/components/pos-user-menu/shoelace.js +6 -0
  42. package/dist/collection/components/pos-user-menu/shoelace.js.map +1 -0
  43. package/dist/collection/global.js +6 -0
  44. package/dist/collection/global.js.map +1 -1
  45. package/dist/components/index.js +7 -0
  46. package/dist/components/index.js.map +1 -1
  47. package/dist/components/pos-add-new-thing2.js +1 -1
  48. package/dist/components/pos-app-browser.js +68 -61
  49. package/dist/components/pos-app-browser.js.map +1 -1
  50. package/dist/components/pos-app-dashboard2.js +1 -1
  51. package/dist/components/pos-app-generic.js +1 -1
  52. package/dist/components/pos-app-ldp-container.js +1 -1
  53. package/dist/components/pos-app-rdf-document.js +1 -1
  54. package/dist/components/pos-app-settings2.js +1 -1
  55. package/dist/components/pos-app2.js +1 -1
  56. package/dist/components/pos-dialog2.js +1 -1
  57. package/dist/components/pos-error-toast2.js +1 -1
  58. package/dist/components/pos-example-resources2.js +1 -1
  59. package/dist/components/pos-getting-started2.js +1 -1
  60. package/dist/components/pos-literals2.js +1 -1
  61. package/dist/components/pos-login-form2.js +1 -1
  62. package/dist/components/pos-login2.js +2 -2
  63. package/dist/components/pos-login2.js.map +1 -1
  64. package/dist/components/pos-navigation-bar2.js +1 -1
  65. package/dist/components/pos-navigation2.js +1 -1
  66. package/dist/components/pos-new-thing-form2.js +1 -1
  67. package/dist/components/pos-picture2.js +1 -1
  68. package/dist/components/pos-picture2.js.map +1 -1
  69. package/dist/components/pos-rich-link2.js +2 -2
  70. package/dist/components/pos-router2.js +1 -1
  71. package/dist/components/pos-select-term2.js +1 -1
  72. package/dist/components/pos-setting-offline-cache2.js +1 -1
  73. package/dist/components/pos-user-menu.d.ts +11 -0
  74. package/dist/components/pos-user-menu.js +8 -0
  75. package/dist/components/pos-user-menu.js.map +1 -0
  76. package/dist/components/pos-user-menu2.js +5064 -0
  77. package/dist/components/pos-user-menu2.js.map +1 -0
  78. package/dist/elements/elements.css +7 -1
  79. package/dist/elements/elements.esm.js +1 -1
  80. package/dist/elements/elements.esm.js.map +1 -1
  81. package/dist/elements/p-3f129942.entry.js +2 -0
  82. package/dist/elements/p-4789f893.entry.js +2 -0
  83. package/dist/elements/p-61cd1259.js +2 -0
  84. package/dist/elements/p-61cd1259.js.map +1 -0
  85. package/dist/elements/p-951ab33f.entry.js +2 -0
  86. package/dist/elements/p-bf4281d5.entry.js +652 -0
  87. package/dist/elements/p-bf4281d5.entry.js.map +1 -0
  88. package/dist/elements/{p-178b3852.entry.js → p-db7b0e71.entry.js} +2 -2
  89. package/dist/esm/app-globals-fd9221d0.js +21 -0
  90. package/dist/esm/app-globals-fd9221d0.js.map +1 -0
  91. package/dist/esm/elements.js +2 -2
  92. package/dist/esm/ion-badge_5.entry.js +1 -1
  93. package/dist/esm/ion-icon_32.entry.js +9122 -0
  94. package/dist/esm/ion-icon_32.entry.js.map +1 -0
  95. package/dist/esm/loader.js +2 -2
  96. package/dist/esm/pos-app-generic.entry.js +1 -1
  97. package/dist/esm/pos-app-ldp-container.entry.js +1 -1
  98. package/dist/esm/pos-app-rdf-document.entry.js +1 -1
  99. package/dist/types/components/pos-user-menu/pos-user-menu.d.ts +13 -0
  100. package/dist/types/components/pos-user-menu/shoelace.d.ts +5 -0
  101. package/dist/types/components.d.ts +33 -0
  102. package/package.json +2 -1
  103. package/dist/cjs/app-globals-1c06b5ae.js +0 -16
  104. package/dist/cjs/app-globals-1c06b5ae.js.map +0 -1
  105. package/dist/cjs/ion-icon_31.cjs.entry.js +0 -4156
  106. package/dist/cjs/ion-icon_31.cjs.entry.js.map +0 -1
  107. package/dist/elements/p-0252f287.entry.js +0 -20
  108. package/dist/elements/p-0252f287.entry.js.map +0 -1
  109. package/dist/elements/p-2cda3231.entry.js +0 -2
  110. package/dist/elements/p-c27a94bc.entry.js +0 -2
  111. package/dist/elements/p-e1957ea1.entry.js +0 -2
  112. package/dist/elements/p-ec7a6c44.js +0 -2
  113. package/dist/elements/p-ec7a6c44.js.map +0 -1
  114. package/dist/esm/app-globals-31ecda4c.js +0 -14
  115. package/dist/esm/app-globals-31ecda4c.js.map +0 -1
  116. package/dist/esm/ion-icon_31.entry.js +0 -4122
  117. package/dist/esm/ion-icon_31.entry.js.map +0 -1
  118. /package/dist/elements/{p-e1957ea1.entry.js.map → p-3f129942.entry.js.map} +0 -0
  119. /package/dist/elements/{p-c27a94bc.entry.js.map → p-4789f893.entry.js.map} +0 -0
  120. /package/dist/elements/{p-2cda3231.entry.js.map → p-951ab33f.entry.js.map} +0 -0
  121. /package/dist/elements/{p-178b3852.entry.js.map → p-db7b0e71.entry.js.map} +0 -0
@@ -11,7 +11,7 @@ export class PosNavigationBar {
11
11
  }
12
12
  render() {
13
13
  const ariaLabel = this.current ? `${this.current.label()} (Click to search or enter URI)` : 'Search or enter URI';
14
- return (h("section", { key: '1b507d50bd24f257023fe980f1ffdb3abe903577', class: "current" }, this.current && this.searchIndexReady && h("pos-make-findable", { key: 'e96559f40418154a26350705ae6e3dbf8057a424', uri: this.current.uri }), h("button", { key: '2ac476bd89918e71ca10cc945952f8c9905865df', "aria-label": ariaLabel, onClick: () => this.onClick() }, h("div", { key: 'd34b73e2090f08cab8533d03a7b206d420bfa8c2' }, this.current ? this.current.label() : 'Search or enter URI'), this.icon())));
14
+ return (h("section", { key: '79ac5c5dc2d6c2d44e852f9671d0895a29fb62a6', class: "current" }, this.current && this.searchIndexReady && h("pos-make-findable", { key: 'be92d99ead125c1a29520639da6dfd6e28007d85', uri: this.current.uri }), h("button", { key: '4ecdd49e46614f604c36ef760422d54f99ab00f1', "aria-label": ariaLabel, onClick: () => this.onClick() }, h("div", { key: '002c4138be9b798cecec90de50f7500cffd89df7' }, this.current ? this.current.label() : 'Search or enter URI'), this.icon())));
15
15
  }
16
16
  icon() {
17
17
  return (h("svg", { "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" })));
@@ -113,7 +113,7 @@ export class PosNavigation {
113
113
  }
114
114
  }
115
115
  render() {
116
- return (h("nav", { key: '5c6c07b6b2f9ccb0e45bd59b5e477d8ed3d52c2d' }, h("search", { key: '19997ad34212d679547ad5e1bb2f5ea53e576361' }, h("pos-navigation-bar", { key: '2d1c073b2c53ba8cd5afbb595cc95015e5a50e5b', searchIndexReady: this.searchIndex !== undefined, current: this.resource }), h("dialog", { key: '55de5a58604feaf54426b643b434560dbc55a9a1', ref: el => (this.dialogRef = el) }, h("form", { key: '50c064938ec275b53bde81d9bb6c86e0c708a625', method: "dialog", onSubmit: () => this.onSubmit() }, h("input", { key: 'ca06fd69e8346cb8bb0868560f39987b4545c8f5', ref: el => (this.inputRef = el), enterkeyhint: "search", "aria-label": "Search or enter URI", placeholder: "Search or enter URI", value: this.uri, onChange: e => this.onChange(e), onInput: e => this.onChange(e), 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 ? (h("div", { class: "suggestions" }, h("ol", { id: "suggestions-list", role: "listbox", "aria-label": "Search results" }, this.suggestions.map((it, index) => (h("li", { id: `option-${index}`, role: "option", "aria-selected": index === this.selectedIndex ? 'true' : 'false' }, h("pos-rich-link", { uri: it.ref }))))))) : null)))));
116
+ return (h("nav", { key: 'f09437fdd0bdfc5912af62658f1f32ab54c439c8' }, h("search", { key: 'fa09fec64bacfe1460a1fad256e509a480dd6a01' }, h("pos-navigation-bar", { key: '8dcd35cad5858da049ae942152f3cebe884aa761', searchIndexReady: this.searchIndex !== undefined, current: this.resource }), h("dialog", { key: '3ad61d48a6c5fcd0b010950c702e9488a9fd5160', ref: el => (this.dialogRef = el) }, h("form", { key: '1c23af28daf15f635d4c36002ca6fe153e33b48e', method: "dialog", onSubmit: () => this.onSubmit() }, h("input", { key: 'b94910b19d32dbb091790f0ebbf59f5838e8d5ea', ref: el => (this.inputRef = el), enterkeyhint: "search", "aria-label": "Search or enter URI", placeholder: "Search or enter URI", value: this.uri, onChange: e => this.onChange(e), onInput: e => this.onChange(e), 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 ? (h("div", { class: "suggestions" }, h("ol", { id: "suggestions-list", role: "listbox", "aria-label": "Search results" }, this.suggestions.map((it, index) => (h("li", { id: `option-${index}`, role: "option", "aria-selected": index === this.selectedIndex ? 'true' : 'false' }, h("pos-rich-link", { uri: it.ref }))))))) : null)))));
117
117
  }
118
118
  static get is() { return "pos-navigation"; }
119
119
  static get encapsulation() { return "shadow"; }
@@ -14,7 +14,7 @@ export class PosNewThingForm {
14
14
  subscribePodOs(this);
15
15
  }
16
16
  render() {
17
- return (h("form", { key: '6d8a76b95abc98ab382b425b2dd8894983bb9522', method: "dialog", onSubmit: e => this.handleSubmit(e) }, h("label", { key: '6fe391ac186c0b0a8e6bb3265e66469dac3ab187', htmlFor: "type" }, "Type"), h("pos-select-term", { key: '33b50596c8cd22d8ce2b1af114277fa9bfd80355', id: "type", placeholder: "", value: this.selectedTypeUri, "onPod-os:term-selected": e => this.onTermSelected(e) }), h("label", { key: '8681f29f0c20d59c2be10a1f49cc38dea6abd19d', htmlFor: "name" }, "Name"), h("input", { key: 'f5905d871b55821f7019134d972e1f156c55f49e', id: "name", type: "text", value: this.name, onInput: e => this.handleChange(e) }), this.newUri ? (h("div", { id: "new-uri", title: "This will be the URI of the new thing" }, this.newUri)) : null, h("input", { key: 'dade4834abecd9bf2fc8eb5bca0b1f60784287a4', id: "create", type: "submit", value: "Create", disabled: !this.canSubmit })));
17
+ return (h("form", { key: 'b1fb16121ecdbed1a3f19df9f9acd1cbc70f91f1', method: "dialog", onSubmit: e => this.handleSubmit(e) }, h("label", { key: '87397db04178def97089013afb85287bfc3fe679', htmlFor: "type" }, "Type"), h("pos-select-term", { key: 'dcc4829c2af46d899617f1ee1e8b3b3fd0a8ebf3', id: "type", placeholder: "", value: this.selectedTypeUri, "onPod-os:term-selected": e => this.onTermSelected(e) }), h("label", { key: 'a9ae3917bce29016bf2923b11a9c278a2e54afe4', htmlFor: "name" }, "Name"), h("input", { key: '3638043dac61fdda67a28f95c0ab9991a3a36979', id: "name", type: "text", value: this.name, onInput: e => this.handleChange(e) }), this.newUri ? (h("div", { id: "new-uri", title: "This will be the URI of the new thing" }, this.newUri)) : null, h("input", { key: '2bcec9f76f2b2f45abadf395b826938d6dcc67ab', id: "create", type: "submit", value: "Create", disabled: !this.canSubmit })));
18
18
  }
19
19
  handleChange(event) {
20
20
  this.name = event.target.value;
@@ -16,7 +16,7 @@ export class PosPicture {
16
16
  render() {
17
17
  const pic = this.resource ? this.resource.picture() : null;
18
18
  if (!pic)
19
- return null;
19
+ return h("slot", null);
20
20
  return h("pos-image", { blurredBackground: this.blurredBackground, src: pic.url, alt: this.resource.label() });
21
21
  }
22
22
  static get is() { return "pos-picture"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pos-picture.js","sourceRoot":"","sources":["../../../../src/components/pos-picture/pos-picture.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO3E,MAAM,OAAO,UAAU;IALvB;QAME;;WAEG;QACK,sBAAiB,GAAY,KAAK,CAAC;QAU3C,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC3B,CAAC,CAAC;KAOH;IAbC,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAMD,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3D,IAAI,CAAC,GAAG;YAAE,OAAO,IAAI,CAAC;QACtB,OAAO,iBAAW,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAc,CAAC;IACtH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, State, h, Prop } from '@stencil/core';\nimport { Thing } from '@pod-os/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-picture',\n shadow: true,\n styleUrl: 'pos-picture.css',\n})\nexport class PosPicture implements ResourceAware {\n /**\n * Use a blurred version of the image as its own background, if the image is scaled down to fit into the container.\n */\n @Prop() blurredBackground: boolean = false;\n\n @State() resource: Thing;\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.resource = resource;\n };\n\n render() {\n const pic = this.resource ? this.resource.picture() : null;\n if (!pic) return null;\n return <pos-image blurredBackground={this.blurredBackground} src={pic.url} alt={this.resource.label()}></pos-image>;\n }\n}\n"]}
1
+ {"version":3,"file":"pos-picture.js","sourceRoot":"","sources":["../../../../src/components/pos-picture/pos-picture.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO3E,MAAM,OAAO,UAAU;IALvB;QAME;;WAEG;QACK,sBAAiB,GAAY,KAAK,CAAC;QAU3C,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC3B,CAAC,CAAC;KAOH;IAbC,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAMD,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3D,IAAI,CAAC,GAAG;YAAE,OAAO,eAAa,CAAC;QAC/B,OAAO,iBAAW,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAc,CAAC;IACtH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, State, h, Prop } from '@stencil/core';\nimport { Thing } from '@pod-os/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-picture',\n shadow: true,\n styleUrl: 'pos-picture.css',\n})\nexport class PosPicture implements ResourceAware {\n /**\n * Use a blurred version of the image as its own background, if the image is scaled down to fit into the container.\n */\n @Prop() blurredBackground: boolean = false;\n\n @State() resource: Thing;\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.resource = resource;\n };\n\n render() {\n const pic = this.resource ? this.resource.picture() : null;\n if (!pic) return <slot></slot>;\n return <pos-image blurredBackground={this.blurredBackground} src={pic.url} alt={this.resource.label()}></pos-image>;\n }\n}\n"]}
@@ -1,10 +1,10 @@
1
1
  import { h } from "@stencil/core";
2
2
  export class PosRichLink {
3
3
  render() {
4
- return (h("pos-resource", { key: '389fb8817f5a7ff77965a8bb9924f48af15c528c', lazy: true, uri: this.uri }, h("p", { key: '1946deeff38a510800ef1558fd6374f65d72cd7f', class: "content" }, h("a", { key: '776c99ca32c7cd7fac30ab1f18b1c024b234d85f', href: this.uri, onClick: e => {
4
+ return (h("pos-resource", { key: '73845f265bf6ce6b9245c3b1a98c169ee110b650', lazy: true, uri: this.uri }, h("p", { key: '5d2698dd9cf27cb8b81cd679196f1b65eb8b45f8', class: "content" }, h("a", { key: '26973e0fa9966c07b0568a1893aef2d35f51744a', href: this.uri, onClick: e => {
5
5
  e.preventDefault();
6
6
  this.linkEmitter.emit(this.uri);
7
- } }, h("pos-label", { key: '0ddb22c414f2e4d61cf1beabb301b723b78235e1' })), h("span", { key: 'd2730c1fcc1c1521a7527bdb7a63c091ff49746c', class: "url" }, new URL(this.uri).host), h("pos-description", { key: '53867e57b7403aed46e94a5f3df0b8389bc68244' }))));
7
+ } }, h("pos-label", { key: 'f0cfb727e32f5e3c760bd06e8c3031639959ff2c' })), h("span", { key: '93bfbe0f64ceceac6f600a39827aa3387460de1f', class: "url" }, new URL(this.uri).host), h("pos-description", { key: '28a1a9afeb21720c3fe87ff5a4ad004173508a53' }))));
8
8
  }
9
9
  static get is() { return "pos-rich-link"; }
10
10
  static get encapsulation() { return "shadow"; }
@@ -38,7 +38,7 @@ export class PosRouter {
38
38
  this.routeChanged.emit(this.uri);
39
39
  }
40
40
  render() {
41
- return h("slot", { key: 'a5a451a8ddf4a30c6e5cbb2faf61d44f5a286df9' });
41
+ return h("slot", { key: '8b09de3dbbd253665cd541b9f264b0dcdc774354' });
42
42
  }
43
43
  static get is() { return "pos-router"; }
44
44
  static get originalStyleUrls() {
@@ -19,7 +19,7 @@ export class PosSelectTerm {
19
19
  this.termSelected.emit({ uri: event.target.value });
20
20
  }
21
21
  render() {
22
- return (h(Host, { key: '7f7d48443893800bb818e67865fccdbe1d10d44a' }, h("input", { key: 'ee24690418d5a4d6e357154e12685fa9975754f9', part: "input", list: "terms", placeholder: this.placeholder, value: this.value, onChange: ev => this.handleChange(ev) }), h("datalist", { key: '78fde7ccb4e0750e902da139b02810c15c21db3e', part: "terms", id: "terms" }, this.terms.map(term => (h("option", { value: term.uri }, term.shorthand))))));
22
+ return (h(Host, { key: '88196bb6125fb061a14058eb4b8c5ece2a479316' }, h("input", { key: '839d513d12de456412da84c6de912ecb0df1d36f', part: "input", list: "terms", placeholder: this.placeholder, value: this.value, onChange: ev => this.handleChange(ev) }), h("datalist", { key: '3b62eb3eba017b4f092f20385c3cd79f7ab3c977', part: "terms", id: "terms" }, this.terms.map(term => (h("option", { value: term.uri }, term.shorthand))))));
23
23
  }
24
24
  static get is() { return "pos-select-term"; }
25
25
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,24 @@
1
+ button {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ padding: 0;
6
+ margin: 0;
7
+ border: none;
8
+ background: none;
9
+ cursor: pointer;
10
+ border-radius: 50%;
11
+ pos-picture {
12
+ --width: 40px;
13
+ --height: 40px;
14
+ --border-radius: 50%;
15
+ }
16
+ sl-avatar {
17
+ --size: 40px;
18
+ }
19
+ }
20
+
21
+ sl-dropdown {
22
+ display: block;
23
+ --sl-color-primary-600: var(--pos-primary-color);
24
+ }
@@ -0,0 +1,102 @@
1
+ import { h } from "@stencil/core";
2
+ import "./shoelace";
3
+ export class PosUserMenu {
4
+ onSelect(e) {
5
+ const { value } = e.detail.item;
6
+ if (value === 'logout') {
7
+ this.logout.emit();
8
+ }
9
+ else if (value === 'profile') {
10
+ this.link.emit(this.webId);
11
+ }
12
+ else if (value === 'dashboard') {
13
+ this.link.emit('pod-os:dashboard');
14
+ }
15
+ else if (value === 'settings') {
16
+ this.link.emit('pod-os:settings');
17
+ }
18
+ }
19
+ render() {
20
+ if (!this.webId)
21
+ return null; //?
22
+ return (h("pos-resource", { uri: this.webId }, h("sl-dropdown", null, h("button", { slot: "trigger" }, h("pos-picture", null, h("sl-avatar", null))), h("sl-menu", null, h("sl-menu-item", { value: "dashboard" }, "Dashboard"), h("sl-menu-item", { value: "profile" }, h("pos-label", null)), h("sl-menu-item", { value: "settings" }, "Settings"), h("sl-divider", null), h("sl-menu-item", { value: "logout" }, "Logout")))));
23
+ }
24
+ static get is() { return "pos-user-menu"; }
25
+ static get encapsulation() { return "shadow"; }
26
+ static get originalStyleUrls() {
27
+ return {
28
+ "$": ["pos-user-menu.css"]
29
+ };
30
+ }
31
+ static get styleUrls() {
32
+ return {
33
+ "$": ["pos-user-menu.css"]
34
+ };
35
+ }
36
+ static get properties() {
37
+ return {
38
+ "webId": {
39
+ "type": "string",
40
+ "mutable": false,
41
+ "complexType": {
42
+ "original": "string",
43
+ "resolved": "string",
44
+ "references": {}
45
+ },
46
+ "required": true,
47
+ "optional": false,
48
+ "docs": {
49
+ "tags": [],
50
+ "text": ""
51
+ },
52
+ "getter": false,
53
+ "setter": false,
54
+ "attribute": "web-id",
55
+ "reflect": false
56
+ }
57
+ };
58
+ }
59
+ static get events() {
60
+ return [{
61
+ "method": "logout",
62
+ "name": "pod-os:logout",
63
+ "bubbles": true,
64
+ "cancelable": true,
65
+ "composed": true,
66
+ "docs": {
67
+ "tags": [],
68
+ "text": ""
69
+ },
70
+ "complexType": {
71
+ "original": "any",
72
+ "resolved": "any",
73
+ "references": {}
74
+ }
75
+ }, {
76
+ "method": "link",
77
+ "name": "pod-os:link",
78
+ "bubbles": true,
79
+ "cancelable": true,
80
+ "composed": true,
81
+ "docs": {
82
+ "tags": [],
83
+ "text": ""
84
+ },
85
+ "complexType": {
86
+ "original": "any",
87
+ "resolved": "any",
88
+ "references": {}
89
+ }
90
+ }];
91
+ }
92
+ static get listeners() {
93
+ return [{
94
+ "name": "sl-select",
95
+ "method": "onSelect",
96
+ "target": undefined,
97
+ "capture": false,
98
+ "passive": false
99
+ }];
100
+ }
101
+ }
102
+ //# sourceMappingURL=pos-user-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pos-user-menu.js","sourceRoot":"","sources":["../../../../src/components/pos-user-menu/pos-user-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEhF,OAAO,YAAY,CAAC;AAOpB,MAAM,OAAO,WAAW;IAWtB,QAAQ,CAAC,CAAuE;QAC9E,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;QAChC,IAAI,KAAK,KAAK,QAAQ,EAAE,CAAC;YACvB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC;aAAM,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;aAAM,IAAI,KAAK,KAAK,WAAW,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACrC,CAAC;aAAM,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;YAChC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC,CAAC,GAAG;QACjC,OAAO,CACL,oBAAc,GAAG,EAAE,IAAI,CAAC,KAAK;YAC3B;gBACE,cAAQ,IAAI,EAAC,SAAS;oBACpB;wBACE,oBAAuB,CACX,CACP;gBACT;oBACE,oBAAc,KAAK,EAAC,WAAW,gBAAyB;oBACxD,oBAAc,KAAK,EAAC,SAAS;wBAC3B,oBAAuB,CACV;oBACf,oBAAc,KAAK,EAAC,UAAU,eAAwB;oBACtD,qBAAyB;oBACzB,oBAAc,KAAK,EAAC,QAAQ,aAAsB,CAC1C,CACE,CACD,CAChB,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, h, Listen, Prop } from '@stencil/core';\n\nimport './shoelace';\n\n@Component({\n tag: 'pos-user-menu',\n shadow: true,\n styleUrl: 'pos-user-menu.css',\n})\nexport class PosUserMenu {\n @Prop()\n webId!: string;\n\n @Event({ eventName: 'pod-os:logout' })\n logout: EventEmitter;\n\n @Event({ eventName: 'pod-os:link' })\n link: EventEmitter;\n\n @Listen('sl-select')\n onSelect(e: CustomEvent<{ item: { value: 'profile' | 'logout' | 'dashboard' } }>) {\n const { value } = e.detail.item;\n if (value === 'logout') {\n this.logout.emit();\n } else if (value === 'profile') {\n this.link.emit(this.webId);\n } else if (value === 'dashboard') {\n this.link.emit('pod-os:dashboard');\n } else if (value === 'settings') {\n this.link.emit('pod-os:settings');\n }\n }\n\n render() {\n if (!this.webId) return null; //?\n return (\n <pos-resource uri={this.webId}>\n <sl-dropdown>\n <button slot=\"trigger\">\n <pos-picture>\n <sl-avatar></sl-avatar>\n </pos-picture>\n </button>\n <sl-menu>\n <sl-menu-item value=\"dashboard\">Dashboard</sl-menu-item>\n <sl-menu-item value=\"profile\">\n <pos-label></pos-label>\n </sl-menu-item>\n <sl-menu-item value=\"settings\">Settings</sl-menu-item>\n <sl-divider></sl-divider>\n <sl-menu-item value=\"logout\">Logout</sl-menu-item>\n </sl-menu>\n </sl-dropdown>\n </pos-resource>\n );\n }\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import "@shoelace-style/shoelace/dist/components/dropdown/dropdown.js";
2
+ import "@shoelace-style/shoelace/dist/components/menu/menu.js";
3
+ import "@shoelace-style/shoelace/dist/components/menu-item/menu-item.js";
4
+ import "@shoelace-style/shoelace/dist/components/avatar/avatar.js";
5
+ import "@shoelace-style/shoelace/dist/components/divider/divider.js";
6
+ //# sourceMappingURL=shoelace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shoelace.js","sourceRoot":"","sources":["../../../../src/components/pos-user-menu/shoelace.ts"],"names":[],"mappings":"AAAA,OAAO,+DAA+D,CAAC;AACvE,OAAO,uDAAuD,CAAC;AAC/D,OAAO,iEAAiE,CAAC;AACzE,OAAO,2DAA2D,CAAC;AACnE,OAAO,6DAA6D,CAAC","sourcesContent":["import '@shoelace-style/shoelace/dist/components/dropdown/dropdown.js';\nimport '@shoelace-style/shoelace/dist/components/menu/menu.js';\nimport '@shoelace-style/shoelace/dist/components/menu-item/menu-item.js';\nimport '@shoelace-style/shoelace/dist/components/avatar/avatar.js';\nimport '@shoelace-style/shoelace/dist/components/divider/divider.js';\n"]}
@@ -1,2 +1,8 @@
1
1
  import "@ionic/core";
2
+ const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
3
+ function updateTheme(e) {
4
+ document.documentElement.classList.toggle('sl-theme-dark', e.matches);
5
+ }
6
+ updateTheme(mediaQuery);
7
+ mediaQuery.addEventListener('change', updateTheme);
2
8
  //# sourceMappingURL=global.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/global.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC","sourcesContent":["import '@ionic/core';\n"]}
1
+ {"version":3,"file":"global.js","sourceRoot":"","sources":["../../src/global.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;AAErE,SAAS,WAAW,CAAC,CAAC;IACpB,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;AACxE,CAAC;AAED,WAAW,CAAC,UAAU,CAAC,CAAC;AAExB,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC","sourcesContent":["import '@ionic/core';\n\nconst mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n\nfunction updateTheme(e) {\n document.documentElement.classList.toggle('sl-theme-dark', e.matches);\n}\n\nupdateTheme(mediaQuery);\n\nmediaQuery.addEventListener('change', updateTheme);\n"]}
@@ -1,6 +1,13 @@
1
1
  import { i as initialize } from './ionic-global.js';
2
2
  export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
3
3
 
4
+ const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
5
+ function updateTheme(e) {
6
+ document.documentElement.classList.toggle('sl-theme-dark', e.matches);
7
+ }
8
+ updateTheme(mediaQuery);
9
+ mediaQuery.addEventListener('change', updateTheme);
10
+
4
11
  const globalFn = () => { };
5
12
 
6
13
  const globalScripts = () => {
@@ -1 +1 @@
1
- {"file":"index.js","mappings":";;;;;AAEO,MAAM,aAAa,GAAG,MAAM;AACnC,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC;AACrB,IAAIA,QAAoB,EAAE;AAC1B,IAAIC,UAAqB,EAAE;AAC3B,GAAG,CAAC,CAAC;AACL,CAAC;;","names":["elementsGlobalScript","ionicCoreGlobalScript"],"sources":["@stencil/core/internal/app-globals"],"sourcesContent":["import ionicCoreGlobalScript from '/home/runner/work/PodOS/PodOS/node_modules/@ionic/core/dist/collection/global/ionic-global.js';\nimport elementsGlobalScript from '/home/runner/work/PodOS/PodOS/elements/src/global.ts';\nexport const globalScripts = () => {\n return Promise.all([\n elementsGlobalScript(),\n ionicCoreGlobalScript(),\n ]);\n};\n"],"version":3}
1
+ {"file":"index.js","mappings":";;;AAAA;AAEA;AAEA;;AAEA;AAEA,WAAW;;;;ACNJ,MAAM,aAAa,GAAG,MAAM;AACnC,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC;AACrB,IAAIA,QAAoB,EAAE;AAC1B,IAAIC,UAAqB,EAAE;AAC3B,GAAG,CAAC,CAAC;AACL,CAAC;;","names":["elementsGlobalScript","ionicCoreGlobalScript"],"sources":["src/global.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import '@ionic/core';\n\nconst mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n\nfunction updateTheme(e) {\n document.documentElement.classList.toggle('sl-theme-dark', e.matches);\n}\n\nupdateTheme(mediaQuery);\n\nmediaQuery.addEventListener('change', updateTheme);\n","import ionicCoreGlobalScript from '/home/runner/work/PodOS/PodOS/node_modules/@ionic/core/dist/collection/global/ionic-global.js';\nimport elementsGlobalScript from '/home/runner/work/PodOS/PodOS/elements/src/global.ts';\nexport const globalScripts = () => {\n return Promise.all([\n elementsGlobalScript(),\n ionicCoreGlobalScript(),\n ]);\n};\n"],"version":3}
@@ -17,7 +17,7 @@ const PosAddNewThing = /*@__PURE__*/ proxyCustomElement(class PosAddNewThing ext
17
17
  this.dialog.showModal();
18
18
  }
19
19
  render() {
20
- return (h(Host, { key: '5ed3ba3982467778ed2b9b02090c230acb6b1762' }, h("button", { key: '96ff5dbd0ba4ca4d8c1d25045efa06fea062e9cf', id: "new", title: "Add a new thing", onClick: () => this.openDialog() }, h("ion-icon", { key: '201a19c8ecb39e0e913d3fb8cf1ebee06bc41df5', name: "add-circle-outline" })), h("pos-dialog", { key: '421da81e6faf52119fe600cc388663299eab67ec', ref: el => (this.dialog = el) }, h("span", { key: '454e6e05dc478e9c1b378cb3308f006fab4d8738', slot: "title" }, "Add a new thing"), h("pos-new-thing-form", { key: 'a469379848776a4c7e9f8e3f94da76ba048d7fab', slot: "content", referenceUri: this.referenceUri }))));
20
+ return (h(Host, { key: '4adcc80d1a0d810279a85be26c8ec6717d91c8a2' }, h("button", { key: '9a3cdd12719c4d3e4ae1e0eff60ccd6101395d92', id: "new", title: "Add a new thing", onClick: () => this.openDialog() }, h("ion-icon", { key: 'efb2723db05962c02293931d0a334ba55908f596', name: "add-circle-outline" })), h("pos-dialog", { key: '954a947b2dc4082519c50cb71a4b6f0f3550c0fb', ref: el => (this.dialog = el) }, h("span", { key: '0a7e91bab3d8740bc8228782d70a980779db7ca1', slot: "title" }, "Add a new thing"), h("pos-new-thing-form", { key: '66ac9bcf72a71b58f4dbbc5cfd214b3609c78cbf', slot: "content", referenceUri: this.referenceUri }))));
21
21
  }
22
22
  static get style() { return PosAddNewThingStyle0; }
23
23
  }, [1, "pos-add-new-thing", {
@@ -1,34 +1,36 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
- import { d as defineCustomElement$v } from './icon.js';
3
- import { d as defineCustomElement$u } from './progress-bar.js';
4
- import { d as defineCustomElement$t } from './ripple-effect.js';
5
- import { d as defineCustomElement$s } from './skeleton-text.js';
6
- import { d as defineCustomElement$r } from './toast.js';
7
- import { d as defineCustomElement$q } from './pos-add-new-thing2.js';
8
- import { d as defineCustomElement$p } from './pos-app2.js';
9
- import { d as defineCustomElement$o } from './pos-app-dashboard2.js';
10
- import { d as defineCustomElement$n } from './pos-app-settings2.js';
11
- import { d as defineCustomElement$m } from './pos-description2.js';
12
- import { d as defineCustomElement$l } from './pos-dialog2.js';
13
- import { d as defineCustomElement$k } from './pos-error-toast2.js';
14
- import { d as defineCustomElement$j } from './pos-example-resources2.js';
15
- import { d as defineCustomElement$i } from './pos-getting-started2.js';
16
- import { d as defineCustomElement$h } from './pos-image2.js';
17
- import { d as defineCustomElement$g } from './pos-internal-router2.js';
18
- import { d as defineCustomElement$f } from './pos-label2.js';
19
- import { d as defineCustomElement$e } from './pos-login2.js';
20
- import { d as defineCustomElement$d } from './pos-login-form2.js';
21
- import { d as defineCustomElement$c } from './pos-make-findable2.js';
22
- import { d as defineCustomElement$b } from './pos-navigation2.js';
23
- import { d as defineCustomElement$a } from './pos-navigation-bar2.js';
24
- import { d as defineCustomElement$9 } from './pos-new-thing-form2.js';
25
- import { d as defineCustomElement$8 } from './pos-picture2.js';
26
- import { d as defineCustomElement$7 } from './pos-resource2.js';
27
- import { d as defineCustomElement$6 } from './pos-rich-link2.js';
28
- import { d as defineCustomElement$5 } from './pos-router2.js';
29
- import { d as defineCustomElement$4 } from './pos-select-term2.js';
30
- import { d as defineCustomElement$3 } from './pos-setting-offline-cache2.js';
31
- import { d as defineCustomElement$2 } from './pos-type-router2.js';
2
+ import { s as store } from './session.js';
3
+ import { d as defineCustomElement$w } from './icon.js';
4
+ import { d as defineCustomElement$v } from './progress-bar.js';
5
+ import { d as defineCustomElement$u } from './ripple-effect.js';
6
+ import { d as defineCustomElement$t } from './skeleton-text.js';
7
+ import { d as defineCustomElement$s } from './toast.js';
8
+ import { d as defineCustomElement$r } from './pos-add-new-thing2.js';
9
+ import { d as defineCustomElement$q } from './pos-app2.js';
10
+ import { d as defineCustomElement$p } from './pos-app-dashboard2.js';
11
+ import { d as defineCustomElement$o } from './pos-app-settings2.js';
12
+ import { d as defineCustomElement$n } from './pos-description2.js';
13
+ import { d as defineCustomElement$m } from './pos-dialog2.js';
14
+ import { d as defineCustomElement$l } from './pos-error-toast2.js';
15
+ import { d as defineCustomElement$k } from './pos-example-resources2.js';
16
+ import { d as defineCustomElement$j } from './pos-getting-started2.js';
17
+ import { d as defineCustomElement$i } from './pos-image2.js';
18
+ import { d as defineCustomElement$h } from './pos-internal-router2.js';
19
+ import { d as defineCustomElement$g } from './pos-label2.js';
20
+ import { d as defineCustomElement$f } from './pos-login2.js';
21
+ import { d as defineCustomElement$e } from './pos-login-form2.js';
22
+ import { d as defineCustomElement$d } from './pos-make-findable2.js';
23
+ import { d as defineCustomElement$c } from './pos-navigation2.js';
24
+ import { d as defineCustomElement$b } from './pos-navigation-bar2.js';
25
+ import { d as defineCustomElement$a } from './pos-new-thing-form2.js';
26
+ import { d as defineCustomElement$9 } from './pos-picture2.js';
27
+ import { d as defineCustomElement$8 } from './pos-resource2.js';
28
+ import { d as defineCustomElement$7 } from './pos-rich-link2.js';
29
+ import { d as defineCustomElement$6 } from './pos-router2.js';
30
+ import { d as defineCustomElement$5 } from './pos-select-term2.js';
31
+ import { d as defineCustomElement$4 } from './pos-setting-offline-cache2.js';
32
+ import { d as defineCustomElement$3 } from './pos-type-router2.js';
33
+ import { d as defineCustomElement$2 } from './pos-user-menu2.js';
32
34
 
33
35
  const posAppBrowserCss = "pos-router {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\npos-navigation {\n max-width: var(--width-lg);\n margin: 0;\n min-width: var(--size-32);\n flex-shrink: 1; /* Ensure navigation can shrink */\n}\n\npos-add-new-thing,\npos-login {\n flex: 0 1 auto;\n flex-shrink: 0; /* Ensure those items don't shrink */\n}\n\nheader,\nfooter {\n display: flex;\n gap: var(--size-1);\n height: auto;\n justify-content: center;\n align-items: center;\n padding: var(--size-1);\n}\n\nfooter svg {\n width: var(--size-5);\n height: var(--size-5);\n}\n\nfooter {\n font-size: var(--scale-fluid-000);\n\n .settings {\n padding: 0 var(--size-1);\n text-decoration: none;\n background-color: var(--pos-background-color);\n border: 1px solid var(--pos-secondary-border-color);\n color: var(--pos-secondary-border-color);\n border-radius: var(--radius-xs);\n\n &:hover {\n background-color: var(--pos-secondary-border-color);\n color: var(--pos-background-color);\n }\n }\n}\n\nheader {\n flex-wrap: nowrap;\n padding: var(--size-1) var(--size-8);\n}\n\nmain {\n flex: 1;\n max-height: 100vh;\n overflow: auto;\n}\n\n@media (max-width: 640px) {\n header {\n padding: var(--size-1);\n justify-content: space-between;\n }\n}\n";
34
36
  const PosAppBrowserStyle0 = posAppBrowserCss;
@@ -48,7 +50,7 @@ const PosAppBrowser$1 = /*@__PURE__*/ proxyCustomElement(class PosAppBrowser ext
48
50
  this.uri = '';
49
51
  }
50
52
  render() {
51
- return (h(Host, { key: 'd2c863f8abf790352cdf9c830a1baa8d7aee95a8' }, h("pos-app", { key: '163415bea00a0a18f5e97f5cb7f3e5b9f5910f61', restorePreviousSession: this.restorePreviousSession }, h("pos-error-toast", { key: '799735b00aff86946259013132079814520ced7e' }, h("pos-router", { key: 'bdb89d03d93937399ec38b0b2c1d695feea248b9', mode: this.mode, "onPod-os:route-changed": e => (this.uri = e.detail) }, h("header", { key: 'e828af57fa2d8842c058197a826ac488cbb2a968' }, h("pos-add-new-thing", { key: '28eed0a89a4e554e88ea4fce13b2dd59c5ce0149', referenceUri: this.uri }), h("pos-navigation", { key: '16a06ae6aea6ac316cacc4ffa52442b3ada62d62', uri: this.uri === 'pod-os:dashboard' ? '' : this.uri }), h("pos-login", { key: '9577c4aa8a18af341715b6e51946dbb4481ef963' })), h("main", { key: '73dc7ba162440c5198a31f5a4b060dc2c2d1c70a' }, this.mainContent()), h("footer", { key: 'cb18c8eb3abc1ee62426db39a61e650df2906241' }, h(Logo, { key: 'e9205f06faa7153310a17470f55b97a423cf6691' }), h("span", { key: '7be0a255d0ca50d961f122fdfc9fd3bb3fdfd624' }, "PodOS Browser"), h("span", { key: '3ed17bc88faffbcfa973278c76f63a2a199ec026' }, "|"), h("a", { key: 'ab88d3e93e59b918dd21b8cd42b70522dc532730', class: "settings", href: "?uri=pod-os%3Asettings" }, "\u2699 Settings")))))));
53
+ return (h(Host, { key: '08b186d2f354d6c07df02707eb4ada81aef7dec3' }, h("pos-app", { key: '54c372343e916ab5d77584381b3965c925ae0cd0', restorePreviousSession: this.restorePreviousSession }, h("pos-error-toast", { key: 'ab63e18121ca16670f81da141219a782dde0694b' }, h("pos-router", { key: '69b6f3bf8ce3720c6c39cdb4be69e640e27ccc5b', mode: this.mode, "onPod-os:route-changed": e => (this.uri = e.detail) }, h("header", { key: '5cd3412caf13b6d99da517ae7e6f5877234e65d7' }, h("pos-add-new-thing", { key: '9b83b3cf03b7038303975386176df539b35ff547', referenceUri: this.uri }), h("pos-navigation", { key: '26bfed9b1c8dd1be018babc6ef40ae42808a5c42', uri: this.uri === 'pod-os:dashboard' ? '' : this.uri }), h("pos-login", { key: 'e29f18dcde866d8ac1e317fcd7b71ef584e69034' }, h("pos-user-menu", { key: 'be796f0914649eb4e8525a9d8acdfd535626303c', webId: store.state.webId, slot: "if-logged-in" }))), h("main", { key: 'f99dfb2d43e949528bc767b94801c99bf04a7eea' }, this.mainContent()), h("footer", { key: '64744d1246356fa00da9c6b561785e2b794a7907' }, h(Logo, { key: 'a648f7f88e12c79348bda33152f2759d2b93e738' }), h("span", { key: 'f22e2f9904ba517fc2e579a05018704b5ade6302' }, "PodOS Browser"), h("span", { key: '24cfa0a74fa3759d919a4ef847705353d403f93b' }, "|"), h("a", { key: 'a4264428f853102c940b4babc71a8b32d7a400e7', class: "settings", href: "?uri=pod-os%3Asettings" }, "\u2699 Settings")))))));
52
54
  }
53
55
  mainContent() {
54
56
  if (this.uri === '') {
@@ -84,7 +86,7 @@ function defineCustomElement$1() {
84
86
  if (typeof customElements === "undefined") {
85
87
  return;
86
88
  }
87
- const components = ["pos-app-browser", "ion-icon", "ion-progress-bar", "ion-ripple-effect", "ion-skeleton-text", "ion-toast", "pos-add-new-thing", "pos-app", "pos-app-dashboard", "pos-app-settings", "pos-description", "pos-dialog", "pos-error-toast", "pos-example-resources", "pos-getting-started", "pos-image", "pos-internal-router", "pos-label", "pos-login", "pos-login-form", "pos-make-findable", "pos-navigation", "pos-navigation-bar", "pos-new-thing-form", "pos-picture", "pos-resource", "pos-rich-link", "pos-router", "pos-select-term", "pos-setting-offline-cache", "pos-type-router"];
89
+ const components = ["pos-app-browser", "ion-icon", "ion-progress-bar", "ion-ripple-effect", "ion-skeleton-text", "ion-toast", "pos-add-new-thing", "pos-app", "pos-app-dashboard", "pos-app-settings", "pos-description", "pos-dialog", "pos-error-toast", "pos-example-resources", "pos-getting-started", "pos-image", "pos-internal-router", "pos-label", "pos-login", "pos-login-form", "pos-make-findable", "pos-navigation", "pos-navigation-bar", "pos-new-thing-form", "pos-picture", "pos-resource", "pos-rich-link", "pos-router", "pos-select-term", "pos-setting-offline-cache", "pos-type-router", "pos-user-menu"];
88
90
  components.forEach(tagName => { switch (tagName) {
89
91
  case "pos-app-browser":
90
92
  if (!customElements.get(tagName)) {
@@ -93,150 +95,155 @@ function defineCustomElement$1() {
93
95
  break;
94
96
  case "ion-icon":
95
97
  if (!customElements.get(tagName)) {
96
- defineCustomElement$v();
98
+ defineCustomElement$w();
97
99
  }
98
100
  break;
99
101
  case "ion-progress-bar":
100
102
  if (!customElements.get(tagName)) {
101
- defineCustomElement$u();
103
+ defineCustomElement$v();
102
104
  }
103
105
  break;
104
106
  case "ion-ripple-effect":
105
107
  if (!customElements.get(tagName)) {
106
- defineCustomElement$t();
108
+ defineCustomElement$u();
107
109
  }
108
110
  break;
109
111
  case "ion-skeleton-text":
110
112
  if (!customElements.get(tagName)) {
111
- defineCustomElement$s();
113
+ defineCustomElement$t();
112
114
  }
113
115
  break;
114
116
  case "ion-toast":
115
117
  if (!customElements.get(tagName)) {
116
- defineCustomElement$r();
118
+ defineCustomElement$s();
117
119
  }
118
120
  break;
119
121
  case "pos-add-new-thing":
120
122
  if (!customElements.get(tagName)) {
121
- defineCustomElement$q();
123
+ defineCustomElement$r();
122
124
  }
123
125
  break;
124
126
  case "pos-app":
125
127
  if (!customElements.get(tagName)) {
126
- defineCustomElement$p();
128
+ defineCustomElement$q();
127
129
  }
128
130
  break;
129
131
  case "pos-app-dashboard":
130
132
  if (!customElements.get(tagName)) {
131
- defineCustomElement$o();
133
+ defineCustomElement$p();
132
134
  }
133
135
  break;
134
136
  case "pos-app-settings":
135
137
  if (!customElements.get(tagName)) {
136
- defineCustomElement$n();
138
+ defineCustomElement$o();
137
139
  }
138
140
  break;
139
141
  case "pos-description":
140
142
  if (!customElements.get(tagName)) {
141
- defineCustomElement$m();
143
+ defineCustomElement$n();
142
144
  }
143
145
  break;
144
146
  case "pos-dialog":
145
147
  if (!customElements.get(tagName)) {
146
- defineCustomElement$l();
148
+ defineCustomElement$m();
147
149
  }
148
150
  break;
149
151
  case "pos-error-toast":
150
152
  if (!customElements.get(tagName)) {
151
- defineCustomElement$k();
153
+ defineCustomElement$l();
152
154
  }
153
155
  break;
154
156
  case "pos-example-resources":
155
157
  if (!customElements.get(tagName)) {
156
- defineCustomElement$j();
158
+ defineCustomElement$k();
157
159
  }
158
160
  break;
159
161
  case "pos-getting-started":
160
162
  if (!customElements.get(tagName)) {
161
- defineCustomElement$i();
163
+ defineCustomElement$j();
162
164
  }
163
165
  break;
164
166
  case "pos-image":
165
167
  if (!customElements.get(tagName)) {
166
- defineCustomElement$h();
168
+ defineCustomElement$i();
167
169
  }
168
170
  break;
169
171
  case "pos-internal-router":
170
172
  if (!customElements.get(tagName)) {
171
- defineCustomElement$g();
173
+ defineCustomElement$h();
172
174
  }
173
175
  break;
174
176
  case "pos-label":
175
177
  if (!customElements.get(tagName)) {
176
- defineCustomElement$f();
178
+ defineCustomElement$g();
177
179
  }
178
180
  break;
179
181
  case "pos-login":
180
182
  if (!customElements.get(tagName)) {
181
- defineCustomElement$e();
183
+ defineCustomElement$f();
182
184
  }
183
185
  break;
184
186
  case "pos-login-form":
185
187
  if (!customElements.get(tagName)) {
186
- defineCustomElement$d();
188
+ defineCustomElement$e();
187
189
  }
188
190
  break;
189
191
  case "pos-make-findable":
190
192
  if (!customElements.get(tagName)) {
191
- defineCustomElement$c();
193
+ defineCustomElement$d();
192
194
  }
193
195
  break;
194
196
  case "pos-navigation":
195
197
  if (!customElements.get(tagName)) {
196
- defineCustomElement$b();
198
+ defineCustomElement$c();
197
199
  }
198
200
  break;
199
201
  case "pos-navigation-bar":
200
202
  if (!customElements.get(tagName)) {
201
- defineCustomElement$a();
203
+ defineCustomElement$b();
202
204
  }
203
205
  break;
204
206
  case "pos-new-thing-form":
205
207
  if (!customElements.get(tagName)) {
206
- defineCustomElement$9();
208
+ defineCustomElement$a();
207
209
  }
208
210
  break;
209
211
  case "pos-picture":
210
212
  if (!customElements.get(tagName)) {
211
- defineCustomElement$8();
213
+ defineCustomElement$9();
212
214
  }
213
215
  break;
214
216
  case "pos-resource":
215
217
  if (!customElements.get(tagName)) {
216
- defineCustomElement$7();
218
+ defineCustomElement$8();
217
219
  }
218
220
  break;
219
221
  case "pos-rich-link":
220
222
  if (!customElements.get(tagName)) {
221
- defineCustomElement$6();
223
+ defineCustomElement$7();
222
224
  }
223
225
  break;
224
226
  case "pos-router":
225
227
  if (!customElements.get(tagName)) {
226
- defineCustomElement$5();
228
+ defineCustomElement$6();
227
229
  }
228
230
  break;
229
231
  case "pos-select-term":
230
232
  if (!customElements.get(tagName)) {
231
- defineCustomElement$4();
233
+ defineCustomElement$5();
232
234
  }
233
235
  break;
234
236
  case "pos-setting-offline-cache":
235
237
  if (!customElements.get(tagName)) {
236
- defineCustomElement$3();
238
+ defineCustomElement$4();
237
239
  }
238
240
  break;
239
241
  case "pos-type-router":
242
+ if (!customElements.get(tagName)) {
243
+ defineCustomElement$3();
244
+ }
245
+ break;
246
+ case "pos-user-menu":
240
247
  if (!customElements.get(tagName)) {
241
248
  defineCustomElement$2();
242
249
  }
@@ -1 +1 @@
1
- {"file":"pos-app-browser.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,4yCAA4yC,CAAC;AACt0C,4BAAe,gBAAgB;;MCKlBA,eAAa;IAJ1B;;;QAKU,2BAAsB,GAAY,KAAK,CAAC;;;;;;;QAQxC,SAAI,GAAyB,YAAY,CAAC;QAEzC,QAAG,GAAG,EAAE,CAAC;KA0CnB;IAxCC,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,gEAAS,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,IAC1D,0EACE,mEAAY,IAAI,EAAE,IAAI,CAAC,IAAI,4BAA0B,CAAC,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,IAC7E,iEACE,0EAAmB,YAAY,EAAE,IAAI,CAAC,GAAG,GAAsB,EAC/D,uEAAgB,GAAG,EAAE,IAAI,CAAC,GAAG,KAAK,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,GAAmB,EACvF,mEAAuB,CAChB,EACT,+DAAO,IAAI,CAAC,WAAW,EAAE,CAAQ,EACjC,iEACE,EAAC,IAAI,sDAAG,EACR,+EAA0B,EAC1B,mEAAc,EACd,0DAAG,KAAK,EAAC,UAAU,EAAC,IAAI,EAAC,wBAAwB,sBAE7C,CACG,CACE,CACG,CACV,CACL,EACP;KACH;IAEO,WAAW;QACjB,IAAI,IAAI,CAAC,GAAG,KAAK,EAAE,EAAE;YACnB,OAAO,IAAI,CAAC;SACb;QACD,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,OAAO,2BAAqB,GAAG,EAAE,IAAI,CAAC,GAAG,GAAI,CAAC;SAC/C;QACD,QACE,oBAAc,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,IACxC,0BAAmB,CACN,EACf;KACH;;;;;;;AAGH,MAAM,IAAI,GAAG;IACX,QACE,WAAK,OAAO,EAAC,aAAa,EAAC,KAAK,EAAC,4BAA4B,IAC3D,YACE,CAAC,EAAC,6CAA6C,EAC/C,KAAK,EAAE;YACL,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,SAAS;YACnB,cAAc,EAAE,IAAI;SACrB,qBACe,OAAO,GACvB,EAEF,YACE,CAAC,EAAC,0EAA0E,EAC5E,KAAK,EAAE;YACL,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,OAAO;YACjB,cAAc,EAAE,IAAI;SACrB,qBACe,OAAO,GACvB,EAEF,YACE,CAAC,EAAC,gDAAgD,EAClD,KAAK,EAAE;YACL,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,SAAS;YACnB,cAAc,EAAE,IAAI;SACrB,qBACe,OAAO,GACvB,CACE,EACN;AACJ,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["PosAppBrowser"],"sources":["src/apps/pos-app-browser/pos-app-browser.css?tag=pos-app-browser","src/apps/pos-app-browser/pos-app-browser.tsx"],"sourcesContent":["pos-router {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\npos-navigation {\n max-width: var(--width-lg);\n margin: 0;\n min-width: var(--size-32);\n flex-shrink: 1; /* Ensure navigation can shrink */\n}\n\npos-add-new-thing,\npos-login {\n flex: 0 1 auto;\n flex-shrink: 0; /* Ensure those items don't shrink */\n}\n\nheader,\nfooter {\n display: flex;\n gap: var(--size-1);\n height: auto;\n justify-content: center;\n align-items: center;\n padding: var(--size-1);\n}\n\nfooter svg {\n width: var(--size-5);\n height: var(--size-5);\n}\n\nfooter {\n font-size: var(--scale-fluid-000);\n\n .settings {\n padding: 0 var(--size-1);\n text-decoration: none;\n background-color: var(--pos-background-color);\n border: 1px solid var(--pos-secondary-border-color);\n color: var(--pos-secondary-border-color);\n border-radius: var(--radius-xs);\n\n &:hover {\n background-color: var(--pos-secondary-border-color);\n color: var(--pos-background-color);\n }\n }\n}\n\nheader {\n flex-wrap: nowrap;\n padding: var(--size-1) var(--size-8);\n}\n\nmain {\n flex: 1;\n max-height: 100vh;\n overflow: auto;\n}\n\n@media (max-width: 640px) {\n header {\n padding: var(--size-1);\n justify-content: space-between;\n }\n}\n","import { Component, h, Host, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'pos-app-browser',\n styleUrl: 'pos-app-browser.css',\n})\nexport class PosAppBrowser {\n @Prop() restorePreviousSession: boolean = false;\n\n /**\n * The mode the app is running in:\n *\n * - standalone: use this when you deploy it as a standalone web application\n * - pod: use this when you host this app as a default interface for you pod\n */\n @Prop() mode: 'standalone' | 'pod' = 'standalone';\n\n @State() uri = '';\n\n render() {\n return (\n <Host>\n <pos-app restorePreviousSession={this.restorePreviousSession}>\n <pos-error-toast>\n <pos-router mode={this.mode} onPod-os:route-changed={e => (this.uri = e.detail)}>\n <header>\n <pos-add-new-thing referenceUri={this.uri}></pos-add-new-thing>\n <pos-navigation uri={this.uri === 'pod-os:dashboard' ? '' : this.uri}></pos-navigation>\n <pos-login></pos-login>\n </header>\n <main>{this.mainContent()}</main>\n <footer>\n <Logo />\n <span>PodOS Browser</span>\n <span>|</span>\n <a class=\"settings\" href=\"?uri=pod-os%3Asettings\">\n ⚙ Settings\n </a>\n </footer>\n </pos-router>\n </pos-error-toast>\n </pos-app>\n </Host>\n );\n }\n\n private mainContent() {\n if (this.uri === '') {\n return null;\n }\n if (this.uri.startsWith('pod-os:')) {\n return <pos-internal-router uri={this.uri} />;\n }\n return (\n <pos-resource key={this.uri} uri={this.uri}>\n <pos-type-router />\n </pos-resource>\n );\n }\n}\n\nconst Logo = () => {\n return (\n <svg viewBox=\"0 0 400 400\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M50 350 L50 100 L200 50 L350 100 L350 350 Z\"\n style={{\n 'fill': '#008BF8',\n 'stroke': '#008BF8',\n 'stroke-width': '70',\n }}\n stroke-linejoin=\"round\"\n />\n\n <path\n d=\"M100 300 L100 150 L200 120 L300 150 L300 300 L130 300 L130 370 L100 370Z\"\n style={{\n 'fill': 'white',\n 'stroke': 'white',\n 'stroke-width': '45',\n }}\n stroke-linejoin=\"round\"\n />\n\n <path\n d=\"M150 250 L150 200 L200 180 L250 200 L250 250 Z\"\n style={{\n 'fill': '#DC0073',\n 'stroke': '#DC0073',\n 'stroke-width': '20',\n }}\n stroke-linejoin=\"round\"\n />\n </svg>\n );\n};\n"],"version":3}
1
+ {"file":"pos-app-browser.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,4yCAA4yC,CAAC;AACt0C,4BAAe,gBAAgB;;MCMlBA,eAAa;IAJ1B;;;QAKU,2BAAsB,GAAY,KAAK,CAAC;;;;;;;QAQxC,SAAI,GAAyB,YAAY,CAAC;QAEzC,QAAG,GAAG,EAAE,CAAC;KA6CnB;IA3CC,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,gEAAS,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,IAC1D,0EACE,mEAAY,IAAI,EAAE,IAAI,CAAC,IAAI,4BAA0B,CAAC,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,IAC7E,iEACE,0EAAmB,YAAY,EAAE,IAAI,CAAC,GAAG,GAAsB,EAC/D,uEAAgB,GAAG,EAAE,IAAI,CAAC,GAAG,KAAK,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,GAAmB,EAEvF,oEACE,sEAAe,KAAK,EAAEC,KAAO,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAC,cAAc,GAAiB,CACrE,CACL,EACT,+DAAO,IAAI,CAAC,WAAW,EAAE,CAAQ,EACjC,iEACE,EAAC,IAAI,sDAAG,EACR,+EAA0B,EAC1B,mEAAc,EACd,0DAAG,KAAK,EAAC,UAAU,EAAC,IAAI,EAAC,wBAAwB,sBAE7C,CACG,CACE,CACG,CACV,CACL,EACP;KACH;IAEO,WAAW;QACjB,IAAI,IAAI,CAAC,GAAG,KAAK,EAAE,EAAE;YACnB,OAAO,IAAI,CAAC;SACb;QACD,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,OAAO,2BAAqB,GAAG,EAAE,IAAI,CAAC,GAAG,GAAI,CAAC;SAC/C;QACD,QACE,oBAAc,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,IACxC,0BAAmB,CACN,EACf;KACH;;;;;;;AAGH,MAAM,IAAI,GAAG;IACX,QACE,WAAK,OAAO,EAAC,aAAa,EAAC,KAAK,EAAC,4BAA4B,IAC3D,YACE,CAAC,EAAC,6CAA6C,EAC/C,KAAK,EAAE;YACL,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,SAAS;YACnB,cAAc,EAAE,IAAI;SACrB,qBACe,OAAO,GACvB,EAEF,YACE,CAAC,EAAC,0EAA0E,EAC5E,KAAK,EAAE;YACL,MAAM,EAAE,OAAO;YACf,QAAQ,EAAE,OAAO;YACjB,cAAc,EAAE,IAAI;SACrB,qBACe,OAAO,GACvB,EAEF,YACE,CAAC,EAAC,gDAAgD,EAClD,KAAK,EAAE;YACL,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,SAAS;YACnB,cAAc,EAAE,IAAI;SACrB,qBACe,OAAO,GACvB,CACE,EACN;AACJ,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["PosAppBrowser","session"],"sources":["src/apps/pos-app-browser/pos-app-browser.css?tag=pos-app-browser","src/apps/pos-app-browser/pos-app-browser.tsx"],"sourcesContent":["pos-router {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\npos-navigation {\n max-width: var(--width-lg);\n margin: 0;\n min-width: var(--size-32);\n flex-shrink: 1; /* Ensure navigation can shrink */\n}\n\npos-add-new-thing,\npos-login {\n flex: 0 1 auto;\n flex-shrink: 0; /* Ensure those items don't shrink */\n}\n\nheader,\nfooter {\n display: flex;\n gap: var(--size-1);\n height: auto;\n justify-content: center;\n align-items: center;\n padding: var(--size-1);\n}\n\nfooter svg {\n width: var(--size-5);\n height: var(--size-5);\n}\n\nfooter {\n font-size: var(--scale-fluid-000);\n\n .settings {\n padding: 0 var(--size-1);\n text-decoration: none;\n background-color: var(--pos-background-color);\n border: 1px solid var(--pos-secondary-border-color);\n color: var(--pos-secondary-border-color);\n border-radius: var(--radius-xs);\n\n &:hover {\n background-color: var(--pos-secondary-border-color);\n color: var(--pos-background-color);\n }\n }\n}\n\nheader {\n flex-wrap: nowrap;\n padding: var(--size-1) var(--size-8);\n}\n\nmain {\n flex: 1;\n max-height: 100vh;\n overflow: auto;\n}\n\n@media (max-width: 640px) {\n header {\n padding: var(--size-1);\n justify-content: space-between;\n }\n}\n","import { Component, h, Host, Prop, State } from '@stencil/core';\nimport session from '../../store/session';\n\n@Component({\n tag: 'pos-app-browser',\n styleUrl: 'pos-app-browser.css',\n})\nexport class PosAppBrowser {\n @Prop() restorePreviousSession: boolean = false;\n\n /**\n * The mode the app is running in:\n *\n * - standalone: use this when you deploy it as a standalone web application\n * - pod: use this when you host this app as a default interface for you pod\n */\n @Prop() mode: 'standalone' | 'pod' = 'standalone';\n\n @State() uri = '';\n\n render() {\n return (\n <Host>\n <pos-app restorePreviousSession={this.restorePreviousSession}>\n <pos-error-toast>\n <pos-router mode={this.mode} onPod-os:route-changed={e => (this.uri = e.detail)}>\n <header>\n <pos-add-new-thing referenceUri={this.uri}></pos-add-new-thing>\n <pos-navigation uri={this.uri === 'pod-os:dashboard' ? '' : this.uri}></pos-navigation>\n\n <pos-login>\n <pos-user-menu webId={session.state.webId} slot=\"if-logged-in\"></pos-user-menu>\n </pos-login>\n </header>\n <main>{this.mainContent()}</main>\n <footer>\n <Logo />\n <span>PodOS Browser</span>\n <span>|</span>\n <a class=\"settings\" href=\"?uri=pod-os%3Asettings\">\n ⚙ Settings\n </a>\n </footer>\n </pos-router>\n </pos-error-toast>\n </pos-app>\n </Host>\n );\n }\n\n private mainContent() {\n if (this.uri === '') {\n return null;\n }\n if (this.uri.startsWith('pod-os:')) {\n return <pos-internal-router uri={this.uri} />;\n }\n return (\n <pos-resource key={this.uri} uri={this.uri}>\n <pos-type-router />\n </pos-resource>\n );\n }\n}\n\nconst Logo = () => {\n return (\n <svg viewBox=\"0 0 400 400\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M50 350 L50 100 L200 50 L350 100 L350 350 Z\"\n style={{\n 'fill': '#008BF8',\n 'stroke': '#008BF8',\n 'stroke-width': '70',\n }}\n stroke-linejoin=\"round\"\n />\n\n <path\n d=\"M100 300 L100 150 L200 120 L300 150 L300 300 L130 300 L130 370 L100 370Z\"\n style={{\n 'fill': 'white',\n 'stroke': 'white',\n 'stroke-width': '45',\n }}\n stroke-linejoin=\"round\"\n />\n\n <path\n d=\"M150 250 L150 200 L200 180 L250 200 L250 250 Z\"\n style={{\n 'fill': '#DC0073',\n 'stroke': '#DC0073',\n 'stroke-width': '20',\n }}\n stroke-linejoin=\"round\"\n />\n </svg>\n );\n};\n"],"version":3}