@jarenjs/studio 0.83.3 → 0.84.3

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 (90) hide show
  1. package/README.md +21 -6
  2. package/contracts/data.contract.json +243 -0
  3. package/dist/types/component/data/actions.d.ts +234 -0
  4. package/dist/types/component/data/index.d.ts +9 -0
  5. package/dist/types/component/data/mount.d.ts +87 -0
  6. package/dist/types/component/data/project-widget.d.ts +27 -0
  7. package/dist/types/component/data/viewmodel.d.ts +85 -0
  8. package/dist/types/component/data/views.d.ts +148 -0
  9. package/dist/types/component/document.d.ts +82 -0
  10. package/dist/types/component/flow/actions.d.ts +708 -0
  11. package/dist/types/component/flow/index.d.ts +7 -0
  12. package/dist/types/component/flow/mount.d.ts +66 -0
  13. package/dist/types/component/flow/project-widget.d.ts +8 -0
  14. package/dist/types/component/flow/runtime.d.ts +57 -0
  15. package/dist/types/component/flow/views.d.ts +242 -0
  16. package/dist/types/component/host.d.ts +2 -2
  17. package/dist/types/component/index.d.ts +21 -15
  18. package/dist/types/component/mount.d.ts +51 -0
  19. package/dist/types/component/project-actions.d.ts +302 -0
  20. package/dist/types/component/project-controller.d.ts +81 -0
  21. package/dist/types/component/project-state.d.ts +1 -0
  22. package/dist/types/component/project.d.ts +327 -0
  23. package/dist/types/component/shared/host-widget.d.ts +24 -0
  24. package/dist/types/component/shared/memo.d.ts +12 -0
  25. package/dist/types/component/shared/nodes.d.ts +92 -0
  26. package/dist/types/component/shared/schema-options.d.ts +28 -0
  27. package/dist/types/component/shared/studio-kit.d.ts +78 -0
  28. package/dist/types/component/shared/ui.d.ts +136 -0
  29. package/dist/types/component/view.d.ts +6 -6
  30. package/dist/types/data/boot-stages.d.ts +97 -0
  31. package/dist/types/data/browser-worker.d.ts +22 -0
  32. package/dist/types/data/contract.d.ts +9 -0
  33. package/dist/types/data/editor.d.ts +81 -0
  34. package/dist/types/data/handlers.d.ts +130 -0
  35. package/dist/types/data/host.d.ts +8 -0
  36. package/dist/types/data/project-worker.d.ts +8 -0
  37. package/dist/types/data/runtime.d.ts +46 -0
  38. package/dist/types/data/state.d.ts +33 -0
  39. package/dist/types/data/storage.d.ts +26 -0
  40. package/dist/types/data/transport.d.ts +69 -0
  41. package/dist/types/flow-document.d.ts +19 -0
  42. package/dist/types/flow-editor.d.ts +88 -0
  43. package/docs/EDITORS.md +158 -0
  44. package/docs/PROJECT-FORMAT.md +1 -11
  45. package/package.json +32 -15
  46. package/src/component/data/actions.js +138 -0
  47. package/src/component/data/index.js +10 -0
  48. package/src/component/data/mount.js +63 -0
  49. package/src/component/data/project-widget.js +164 -0
  50. package/src/component/data/viewmodel.js +185 -0
  51. package/src/component/data/views.js +241 -0
  52. package/src/component/document.js +344 -0
  53. package/src/component/flow/actions.js +331 -0
  54. package/src/component/flow/index.js +8 -0
  55. package/src/component/flow/mount.js +53 -0
  56. package/src/component/flow/project-widget.js +44 -0
  57. package/src/component/flow/runtime.js +481 -0
  58. package/src/component/flow/views.js +196 -0
  59. package/src/component/host.js +2 -2
  60. package/src/component/index.js +19 -9
  61. package/src/component/mount.js +43 -0
  62. package/src/component/project-actions.js +189 -0
  63. package/src/component/project-controller.js +248 -0
  64. package/src/component/project-state.js +30 -0
  65. package/src/component/project.js +308 -0
  66. package/src/component/shared/host-widget.js +35 -0
  67. package/src/component/shared/memo.js +28 -0
  68. package/src/component/shared/nodes.js +94 -0
  69. package/src/component/shared/schema-options.js +30 -0
  70. package/src/component/shared/studio-kit.js +59 -0
  71. package/src/component/shared/ui.js +134 -0
  72. package/src/data/boot-stages.js +202 -0
  73. package/src/data/browser-worker.js +247 -0
  74. package/src/data/contract.js +7 -0
  75. package/src/data/editor.js +95 -0
  76. package/src/data/handlers.js +349 -0
  77. package/src/data/host.js +8 -0
  78. package/src/data/project-worker.js +26 -0
  79. package/src/data/runtime.js +462 -0
  80. package/src/data/state.js +46 -0
  81. package/src/data/storage.js +61 -0
  82. package/src/data/transport.js +215 -0
  83. package/src/flow-document.js +24 -0
  84. package/src/flow-editor.js +98 -0
  85. package/styles/data.css +53 -0
  86. package/styles/editor.css +150 -0
  87. package/styles/flow.css +99 -0
  88. package/styles/studio.css +1 -0
  89. package/dist/types/author.d.ts +0 -27
  90. package/src/author.js +0 -55
