deno fmt
parent
351c3c7088
commit
47f504f2ce
|
@ -18,6 +18,7 @@
|
|||
|
||||
"check": "find . -name '*.ts*' | xargs deno check",
|
||||
"lint": "deno lint",
|
||||
"fmt": "deno fmt",
|
||||
"test": "deno test -A --unstable-kv --unstable-worker-options",
|
||||
"bench": "deno bench",
|
||||
|
||||
|
@ -53,12 +54,13 @@
|
|||
},
|
||||
"fmt": {
|
||||
"exclude": [
|
||||
"dist",
|
||||
"dist_bundle",
|
||||
"dist*",
|
||||
"website",
|
||||
"website_build",
|
||||
"test_space",
|
||||
"README.md"
|
||||
"**/*.md",
|
||||
"**/*.js",
|
||||
"**/*.json"
|
||||
]
|
||||
},
|
||||
"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 { applyQuery, liftAttributeFilter } from "$sb/lib/query.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 { 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 type { Client } from "../client.ts";
|
||||
import { createWidgetSandboxIFrame } from "../components/widget_sandbox_iframe.ts";
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
// Forked from https://codeberg.org/retronav/ixora
|
||||
// Original author: Pranav Karawale
|
||||
// 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 { Decoration, EditorView, WidgetType } from "@codemirror/view";
|
||||
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";
|
||||
|
||||
export function insertMarker(marker: string): StateCommand {
|
||||
|
|
|
@ -200,7 +200,9 @@ export function FilterList({
|
|||
className={(selectedOption === idx
|
||||
? "sb-option sb-selected-option"
|
||||
: "sb-option") +
|
||||
(option.cssClass ? " sb-decorated-object " + option.cssClass : "")}
|
||||
(option.cssClass
|
||||
? " sb-decorated-object " + option.cssClass
|
||||
: "")}
|
||||
onMouseMove={() => {
|
||||
if (selectedOption !== idx) {
|
||||
setSelectionOption(idx);
|
||||
|
|
|
@ -21,7 +21,7 @@ export function Panel({
|
|||
type: "html",
|
||||
html: config.html,
|
||||
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;
|
||||
}
|
||||
|
||||
iframe.addEventListener("load", updateContent)
|
||||
iframe.addEventListener("load", updateContent);
|
||||
updateContent();
|
||||
|
||||
return () => {
|
||||
|
@ -89,7 +89,12 @@ export function Panel({
|
|||
|
||||
return (
|
||||
<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>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -70,9 +70,7 @@ export function TopBar({
|
|||
: unsavedChanges
|
||||
? "sb-unsaved"
|
||||
: "sb-saved") +
|
||||
(cssClass
|
||||
? " sb-decorated-object " + cssClass
|
||||
: "")}
|
||||
(cssClass ? " sb-decorated-object " + cssClass : "")}
|
||||
>
|
||||
<MiniEditor
|
||||
text={pageName ?? ""}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
import { plugPrefix } from "$common/spaces/constants.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 type { EventHook } from "../common/hooks/event.ts";
|
||||
import type { DataStore } from "$lib/data/datastore.ts";
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
import type { Client } from "../client.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 {
|
||||
return {
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
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";
|
||||
|
||||
export function proxySyscalls(client: Client, names: string[]): SysCallMapping {
|
||||
|
|
Loading…
Reference in New Issue