diff --git a/renderers/angular/CHANGELOG.md b/renderers/angular/CHANGELOG.md index 80a525f31..34e04903b 100644 --- a/renderers/angular/CHANGELOG.md +++ b/renderers/angular/CHANGELOG.md @@ -1,5 +1,6 @@ ## Unreleased +- Standardize package entry points to `index.ts` while maintaining `public-api.ts` wrappers for backward compatibility. - (v0_8) Export `A2uiMessageSchema` in public API. ## 0.10.4 diff --git a/renderers/angular/src/v0_8/index.ts b/renderers/angular/src/v0_8/index.ts new file mode 100644 index 000000000..206bb06eb --- /dev/null +++ b/renderers/angular/src/v0_8/index.ts @@ -0,0 +1,40 @@ +/** + * Copyright 2026 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 + * + * http://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 * from './catalog/index'; +export * from './components/audio'; +export * from './components/button'; +export * from './components/card'; +export * from './components/checkbox'; +export * from './components/column'; +export * from './components/datetime-input'; +export * from './components/divider'; +export * from './components/icon'; +export * from './components/image'; +export * from './components/list'; +export * from './components/modal'; +export * from './components/multiple-choice'; +export * from './components/row'; +export * from './components/slider'; +export * from './components/surface'; +export * from './components/tabs'; +export * from './components/text-field'; +export * from './components/text'; +export * from './components/video'; +export * from './config'; +export * from './data/index'; +export * from './rendering/index'; +export * as Types from './types'; diff --git a/renderers/angular/src/v0_8/ng-package.json b/renderers/angular/src/v0_8/ng-package.json index 80dbcb46f..7e82164ba 100644 --- a/renderers/angular/src/v0_8/ng-package.json +++ b/renderers/angular/src/v0_8/ng-package.json @@ -1,6 +1,6 @@ { "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "lib": { - "entryFile": "public-api.ts" + "entryFile": "index.ts" } } diff --git a/renderers/angular/src/v0_8/public-api.ts b/renderers/angular/src/v0_8/public-api.ts index 206bb06eb..3f73bea50 100644 --- a/renderers/angular/src/v0_8/public-api.ts +++ b/renderers/angular/src/v0_8/public-api.ts @@ -14,27 +14,7 @@ * limitations under the License. */ -export * from './catalog/index'; -export * from './components/audio'; -export * from './components/button'; -export * from './components/card'; -export * from './components/checkbox'; -export * from './components/column'; -export * from './components/datetime-input'; -export * from './components/divider'; -export * from './components/icon'; -export * from './components/image'; -export * from './components/list'; -export * from './components/modal'; -export * from './components/multiple-choice'; -export * from './components/row'; -export * from './components/slider'; -export * from './components/surface'; -export * from './components/tabs'; -export * from './components/text-field'; -export * from './components/text'; -export * from './components/video'; -export * from './config'; -export * from './data/index'; -export * from './rendering/index'; -export * as Types from './types'; +/** + * @deprecated Please import from `./index` instead. Will be removed in v1.0. + */ +export * from './index'; diff --git a/renderers/angular/src/v0_9/index.ts b/renderers/angular/src/v0_9/index.ts new file mode 100644 index 000000000..de8f22c7d --- /dev/null +++ b/renderers/angular/src/v0_9/index.ts @@ -0,0 +1,58 @@ +/* + * Copyright 2026 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 + * + * http://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. + */ + +/** + * Public API surface for A2UI Angular Renderer v0.9. + * + * This module provides the core services, components, and catalogs required + * to render A2UI surfaces using the v0.9 protocol. + * + * @module v0.9 + */ + +// Core Services and Components +export * from './core/a2ui-renderer.service'; +export * from './core/component-host.component'; +export * from './core/surface.component'; +export * from './core/catalog_component'; +export * from './core/component-binder.service'; +export * from './core/types'; +export * from './core/utils'; +export * from './core/markdown'; + +// Catalog Types and Implementations +export * from './catalog/types'; +export * from './catalog/basic/basic-catalog'; + +// Basic Catalog Components +export * from './catalog/basic/text.component'; +export * from './catalog/basic/row.component'; +export * from './catalog/basic/column.component'; +export * from './catalog/basic/button.component'; +export * from './catalog/basic/text-field.component'; +export * from './catalog/basic/image.component'; +export * from './catalog/basic/icon.component'; +export * from './catalog/basic/video.component'; +export * from './catalog/basic/audio-player.component'; +export * from './catalog/basic/list.component'; +export * from './catalog/basic/card.component'; +export * from './catalog/basic/tabs.component'; +export * from './catalog/basic/modal.component'; +export * from './catalog/basic/divider.component'; +export * from './catalog/basic/check-box.component'; +export * from './catalog/basic/choice-picker.component'; +export * from './catalog/basic/slider.component'; +export * from './catalog/basic/date-time-input.component'; diff --git a/renderers/angular/src/v0_9/ng-package.json b/renderers/angular/src/v0_9/ng-package.json index ed278942e..bb6786ef9 100644 --- a/renderers/angular/src/v0_9/ng-package.json +++ b/renderers/angular/src/v0_9/ng-package.json @@ -1,6 +1,6 @@ { "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", "lib": { - "entryFile": "public-api.ts" + "entryFile": "index.ts" } } diff --git a/renderers/angular/src/v0_9/public-api.ts b/renderers/angular/src/v0_9/public-api.ts index de8f22c7d..3f73bea50 100644 --- a/renderers/angular/src/v0_9/public-api.ts +++ b/renderers/angular/src/v0_9/public-api.ts @@ -1,4 +1,4 @@ -/* +/** * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,44 +15,6 @@ */ /** - * Public API surface for A2UI Angular Renderer v0.9. - * - * This module provides the core services, components, and catalogs required - * to render A2UI surfaces using the v0.9 protocol. - * - * @module v0.9 + * @deprecated Please import from `./index` instead. Will be removed in v1.0. */ - -// Core Services and Components -export * from './core/a2ui-renderer.service'; -export * from './core/component-host.component'; -export * from './core/surface.component'; -export * from './core/catalog_component'; -export * from './core/component-binder.service'; -export * from './core/types'; -export * from './core/utils'; -export * from './core/markdown'; - -// Catalog Types and Implementations -export * from './catalog/types'; -export * from './catalog/basic/basic-catalog'; - -// Basic Catalog Components -export * from './catalog/basic/text.component'; -export * from './catalog/basic/row.component'; -export * from './catalog/basic/column.component'; -export * from './catalog/basic/button.component'; -export * from './catalog/basic/text-field.component'; -export * from './catalog/basic/image.component'; -export * from './catalog/basic/icon.component'; -export * from './catalog/basic/video.component'; -export * from './catalog/basic/audio-player.component'; -export * from './catalog/basic/list.component'; -export * from './catalog/basic/card.component'; -export * from './catalog/basic/tabs.component'; -export * from './catalog/basic/modal.component'; -export * from './catalog/basic/divider.component'; -export * from './catalog/basic/check-box.component'; -export * from './catalog/basic/choice-picker.component'; -export * from './catalog/basic/slider.component'; -export * from './catalog/basic/date-time-input.component'; +export * from './index'; diff --git a/renderers/angular/src/v0_9/testing/index.ts b/renderers/angular/src/v0_9/testing/index.ts new file mode 100644 index 000000000..8b61f2d76 --- /dev/null +++ b/renderers/angular/src/v0_9/testing/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2026 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 + * + * http://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 {type ComponentToProps, setComponentProps, createBoundProperty} from './test-utils'; diff --git a/renderers/angular/src/v0_9/testing/ng-package.json b/renderers/angular/src/v0_9/testing/ng-package.json index dba7877da..f7136414d 100644 --- a/renderers/angular/src/v0_9/testing/ng-package.json +++ b/renderers/angular/src/v0_9/testing/ng-package.json @@ -1,6 +1,6 @@ { "$schema": "../../../../../node_modules/ng-packagr/ng-package.schema.json", "lib": { - "entryFile": "public-api.ts" + "entryFile": "index.ts" } } diff --git a/renderers/angular/src/v0_9/testing/public-api.ts b/renderers/angular/src/v0_9/testing/public-api.ts index 8b61f2d76..3f73bea50 100644 --- a/renderers/angular/src/v0_9/testing/public-api.ts +++ b/renderers/angular/src/v0_9/testing/public-api.ts @@ -1,4 +1,4 @@ -/* +/** * Copyright 2026 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,4 +14,7 @@ * limitations under the License. */ -export {type ComponentToProps, setComponentProps, createBoundProperty} from './test-utils'; +/** + * @deprecated Please import from `./index` instead. Will be removed in v1.0. + */ +export * from './index'; diff --git a/renderers/angular/tsconfig.json b/renderers/angular/tsconfig.json index 4f752a043..6a8c2348c 100644 --- a/renderers/angular/tsconfig.json +++ b/renderers/angular/tsconfig.json @@ -18,10 +18,10 @@ "moduleResolution": "bundler", "types": ["jasmine"], "paths": { - "@a2ui/angular/v0_8": ["./src/v0_8/public-api.ts"], - "@a2ui/angular/v0_9": ["./src/v0_9/public-api.ts"], - "@a2ui/angular/v0_9/testing": ["./src/v0_9/testing/public-api.ts"], - "@a2ui/angular/testing": ["./src/v0_9/testing/public-api.ts"] + "@a2ui/angular/v0_8": ["./src/v0_8/index.ts"], + "@a2ui/angular/v0_9": ["./src/v0_9/index.ts"], + "@a2ui/angular/v0_9/testing": ["./src/v0_9/testing/index.ts"], + "@a2ui/angular/testing": ["./src/v0_9/testing/index.ts"] } }, "angularCompilerOptions": { diff --git a/samples/client/angular/projects/lib/ng-package.json b/samples/client/angular/projects/lib/ng-package.json index a2d1bdda6..e782d01fa 100644 --- a/samples/client/angular/projects/lib/ng-package.json +++ b/samples/client/angular/projects/lib/ng-package.json @@ -2,7 +2,7 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "../../dist/lib", "lib": { - "entryFile": "src/public-api.ts" + "entryFile": "src/index.ts" }, "allowedNonPeerDependencies": ["markdown-it", "@a2ui/web_core"] } diff --git a/samples/client/angular/tsconfig.json b/samples/client/angular/tsconfig.json index 3ec275872..cec680248 100644 --- a/samples/client/angular/tsconfig.json +++ b/samples/client/angular/tsconfig.json @@ -5,7 +5,7 @@ "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "paths": { - "@a2ui/angular-sample-lib": ["./projects/lib/src/public-api.ts"], + "@a2ui/angular-sample-lib": ["./projects/lib/src/index.ts"], "@a2ui/angular": ["../../../renderers/angular/dist"], "@a2ui/angular/*": ["../../../renderers/angular/dist/*"] }, diff --git a/samples/community/client/angular/projects/a2a-chat-canvas/ng-package.json b/samples/community/client/angular/projects/a2a-chat-canvas/ng-package.json index 8d0ac8874..1c04a7ce5 100644 --- a/samples/community/client/angular/projects/a2a-chat-canvas/ng-package.json +++ b/samples/community/client/angular/projects/a2a-chat-canvas/ng-package.json @@ -2,6 +2,6 @@ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", "dest": "dist", "lib": { - "entryFile": "src/public-api.ts" + "entryFile": "src/index.ts" } } diff --git a/samples/community/client/angular/projects/a2a-chat-canvas/src/public-api.ts b/samples/community/client/angular/projects/a2a-chat-canvas/src/index.ts similarity index 100% rename from samples/community/client/angular/projects/a2a-chat-canvas/src/public-api.ts rename to samples/community/client/angular/projects/a2a-chat-canvas/src/index.ts diff --git a/samples/community/mcp/a2ui-in-mcpapps/server/apps/editor/tsconfig.app.json b/samples/community/mcp/a2ui-in-mcpapps/server/apps/editor/tsconfig.app.json index 0f6b1a88b..8e6a5327e 100644 --- a/samples/community/mcp/a2ui-in-mcpapps/server/apps/editor/tsconfig.app.json +++ b/samples/community/mcp/a2ui-in-mcpapps/server/apps/editor/tsconfig.app.json @@ -15,7 +15,7 @@ "outDir": "./out-tsc/app", "types": [], "paths": { - "@a2ui/angular": ["../../../../../../renderers/angular/src/public-api.ts"], + "@a2ui/angular": ["../../../../../../renderers/angular/src/index.ts"], "@angular/*": ["./node_modules/@angular/*"] } }, diff --git a/samples/community/mcp/a2ui-in-mcpapps/server/apps/src/tsconfig.app.json b/samples/community/mcp/a2ui-in-mcpapps/server/apps/src/tsconfig.app.json index 0f6b1a88b..8e6a5327e 100644 --- a/samples/community/mcp/a2ui-in-mcpapps/server/apps/src/tsconfig.app.json +++ b/samples/community/mcp/a2ui-in-mcpapps/server/apps/src/tsconfig.app.json @@ -15,7 +15,7 @@ "outDir": "./out-tsc/app", "types": [], "paths": { - "@a2ui/angular": ["../../../../../../renderers/angular/src/public-api.ts"], + "@a2ui/angular": ["../../../../../../renderers/angular/src/index.ts"], "@angular/*": ["./node_modules/@angular/*"] } },