@pod-os/elements 0.30.2-rc.0b72955.0 → 0.30.2-rc.1b2b855.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/elements.cjs.js +1 -1
- package/dist/cjs/{ion-badge_5.cjs.entry.js → ion-badge_4.cjs.entry.js} +1 -21
- package/dist/cjs/ion-badge_4.cjs.entry.js.map +1 -0
- package/dist/cjs/ion-icon_33.cjs.entry.js +6 -5
- package/dist/cjs/ion-icon_33.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pos-app-document-viewer.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-document-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/pos-document.cjs.entry.js +7 -2
- package/dist/cjs/pos-document.cjs.entry.js.map +1 -1
- package/dist/cjs/pos-markdown-document.cjs.entry.js +1500 -0
- package/dist/cjs/pos-markdown-document.cjs.entry.js.map +1 -0
- package/dist/cjs/pos-predicate.cjs.entry.js +28 -0
- package/dist/cjs/pos-predicate.cjs.entry.js.map +1 -0
- package/dist/collection/apps/pos-app-document-viewer/pos-app-document-viewer.js +1 -1
- package/dist/collection/apps/pos-app-document-viewer/pos-app-document-viewer.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/pos-document/pos-document.js +8 -3
- package/dist/collection/components/pos-document/pos-document.js.map +1 -1
- package/dist/collection/components/pos-markdown-document/pos-markdown-document.css +3 -0
- package/dist/collection/components/pos-markdown-document/pos-markdown-document.js +69 -0
- package/dist/collection/components/pos-markdown-document/pos-markdown-document.js.map +1 -0
- package/dist/collection/components/pos-markdown-document/sanitize.js +10 -0
- package/dist/collection/components/pos-markdown-document/sanitize.js.map +1 -0
- package/dist/collection/components/pos-navigation/bar/pos-navigation-bar.js +1 -1
- package/dist/collection/components/pos-navigation/pos-navigation.js +1 -1
- package/dist/collection/components/pos-new-thing-form/pos-new-thing-form.js +1 -1
- package/dist/collection/components/pos-router/pos-router.js +1 -1
- package/dist/collection/components/pos-select-term/pos-select-term.js +1 -1
- package/dist/collection/components/pos-type-router/availableTools.js +55 -0
- package/dist/collection/components/pos-type-router/availableTools.js.map +1 -0
- package/dist/collection/components/pos-type-router/selectToolsForTypes.js +1 -54
- package/dist/collection/components/pos-type-router/selectToolsForTypes.js.map +1 -1
- package/dist/components/pos-app-document-viewer.js +9 -45
- package/dist/components/pos-app-document-viewer.js.map +1 -1
- package/dist/components/pos-document2.js +18 -7
- package/dist/components/pos-document2.js.map +1 -1
- package/dist/components/pos-markdown-document.d.ts +11 -0
- package/dist/components/pos-markdown-document.js +8 -0
- package/dist/components/pos-markdown-document.js.map +1 -0
- package/dist/components/pos-markdown-document2.js +1514 -0
- package/dist/components/pos-markdown-document2.js.map +1 -0
- package/dist/components/pos-navigation-bar2.js +1 -1
- package/dist/components/pos-navigation2.js +1 -1
- package/dist/components/pos-new-thing-form2.js +1 -1
- package/dist/components/pos-router2.js +1 -1
- package/dist/components/pos-select-term2.js +1 -1
- package/dist/components/pos-type-router2.js +1 -0
- package/dist/components/pos-type-router2.js.map +1 -1
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/elements.esm.js.map +1 -1
- package/dist/elements/p-262e321b.entry.js +2 -0
- package/dist/elements/p-262e321b.entry.js.map +1 -0
- package/dist/elements/p-51f0a869.entry.js +3 -0
- package/dist/elements/p-51f0a869.entry.js.map +1 -0
- package/dist/elements/p-b98f91f4.entry.js +2 -0
- package/dist/elements/p-b98f91f4.entry.js.map +1 -0
- package/dist/elements/{p-fe3c0e1b.entry.js → p-c267a78a.entry.js} +2 -2
- package/dist/elements/p-c267a78a.entry.js.map +1 -0
- package/dist/elements/{p-f2e65e83.entry.js → p-c43ec7b2.entry.js} +2 -2
- package/dist/elements/p-c43ec7b2.entry.js.map +1 -0
- package/dist/elements/{p-a7c9aa13.entry.js → p-c5efde87.entry.js} +2 -2
- package/dist/elements/{p-a7c9aa13.entry.js.map → p-c5efde87.entry.js.map} +1 -1
- package/dist/esm/elements.js +1 -1
- package/dist/esm/{ion-badge_5.entry.js → ion-badge_4.entry.js} +2 -21
- package/dist/esm/ion-badge_4.entry.js.map +1 -0
- package/dist/esm/ion-icon_33.entry.js +6 -5
- package/dist/esm/ion-icon_33.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pos-app-document-viewer.entry.js +1 -1
- package/dist/esm/pos-app-document-viewer.entry.js.map +1 -1
- package/dist/esm/pos-document.entry.js +7 -2
- package/dist/esm/pos-document.entry.js.map +1 -1
- package/dist/esm/pos-markdown-document.entry.js +1496 -0
- package/dist/esm/pos-markdown-document.entry.js.map +1 -0
- package/dist/esm/pos-predicate.entry.js +24 -0
- package/dist/esm/pos-predicate.entry.js.map +1 -0
- package/dist/types/components/pos-document/pos-document.d.ts +1 -1
- package/dist/types/components/pos-markdown-document/pos-markdown-document.d.ts +7 -0
- package/dist/types/components/pos-markdown-document/sanitize.d.ts +4 -0
- package/dist/types/components/pos-type-router/availableTools.d.ts +4 -0
- package/dist/types/components/pos-type-router/selectToolsForTypes.d.ts +0 -3
- package/dist/types/components.d.ts +17 -2
- package/package.json +3 -1
- package/dist/cjs/ion-badge_5.cjs.entry.js.map +0 -1
- package/dist/elements/p-26c54a6f.entry.js +0 -2
- package/dist/elements/p-26c54a6f.entry.js.map +0 -1
- package/dist/elements/p-f2e65e83.entry.js.map +0 -1
- package/dist/elements/p-fe3c0e1b.entry.js.map +0 -1
- package/dist/esm/ion-badge_5.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pos-document2.js","mappings":"
|
|
1
|
+
{"file":"pos-document2.js","mappings":";;;;;;;AAAA,MAAM,cAAc,GAAG,soBAAsoB,CAAC;AAC9pB,0BAAe,cAAc;;MCShB,WAAW;IALxB;;;;;;QAsBU,YAAO,GAAY,IAAI,CAAC;QAchC,UAAK,GAAG,OAAO,EAAS;YACtB,IAAI,CAAC,EAAE,GAA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I,EAAE,IAAI,CAAC,IAAI,GAA0B,CAAC;SACzE;aAAM;YACL,OAAO,cAAQ,GAAG,EAAE,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,GAAW,CAAC;SACtE;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["session"],"sources":["src/components/pos-document/pos-document.css?tag=pos-document&encapsulation=shadow","src/components/pos-document/pos-document.tsx"],"sourcesContent":["iframe {\n background-color: var(--pos-background-color);\n width: 100%;\n height: 100vh;\n}\n\n/* consolidate with styles from pos-image */\n.error {\n display: flex;\n opacity: 0.8;\n background: repeating-linear-gradient(-45deg, rgba(150, 0, 0, 0.1), rgba(150, 0, 0, 0.1) 10px, #fff 5px, #fff 25px);\n flex-direction: column;\n border: 1px solid red;\n color: black;\n align-items: center;\n justify-content: center;\n word-break: break-all;\n padding: 1rem;\n box-sizing: border-box;\n}\n\n.error ion-icon {\n color: #282828;\n --ionicon-stroke-width: calc(var(--width) / 5);\n font-size: calc(var(--width) / 2);\n}\n\na {\n text-decoration: none;\n width: var(--width);\n height: var(--height);\n}\n\n.code {\n font-weight: bold;\n font-size: calc(var(--width) / 8);\n}\n\n.text {\n font-size: calc(var(--width) / 20);\n}\n","import { PodOS, BrokenFile as BrokenFileData, SolidFile } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\nimport session from '../../store/session';\nimport { BrokenFile } from '../broken-file/BrokenFile';\n\n@Component({\n tag: 'pos-document',\n styleUrl: 'pos-document.css',\n shadow: true,\n})\nexport class PosDocument {\n @Prop() src: string;\n\n @Prop() alt: string;\n\n @State() os: PodOS;\n\n @State()\n private file: SolidFile;\n\n @State()\n private brokenFile: BrokenFileData;\n\n @State()\n private error: Error;\n\n @State()\n private loading: boolean = true;\n\n @Event({ eventName: 'pod-os:init' }) initializeOsEmitter: EventEmitter;\n\n /**\n * Indicates that the resource given in `src` property has been loaded.\n */\n @Event({ eventName: 'pod-os:resource-loaded' }) resourceLoadedEmitter: EventEmitter<string>;\n\n componentWillLoad() {\n session.onChange('isLoggedIn', () => this.fetchBlob());\n this.initializeOsEmitter.emit(this.setOs);\n }\n\n setOs = async (os: PodOS) => {\n this.os = os;\n };\n\n @Watch('os')\n @Watch('src')\n async fetchBlob() {\n try {\n this.loading = true;\n const file = await this.os.fetchFile(this.src);\n this.resourceLoadedEmitter.emit(this.src);\n if (file.blob()) {\n this.file = file;\n this.error = null;\n } else {\n this.brokenFile = file as BrokenFileData;\n }\n } catch (err) {\n this.error = err;\n } finally {\n this.loading = false;\n }\n }\n\n render() {\n if (this.loading) {\n return <ion-skeleton-text animated={true}></ion-skeleton-text>;\n }\n if (this.error) {\n return <div class=\"error\">{this.error.message}</div>;\n }\n if (this.brokenFile) {\n return <BrokenFile file={this.brokenFile} />;\n }\n if (this.file.blob().type === 'text/markdown') {\n return <pos-markdown-document file={this.file}></pos-markdown-document>;\n } else {\n return <iframe src={URL.createObjectURL(this.file.blob())}></iframe>;\n }\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PosMarkdownDocument extends Components.PosMarkdownDocument, HTMLElement {}
|
|
4
|
+
export const PosMarkdownDocument: {
|
|
5
|
+
prototype: PosMarkdownDocument;
|
|
6
|
+
new (): PosMarkdownDocument;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { P as PosMarkdownDocument$1, d as defineCustomElement$1 } from './pos-markdown-document2.js';
|
|
2
|
+
|
|
3
|
+
const PosMarkdownDocument = PosMarkdownDocument$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { PosMarkdownDocument, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=pos-markdown-document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"pos-markdown-document.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|