@pod-os/elements 0.30.2-rc.ca6f577.0 → 0.30.2-rc.d44969f.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/loader.cjs.js +1 -1
- package/dist/cjs/pos-document.cjs.entry.js +9 -6
- package/dist/cjs/pos-document.cjs.entry.js.map +1 -1
- package/dist/cjs/pos-markdown-document.cjs.entry.js +13481 -14042
- package/dist/cjs/pos-markdown-document.cjs.entry.js.map +1 -1
- package/dist/collection/components/pos-document/pos-document.js +10 -7
- package/dist/collection/components/pos-document/pos-document.js.map +1 -1
- package/dist/collection/components/pos-markdown-document/pos-markdown-document.css +17 -0
- package/dist/collection/components/pos-markdown-document/pos-markdown-document.js +33 -25
- package/dist/collection/components/pos-markdown-document/pos-markdown-document.js.map +1 -1
- package/dist/collection/components/pos-markdown-document/rich-editor/PosImageNode.js +25 -21
- package/dist/collection/components/pos-markdown-document/rich-editor/PosImageNode.js.map +1 -1
- package/dist/collection/components/pos-markdown-document/rich-editor/PosRichLinkMark.js +20 -16
- package/dist/collection/components/pos-markdown-document/rich-editor/PosRichLinkMark.js.map +1 -1
- package/dist/collection/components/pos-markdown-document/rich-editor/RichEditor.js +10 -24
- package/dist/collection/components/pos-markdown-document/rich-editor/RichEditor.js.map +1 -1
- package/dist/components/pos-document2.js +10 -7
- package/dist/components/pos-document2.js.map +1 -1
- package/dist/components/pos-markdown-document2.js +13483 -14044
- package/dist/components/pos-markdown-document2.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-08f92489.entry.js +2 -0
- package/dist/elements/p-08f92489.entry.js.map +1 -0
- package/dist/elements/p-4f8297e8.entry.js +2 -0
- package/dist/elements/p-4f8297e8.entry.js.map +1 -0
- package/dist/esm/elements.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pos-document.entry.js +9 -6
- package/dist/esm/pos-document.entry.js.map +1 -1
- package/dist/esm/pos-markdown-document.entry.js +13481 -14042
- package/dist/esm/pos-markdown-document.entry.js.map +1 -1
- package/dist/types/components/pos-document/pos-document.d.ts +1 -1
- package/dist/types/components/pos-markdown-document/pos-markdown-document.d.ts +5 -5
- package/dist/types/components/pos-markdown-document/rich-editor/PosImageNode.d.ts +2 -0
- package/dist/types/components/pos-markdown-document/rich-editor/PosRichLinkMark.d.ts +2 -0
- package/dist/types/components/pos-markdown-document/rich-editor/RichEditor.d.ts +1 -9
- package/dist/types/components.d.ts +4 -4
- package/package.json +7 -9
- package/dist/collection/components/pos-markdown-document/html2markdown.js +0 -10
- package/dist/collection/components/pos-markdown-document/html2markdown.js.map +0 -1
- package/dist/collection/components/pos-markdown-document/markdown2html.js +0 -5
- package/dist/collection/components/pos-markdown-document/markdown2html.js.map +0 -1
- package/dist/collection/components/pos-markdown-document/sanitize.js +0 -10
- package/dist/collection/components/pos-markdown-document/sanitize.js.map +0 -1
- package/dist/elements/p-581ed3ee.entry.js +0 -3
- package/dist/elements/p-581ed3ee.entry.js.map +0 -1
- package/dist/elements/p-ff3f95dc.entry.js +0 -2
- package/dist/elements/p-ff3f95dc.entry.js.map +0 -1
- package/dist/types/components/pos-markdown-document/html2markdown.d.ts +0 -1
- package/dist/types/components/pos-markdown-document/markdown2html.d.ts +0 -1
- package/dist/types/components/pos-markdown-document/sanitize.d.ts +0 -4
|
@@ -11,14 +11,14 @@ export declare class PosMarkdownDocument {
|
|
|
11
11
|
*/
|
|
12
12
|
file: SolidFile;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Current save status
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
saveStatus: 'idle' | 'saving' | 'failed';
|
|
17
17
|
/**
|
|
18
18
|
* Whether the current user has the permission to edit the file
|
|
19
19
|
*/
|
|
20
20
|
editable: boolean;
|
|
21
|
-
private
|
|
21
|
+
private markdown;
|
|
22
22
|
private editorEl;
|
|
23
23
|
private isModified;
|
|
24
24
|
private editor;
|
|
@@ -34,11 +34,11 @@ export declare class PosMarkdownDocument {
|
|
|
34
34
|
/**
|
|
35
35
|
* Switch to editing mode
|
|
36
36
|
*/
|
|
37
|
-
startEditing(): void
|
|
37
|
+
startEditing(): Promise<void>;
|
|
38
38
|
/**
|
|
39
39
|
* Switch to view mode
|
|
40
40
|
*/
|
|
41
|
-
stopEditing(): void
|
|
41
|
+
stopEditing(): Promise<void>;
|
|
42
42
|
render(): any;
|
|
43
43
|
private getStatus;
|
|
44
44
|
}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
import { SanitizedHtml } from '../sanitize';
|
|
2
1
|
export declare class RichEditor {
|
|
3
2
|
private readonly editor;
|
|
4
|
-
/**
|
|
5
|
-
* Whether the editor has been modified since the latest changes have been observed
|
|
6
|
-
* @private
|
|
7
|
-
*/
|
|
8
|
-
private modified;
|
|
9
|
-
private editingJustChanged;
|
|
10
3
|
private readonly modifications;
|
|
11
4
|
/**
|
|
12
5
|
* @param target The element to render to
|
|
13
6
|
* @param content The content to show in the editor
|
|
14
7
|
* @param baseUrl Base URL for relative links and relative image src
|
|
15
8
|
*/
|
|
16
|
-
constructor(target: HTMLElement, content:
|
|
9
|
+
constructor(target: HTMLElement, content: string, baseUrl: string);
|
|
17
10
|
onUpdate(callback: () => void): void;
|
|
18
11
|
isEditable(): boolean;
|
|
19
12
|
startEditing(): void;
|
|
20
13
|
stopEditing(): void;
|
|
21
|
-
isModified(): boolean;
|
|
22
14
|
getContent(): string;
|
|
23
15
|
/**
|
|
24
16
|
* Provides an observable that communicates the latest editor content after changes have settled
|
|
@@ -112,9 +112,9 @@ export namespace Components {
|
|
|
112
112
|
*/
|
|
113
113
|
"file": SolidFile;
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* Current save status
|
|
116
116
|
*/
|
|
117
|
-
"
|
|
117
|
+
"saveStatus": 'idle' | 'saving' | 'failed';
|
|
118
118
|
/**
|
|
119
119
|
* Switch to editing mode
|
|
120
120
|
*/
|
|
@@ -1267,9 +1267,9 @@ declare namespace LocalJSX {
|
|
|
1267
1267
|
*/
|
|
1268
1268
|
"onPod-os:document-modified"?: (event: PosMarkdownDocumentCustomEvent<ModifiedFile>) => void;
|
|
1269
1269
|
/**
|
|
1270
|
-
*
|
|
1270
|
+
* Current save status
|
|
1271
1271
|
*/
|
|
1272
|
-
"
|
|
1272
|
+
"saveStatus"?: 'idle' | 'saving' | 'failed';
|
|
1273
1273
|
}
|
|
1274
1274
|
interface PosNavigation {
|
|
1275
1275
|
"onPod-os:init"?: (event: PosNavigationCustomEvent<any>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pod-os/elements",
|
|
3
|
-
"version": "0.30.2-rc.
|
|
3
|
+
"version": "0.30.2-rc.d44969f.0",
|
|
4
4
|
"description": "Custom elements for usage with Solid Pods",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -27,18 +27,16 @@
|
|
|
27
27
|
"@stencil/core": "4.24.0",
|
|
28
28
|
"@stencil/store": "^2.2.0",
|
|
29
29
|
"@testing-library/user-event": "^14.6.1",
|
|
30
|
-
"@tiptap/core": "^3.
|
|
31
|
-
"@tiptap/extension-image": "^3.
|
|
32
|
-
"@tiptap/
|
|
33
|
-
"@tiptap/
|
|
34
|
-
"@
|
|
30
|
+
"@tiptap/core": "^3.7.2",
|
|
31
|
+
"@tiptap/extension-image": "^3.7.2",
|
|
32
|
+
"@tiptap/markdown": "^3.7.2",
|
|
33
|
+
"@tiptap/pm": "^3.7.2",
|
|
34
|
+
"@tiptap/starter-kit": "^3.7.2",
|
|
35
35
|
"@uvdsl/solid-oidc-client-browser": "^0.1.3",
|
|
36
|
-
"dompurify": "^3.2.7",
|
|
37
36
|
"idb": "^8.0.3",
|
|
38
37
|
"pollen-css": "^5.0.2",
|
|
39
38
|
"rxjs": "^7.8.2",
|
|
40
|
-
"stencil-router-v2": "^0.6.0"
|
|
41
|
-
"turndown": "^7.2.1"
|
|
39
|
+
"stencil-router-v2": "^0.6.0"
|
|
42
40
|
},
|
|
43
41
|
"devDependencies": {
|
|
44
42
|
"@happy-dom/jest-environment": "^19.0.2",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import TurndownService from "turndown";
|
|
2
|
-
const turndown = new TurndownService({
|
|
3
|
-
headingStyle: 'atx',
|
|
4
|
-
bulletListMarker: '-',
|
|
5
|
-
codeBlockStyle: 'fenced',
|
|
6
|
-
});
|
|
7
|
-
export function html2markdown(html) {
|
|
8
|
-
return turndown.turndown(html);
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=html2markdown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html2markdown.js","sourceRoot":"","sources":["../../../../src/components/pos-markdown-document/html2markdown.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,UAAU,CAAC;AAEvC,MAAM,QAAQ,GAAG,IAAI,eAAe,CAAC;IACnC,YAAY,EAAE,KAAK;IACnB,gBAAgB,EAAE,GAAG;IACrB,cAAc,EAAE,QAAQ;CACzB,CAAC,CAAC;AAEH,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC","sourcesContent":["import TurndownService from 'turndown';\n\nconst turndown = new TurndownService({\n headingStyle: 'atx',\n bulletListMarker: '-',\n codeBlockStyle: 'fenced',\n});\n\nexport function html2markdown(html: string): string {\n return turndown.turndown(html);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdown2html.js","sourceRoot":"","sources":["../../../../src/components/pos-markdown-document/markdown2html.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,QAAgB;IAClD,OAAO,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import { marked } from 'marked';\n\nexport async function markdown2html(markdown: string) {\n return await marked(markdown);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sanitize.js","sourceRoot":"","sources":["../../../../src/components/pos-markdown-document/sanitize.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAMlC,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAO;QACL,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE;YAC9B,QAAQ,EAAE,CAAC,eAAe,EAAE,WAAW,CAAC;YACxC,QAAQ,EAAE,CAAC,KAAK,CAAC;SAClB,CAAC;KACH,CAAC;AACJ,CAAC","sourcesContent":["import DomPurify from 'dompurify';\n\nexport interface SanitizedHtml {\n value: string;\n}\n\nexport function sanitize(html: string): SanitizedHtml {\n return {\n value: DomPurify.sanitize(html, {\n ADD_TAGS: ['pos-rich-link', 'pos-image'],\n ADD_ATTR: ['uri'],\n }),\n };\n}\n"]}
|