@sealcode/jdd-editor 0.2.1 → 0.2.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.
Files changed (37) hide show
  1. package/.nyc_output/2100f533-71ff-4c0e-81c5-53e05dcac20f.json +1 -0
  2. package/.nyc_output/processinfo/2100f533-71ff-4c0e-81c5-53e05dcac20f.json +1 -0
  3. package/.nyc_output/processinfo/ac9c9615-9aa2-4e42-8685-90e92855ba11.json +1 -0
  4. package/.nyc_output/processinfo/d0ae4bd5-5f2e-4e32-9403-fb824c49a5f8.json +1 -0
  5. package/.nyc_output/processinfo/index.json +1 -1
  6. package/.xunit +1 -1
  7. package/@types/components.sreact.d.ts +1 -5
  8. package/@types/controllers/json-editor.stimulus.d.ts +2 -0
  9. package/@types/inputs/component-input-code.d.ts +5 -0
  10. package/@types/inputs/component-input-color.d.ts +15 -0
  11. package/@types/jdd-page.d.ts +1 -6
  12. package/coverage/clover.xml +310 -299
  13. package/dist/src/components.sreact.js +1 -14
  14. package/dist/src/components.sreact.js.map +2 -2
  15. package/dist/src/controllers/json-editor.stimulus.js +33 -23
  16. package/dist/src/controllers/json-editor.stimulus.js.map +2 -2
  17. package/dist/src/inputs/component-input-code.js +23 -0
  18. package/dist/src/inputs/component-input-code.js.map +7 -0
  19. package/dist/src/inputs/component-input-color.js +27 -0
  20. package/dist/src/inputs/component-input-color.js.map +7 -0
  21. package/dist/src/inputs/component-input.js +24 -2
  22. package/dist/src/inputs/component-input.js.map +2 -2
  23. package/dist/src/jdd-page.js +1 -14
  24. package/dist/src/jdd-page.js.map +2 -2
  25. package/package.json +4 -3
  26. package/src/components.sreact.ts +1 -14
  27. package/src/controllers/json-editor.stimulus.ts +33 -20
  28. package/src/inputs/component-input-code.ts +24 -0
  29. package/src/inputs/component-input-color.ts +38 -0
  30. package/src/inputs/component-input.ts +25 -2
  31. package/src/jdd-page.ts +2 -15
  32. package/.nyc_output/cfebf13d-f940-426b-a4d3-af28d17bb6b8.json +0 -1
  33. package/.nyc_output/processinfo/2ad4e34c-cebb-4299-9698-08eccbbe71f7.json +0 -1
  34. package/.nyc_output/processinfo/71f2685b-e2c9-4db2-9f31-0dbdcacfcea1.json +0 -1
  35. package/.nyc_output/processinfo/cfebf13d-f940-426b-a4d3-af28d17bb6b8.json +0 -1
  36. /package/.nyc_output/{2ad4e34c-cebb-4299-9698-08eccbbe71f7.json → ac9c9615-9aa2-4e42-8685-90e92855ba11.json} +0 -0
  37. /package/.nyc_output/{71f2685b-e2c9-4db2-9f31-0dbdcacfcea1.json → d0ae4bd5-5f2e-4e32-9403-fb824c49a5f8.json} +0 -0
