diff --git a/ng-app/package.json b/ng-app/package.json
index bebf1809..10f30f1e 100644
--- a/ng-app/package.json
+++ b/ng-app/package.json
@@ -82,6 +82,7 @@
"svelte-jsoneditor": "^0.23.8",
"svelte-spa-router": "^3.3.0",
"vite-plugin-top-level-await": "^1.3.1",
+ "xml-beautifier": "^0.5.0",
"y-codemirror.next": "^0.3.5",
"y-prosemirror": "^1.2.10",
"y-protocols": "^1.0.1",
diff --git a/ng-app/src/App.svelte b/ng-app/src/App.svelte
index bc5da3b5..f018b5fb 100644
--- a/ng-app/src/App.svelte
+++ b/ng-app/src/App.svelte
@@ -74,7 +74,7 @@
// };
onMount(async () => {
- console.log("hide splash", window.supported);
+ //console.log("hide splash", window.supported);
if (window.supported) {
window.document.getElementById("splash").className="noshow";
window.document.getElementById("app").className="";
diff --git a/ng-app/src/apps/MdSource.svelte b/ng-app/src/apps/MdSource.svelte
new file mode 100644
index 00000000..82da84ba
--- /dev/null
+++ b/ng-app/src/apps/MdSource.svelte
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+ {#if !has_content}
+
+
{@html source}
diff --git a/ng-app/src/apps/XmlSource.svelte b/ng-app/src/apps/XmlSource.svelte
new file mode 100644
index 00000000..7891aac2
--- /dev/null
+++ b/ng-app/src/apps/XmlSource.svelte
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+ {#if !has_content}
+
{$t("doc.empty")}
+ {/if}
+
+ {#if loading}
+
+
+
{$t("connectivity.loading")}...
+
+ {/if}
+
+ {#if source}
+
+
+
+ {/if}
diff --git a/ng-app/src/apps/YMapEditor.svelte b/ng-app/src/apps/YMapEditor.svelte
index cd66124f..fd097faf 100644
--- a/ng-app/src/apps/YMapEditor.svelte
+++ b/ng-app/src/apps/YMapEditor.svelte
@@ -266,7 +266,7 @@
function onRenderContextMenu(items, context) {
if (items[4].items[1].items[0].text == "Convert to:") items[4].items.pop();
- if (Array.isArray(context.selection.path) && context.selection.path.length == 0 && context.selection.type === "value") {
+ if (Array.isArray(context.selection?.path) && context.selection.path.length == 0 && context.selection.type === "value") {
items[2].items.shift();
items[2].items.pop();
items[4].items[0].items.pop();
@@ -275,6 +275,7 @@
}
+
diff --git a/ng-app/src/apps/YMapViewer.svelte b/ng-app/src/apps/YMapViewer.svelte
index 7e5ba492..a8e1deaa 100644
--- a/ng-app/src/apps/YMapViewer.svelte
+++ b/ng-app/src/apps/YMapViewer.svelte
@@ -20,11 +20,11 @@
discrete_update
} from "../store";
import {
- cur_tab_register_on_save,
- cur_tab_deregister_on_save,
- cur_tab_branch_class
+ cur_tab_doc_can_edit,
+ set_view_or_edit
} from "../tab";
import { t } from "svelte-i18n";
+ import{ PencilSquare } from "svelte-heros-v2";
import * as Y from 'yjs'
import { JSONEditor } from 'svelte-jsoneditor'
@@ -119,12 +119,17 @@
for (const h of history) {
Y.applyUpdate(ydoc, h[crdt], {local:true})
}
+ loading = false;
});
onDestroy(async ()=>{
ydoc.destroy();
await editor.destroy();
});
+
+ const edit = () => {
+ set_view_or_edit(false);
+ }
@@ -155,6 +160,20 @@
{/if}
+
+ {#if $cur_tab_doc_can_edit && ( crdt=="YMap" && Object.keys(content.json).length == 0 || crdt=="YArray" && Array.isArray(content.json) && content.json.length == 0 ) }
+
+
+
+ {/if}
+
diff --git a/ng-app/src/classes.ts b/ng-app/src/classes.ts
index c05d0d88..64993645 100644
--- a/ng-app/src/classes.ts
+++ b/ng-app/src/classes.ts
@@ -105,6 +105,7 @@ export const official_classes = {
"ng:o": "n:g:z:pre",
"ng:w": "n:g:z:code_editor",
"ng:compat": ["file:iana:text:javascript"],
+ "implemented": true
},
"code:ts": {
"ng:crdt": "YText",
@@ -113,6 +114,7 @@ export const official_classes = {
"ng:o": "n:g:z:pre",
"ng:w": "n:g:z:code_editor",
"ng:compat": ["file:iana:text:typescript"],
+ "implemented": true
},
"code:rust": {
"ng:crdt": "YText",
@@ -121,6 +123,7 @@ export const official_classes = {
"ng:o": "n:g:z:pre",
"ng:w": "n:g:z:code_editor",
"ng:compat": [],
+ "implemented": true
},
"code:svelte": {
"ng:crdt": "YText",
@@ -129,6 +132,7 @@ export const official_classes = {
"ng:o": "n:g:z:pre",
"ng:w": "n:g:z:code_editor",
"ng:compat": [],
+ "implemented": true
},
"code:react": {
"ng:crdt": "YText",
@@ -137,6 +141,7 @@ export const official_classes = {
"ng:o": "n:g:z:pre",
"ng:w": "n:g:z:code_editor",
"ng:compat": [],
+ "implemented": true
},
"app": {
"ng:n": "Official App",
@@ -283,6 +288,7 @@ export const official_classes = {
},
"ng:compat": [ "rdf:*", "xsd:*", "file:iana:text:n3", "file:iana:text:rdf+n3", "file:iana:text:turtle", "file:iana:application:n-quads", "file:iana:application:trig", "file:iana:application:n-triples",
"file:iana:application:rdf+xml", "file:iana:application:ld+json"],
+ "implemented": true
},
"data:json": {
"ng:crdt": "Automerge",
@@ -291,6 +297,7 @@ export const official_classes = {
"ng:o": "n:g:z:json_automerge_viewer", // default viewer
"ng:w": "n:g:z:json_automerge_editor", // default editor
"ng:compat": ["file:iana:application:json", "code:json"],
+ "implemented": true
},
"data:array": {
"ng:crdt": "YArray",
@@ -299,6 +306,7 @@ export const official_classes = {
"ng:o": "n:g:z:json_yarray_viewer", // default viewer
"ng:w": "n:g:z:json_yarray_editor", // default editor
"ng:compat": ["file:iana:application:json", "code:json"],
+ "implemented": true
},
"data:map": {
"ng:crdt": "YMap",
@@ -307,6 +315,7 @@ export const official_classes = {
"ng:o": "n:g:z:json_ymap_viewer", // default viewer
"ng:w": "n:g:z:json_ymap_editor", // default editor
"ng:compat": ["file:iana:application:json", "code:json"],
+ "implemented": true
},
"data:xml": {
"ng:crdt": "YXml",
@@ -343,6 +352,7 @@ export const official_classes = {
"ldp": true,
},
"ng:compat": ["rdfs:member","ldp:contains","rdf:Bag","rdf:Alt"],
+ "implemented": true
},
"data:plato": {
"ng:crdt": "Graph",
diff --git a/ng-app/src/lib/Document.svelte b/ng-app/src/lib/Document.svelte
index 902142f4..0e54ddb6 100644
--- a/ng-app/src/lib/Document.svelte
+++ b/ng-app/src/lib/Document.svelte
@@ -118,7 +118,34 @@
{:then}
{#if $cur_app}
- {#await load_official_app($cur_app) then app}
+ {#await load_official_app($cur_app)}
+
+
+
+
{$t("connectivity.loading")}...
+
+
+ {:then app}
diff --git a/ng-app/src/lib/FullLayout.svelte b/ng-app/src/lib/FullLayout.svelte
index 08b27e19..ab137b29 100644
--- a/ng-app/src/lib/FullLayout.svelte
+++ b/ng-app/src/lib/FullLayout.svelte
@@ -103,6 +103,8 @@
Camera,
VideoCamera,
Microphone,
+ ChevronUp,
+ ChevronDown,
} from "svelte-heros-v2";
import NavBar from "./components/NavBar.svelte";
@@ -340,8 +342,8 @@
"data:board",
"data:grid",
"data:json",
- "data:array",
"data:map",
+ "data:array",
"data:xml",
];
@@ -643,7 +645,7 @@
{/if}
{#if $cur_viewer}
-