deno fmt
parent
351c3c7088
commit
47f504f2ce
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
"check": "find . -name '*.ts*' | xargs deno check",
|
"check": "find . -name '*.ts*' | xargs deno check",
|
||||||
"lint": "deno lint",
|
"lint": "deno lint",
|
||||||
|
"fmt": "deno fmt",
|
||||||
"test": "deno test -A --unstable-kv --unstable-worker-options",
|
"test": "deno test -A --unstable-kv --unstable-worker-options",
|
||||||
"bench": "deno bench",
|
"bench": "deno bench",
|
||||||
|
|
||||||
|
@ -53,12 +54,13 @@
|
||||||
},
|
},
|
||||||
"fmt": {
|
"fmt": {
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"dist",
|
"dist*",
|
||||||
"dist_bundle",
|
|
||||||
"website",
|
"website",
|
||||||
"website_build",
|
"website_build",
|
||||||
"test_space",
|
"test_space",
|
||||||
"README.md"
|
"**/*.md",
|
||||||
|
"**/*.js",
|
||||||
|
"**/*.json"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
import type { IndexTreeEvent, QueryProviderEvent } from "../../plug-api/types.ts";
|
import type {
|
||||||
|
IndexTreeEvent,
|
||||||
|
QueryProviderEvent,
|
||||||
|
} from "../../plug-api/types.ts";
|
||||||
import { renderToText } from "$sb/lib/tree.ts";
|
import { renderToText } from "$sb/lib/tree.ts";
|
||||||
import { applyQuery, liftAttributeFilter } from "$sb/lib/query.ts";
|
import { applyQuery, liftAttributeFilter } from "$sb/lib/query.ts";
|
||||||
import { editor } from "$sb/syscalls.ts";
|
import { editor } from "$sb/syscalls.ts";
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
import type { AttachmentMeta, FileMeta, PageMeta } from "../../plug-api/types.ts";
|
import type {
|
||||||
|
AttachmentMeta,
|
||||||
|
FileMeta,
|
||||||
|
PageMeta,
|
||||||
|
} from "../../plug-api/types.ts";
|
||||||
import type { SysCallMapping } from "../../lib/plugos/system.ts";
|
import type { SysCallMapping } from "../../lib/plugos/system.ts";
|
||||||
import type { Space } from "../../common/space.ts";
|
import type { Space } from "../../common/space.ts";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
import type { CodeWidgetCallback, WidgetContent } from "../../plug-api/types.ts";
|
import type {
|
||||||
|
CodeWidgetCallback,
|
||||||
|
WidgetContent,
|
||||||
|
} from "../../plug-api/types.ts";
|
||||||
import { WidgetType } from "@codemirror/view";
|
import { WidgetType } from "@codemirror/view";
|
||||||
import type { Client } from "../client.ts";
|
import type { Client } from "../client.ts";
|
||||||
import { createWidgetSandboxIFrame } from "../components/widget_sandbox_iframe.ts";
|
import { createWidgetSandboxIFrame } from "../components/widget_sandbox_iframe.ts";
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
// Forked from https://codeberg.org/retronav/ixora
|
// Forked from https://codeberg.org/retronav/ixora
|
||||||
// Original author: Pranav Karawale
|
// Original author: Pranav Karawale
|
||||||
// License: Apache License 2.0.
|
// License: Apache License 2.0.
|
||||||
import { type EditorState, StateField, type Transaction } from "@codemirror/state";
|
import {
|
||||||
|
type EditorState,
|
||||||
|
StateField,
|
||||||
|
type Transaction,
|
||||||
|
} from "@codemirror/state";
|
||||||
import type { DecorationSet } from "@codemirror/view";
|
import type { DecorationSet } from "@codemirror/view";
|
||||||
import { Decoration, EditorView, WidgetType } from "@codemirror/view";
|
import { Decoration, EditorView, WidgetType } from "@codemirror/view";
|
||||||
type LinkOptions = {
|
type LinkOptions = {
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
import { EditorSelection, type StateCommand, Transaction } from "@codemirror/state";
|
import {
|
||||||
|
EditorSelection,
|
||||||
|
type StateCommand,
|
||||||
|
Transaction,
|
||||||
|
} from "@codemirror/state";
|
||||||
import { Text } from "@codemirror/state";
|
import { Text } from "@codemirror/state";
|
||||||
|
|
||||||
export function insertMarker(marker: string): StateCommand {
|
export function insertMarker(marker: string): StateCommand {
|
||||||
|
|
|
@ -200,7 +200,9 @@ export function FilterList({
|
||||||
className={(selectedOption === idx
|
className={(selectedOption === idx
|
||||||
? "sb-option sb-selected-option"
|
? "sb-option sb-selected-option"
|
||||||
: "sb-option") +
|
: "sb-option") +
|
||||||
(option.cssClass ? " sb-decorated-object " + option.cssClass : "")}
|
(option.cssClass
|
||||||
|
? " sb-decorated-object " + option.cssClass
|
||||||
|
: "")}
|
||||||
onMouseMove={() => {
|
onMouseMove={() => {
|
||||||
if (selectedOption !== idx) {
|
if (selectedOption !== idx) {
|
||||||
setSelectionOption(idx);
|
setSelectionOption(idx);
|
||||||
|
|
|
@ -21,7 +21,7 @@ export function Panel({
|
||||||
type: "html",
|
type: "html",
|
||||||
html: config.html,
|
html: config.html,
|
||||||
script: config.script,
|
script: config.script,
|
||||||
theme: document.getElementsByTagName("html")[0].dataset.theme
|
theme: document.getElementsByTagName("html")[0].dataset.theme,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ export function Panel({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
iframe.addEventListener("load", updateContent)
|
iframe.addEventListener("load", updateContent);
|
||||||
updateContent();
|
updateContent();
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
@ -89,7 +89,12 @@ export function Panel({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="sb-panel" style={{ flex: config.mode }}>
|
<div className="sb-panel" style={{ flex: config.mode }}>
|
||||||
<iframe srcDoc={panelHtml} ref={iFrameRef} style={{ visibility: 'hidden' }} onLoad={() => iFrameRef.current!.style.visibility = "visible" }/>
|
<iframe
|
||||||
|
srcDoc={panelHtml}
|
||||||
|
ref={iFrameRef}
|
||||||
|
style={{ visibility: "hidden" }}
|
||||||
|
onLoad={() => iFrameRef.current!.style.visibility = "visible"}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,9 +70,7 @@ export function TopBar({
|
||||||
: unsavedChanges
|
: unsavedChanges
|
||||||
? "sb-unsaved"
|
? "sb-unsaved"
|
||||||
: "sb-saved") +
|
: "sb-saved") +
|
||||||
(cssClass
|
(cssClass ? " sb-decorated-object " + cssClass : "")}
|
||||||
? " sb-decorated-object " + cssClass
|
|
||||||
: "")}
|
|
||||||
>
|
>
|
||||||
<MiniEditor
|
<MiniEditor
|
||||||
text={pageName ?? ""}
|
text={pageName ?? ""}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
import { plugPrefix } from "$common/spaces/constants.ts";
|
import { plugPrefix } from "$common/spaces/constants.ts";
|
||||||
import type { SpacePrimitives } from "$common/spaces/space_primitives.ts";
|
import type { SpacePrimitives } from "$common/spaces/space_primitives.ts";
|
||||||
import { SpaceSync, type SyncStatus, type SyncStatusItem } from "$common/spaces/sync.ts";
|
import {
|
||||||
|
SpaceSync,
|
||||||
|
type SyncStatus,
|
||||||
|
type SyncStatusItem,
|
||||||
|
} from "$common/spaces/sync.ts";
|
||||||
import { sleep } from "$lib/async.ts";
|
import { sleep } from "$lib/async.ts";
|
||||||
import type { EventHook } from "../common/hooks/event.ts";
|
import type { EventHook } from "../common/hooks/event.ts";
|
||||||
import type { DataStore } from "$lib/data/datastore.ts";
|
import type { DataStore } from "$lib/data/datastore.ts";
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
import type { Client } from "../client.ts";
|
import type { Client } from "../client.ts";
|
||||||
import type { SysCallMapping } from "../../lib/plugos/system.ts";
|
import type { SysCallMapping } from "../../lib/plugos/system.ts";
|
||||||
import type { AttachmentMeta, FileMeta, PageMeta } from "../../plug-api/types.ts";
|
import type {
|
||||||
|
AttachmentMeta,
|
||||||
|
FileMeta,
|
||||||
|
PageMeta,
|
||||||
|
} from "../../plug-api/types.ts";
|
||||||
|
|
||||||
export function spaceReadSyscalls(editor: Client): SysCallMapping {
|
export function spaceReadSyscalls(editor: Client): SysCallMapping {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
import type { HttpSpacePrimitives } from "$common/spaces/http_space_primitives.ts";
|
import type { HttpSpacePrimitives } from "$common/spaces/http_space_primitives.ts";
|
||||||
import type { SyscallContext, SysCallMapping } from "../../lib/plugos/system.ts";
|
import type {
|
||||||
|
SyscallContext,
|
||||||
|
SysCallMapping,
|
||||||
|
} from "../../lib/plugos/system.ts";
|
||||||
import type { Client } from "../client.ts";
|
import type { Client } from "../client.ts";
|
||||||
|
|
||||||
export function proxySyscalls(client: Client, names: string[]): SysCallMapping {
|
export function proxySyscalls(client: Client, names: string[]): SysCallMapping {
|
||||||
|
|
Loading…
Reference in New Issue