@@ -0,0 +1 @@
1
+ {"parent":null,"pid":3346019,"argv":["/home/kuba/.local/share/fnm/node-versions/v21.7.3/installation/bin/node","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/node_modules/.bin/nyc","--reporter","clover","mocha","--reporter","xunit","--reporter-option","output=.xunit"],"execArgv":[],"cwd":"/home/kuba/projects/sealcode/superseal/repos/jdd-editor","time":1761252120681,"ppid":3345998,"coverageFilename":"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/.nyc_output/2100f533-71ff-4c0e-81c5-53e05dcac20f.json","externalId":"","uuid":"2100f533-71ff-4c0e-81c5-53e05dcac20f","files":["/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/component-preview-actions.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/components.sreact.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/autogrow-textarea.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/component-debugger.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/exportable-textarea.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/input-image-preview.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/jdd-table-paste.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/json-editor.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/markdown-textarea.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/refresh-on-ts-changes.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/refresh-styles.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/submit-on-input.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/toast.stimulus.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/edit-jdd-field.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/index.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-code.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-color.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-enum.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-image.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-list.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-single-reference.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-structured.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-table.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/print-arg-path.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/jdd-creator.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/jdd-page.ts","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/test.test.ts"]}
@@ -0,0 +1 @@
1
+ {"parent":"d0ae4bd5-5f2e-4e32-9403-fb824c49a5f8","pid":3346110,"argv":["/home/kuba/.local/share/fnm/node-versions/v21.7.3/installation/bin/node","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/node_modules/.bin/mocha","--recursive","--timeout=10000","--require","source-map-support/register","lib/src/**/*.test.js"],"execArgv":[],"cwd":"/home/kuba/projects/sealcode/superseal/repos/jdd-editor","time":1761252121686,"ppid":3346095,"coverageFilename":"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/.nyc_output/ac9c9615-9aa2-4e42-8685-90e92855ba11.json","externalId":"","uuid":"ac9c9615-9aa2-4e42-8685-90e92855ba11","files":[]}
@@ -0,0 +1 @@
1
+ {"parent":null,"pid":3346095,"argv":["/home/kuba/.local/share/fnm/node-versions/v21.7.3/installation/bin/node","/home/kuba/projects/sealcode/superseal/repos/jdd-editor/node_modules/.bin/mocha","--reporter","xunit","--reporter-option","output=.xunit"],"execArgv":[],"cwd":"/home/kuba/projects/sealcode/superseal/repos/jdd-editor","time":1761252121486,"ppid":3346019,"coverageFilename":"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/.nyc_output/d0ae4bd5-5f2e-4e32-9403-fb824c49a5f8.json","externalId":"","uuid":"d0ae4bd5-5f2e-4e32-9403-fb824c49a5f8","files":[]}
@@ -1 +1 @@
1
- {"processes":{"2ad4e34c-cebb-4299-9698-08eccbbe71f7":{"parent":null,"children":["71f2685b-e2c9-4db2-9f31-0dbdcacfcea1"]},"71f2685b-e2c9-4db2-9f31-0dbdcacfcea1":{"parent":"2ad4e34c-cebb-4299-9698-08eccbbe71f7","children":[]},"cfebf13d-f940-426b-a4d3-af28d17bb6b8":{"parent":null,"children":[]}},"files":{"/home/kuba/projects/sealcode/jdd-editor/src/component-preview-actions.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/components.sreact.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/autogrow-textarea.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/component-debugger.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/exportable-textarea.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/input-image-preview.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/jdd-table-paste.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/json-editor.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/markdown-textarea.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/refresh-on-ts-changes.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/refresh-styles.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/submit-on-input.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/controllers/toast.stimulus.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/edit-jdd-field.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/index.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/inputs/component-input-enum.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/inputs/component-input-image.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/inputs/component-input-list.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/inputs/component-input-single-reference.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/inputs/component-input-structured.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/inputs/component-input-table.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/inputs/component-input.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/inputs/print-arg-path.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/jdd-creator.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/jdd-page.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"],"/home/kuba/projects/sealcode/jdd-editor/src/test.test.ts":["cfebf13d-f940-426b-a4d3-af28d17bb6b8"]},"externalIds":{}}
1
+ {"processes":{"2100f533-71ff-4c0e-81c5-53e05dcac20f":{"parent":null,"children":[]},"ac9c9615-9aa2-4e42-8685-90e92855ba11":{"parent":"d0ae4bd5-5f2e-4e32-9403-fb824c49a5f8","children":[]},"d0ae4bd5-5f2e-4e32-9403-fb824c49a5f8":{"parent":null,"children":["ac9c9615-9aa2-4e42-8685-90e92855ba11"]}},"files":{"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/component-preview-actions.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/components.sreact.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/autogrow-textarea.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/component-debugger.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/exportable-textarea.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/input-image-preview.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/jdd-table-paste.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/json-editor.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/markdown-textarea.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/refresh-on-ts-changes.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/refresh-styles.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/submit-on-input.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/controllers/toast.stimulus.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/edit-jdd-field.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/index.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-code.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-color.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-enum.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-image.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-list.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-single-reference.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-structured.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input-table.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/component-input.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/inputs/print-arg-path.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/jdd-creator.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/jdd-page.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"],"/home/kuba/projects/sealcode/superseal/repos/jdd-editor/src/test.test.ts":["2100f533-71ff-4c0e-81c5-53e05dcac20f"]},"externalIds":{}}
package/.xunit CHANGED
@@ -1,2 +1,2 @@
1
- <testsuite name="Mocha Tests" tests="0" failures="0" errors="0" skipped="0" timestamp="Sat, 05 Apr 2025 14:39:19 GMT" time="0">
1
+ <testsuite name="Mocha Tests" tests="0" failures="0" errors="0" skipped="0" timestamp="Thu, 23 Oct 2025 20:42:01 GMT" time="0">
2
2
  </testsuite>
