-
@@ -43,12 +58,12 @@ interface GallerySample { {{ showJsonId === sample.id ? 'Hide JSON' : 'Show JSON' }}
- +
- +
{{ getJson(sample.surface) }}
@@ -60,44 +75,44 @@ interface GallerySample { `, styles: [` .gallery-container { display: flex; height: calc(100vh - 64px); overflow: hidden; } - .sidebar { - width: 250px; - background: #f5f5f5; - border-right: 1px solid #ddd; - display: flex; + .sidebar { + width: 250px; + background: #f5f5f5; + border-right: 1px solid #ddd; + display: flex; flex-direction: column; overflow-y: auto; } .sidebar h2 { padding: 20px; margin: 0; font-size: 18px; border-bottom: 1px solid #ddd; } .nav-list { padding: 10px 0; } - .nav-item { - padding: 10px 20px; - cursor: pointer; + .nav-item { + padding: 10px 20px; + cursor: pointer; transition: all 0.2s; font-size: 14px; border-left: 3px solid transparent; } .nav-item:hover { background: #e0e0e0; } - .nav-item.active { - background: #e8f0fe; + .nav-item.active { + background: #e8f0fe; color: #1a73e8; border-left-color: #1a73e8; font-weight: 500; } - + .main-content { flex: 1; overflow-y: auto; scroll-behavior: smooth; padding: 20px 40px; } .component-section { margin-bottom: 60px; scroll-margin-top: 20px; } - .section-header { - display: flex; - justify-content: space-between; + .section-header { + display: flex; + justify-content: space-between; align-items: flex-start; - margin-bottom: 20px; - padding-bottom: 10px; - border-bottom: 1px solid #eee; + margin-bottom: 20px; + padding-bottom: 10px; + border-bottom: 1px solid #eee; } .component-section h3 { font-size: 24px; margin: 0 0 8px 0; } .description { color: #666; margin: 0; } - + .json-toggle { padding: 6px 12px; background: #f0f0f0; @@ -107,26 +122,26 @@ interface GallerySample { font-size: 12px; } .json-toggle:hover { background: #e0e0e0; } - + .content-wrapper { display: flex; gap: 20px; height: 500px; } .content-wrapper.with-json .preview-card { flex: 1; } - .preview-card { + .preview-card { flex: 1; - border: 1px solid #ddd; - border-radius: 8px; - padding: 24px; - background: white; + border: 1px solid #ddd; + border-radius: 8px; + padding: 24px; + background: white; box-shadow: 0 2px 4px rgba(0,0,0,0.05); overflow-y: auto; } - - .json-pane { - flex: 1; - overflow-y: auto; - background: #2d2d2d; - color: #f8f8f2; - padding: 20px; - border-radius: 8px; + + .json-pane { + flex: 1; + overflow-y: auto; + background: #2d2d2d; + color: #f8f8f2; + padding: 20px; + border-radius: 8px; font-family: monospace; font-size: 12px; } diff --git a/samples/client/angular/projects/gallery/src/app/features/library/library.component.ts b/samples/client/angular/projects/gallery/src/app/features/library/library.component.ts index 6c300790..a8dde84e 100644 --- a/samples/client/angular/projects/gallery/src/app/features/library/library.component.ts +++ b/samples/client/angular/projects/gallery/src/app/features/library/library.component.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import { Component } from '@angular/core'; import { CommonModule } from '@angular/common'; import { Surface } from '@a2ui/angular'; diff --git a/samples/client/angular/projects/gallery/src/index.html b/samples/client/angular/projects/gallery/src/index.html index 70168dab..8a7bbb13 100644 --- a/samples/client/angular/projects/gallery/src/index.html +++ b/samples/client/angular/projects/gallery/src/index.html @@ -1,3 +1,19 @@ + + diff --git a/samples/client/angular/projects/gallery/src/main.ts b/samples/client/angular/projects/gallery/src/main.ts index 190f3418..1947cf49 100644 --- a/samples/client/angular/projects/gallery/src/main.ts +++ b/samples/client/angular/projects/gallery/src/main.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from './app/app.config'; import { App } from './app/app'; diff --git a/samples/client/angular/projects/gallery/src/styles.css b/samples/client/angular/projects/gallery/src/styles.css index d6c531f4..6158ecdc 100644 --- a/samples/client/angular/projects/gallery/src/styles.css +++ b/samples/client/angular/projects/gallery/src/styles.css @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + /* Global Styles */ body { margin: 0; diff --git a/samples/client/angular/projects/rizzcharts/src/pipes/markdown.pipe.spec.ts b/samples/client/angular/projects/rizzcharts/src/pipes/markdown.pipe.spec.ts index a81e07bb..55ef02e2 100644 --- a/samples/client/angular/projects/rizzcharts/src/pipes/markdown.pipe.spec.ts +++ b/samples/client/angular/projects/rizzcharts/src/pipes/markdown.pipe.spec.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import { TestBed } from '@angular/core/testing'; import { DomSanitizer } from '@angular/platform-browser'; import { MarkdownPipe } from './markdown.pipe'; diff --git a/samples/client/angular/projects/rizzcharts/src/services/markdown-renderer.service.spec.ts b/samples/client/angular/projects/rizzcharts/src/services/markdown-renderer.service.spec.ts index 84f0be0c..5c81b432 100644 --- a/samples/client/angular/projects/rizzcharts/src/services/markdown-renderer.service.spec.ts +++ b/samples/client/angular/projects/rizzcharts/src/services/markdown-renderer.service.spec.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import { TestBed } from '@angular/core/testing'; import { DomSanitizer } from '@angular/platform-browser'; import { RizzchartsMarkdownRendererService } from './markdown-renderer.service'; diff --git a/samples/client/lit/contact/ui/custom-components/org-chart.ts b/samples/client/lit/contact/ui/custom-components/org-chart.ts index 14d123f4..7b0538be 100644 --- a/samples/client/lit/contact/ui/custom-components/org-chart.ts +++ b/samples/client/lit/contact/ui/custom-components/org-chart.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import { Root } from '@a2ui/web-lib/ui'; import { v0_8 } from '@a2ui/web-lib'; import { html, css, TemplateResult } from 'lit'; diff --git a/samples/client/lit/contact/ui/custom-components/premium-text-field.ts b/samples/client/lit/contact/ui/custom-components/premium-text-field.ts index 6780e0fe..b44bf493 100644 --- a/samples/client/lit/contact/ui/custom-components/premium-text-field.ts +++ b/samples/client/lit/contact/ui/custom-components/premium-text-field.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import { Root } from '@a2ui/web-lib/ui'; import { html, css } from 'lit'; import { property } from 'lit/decorators.js'; diff --git a/samples/client/lit/contact/ui/custom-components/register-components.ts b/samples/client/lit/contact/ui/custom-components/register-components.ts index 46400462..c3874e25 100644 --- a/samples/client/lit/contact/ui/custom-components/register-components.ts +++ b/samples/client/lit/contact/ui/custom-components/register-components.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import { componentRegistry } from "@a2ui/web-lib/ui"; import { OrgChart } from "./org-chart.js"; import { PremiumTextField } from "./premium-text-field.js"; diff --git a/samples/client/lit/contact/ui/custom-components/test/org-chart-test.html b/samples/client/lit/contact/ui/custom-components/test/org-chart-test.html index 656922c0..b54b5710 100644 --- a/samples/client/lit/contact/ui/custom-components/test/org-chart-test.html +++ b/samples/client/lit/contact/ui/custom-components/test/org-chart-test.html @@ -1,3 +1,19 @@ + + diff --git a/samples/client/lit/contact/ui/custom-components/test/override-test.html b/samples/client/lit/contact/ui/custom-components/test/override-test.html index 4f7c0522..7edf0291 100644 --- a/samples/client/lit/contact/ui/custom-components/test/override-test.html +++ b/samples/client/lit/contact/ui/custom-components/test/override-test.html @@ -1,3 +1,19 @@ + + diff --git a/samples/client/lit/contact/ui/custom-components/test/override-test.ts b/samples/client/lit/contact/ui/custom-components/test/override-test.ts index aa1bd582..f2d2d461 100644 --- a/samples/client/lit/contact/ui/custom-components/test/override-test.ts +++ b/samples/client/lit/contact/ui/custom-components/test/override-test.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import { componentRegistry, Root } from "@a2ui/web-lib/ui"; import { html, css } from "lit"; import { property } from "lit/decorators.js"; diff --git a/samples/client/lit/shell/configs/types.ts b/samples/client/lit/shell/configs/types.ts index a5a4d203..f91aeacf 100644 --- a/samples/client/lit/shell/configs/types.ts +++ b/samples/client/lit/shell/configs/types.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import { v0_8 } from "@a2ui/web-lib"; /** diff --git a/specification/0.8/eval/pnpm-lock.yaml b/specification/0.8/eval/pnpm-lock.yaml index 7ade2ded..3bccec70 100644 --- a/specification/0.8/eval/pnpm-lock.yaml +++ b/specification/0.8/eval/pnpm-lock.yaml @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + lockfileVersion: '9.0' settings: diff --git a/specification/0.8/eval/pnpm-workspace.yaml b/specification/0.8/eval/pnpm-workspace.yaml index 0ae80a64..719ee0b4 100644 --- a/specification/0.8/eval/pnpm-workspace.yaml +++ b/specification/0.8/eval/pnpm-workspace.yaml @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + onlyBuiltDependencies: - '@firebase/util' - esbuild diff --git a/specification/0.9/eval/pnpm-lock.yaml b/specification/0.9/eval/pnpm-lock.yaml index 00544515..2cbb1dec 100644 --- a/specification/0.9/eval/pnpm-lock.yaml +++ b/specification/0.9/eval/pnpm-lock.yaml @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + lockfileVersion: '9.0' settings: diff --git a/specification/0.9/eval/pnpm-workspace.yaml b/specification/0.9/eval/pnpm-workspace.yaml index 0ae80a64..719ee0b4 100644 --- a/specification/0.9/eval/pnpm-workspace.yaml +++ b/specification/0.9/eval/pnpm-workspace.yaml @@ -1,3 +1,17 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + onlyBuiltDependencies: - '@firebase/util' - esbuild diff --git a/specification/0.9/eval/src/evaluator.ts b/specification/0.9/eval/src/evaluator.ts index a6128cb5..a0340442 100644 --- a/specification/0.9/eval/src/evaluator.ts +++ b/specification/0.9/eval/src/evaluator.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import { evaluationFlow } from "./evaluation_flow"; import { ValidatedResult, EvaluatedResult } from "./types"; import { logger } from "./logger"; diff --git a/specification/0.9/eval/src/generator.ts b/specification/0.9/eval/src/generator.ts index ed357005..d61bd275 100644 --- a/specification/0.9/eval/src/generator.ts +++ b/specification/0.9/eval/src/generator.ts @@ -1,3 +1,18 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ import { componentGeneratorFlow } from "./generation_flow"; import { ModelConfiguration } from "./models"; diff --git a/specification/0.9/eval/src/logger.ts b/specification/0.9/eval/src/logger.ts index 5dc4aef6..15f6ec26 100644 --- a/specification/0.9/eval/src/logger.ts +++ b/specification/0.9/eval/src/logger.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import * as winston from "winston"; import * as path from "path"; diff --git a/specification/0.9/eval/src/types.ts b/specification/0.9/eval/src/types.ts index 842496f7..6680b481 100644 --- a/specification/0.9/eval/src/types.ts +++ b/specification/0.9/eval/src/types.ts @@ -1,3 +1,18 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ import { TestPrompt } from "./prompts"; diff --git a/specification/0.9/eval/src/utils.ts b/specification/0.9/eval/src/utils.ts index 36908b1e..1eea6108 100644 --- a/specification/0.9/eval/src/utils.ts +++ b/specification/0.9/eval/src/utils.ts @@ -1,3 +1,18 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ export function extractJsonFromMarkdown(markdown: string): any[] { const jsonBlockRegex = /```json\s*([\s\S]*?)\s*```/g; diff --git a/specification/0.9/eval/src/validator.ts b/specification/0.9/eval/src/validator.ts index 43394f0a..d2c0a2dc 100644 --- a/specification/0.9/eval/src/validator.ts +++ b/specification/0.9/eval/src/validator.ts @@ -1,3 +1,19 @@ +/* + Copyright 2025 Google LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + import Ajv from "ajv/dist/2020"; import * as fs from "fs"; import * as path from "path"; diff --git a/specification/0.9/validate.sh b/specification/0.9/validate.sh index 0c412ebb..a73a91e1 100755 --- a/specification/0.9/validate.sh +++ b/specification/0.9/validate.sh @@ -1,5 +1,19 @@ #!/bin/bash +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + SCHEMA_DIR="/Users/gspencer/code/a2ui/specification/0.9" SERVER_SCHEMA="${SCHEMA_DIR}/server_to_client.json" COMMON_TYPES="${SCHEMA_DIR}/common_types.json"