@origostudio/origo-design 0.0.24 → 0.0.26
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/CHANGELOG.md +3 -3
- package/dist/packages/angular-renderer/CHANGELOG.md +14 -0
- package/dist/packages/angular-renderer/package.json +7 -3
- package/dist/packages/cli/CHANGELOG.md +14 -0
- package/dist/packages/cli/package.json +6 -2
- package/dist/packages/cli/package.json.bak +6 -2
- package/dist/packages/core/CHANGELOG.md +14 -0
- package/dist/packages/core/package.json +5 -1
- package/dist/packages/core/package.json.bak +5 -1
- package/dist/packages/design-tokens/CHANGELOG.md +14 -0
- package/dist/packages/design-tokens/package.json +6 -2
- package/dist/packages/playground/browser/{chunk-CHh1yOT3.js → chunk-B1yt1wkH.js} +1 -1
- package/dist/packages/playground/browser/{chunk-BIsevC4o.js → chunk-BEMXb5oL.js} +1 -1
- package/dist/packages/playground/browser/{chunk-5S3Ucu1S.js → chunk-BZdIduKX.js} +1 -1
- package/dist/packages/playground/browser/{chunk-BZXiyyqI.js → chunk-BbYkq0do.js} +1 -1
- package/dist/packages/playground/browser/{chunk-Du5eaEhO.js → chunk-CFynrtNT.js} +1 -1
- package/dist/packages/playground/browser/{chunk-CIQb4Ujf.js → chunk-CKGOb_0k.js} +1 -1
- package/dist/packages/playground/browser/{chunk-DcWKTj51.js → chunk-CN5udh6_.js} +1 -1
- package/dist/packages/playground/browser/{chunk-kRrEPa7L.js → chunk-CgXX0xzO.js} +1 -1
- package/dist/packages/playground/browser/{chunk-BmW8ut-l.js → chunk-D6bPVI5e.js} +1 -1
- package/dist/packages/playground/browser/{chunk-1vJMDD28.js → chunk-DCWOfVW7.js} +1 -1
- package/dist/packages/playground/browser/{chunk-BY0EamUN.js → chunk-DK0Oayzy.js} +1 -1
- package/dist/packages/playground/browser/{chunk-CzUkWye9.js → chunk-DK1jtz7W.js} +1 -1
- package/dist/packages/playground/browser/{chunk-BMMWqLA2.js → chunk-J3vZZDeQ.js} +1 -1
- package/dist/packages/playground/browser/{chunk-DogLDWZF.js → chunk-JJAF1OPh.js} +1 -1
- package/dist/packages/playground/browser/{chunk-FQyDviof.js → chunk-qEgphO2b.js} +1 -1
- package/dist/packages/playground/browser/index.html +5 -2
- package/dist/packages/playground/browser/main-LV44ZNM4.js +711 -0
- package/dist/packages/playground/browser/styles-QZDFZ2TY.css +1 -0
- package/dist/packages/playground/browser/worker-GYB3RGDW.js +12 -0
- package/package.json +1 -1
- package/packages/angular-renderer/CHANGELOG.md +14 -0
- package/packages/angular-renderer/package.json +7 -3
- package/packages/cli/CHANGELOG.md +14 -0
- package/packages/cli/package.json +6 -2
- package/packages/core/CHANGELOG.md +14 -0
- package/packages/core/package.json +5 -1
- package/packages/design-tokens/CHANGELOG.md +14 -0
- package/packages/design-tokens/package.json +6 -2
- package/packages/playground/CHANGELOG.md +20 -0
- package/packages/playground/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/deps___vitest_vm__/_metadata.json +3 -3
- package/packages/playground/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/packages/playground/package.json +5 -1
- package/packages/playground/src/app/app.component.html +11 -1
- package/packages/playground/src/app/app.component.scss +25 -0
- package/packages/playground/src/app/app.component.ts +9 -2
- package/packages/playground/src/editor/badl-editor.component.html +4 -0
- package/packages/playground/src/editor/badl-editor.component.scss +43 -2
- package/packages/playground/src/editor/badl-editor.component.ts +99 -0
- package/packages/playground/src/index.html +6 -0
- package/packages/playground/src/main.ts +6 -1
- package/packages/playground/src/preview/error-display.component.html +29 -0
- package/packages/playground/src/preview/error-display.component.scss +79 -0
- package/packages/playground/src/preview/error-display.component.ts +14 -0
- package/packages/playground/src/preview/preview-pane.component.html +18 -0
- package/packages/playground/src/preview/preview-pane.component.scss +44 -0
- package/packages/playground/src/preview/preview-pane.component.ts +34 -0
- package/packages/playground/src/preview/preview-root.component.ts +85 -0
- package/packages/playground/src/preview/preview.service.ts +88 -0
- package/packages/playground/src/styles.scss +15 -0
- package/packages/playground/src/workers/compiler.worker.ts +62 -0
- package/packages/playground/vite.config.ts +2 -1
- package/dist/packages/playground/browser/main-YL46L42N.js +0 -711
- package/dist/packages/playground/browser/styles-WT2FEGU3.css +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "angular-renderer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@origo/core": "0.0.
|
|
10
|
-
"@origo/design-tokens": "0.0.
|
|
9
|
+
"@origo/core": "0.0.26",
|
|
10
|
+
"@origo/design-tokens": "0.0.26",
|
|
11
11
|
"tslib": "^2.3.0",
|
|
12
12
|
"@axe-core/playwright": "^4.13.0",
|
|
13
13
|
"@playwright/test": "^1.36.0"
|
|
@@ -16,5 +16,9 @@
|
|
|
16
16
|
"@angular/common": ">=18.0.0",
|
|
17
17
|
"@angular/core": ">=18.0.0",
|
|
18
18
|
"@angular/platform-browser": ">=18.0.0"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/OrigoStudio/origo-design.git"
|
|
19
23
|
}
|
|
20
24
|
}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 0.0.26 (2026-09-08)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for cli to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.0.25 (2026-09-07)
|
|
6
|
+
|
|
7
|
+
### 🚀 Features
|
|
8
|
+
|
|
9
|
+
- initialize package.json files for cli, core, design-tokens, playground, and angular-renderer packages ([2dee8cc](https://github.com/OrigoStudio/origo-design/commit/2dee8cc))
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Hardik Patel @hardikpatelse
|
|
14
|
+
|
|
1
15
|
## 0.0.24 (2026-09-07)
|
|
2
16
|
|
|
3
17
|
This was a version bump only for cli to align it with other projects, there were no code changes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origostudio/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -9,8 +9,12 @@
|
|
|
9
9
|
"origo": "./src/main.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@origo/core": "0.0.
|
|
12
|
+
"@origo/core": "0.0.26",
|
|
13
13
|
"commander": "^15.0.0",
|
|
14
14
|
"tslib": "^2.3.0"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/OrigoStudio/origo-design.git"
|
|
15
19
|
}
|
|
16
20
|
}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 0.0.26 (2026-09-08)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for core to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.0.25 (2026-09-07)
|
|
6
|
+
|
|
7
|
+
### 🚀 Features
|
|
8
|
+
|
|
9
|
+
- initialize package.json files for cli, core, design-tokens, playground, and angular-renderer packages ([2dee8cc](https://github.com/OrigoStudio/origo-design/commit/2dee8cc))
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Hardik Patel @hardikpatelse
|
|
14
|
+
|
|
1
15
|
## 0.0.24 (2026-09-07)
|
|
2
16
|
|
|
3
17
|
This was a version bump only for core to align it with other projects, there were no code changes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origo/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -17,5 +17,9 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/json-source-map": "^0.6.0",
|
|
19
19
|
"@types/semver": "^7.8.0"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/OrigoStudio/origo-design.git"
|
|
20
24
|
}
|
|
21
25
|
}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 0.0.26 (2026-09-08)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for design-tokens to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.0.25 (2026-09-07)
|
|
6
|
+
|
|
7
|
+
### 🚀 Features
|
|
8
|
+
|
|
9
|
+
- initialize package.json files for cli, core, design-tokens, playground, and angular-renderer packages ([2dee8cc](https://github.com/OrigoStudio/origo-design/commit/2dee8cc))
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Hardik Patel @hardikpatelse
|
|
14
|
+
|
|
1
15
|
## 0.0.24 (2026-09-07)
|
|
2
16
|
|
|
3
17
|
This was a version bump only for design-tokens to align it with other projects, there were no code changes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origo/design-tokens",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -21,5 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"ajv": "^8.20.0"
|
|
23
23
|
},
|
|
24
|
-
"devDependencies": {}
|
|
24
|
+
"devDependencies": {},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/OrigoStudio/origo-design.git"
|
|
28
|
+
}
|
|
25
29
|
}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## 0.0.26 (2026-09-08)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- implement live compilation and rendering pipeline in playground environment ([d6dd322](https://github.com/OrigoStudio/origo-design/commit/d6dd322))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Hardik Patel @hardikpatelse
|
|
10
|
+
|
|
11
|
+
## 0.0.25 (2026-09-07)
|
|
12
|
+
|
|
13
|
+
### 🚀 Features
|
|
14
|
+
|
|
15
|
+
- initialize package.json files for cli, core, design-tokens, playground, and angular-renderer packages ([2dee8cc](https://github.com/OrigoStudio/origo-design/commit/2dee8cc))
|
|
16
|
+
|
|
17
|
+
### ❤️ Thank You
|
|
18
|
+
|
|
19
|
+
- Hardik Patel @hardikpatelse
|
|
20
|
+
|
|
1
21
|
## 0.0.24 (2026-09-07)
|
|
2
22
|
|
|
3
23
|
This was a version bump only for playground to align it with other projects, there were no code changes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.1.11","results":[[":src/editor/schema-registry.spec.ts",{"duration":
|
|
1
|
+
{"version":"4.1.11","results":[[":src/editor/badl-editor.component.spec.ts",{"duration":121.80809300000146,"failed":false}],[":src/workers/compiler.worker.spec.ts",{"duration":226.10447299999942,"failed":false}],[":src/editor/schema-registry.spec.ts",{"duration":11.560529000000315,"failed":false}],[":src/preview/preview-pane.component.spec.ts",{"duration":168.94734900000003,"failed":false}],[":src/preview/preview-root.component.spec.ts",{"duration":151.09215100000074,"failed":false}],[":src/app/app.component.spec.ts",{"duration":172.2051109999993,"failed":false}],[":src/preview/preview.service.spec.ts",{"duration":17.45730200000071,"failed":false}]]}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@origo/playground",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26",
|
|
4
4
|
"private": true,
|
|
5
5
|
"dependencies": {},
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"@angular/common": "^18.0.0",
|
|
8
8
|
"@angular/core": "^18.0.0"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/OrigoStudio/origo-design.git"
|
|
9
13
|
}
|
|
10
14
|
}
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
<
|
|
1
|
+
<div class="playground-layout">
|
|
2
|
+
<div class="editor-pane">
|
|
3
|
+
<origo-badl-editor
|
|
4
|
+
[initialValue]="'{}'"
|
|
5
|
+
(editorContentChange)="onContentChange($event)"
|
|
6
|
+
></origo-badl-editor>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="preview-pane">
|
|
9
|
+
<origo-playground-preview></origo-playground-preview>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
|
+
height: 100vh;
|
|
4
|
+
width: 100vw;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.playground-layout {
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: 1fr;
|
|
11
|
+
grid-template-rows: 1fr 1fr;
|
|
12
|
+
height: 100%;
|
|
13
|
+
width: 100%;
|
|
14
|
+
|
|
15
|
+
@media (min-width: 768px) {
|
|
16
|
+
grid-template-columns: 1fr 1fr;
|
|
17
|
+
grid-template-rows: 1fr;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.editor-pane {
|
|
22
|
+
min-width: 0;
|
|
23
|
+
height: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.preview-pane {
|
|
27
|
+
min-width: 0;
|
|
3
28
|
height: 100%;
|
|
4
29
|
}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
1
|
+
import { Component, inject } from '@angular/core';
|
|
2
|
+
import { PreviewService } from '../preview/preview.service';
|
|
2
3
|
import { BadlEditorComponent } from '../editor/badl-editor.component';
|
|
4
|
+
import { PreviewPaneComponent } from '../preview/preview-pane.component';
|
|
3
5
|
|
|
4
6
|
@Component({
|
|
5
7
|
standalone: true,
|
|
6
|
-
imports: [BadlEditorComponent],
|
|
8
|
+
imports: [BadlEditorComponent, PreviewPaneComponent],
|
|
7
9
|
selector: 'origo-root',
|
|
8
10
|
templateUrl: './app.component.html',
|
|
9
11
|
styleUrl: './app.component.scss',
|
|
10
12
|
})
|
|
11
13
|
export class AppComponent {
|
|
12
14
|
protected title = 'playground';
|
|
15
|
+
private previewService = inject(PreviewService);
|
|
16
|
+
|
|
17
|
+
public onContentChange(content: string) {
|
|
18
|
+
this.previewService.onContentChange(content);
|
|
19
|
+
}
|
|
13
20
|
}
|
|
@@ -1,10 +1,51 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
display:
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
3
4
|
width: 100%;
|
|
4
5
|
height: 100%;
|
|
5
6
|
}
|
|
6
7
|
|
|
8
|
+
.editor-header {
|
|
9
|
+
padding: 12px 24px;
|
|
10
|
+
background: var(--origo-color-surface, #1e1e1e);
|
|
11
|
+
border-bottom: 1px solid var(--origo-color-border-subtle, rgba(255, 255, 255, 0.1));
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
align-items: center;
|
|
15
|
+
|
|
16
|
+
.editor-title {
|
|
17
|
+
color: var(--origo-color-text-secondary, #cccccc);
|
|
18
|
+
font-size: 0.9rem;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
letter-spacing: 0.05em;
|
|
21
|
+
text-transform: uppercase;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.load-sample-btn {
|
|
25
|
+
background: transparent;
|
|
26
|
+
border: 1px solid var(--origo-color-border, #4a4a4a);
|
|
27
|
+
color: var(--origo-color-text-primary, #e0e0e0);
|
|
28
|
+
padding: 6px 12px;
|
|
29
|
+
border-radius: 6px;
|
|
30
|
+
font-size: 0.8rem;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
transition: all 0.2s ease;
|
|
34
|
+
font-family: inherit;
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
background: var(--origo-color-surface-hover, rgba(255, 255, 255, 0.1));
|
|
38
|
+
border-color: var(--origo-color-border-hover, #666);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:active {
|
|
42
|
+
background: var(--origo-color-surface-active, rgba(255, 255, 255, 0.15));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
7
47
|
.editor-container {
|
|
48
|
+
flex: 1;
|
|
8
49
|
width: 100%;
|
|
9
|
-
height:
|
|
50
|
+
min-height: 0;
|
|
10
51
|
}
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ElementRef,
|
|
6
6
|
ViewChild,
|
|
7
7
|
input,
|
|
8
|
+
output,
|
|
8
9
|
NgZone,
|
|
9
10
|
inject,
|
|
10
11
|
} from '@angular/core';
|
|
@@ -24,6 +25,7 @@ export class BadlEditorComponent implements AfterViewInit, OnDestroy {
|
|
|
24
25
|
readonly initialValue = input<string>('');
|
|
25
26
|
readonly theme = input<string>('vs-dark');
|
|
26
27
|
readonly readOnly = input<boolean>(false);
|
|
28
|
+
readonly editorContentChange = output<string>();
|
|
27
29
|
|
|
28
30
|
private editor: monaco.editor.IStandaloneCodeEditor | null = null;
|
|
29
31
|
private zone = inject(NgZone);
|
|
@@ -44,12 +46,109 @@ export class BadlEditorComponent implements AfterViewInit, OnDestroy {
|
|
|
44
46
|
automaticLayout: true, // Required for split-pane resize in Story 7.2
|
|
45
47
|
minimap: { enabled: false },
|
|
46
48
|
});
|
|
49
|
+
|
|
50
|
+
// Initial compilation trigger
|
|
51
|
+
this.editorContentChange.emit(this.initialValue());
|
|
52
|
+
|
|
53
|
+
this.editor.onDidChangeModelContent(() => {
|
|
54
|
+
const val = this.editor?.getValue();
|
|
55
|
+
if (val !== undefined) {
|
|
56
|
+
this.editorContentChange.emit(val);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
47
59
|
} catch (e) {
|
|
48
60
|
console.error('Failed to initialize Monaco Editor', e);
|
|
49
61
|
}
|
|
50
62
|
});
|
|
51
63
|
}
|
|
52
64
|
|
|
65
|
+
loadSample(): void {
|
|
66
|
+
if (this.editor) {
|
|
67
|
+
const sample = {
|
|
68
|
+
id: 'dom-identity',
|
|
69
|
+
name: 'Identity Management',
|
|
70
|
+
version: '1.0.0',
|
|
71
|
+
domain: 'core',
|
|
72
|
+
entities: [
|
|
73
|
+
{
|
|
74
|
+
id: 'ent-user',
|
|
75
|
+
name: 'User',
|
|
76
|
+
fields: [
|
|
77
|
+
{
|
|
78
|
+
id: 'fld-user-id',
|
|
79
|
+
name: 'id',
|
|
80
|
+
type: 'string',
|
|
81
|
+
label: 'User ID',
|
|
82
|
+
validation: ['required', 'uuid'],
|
|
83
|
+
metadata_path: '/user/id',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'fld-user-username',
|
|
87
|
+
name: 'username',
|
|
88
|
+
type: 'string',
|
|
89
|
+
label: 'Username',
|
|
90
|
+
validation: ['required', 'min:3', 'max:50'],
|
|
91
|
+
metadata_path: '/user/username',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'fld-user-email',
|
|
95
|
+
name: 'email',
|
|
96
|
+
type: 'string',
|
|
97
|
+
label: 'Email Address',
|
|
98
|
+
validation: ['required', 'email'],
|
|
99
|
+
metadata_path: '/user/email',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: 'fld-user-roleId',
|
|
103
|
+
name: 'roleId',
|
|
104
|
+
type: 'string',
|
|
105
|
+
label: 'Assigned Role',
|
|
106
|
+
references: 'ent-role',
|
|
107
|
+
validation: ['required'],
|
|
108
|
+
metadata_path: '/user/roleId',
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: 'ent-role',
|
|
114
|
+
name: 'Role',
|
|
115
|
+
fields: [
|
|
116
|
+
{
|
|
117
|
+
id: 'fld-role-id',
|
|
118
|
+
name: 'id',
|
|
119
|
+
type: 'string',
|
|
120
|
+
label: 'Role ID',
|
|
121
|
+
validation: ['required', 'uuid'],
|
|
122
|
+
metadata_path: '/role/id',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'fld-role-name',
|
|
126
|
+
name: 'name',
|
|
127
|
+
type: 'string',
|
|
128
|
+
label: 'Role Name',
|
|
129
|
+
validation: ['required'],
|
|
130
|
+
metadata_path: '/role/name',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: 'fld-role-permissions',
|
|
134
|
+
name: 'permissions',
|
|
135
|
+
type: 'array',
|
|
136
|
+
itemType: 'string',
|
|
137
|
+
label: 'Permissions List',
|
|
138
|
+
validation: [],
|
|
139
|
+
metadata_path: '/role/permissions',
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const formatted = JSON.stringify(sample, null, 2);
|
|
147
|
+
this.editor.setValue(formatted);
|
|
148
|
+
// The onDidChangeModelContent will trigger preview compilation automatically
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
53
152
|
ngOnDestroy(): void {
|
|
54
153
|
this.editor?.dispose(); // CRITICAL — prevents Monaco timer memory leak
|
|
55
154
|
this.editor = null;
|
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
<base href="/" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
8
|
<link rel="icon" type="image/x-icon" href="favicon.ico" />
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
10
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
11
|
+
<link
|
|
12
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
|
|
13
|
+
rel="stylesheet"
|
|
14
|
+
/>
|
|
9
15
|
</head>
|
|
10
16
|
<body>
|
|
11
17
|
<origo-root></origo-root>
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { bootstrapApplication } from '@angular/platform-browser';
|
|
2
2
|
import { appConfig } from './app/app.config';
|
|
3
3
|
import { AppComponent } from './app/app.component';
|
|
4
|
+
import { PreviewRootComponent } from './preview/preview-root.component';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
if (window.location.search.includes('preview=true')) {
|
|
7
|
+
bootstrapApplication(PreviewRootComponent, appConfig).catch(err => console.error(err));
|
|
8
|
+
} else {
|
|
9
|
+
bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err));
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@if (previewService.compilationErrorsSignal().length > 0) {
|
|
2
|
+
<div class="error-container">
|
|
3
|
+
<h3>Compilation Errors</h3>
|
|
4
|
+
<ul>
|
|
5
|
+
@for (error of previewService.compilationErrorsSignal(); track $index) {
|
|
6
|
+
<li class="error-item">
|
|
7
|
+
<span
|
|
8
|
+
class="badge"
|
|
9
|
+
[ngClass]="{
|
|
10
|
+
'badge-syntax': error.type === 'Syntax Error',
|
|
11
|
+
'badge-semantic': error.type === 'Semantic Error',
|
|
12
|
+
}"
|
|
13
|
+
>
|
|
14
|
+
{{ error.type }}
|
|
15
|
+
</span>
|
|
16
|
+
<div class="error-details">
|
|
17
|
+
<span class="error-message">{{ error.message }}</span>
|
|
18
|
+
@if (error.path || error.line) {
|
|
19
|
+
<span class="error-location">
|
|
20
|
+
at {{ error.path || 'document' }} (Line: {{ error.line || '?' }}, Col:
|
|
21
|
+
{{ error.column || '?' }})
|
|
22
|
+
</span>
|
|
23
|
+
}
|
|
24
|
+
</div>
|
|
25
|
+
</li>
|
|
26
|
+
}
|
|
27
|
+
</ul>
|
|
28
|
+
</div>
|
|
29
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
flex-shrink: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.error-container {
|
|
7
|
+
padding: 20px;
|
|
8
|
+
background-color: var(--origo-color-surface, #ffffff);
|
|
9
|
+
border-top: 1px solid var(--origo-color-border, #eaeaea);
|
|
10
|
+
box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.03);
|
|
11
|
+
max-height: 300px;
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
border-top-left-radius: 12px;
|
|
14
|
+
border-top-right-radius: 12px;
|
|
15
|
+
margin-top: -12px; /* Pull up to overlap slightly */
|
|
16
|
+
position: relative;
|
|
17
|
+
z-index: 10;
|
|
18
|
+
|
|
19
|
+
h3 {
|
|
20
|
+
margin-top: 0;
|
|
21
|
+
margin-bottom: 12px;
|
|
22
|
+
color: var(--origo-color-danger, #ef4444);
|
|
23
|
+
font-size: 0.95rem;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
text-transform: uppercase;
|
|
26
|
+
letter-spacing: 0.05em;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
ul {
|
|
30
|
+
list-style: none;
|
|
31
|
+
padding: 0;
|
|
32
|
+
margin: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.error-item {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: flex-start;
|
|
38
|
+
padding: var(--origo-spacing-xs) 0;
|
|
39
|
+
border-bottom: 1px solid var(--origo-color-border);
|
|
40
|
+
|
|
41
|
+
&:last-child {
|
|
42
|
+
border-bottom: none;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.badge {
|
|
47
|
+
padding: 2px 6px;
|
|
48
|
+
border-radius: var(--origo-border-radius-s);
|
|
49
|
+
font-size: var(--origo-typography-size-caption);
|
|
50
|
+
font-weight: 600;
|
|
51
|
+
margin-right: var(--origo-spacing-s);
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
|
|
54
|
+
&.badge-syntax {
|
|
55
|
+
background-color: var(--origo-color-danger);
|
|
56
|
+
color: white;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.badge-semantic {
|
|
60
|
+
background-color: var(--origo-color-warning);
|
|
61
|
+
color: black;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.error-details {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
|
|
69
|
+
.error-message {
|
|
70
|
+
font-weight: 500;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.error-location {
|
|
74
|
+
font-size: var(--origo-typography-size-caption);
|
|
75
|
+
color: var(--origo-color-text-muted);
|
|
76
|
+
margin-top: 2px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, inject } from '@angular/core';
|
|
2
|
+
import { PreviewService } from './preview.service';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'origo-playground-error-display',
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [CommonModule],
|
|
9
|
+
templateUrl: './error-display.component.html',
|
|
10
|
+
styleUrl: './error-display.component.scss',
|
|
11
|
+
})
|
|
12
|
+
export class ErrorDisplayComponent {
|
|
13
|
+
public previewService = inject(PreviewService);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="preview-container">
|
|
2
|
+
<div class="preview-header">
|
|
3
|
+
<h2>Preview</h2>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<div class="iframe-wrapper">
|
|
7
|
+
<iframe
|
|
8
|
+
#previewIframe
|
|
9
|
+
(load)="onIframeLoad()"
|
|
10
|
+
sandbox="allow-scripts allow-same-origin"
|
|
11
|
+
src="/?preview=true"
|
|
12
|
+
title="Origo Live Preview"
|
|
13
|
+
>
|
|
14
|
+
</iframe>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<origo-playground-error-display></origo-playground-error-display>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.preview-container {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
height: 100%;
|
|
11
|
+
background-color: var(--origo-color-surface, #fafafa);
|
|
12
|
+
border-left: 1px solid var(--origo-color-border, #eaeaea);
|
|
13
|
+
box-shadow: -4px 0 15px rgba(0, 0, 0, 0.03);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.preview-header {
|
|
17
|
+
padding: var(--origo-spacing-m, 16px) 24px;
|
|
18
|
+
background: rgba(255, 255, 255, 0.8);
|
|
19
|
+
backdrop-filter: blur(8px);
|
|
20
|
+
border-bottom: 1px solid var(--origo-color-border, #eaeaea);
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
|
|
24
|
+
h2 {
|
|
25
|
+
margin: 0;
|
|
26
|
+
font-size: 1.1rem;
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
letter-spacing: -0.01em;
|
|
29
|
+
color: var(--origo-color-text, #111827);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.iframe-wrapper {
|
|
34
|
+
flex: 1;
|
|
35
|
+
display: flex;
|
|
36
|
+
min-height: 0; /* Important for flex child to not overflow */
|
|
37
|
+
|
|
38
|
+
iframe {
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
border: none;
|
|
42
|
+
display: block;
|
|
43
|
+
}
|
|
44
|
+
}
|