Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ The best way to understand A2UI is to run the samples.

```bash
# Install and build the Markdown renderer
cd renderers/markdown/markdown-it
cd renderers/markdown/markdown_it
npm install
npm run build

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/catalogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export class HelloWorldBanner extends DynamicComponent {
}
```

You can see a working example of a client renderer in the [Rizzcharts demo](../samples/client/angular/projects/rizzcharts/src/a2ui-catalog/catalog.ts).
You can see a working example of a client renderer in the [Rizzcharts demo](../samples/client/angular/projects/rizzcharts/src/a2ui_catalog/catalog.ts).

## A2UI Catalog Negotiation

Expand Down
2 changes: 1 addition & 1 deletion renderers/lit/src/0.8/ui/directives/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class MarkdownDirective extends Directive {
if (!MarkdownDirective.defaultMarkdownWarningLogged) {
console.warn("[MarkdownDirective]",
"can't render markdown because no markdown renderer is configured.\n",
"Use `@a2ui/markdown-it`, or your own markdown renderer.");
"Use `@a2ui/markdown_it`, or your own markdown renderer.");
MarkdownDirective.defaultMarkdownWarningLogged = true;
}
return html`<span class="no-markdown-renderer">${value}</span>`;
Expand Down
2 changes: 1 addition & 1 deletion renderers/lit/src/0.8/ui/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class Text extends Root {
accessor usageHint: Types.ResolvedText["usageHint"] | null = null;

// Allow users to specify their own markdown renderer,
// or the one provided by @a2ui/markdown-it.
// or the one provided by @a2ui/markdown_it.
@consume({context: Context.markdown})
accessor markdownRenderer: Types.MarkdownRenderer | undefined = undefined;

Expand Down
2 changes: 1 addition & 1 deletion renderers/lit/src/0.8/ui/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import { Video } from "./video.js";
export * as Context from "./context/context.js";
export * as Utils from "./utils/utils.js";
export { ComponentRegistry, componentRegistry } from "./component-registry.js";
export { registerCustomComponents } from "./custom-components/index.js";
export { registerCustomComponents } from "./custom_components/index.js";

export {
Audio,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@a2ui/markdown-it",
"name": "@a2ui/markdown_it",
"version": "0.0.2",
"description": "A Markdown renderer using markdown-it and dompurify.",
"keywords": [],
Expand All @@ -10,7 +10,7 @@
"repository": {
"type": "git",
"url": "git+https://github.com/google/A2UI.git",
"directory": "renderers/markdown/markdown-it"
"directory": "renderers/markdown/markdown_it"
},
"license": "Apache-2.0",
"author": "Google",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import markdownit from 'markdown-it';
import markdownit from 'markdown_it';
import * as Types from '@a2ui/web_core';

/**
Expand All @@ -34,7 +34,7 @@ export class MarkdownItRenderer {
*/
private registerTagClassMapRules() {
// Proxy the "_open" default rules to apply classes to their tokens.
// See: https://github.com/markdown-it/markdown-it/blob/master/docs/examples/renderer_rules.md#default-renderer-rules
// See: https://github.com/markdown_it/markdown-it/blob/master/docs/examples/renderer_rules.md#default-renderer-rules
const rulesToProxy = [
'paragraph_open',
'heading_open',
Expand All @@ -49,7 +49,7 @@ export class MarkdownItRenderer {
for (const ruleName of rulesToProxy) {
// We cache the original rule here to use it to render the token after
// we've applied classes to it.
// See: https://github.com/markdown-it/markdown-it/blob/master/docs/examples/renderer_rules.md#to-add-a-default-css-class-to-an-element
// See: https://github.com/markdown_it/markdown-it/blob/master/docs/examples/renderer_rules.md#to-add-a-default-css-class-to-an-element
const originalRule = this.markdownIt.renderer.rules[ruleName];
this.markdownIt.renderer.rules[ruleName] = (tokens, idx, options, env, self) => {
const token = tokens[idx];
Expand Down
6 changes: 3 additions & 3 deletions renderers/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,9 +578,9 @@ npm run dev

### Documentation

- **[visual-parity/README.md](./visual-parity/README.md)** - Test suite usage
- **[visual_parity/README.md](./visual_parity/README.md)** - Test suite usage
and fixture creation
- **[visual-parity/PARITY.md](./visual-parity/PARITY.md)** - CSS
- **[visual_parity/PARITY.md](./visual_parity/PARITY.md)** - CSS
transformation approach and implementation status

### Key Concepts
Expand Down Expand Up @@ -653,4 +653,4 @@ import type {
3. Register in `src/registry/defaultCatalog.ts`
4. Export from `src/index.ts`
5. Add unit tests in `tests/components/{ComponentName}.test.tsx`
6. Add visual parity fixtures in `visual-parity/fixtures/components/`
6. Add visual parity fixtures in `visual_parity/fixtures/components/`
2 changes: 1 addition & 1 deletion renderers/react/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ export default tseslint.config(

// Ignored paths
{
ignores: ['dist/**', 'node_modules/**', 'visual-parity/**', '**/*.d.ts'],
ignores: ['dist/**', 'node_modules/**', 'visual_parity/**', '**/*.d.ts'],
}
);
4 changes: 2 additions & 2 deletions renderers/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion renderers/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"dependencies": {
"@a2ui/web_core": "file:../web_core",
"clsx": "^2.1.0",
"markdown-it": "^14.0.0",
"markdown_it": "^14.0.0",
"zod": "^3.23.8",
"rxjs": "^7.8.1"
},
Expand Down
2 changes: 1 addition & 1 deletion renderers/react/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default defineConfig([
sourcemap: true,
clean: true,
treeshake: true,
external: ['react', 'react-dom', 'markdown-it'],
external: ['react', 'react-dom', 'markdown_it'],
esbuildOptions(options) {
options.jsx = 'automatic';
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ This happens when Vite's dependency optimization cache becomes stale, typically

**Fix:** Clear the Vite cache and restart:
```bash
# From renderers/react/visual-parity/
# From renderers/react/visual_parity/
rm -rf node_modules/.vite react/node_modules/.vite lit/node_modules/.vite ../node_modules/.vite
npm run dev:react # or dev:lit
```
Expand All @@ -181,7 +181,7 @@ If you edit files in `renderers/react/src/` but the visual parity app doesn't re

**Fix:** Rebuild the package and clear Vite's cache:
```bash
# From renderers/react/visual-parity/
# From renderers/react/visual_parity/

# 1. Rebuild the React renderer
cd ../
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ http://localhost:5002?fixture=buttonPrimary&theme=lit (Lit)
## Project Structure

```
visual-parity/
visual_parity/
├── fixtures/
│ ├── index.ts # Aggregates all fixtures
│ ├── types.ts # ComponentFixture interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as UI from '@a2ui/lit/ui';
import { LitElement, html } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { provide } from '@lit/context';
import { renderMarkdown } from '@a2ui/markdown-it';
import { renderMarkdown } from '@a2ui/markdown_it';
import { allFixtures, type FixtureName, type ComponentFixture } from '../../fixtures';
import { getTheme, themeNames, type ThemeName } from '../../fixtures/themes';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default defineConfig({
// Don't pre-bundle @a2ui/lit or its deps to avoid duplicate module instances
exclude: [
'@a2ui/lit',
'markdown-it',
'markdown_it',
'clsx',
'signal-utils/array',
'signal-utils/map',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@a2ui/visual-parity",
"name": "@a2ui/visual_parity",
"version": "0.8.0",
"private": true,
"type": "module",
Expand All @@ -16,11 +16,11 @@
},
"dependencies": {
"@a2ui/lit": "file:../../lit",
"@a2ui/markdown-it": "file:../../markdown/markdown-it",
"@a2ui/markdown_it": "file:../../markdown/markdown-it",
"@a2ui/react": "file:..",
"@lit/context": "^1.1.0",
"lit": "^3.1.0",
"markdown-it": "^14.0.0",
"markdown_it": "^14.0.0",
"react": "^18.3.0",
"react-dom": "^18.3.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default defineConfig({
exclude: [
'@a2ui/react',
'@a2ui/lit',
'markdown-it',
'markdown_it',
'clsx',
'signal-utils/array',
'signal-utils/map',
Expand Down
14 changes: 7 additions & 7 deletions samples/client/angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,20 +350,20 @@
}
}
},
"a2a-chat-canvas": {
"a2a_chat_canvas": {
"projectType": "library",
"root": "projects/a2a-chat-canvas",
"sourceRoot": "projects/a2a-chat-canvas/src",
"root": "projects/a2a_chat_canvas",
"sourceRoot": "projects/a2a_chat_canvas/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular/build:ng-packagr",
"configurations": {
"production": {
"tsConfig": "projects/a2a-chat-canvas/tsconfig.lib.prod.json"
"tsConfig": "projects/a2a_chat_canvas/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/a2a-chat-canvas/tsconfig.lib.json"
"tsConfig": "projects/a2a_chat_canvas/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
Expand All @@ -372,11 +372,11 @@
"builder": "@angular/build:karma",
"options": {
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "projects/a2a-chat-canvas/tsconfig.spec.json",
"tsConfig": "projects/a2a_chat_canvas/tsconfig.spec.json",
"assets": [
{
"glob": "**/*",
"input": "projects/a2a-chat-canvas/public"
"input": "projects/a2a_chat_canvas/public"
}
]
}
Expand Down
Loading
Loading