@opencraw/studio 0.0.3 → 0.0.5
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/bin/opencraw-studio.mjs +0 -0
- package/dist/index.esm.js +333 -4
- package/dist/src/index.d.ts +2 -2
- package/dist/src/scope-outline/card-sentence.mapper.d.ts +18 -0
- package/dist/src/scope-outline/index.d.ts +8 -0
- package/dist/src/scope-outline/outline-to-recipe.mapper.d.ts +17 -0
- package/dist/src/scope-outline/outline.model.d.ts +57 -0
- package/dist/src/scope-outline/recipe-to-outline.mapper.d.ts +14 -0
- package/dist/src/scope-outline/scope-at-path.algorithm.d.ts +19 -0
- package/dist/src/studio-api/command.contract.d.ts +20 -0
- package/dist/src/studio-api/index.d.ts +4 -2
- package/dist/src/studio-api/outline-view.contract.d.ts +37 -0
- package/dist/src/studio-api/workspace-view.contract.d.ts +4 -2
- package/dist/src/studio-server/save-outline.handler.d.ts +18 -0
- package/dist/ui/assets/index-DYb-tdmr.js +12 -0
- package/dist/ui/assets/index-x1XGuNl0.css +1 -0
- package/dist/ui/favicon.ico +0 -0
- package/dist/ui/index.html +16 -0
- package/package.json +5 -19
|
@@ -12,9 +12,9 @@ export declare const recipeIssueSchema: z.ZodObject<{
|
|
|
12
12
|
export declare const recipeListingSchema: z.ZodObject<{
|
|
13
13
|
file: z.ZodString;
|
|
14
14
|
kind: z.ZodEnum<{
|
|
15
|
-
unknown: "unknown";
|
|
16
15
|
input: "input";
|
|
17
16
|
output: "output";
|
|
17
|
+
unknown: "unknown";
|
|
18
18
|
}>;
|
|
19
19
|
id: z.ZodOptional<z.ZodString>;
|
|
20
20
|
issues: z.ZodArray<z.ZodObject<{
|
|
@@ -26,6 +26,7 @@ export declare const recipeListingSchema: z.ZodObject<{
|
|
|
26
26
|
}>;
|
|
27
27
|
}, z.core.$strip>>;
|
|
28
28
|
text: z.ZodString;
|
|
29
|
+
outline: z.ZodOptional<z.ZodType<import("./outline-view.contract").OutlineView, unknown, z.core.$ZodTypeInternals<import("./outline-view.contract").OutlineView, unknown>>>;
|
|
29
30
|
}, z.core.$strip>;
|
|
30
31
|
/** What `open-workspace` answers with: every recipe file directly inside the folder. */
|
|
31
32
|
export declare const workspaceViewSchema: z.ZodObject<{
|
|
@@ -33,9 +34,9 @@ export declare const workspaceViewSchema: z.ZodObject<{
|
|
|
33
34
|
recipes: z.ZodArray<z.ZodObject<{
|
|
34
35
|
file: z.ZodString;
|
|
35
36
|
kind: z.ZodEnum<{
|
|
36
|
-
unknown: "unknown";
|
|
37
37
|
input: "input";
|
|
38
38
|
output: "output";
|
|
39
|
+
unknown: "unknown";
|
|
39
40
|
}>;
|
|
40
41
|
id: z.ZodOptional<z.ZodString>;
|
|
41
42
|
issues: z.ZodArray<z.ZodObject<{
|
|
@@ -47,6 +48,7 @@ export declare const workspaceViewSchema: z.ZodObject<{
|
|
|
47
48
|
}>;
|
|
48
49
|
}, z.core.$strip>>;
|
|
49
50
|
text: z.ZodString;
|
|
51
|
+
outline: z.ZodOptional<z.ZodType<import("./outline-view.contract").OutlineView, unknown, z.core.$ZodTypeInternals<import("./outline-view.contract").OutlineView, unknown>>>;
|
|
50
52
|
}, z.core.$strip>>;
|
|
51
53
|
}, z.core.$strip>;
|
|
52
54
|
export type RecipeIssue = z.infer<typeof recipeIssueSchema>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SaveOutlineCommand } from '../studio-api/index.js';
|
|
2
|
+
import type { StudioState } from './workspace.store.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handles `save-outline`: the Steps tab's edits, as the outline it holds
|
|
5
|
+
* locally, converted back to the recipe's JSON (`scope-outline`'s
|
|
6
|
+
* `outlineToRecipe`, so the conversion runs here rather than in the
|
|
7
|
+
* browser) and written the same way `save-recipe` writes the JSON tab's
|
|
8
|
+
* edits. Every connected client, including the sender, is told the
|
|
9
|
+
* workspace changed, so both tabs re-fetch it and stay in sync.
|
|
10
|
+
*
|
|
11
|
+
* @param state - The server state holding the connected sockets.
|
|
12
|
+
* @param command - The command: the file path and the edited outline.
|
|
13
|
+
* @returns `{ saved: true }` once the write has completed.
|
|
14
|
+
*/
|
|
15
|
+
export declare function handleSaveOutline(state: StudioState, command: SaveOutlineCommand): Promise<{
|
|
16
|
+
saved: true;
|
|
17
|
+
}>;
|
|
18
|
+
//# sourceMappingURL=save-outline.handler.d.ts.map
|