@kubohiroya/turbowarp-plus-editor-code-views 0.0.0-stage → 0.1.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/LICENSE +373 -0
- package/README.ja.md +38 -0
- package/README.md +37 -2
- package/dist/asset-edit-session.d.ts +24 -0
- package/dist/asset-edit-session.js +58 -0
- package/dist/block-argument-text.d.ts +39 -0
- package/dist/block-argument-text.js +170 -0
- package/dist/block-drag.d.ts +17 -0
- package/dist/block-drag.js +184 -0
- package/dist/code-extensions.d.ts +38 -0
- package/dist/code-extensions.js +418 -0
- package/dist/code-pane.d.ts +63 -0
- package/dist/code-pane.js +363 -0
- package/dist/custom-extension-fields.d.ts +45 -0
- package/dist/custom-extension-fields.js +144 -0
- package/dist/detached-block-palette-view.d.ts +10 -0
- package/dist/detached-block-palette-view.js +62 -0
- package/dist/detached-block-palette.d.ts +41 -0
- package/dist/detached-block-palette.js +197 -0
- package/dist/dockview-unsaved.d.ts +45 -0
- package/dist/dockview-unsaved.js +123 -0
- package/dist/history.d.ts +57 -0
- package/dist/history.js +85 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +729 -0
- package/dist/native-extension-field.d.ts +26 -0
- package/dist/native-extension-field.js +204 -0
- package/dist/native-field-svg.d.ts +20 -0
- package/dist/native-field-svg.js +156 -0
- package/dist/palette-category-reorder.d.ts +4 -0
- package/dist/palette-category-reorder.js +167 -0
- package/dist/palette-category-search.d.ts +26 -0
- package/dist/palette-category-search.js +74 -0
- package/dist/palette-dropdown-resize.d.ts +19 -0
- package/dist/palette-dropdown-resize.js +135 -0
- package/dist/parent-field-layout.d.ts +2 -0
- package/dist/parent-field-layout.js +90 -0
- package/dist/parent-field-mirror.d.ts +3 -0
- package/dist/parent-field-mirror.js +290 -0
- package/dist/parent-field-resources.d.ts +9 -0
- package/dist/parent-field-resources.js +199 -0
- package/dist/preview-chrome.d.ts +9 -0
- package/dist/preview-chrome.js +78 -0
- package/dist/procedure-editor.d.ts +9 -0
- package/dist/procedure-editor.js +122 -0
- package/dist/procedure-edits.d.ts +16 -0
- package/dist/procedure-edits.js +47 -0
- package/dist/programmatic-extension-field.d.ts +20 -0
- package/dist/programmatic-extension-field.js +69 -0
- package/dist/protocol.d.ts +15 -0
- package/dist/protocol.js +36 -0
- package/dist/script-layout-dialog.d.ts +10 -0
- package/dist/script-layout-dialog.js +93 -0
- package/dist/script-layout-view.d.ts +68 -0
- package/dist/script-layout-view.js +164 -0
- package/dist/script-layout-workspace.d.ts +45 -0
- package/dist/script-layout-workspace.js +55 -0
- package/dist/script-layout.d.ts +17 -0
- package/dist/script-layout.js +25 -0
- package/dist/script-view-menu.d.ts +46 -0
- package/dist/script-view-menu.js +161 -0
- package/dist/sprite-code-windows.d.ts +31 -0
- package/dist/sprite-code-windows.js +180 -0
- package/dist/stage-code-prewarm.d.ts +52 -0
- package/dist/stage-code-prewarm.js +216 -0
- package/dist/target-combobox.d.ts +10 -0
- package/dist/target-combobox.js +92 -0
- package/dist/variable-references.d.ts +1 -0
- package/dist/variable-references.js +87 -0
- package/dist/workspace.d.ts +103 -0
- package/dist/workspace.js +1102 -0
- package/package.json +100 -4
- package/src/asset-edit-session.ts +72 -0
- package/src/block-argument-text.ts +172 -0
- package/src/block-drag.ts +190 -0
- package/src/code-extensions.ts +394 -0
- package/src/code-pane.ts +353 -0
- package/src/custom-extension-fields.ts +154 -0
- package/src/detached-block-palette-view.tsx +97 -0
- package/src/detached-block-palette.ts +218 -0
- package/src/dockview-unsaved.ts +134 -0
- package/src/history.ts +114 -0
- package/src/index.ts +680 -0
- package/src/native-extension-field.ts +201 -0
- package/src/native-field-svg.ts +140 -0
- package/src/palette-category-reorder.ts +155 -0
- package/src/palette-category-search.ts +82 -0
- package/src/palette-dropdown-resize.ts +132 -0
- package/src/parent-field-layout.ts +88 -0
- package/src/parent-field-mirror.ts +260 -0
- package/src/parent-field-resources.ts +179 -0
- package/src/preview-chrome.ts +82 -0
- package/src/procedure-editor.ts +123 -0
- package/src/procedure-edits.ts +46 -0
- package/src/programmatic-extension-field.ts +76 -0
- package/src/protocol.ts +47 -0
- package/src/script-layout-dialog.ts +104 -0
- package/src/script-layout-view.ts +198 -0
- package/src/script-layout-workspace.ts +95 -0
- package/src/script-layout.ts +40 -0
- package/src/script-view-menu.ts +213 -0
- package/src/sprite-code-windows.tsx +182 -0
- package/src/stage-code-prewarm.ts +242 -0
- package/src/styles.css +595 -0
- package/src/target-combobox.tsx +106 -0
- package/src/variable-references.ts +85 -0
- package/src/workspace.ts +1124 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type CodeTarget } from './history.ts';
|
|
2
|
+
import { captureCodePreviewChrome } from './preview-chrome.ts';
|
|
3
|
+
import type { PresentationElements } from './preview-chrome.ts';
|
|
4
|
+
import { type ScriptView } from './script-layout-view.ts';
|
|
5
|
+
export type AttachPreviewMinimap = (workspace: any, ScratchBlocks: any, watermark: HTMLElement) => {
|
|
6
|
+
dispose(): void;
|
|
7
|
+
};
|
|
8
|
+
/** Adds the code area's zoom buttons and minimap to another workspace. */
|
|
9
|
+
export type AttachWorkspaceNavigation = (workspace: any, ScratchBlocks: any) => {
|
|
10
|
+
dispose(): void;
|
|
11
|
+
} | undefined;
|
|
12
|
+
export interface Presentation {
|
|
13
|
+
scale: number;
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
visible: boolean;
|
|
17
|
+
scriptView?: ScriptView;
|
|
18
|
+
chrome: ReturnType<typeof captureCodePreviewChrome>;
|
|
19
|
+
}
|
|
20
|
+
interface CodeSession {
|
|
21
|
+
frontView: {
|
|
22
|
+
target: object;
|
|
23
|
+
mount: HTMLElement;
|
|
24
|
+
presentation?: Presentation;
|
|
25
|
+
} | null;
|
|
26
|
+
bridge: ReturnType<typeof attachCodeWorkspace> | null;
|
|
27
|
+
subscribe(listener: () => void): () => void;
|
|
28
|
+
changed(): void;
|
|
29
|
+
}
|
|
30
|
+
export declare function getCodeSession(vm: object): CodeSession;
|
|
31
|
+
type MeasuredField = {
|
|
32
|
+
textElement_?: {
|
|
33
|
+
textContent?: string | null;
|
|
34
|
+
} | null;
|
|
35
|
+
size_?: {
|
|
36
|
+
width: number;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
type MeasuredBlock = {
|
|
40
|
+
rendered?: boolean;
|
|
41
|
+
inputList: {
|
|
42
|
+
fieldRow: MeasuredField[];
|
|
43
|
+
}[];
|
|
44
|
+
getRootBlock(): MeasuredBlock;
|
|
45
|
+
getDescendants(ordered: boolean): MeasuredBlock[];
|
|
46
|
+
render(bubble?: boolean): void;
|
|
47
|
+
};
|
|
48
|
+
export declare function remeasureHiddenFields(workspace: {
|
|
49
|
+
getAllBlocks(ordered: boolean): MeasuredBlock[];
|
|
50
|
+
}): boolean;
|
|
51
|
+
export declare function attachCodeWorkspace({ vm, ScratchBlocks: blocks, workspace, options, onError, presentationElements }: {
|
|
52
|
+
vm: any;
|
|
53
|
+
ScratchBlocks: any;
|
|
54
|
+
workspace: any;
|
|
55
|
+
options: any;
|
|
56
|
+
onError: any;
|
|
57
|
+
presentationElements?: PresentationElements;
|
|
58
|
+
}): {
|
|
59
|
+
onError: any;
|
|
60
|
+
capturePane(targetId: string): Presentation;
|
|
61
|
+
restorePane(targetId: string, presentation: Presentation): void;
|
|
62
|
+
prepareImport(target: any): ({ blockIds, rootBlockIds }: {
|
|
63
|
+
blockIds: any;
|
|
64
|
+
rootBlockIds: any;
|
|
65
|
+
}) => void;
|
|
66
|
+
blockListener(event: any): void;
|
|
67
|
+
beforeReload(): void;
|
|
68
|
+
load: (action: any) => any;
|
|
69
|
+
afterReload(): void;
|
|
70
|
+
select(view: any): boolean;
|
|
71
|
+
preview(element: any, chrome: any, view: any): {
|
|
72
|
+
workspace: any;
|
|
73
|
+
update(): void;
|
|
74
|
+
dispose(): void;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Show only one script in the code area, a hat or a function, or every script again without `id`.
|
|
78
|
+
* `onLost` runs when that script is deleted.
|
|
79
|
+
*/
|
|
80
|
+
focusScript(id?: string, onLost?: () => void): void;
|
|
81
|
+
readonly focusedScript: string;
|
|
82
|
+
createFunction(target: CodeTarget & {
|
|
83
|
+
id: string;
|
|
84
|
+
}, kind: "procedure" | "named", name: string, { loadNamedFunctions }?: {
|
|
85
|
+
loadNamedFunctions?(): Promise<void>;
|
|
86
|
+
}): Promise<string>;
|
|
87
|
+
editProcedure(element: HTMLElement, { target, definitionId, editable, attachNavigation, locale, focusBlock }: {
|
|
88
|
+
target: CodeTarget & {
|
|
89
|
+
id: string;
|
|
90
|
+
};
|
|
91
|
+
definitionId: string;
|
|
92
|
+
editable: boolean;
|
|
93
|
+
attachNavigation?: AttachWorkspaceNavigation;
|
|
94
|
+
locale?: string;
|
|
95
|
+
focusBlock?: string;
|
|
96
|
+
}): {
|
|
97
|
+
workspace: any;
|
|
98
|
+
showBlock(id: string): void;
|
|
99
|
+
dispose(): void;
|
|
100
|
+
};
|
|
101
|
+
dispose(): void;
|
|
102
|
+
};
|
|
103
|
+
export {};
|