@@ -0,0 +1,85 @@
1
+ /**
2
+ * The oracle's verdict, as one line: what ran, what agreed, what was
3
+ * left out by its marker — or why there is no verdict.
4
+ * @param {any} oracle
5
+ * @returns {string}
6
+ */
7
+ export declare function oracleSummary(oracle: any): string;
8
+ /**
9
+ * The page's view model — the boundary-exports convention.
10
+ * @param {any} state
11
+ * @param {any} [options]
12
+ */
13
+ export declare function dataViewModel(state: any, options?: any): {
14
+ collection: any;
15
+ insertPlaceholder: string;
16
+ tripAvailable: boolean;
17
+ oracleAvailable: boolean;
18
+ migrationAvailable: boolean;
19
+ status: any;
20
+ boot: any;
21
+ plainError: any;
22
+ topology: any;
23
+ vfs: any;
24
+ version: any;
25
+ capture: any;
26
+ operators: any;
27
+ pushableOperators: any;
28
+ operatorSummary: string;
29
+ operatorList: any;
30
+ operatorSample: string;
31
+ refusal: any;
32
+ liveNote: string;
33
+ durability: string;
34
+ modelText: any;
35
+ queryText: any;
36
+ rows: any;
37
+ rowCount: any;
38
+ rowList: {
39
+ index: number;
40
+ text: string;
41
+ key?: any;
42
+ }[];
43
+ rowSummary: string;
44
+ results: any;
45
+ resultsJson: string;
46
+ explain: {
47
+ sql: any;
48
+ params: string;
49
+ indexes: any;
50
+ residual: string;
51
+ } | null;
52
+ live: any;
53
+ liveSummary: string;
54
+ liveRegs: string;
55
+ liveJson: string;
56
+ insertDraft: any;
57
+ migration: any;
58
+ migrationSteps: any;
59
+ migrationSummary: string;
60
+ oracle: any;
61
+ oracleDone: boolean;
62
+ oracleDisagreed: boolean;
63
+ oracleSummary: string;
64
+ oracleDisagreements: any;
65
+ oracleResultsJson: string;
66
+ tripCsv: any;
67
+ tripStylesheet: any;
68
+ tripModel: any;
69
+ tripChain: any;
70
+ tripQuery: any;
71
+ tripRegion: any;
72
+ trip: any;
73
+ tripStatus: any;
74
+ tripDone: boolean;
75
+ tripSummary: any;
76
+ tripResultsJson: string;
77
+ tripExplainSql: any;
78
+ tripPrefilters: string;
79
+ tripNarrative: any;
80
+ tripIndexes: any;
81
+ tripResidual: string;
82
+ tripMap: any;
83
+ error: any;
84
+ mobilePane: string;
85
+ };
@@ -0,0 +1,148 @@
1
+ export declare const DATA_RULES: ({
2
+ match: string;
3
+ mode: string;
4
+ body: (string | {}[] | {
5
+ class: string;
6
+ $if?: undefined;
7
+ } | {
8
+ class?: undefined;
9
+ $if: ((string | {
10
+ type: string;
11
+ class: string;
12
+ title: string;
13
+ on: {
14
+ click: {
15
+ action: string;
16
+ with: string;
17
+ };
18
+ };
19
+ })[] | {
20
+ $exists: string;
21
+ })[];
22
+ })[];
23
+ } | {
24
+ match: string;
25
+ mode: string;
26
+ body: (string | (string | (string | (string | {
27
+ type: string;
28
+ class: {
29
+ $if: (string | {
30
+ $eq: string[];
31
+ })[];
32
+ };
33
+ 'aria-pressed': {
34
+ $if: (string | {
35
+ $eq: string[];
36
+ })[];
37
+ };
38
+ on: {
39
+ click: {
40
+ action: string;
41
+ with: string;
42
+ };
43
+ };
44
+ })[] | {
45
+ class: string;
46
+ role: string;
47
+ 'aria-label': string;
48
+ })[] | (string | {}[] | (string | {}[] | {
49
+ class: string;
50
+ })[] | {
51
+ $if?: undefined;
52
+ class: string;
53
+ } | {
54
+ class?: undefined;
55
+ $if: (string | {}[])[];
56
+ } | {
57
+ class?: undefined;
58
+ $if: (string | (string | {}[] | (string | {}[] | {
59
+ class: string;
60
+ })[] | {
61
+ class: string;
62
+ })[])[];
63
+ })[] | {
64
+ $if?: undefined;
65
+ class: string;
66
+ 'data-pane': string;
67
+ } | {
68
+ class?: undefined;
69
+ 'data-pane'?: undefined;
70
+ $if: (string | (string | {}[] | (string | {
71
+ class: string;
72
+ rows: number;
73
+ spellcheck: string;
74
+ value: string;
75
+ readonly?: string | undefined;
76
+ on: {
77
+ change: string;
78
+ input?: string | undefined;
79
+ };
80
+ })[] | (string | {}[] | (string | {}[] | {
81
+ class: string;
82
+ })[] | {
83
+ class: string;
84
+ })[] | {
85
+ $if?: undefined;
86
+ class: string;
87
+ } | {
88
+ class?: undefined;
89
+ $if: (string | (string | (string | {
90
+ class: string;
91
+ })[] | {
92
+ $if?: undefined;
93
+ class: string;
94
+ 'data-status': string;
95
+ } | {
96
+ 'data-status'?: undefined;
97
+ class?: undefined;
98
+ $if: (string | (string | (string | {}[] | (string | {}[] | {
99
+ class: string;
100
+ })[] | {
101
+ class: string;
102
+ })[] | (string | {}[] | (string | {}[] | {
103
+ class: string;
104
+ })[] | (string | (string | {
105
+ class: string;
106
+ })[] | {
107
+ class: string;
108
+ })[] | {
109
+ class: string;
110
+ open: boolean;
111
+ })[] | {
112
+ $if?: undefined;
113
+ } | {
114
+ $if: (string | (string | {
115
+ class: string;
116
+ })[])[];
117
+ })[])[];
118
+ })[])[];
119
+ })[])[];
120
+ })[] | {
121
+ $if?: undefined;
122
+ class: string;
123
+ } | {
124
+ class?: undefined;
125
+ $if: ((string | {
126
+ class: string;
127
+ })[] | {
128
+ $eq: string[];
129
+ })[];
130
+ } | {
131
+ class?: undefined;
132
+ $if: ((string | {}[] | (string | {
133
+ class: string;
134
+ type: string;
135
+ on: {
136
+ click: string;
137
+ };
138
+ })[] | {
139
+ class: string;
140
+ role: string;
141
+ })[] | {
142
+ $eq: string[];
143
+ })[];
144
+ } | {
145
+ class?: undefined;
146
+ $if: (string | any[])[];
147
+ })[];
148
+ })[];
@@ -0,0 +1,82 @@
1
+ import { createDomRenderer } from '@jarenjs/view';
2
+ /** @param {{ markdown: (source: string) => any, diagram: (source: string) => any, templates?: any[] }} options */
3
+ export declare function createStudioDocumentHost(options: {
4
+ markdown: (source: string) => any;
5
+ diagram: (source: string) => any;
6
+ templates?: any[];
7
+ }): {
8
+ validateAppDocument: (doc: any) => {
9
+ valid: boolean;
10
+ errors: Array<{
11
+ instancePath: string;
12
+ keyword: string;
13
+ message: string;
14
+ }>;
15
+ total: number;
16
+ };
17
+ STUDIO_WIDGETS: {
18
+ form: {
19
+ mount: (host: HTMLElement, props: any, emit: (binding: any, event: Event) => void) => {
20
+ render: ReturnType<typeof createDomRenderer>;
21
+ };
22
+ update: (handle: {
23
+ render: ReturnType<typeof createDomRenderer>;
24
+ }, props: any) => void;
25
+ unmount: (handle: {
26
+ render: ReturnType<typeof createDomRenderer>;
27
+ }) => void;
28
+ };
29
+ chart: {
30
+ mount: (host: HTMLElement, props: any, emit: (binding: any, event: Event) => void) => {
31
+ render: ReturnType<typeof createDomRenderer>;
32
+ };
33
+ update: (handle: {
34
+ render: ReturnType<typeof createDomRenderer>;
35
+ }, props: any) => void;
36
+ unmount: (handle: {
37
+ render: ReturnType<typeof createDomRenderer>;
38
+ }) => void;
39
+ };
40
+ markdown: {
41
+ mount: (host: HTMLElement, props: any, emit: (binding: any, event: Event) => void) => {
42
+ render: ReturnType<typeof createDomRenderer>;
43
+ };
44
+ update: (handle: {
45
+ render: ReturnType<typeof createDomRenderer>;
46
+ }, props: any) => void;
47
+ unmount: (handle: {
48
+ render: ReturnType<typeof createDomRenderer>;
49
+ }) => void;
50
+ };
51
+ mermaid: {
52
+ mount: (host: HTMLElement, props: any, emit: (binding: any, event: Event) => void) => {
53
+ render: ReturnType<typeof createDomRenderer>;
54
+ };
55
+ update: (handle: {
56
+ render: ReturnType<typeof createDomRenderer>;
57
+ }, props: any) => void;
58
+ unmount: (handle: {
59
+ render: ReturnType<typeof createDomRenderer>;
60
+ }) => void;
61
+ };
62
+ };
63
+ auditDocumentRender: (doc: any) => {
64
+ widgets: string[];
65
+ problems: string[];
66
+ notes: string[];
67
+ };
68
+ loadStudioDocument: (doc: any, env?: {
69
+ node?: any;
70
+ document?: any;
71
+ schedule?: (flush: () => void) => void;
72
+ onError?: (err: Error) => void;
73
+ }) => {
74
+ ok: true;
75
+ app: any;
76
+ } | {
77
+ ok: false;
78
+ errors: any[];
79
+ total: number;
80
+ message: string;
81
+ };
82
+ };