@siladev/qalam 0.2.1 → 0.3.1
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/{QalamEditor-sYrI0Izl.js → QalamEditor-Cwl4r5om.js} +2922 -2504
- package/dist/editor/extensions/blockquote-repeat.d.ts.map +1 -1
- package/dist/editor/extensions/hadith-ref.d.ts.map +1 -1
- package/dist/editor/extensions/inline-repeat.d.ts.map +1 -1
- package/dist/editor/extensions/markdown-utils.d.ts +24 -0
- package/dist/editor/extensions/markdown-utils.d.ts.map +1 -0
- package/dist/editor/extensions/ordered-list.d.ts.map +1 -1
- package/dist/editor/extensions/paragraph-repeat.d.ts.map +1 -1
- package/dist/editor/extensions/poem.d.ts.map +1 -1
- package/dist/editor/extensions/prophetic-speech.d.ts.map +1 -1
- package/dist/editor/extensions/quote.d.ts.map +1 -1
- package/dist/editor/extensions/quran-ref.d.ts.map +1 -1
- package/dist/editor/index.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1965 -16
- package/dist/markdown/index.d.ts +15 -0
- package/dist/markdown/index.d.ts.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MarkdownManager } from "@tiptap/markdown";
|
|
2
|
+
import type { QalamDoc, QalamDocResolved } from "../schema/types";
|
|
3
|
+
export declare function createMarkdownManager(): MarkdownManager;
|
|
4
|
+
export declare function docToMarkdown(doc: QalamDoc): string;
|
|
5
|
+
export declare function markdownToDoc(markdown: string): QalamDoc;
|
|
6
|
+
export declare function resolvedDocToMarkdown(doc: QalamDocResolved): string;
|
|
7
|
+
/**
|
|
8
|
+
* Parse markdown containing resolved Quran data (>> payload) into QalamDocResolved.
|
|
9
|
+
* The resolved payload is trusted as-is — the consumer is responsible for ensuring
|
|
10
|
+
* consistency between attrs and resolved data. Use this for pre-compiled/cached content
|
|
11
|
+
* where quran data is not available. For source documents, use markdownToDoc() instead.
|
|
12
|
+
*/
|
|
13
|
+
export declare function markdownToResolvedDoc(markdown: string): QalamDocResolved;
|
|
14
|
+
export { MarkdownManager };
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAkBnD,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAuBlE,wBAAgB,qBAAqB,IAAI,eAAe,CAMvD;AASD,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAEnD;AAgBD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAKxD;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,MAAM,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAIxE;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siladev/qalam",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Islamic content editor with Quran verse references",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
+
"@happy-dom/global-registrator": "^20.8.7",
|
|
50
51
|
"@types/react": "^19.0.0",
|
|
51
52
|
"@types/react-dom": "^19.0.0",
|
|
52
53
|
"@vitejs/plugin-react": "^4.4.0",
|
|
@@ -73,6 +74,7 @@
|
|
|
73
74
|
"@tiptap/extension-list": "^3.20.1",
|
|
74
75
|
"@tiptap/extension-paragraph": "^3.20.1",
|
|
75
76
|
"@tiptap/extension-text": "^3.20.1",
|
|
77
|
+
"@tiptap/markdown": "^3.20.4",
|
|
76
78
|
"@tiptap/pm": "^3.20.1",
|
|
77
79
|
"@tiptap/react": "^3.20.1"
|
|
78
80
|
}
|