@@ -7,11 +7,7 @@ export declare class JDDDebugger extends JDDPage {
7
7
  renderParameterButtons(state: JDDPageState): Stringifiable;
8
8
  actions: Record<string, import("@sealcode/sealgen").StatefulPageAction<JDDPageState>>;
9
9
  getInitialState(ctx: Context): Promise<{
10
- components: {
11
- component_name: string;
12
- args: import("@sealcode/jdd").ExtractStructuredComponentArgumentsParsed<Record<string, import("@sealcode/jdd").ComponentArgument<unknown, unknown, unknown>>>;
13
- open: boolean;
14
- }[];
10
+ components: never[];
15
11
  }>;
16
12
  wrapInLayout(ctx: Context, content: Templatable, state: JDDPageState): Templatable;
17
13
  containerSizes: string[];
@@ -2,7 +2,9 @@ import { Controller } from "stimulus";
2
2
  export default class JSONEditor extends Controller<HTMLTextAreaElement> {
3
3
  cm: any;
4
4
  saving: boolean;
5
+ getSessionStorageKey(): string;
5
6
  addCSS(): void;
7
+ resetValue(): void;
6
8
  addJS(js_id: string, js_path: string): Promise<void>;
7
9
  connect(): Promise<void>;
8
10
  disconnect(): Promise<void>;
@@ -0,0 +1,5 @@
1
+ export declare function ComponentInputCode({ language, value, arg_path, }: {
2
+ value: string;
3
+ language: string;
4
+ arg_path: string[];
5
+ }): JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { Context } from "koa";
2
+ import type { Color, JDDContext } from "@sealcode/jdd";
3
+ import type { StatefulPage } from "@sealcode/sealgen";
4
+ import type { ComponentPreviewActions } from "../component-preview-actions.js";
5
+ import type { JDDPageState } from "../jdd-page.js";
6
+ export declare function ComponentInputColor<State extends JDDPageState>({ arg_path, value, onchange, }: {
7
+ state: State;
8
+ arg_path: string[];
9
+ arg: Color;
10
+ value: string | null;
11
+ page: StatefulPage<JDDPageState, typeof ComponentPreviewActions>;
12
+ ctx: Context;
13
+ onchange?: string;
14
+ makeJDDContext: (ctx: Context) => JDDContext;
15
+ }): JSX.Element;
@@ -28,12 +28,7 @@ export default abstract class JDDPage extends StatefulPage<JDDPageState, typeof
28
28
  makeAssetURL?: (asset: string) => string;
29
29
  });
30
30
  getRegistryComponents(): Record<string, Component<Record<string, import("@sealcode/jdd").ComponentArgument<unknown, unknown, unknown>>>>;
31
- getInitialState(ctx: Context): Promise<{
32
- components: {
33
- component_name: string;
34
- args: import("@sealcode/jdd").ExtractStructuredComponentArgumentsParsed<Record<string, import("@sealcode/jdd").ComponentArgument<unknown, unknown, unknown>>>;
35
- }[];
36
- }>;
31
+ getInitialState(ctx: Context): Promise<JDDPageState>;
37
32
  wrapInLayout(ctx: Context, content: Templatable, state: JDDPageState): Templatable;
38
33
  preprocessOverrides(_ctx: Context, state: JDDPageState, overrides: Record<string, unknown>): Promise<{}>;
39
34
  abstract renderParameterButtons(_state: JDDPageState): FlatTemplatable;