zard-cli 1.0.0-beta.43 → 1.0.0-beta.44

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/README.md CHANGED
@@ -1,188 +1,60 @@
1
- # @ngzard/ui
1
+ # Zard
2
2
 
3
- Beautiful Angular components built with TailwindCSS v4. Add modern, accessible components to your Angular apps with a single command.
3
+ Modern Angular component library inspired by shadcn/ui, built with TailwindCSS and designed for developers who value <b>beautiful</b>, <b>accessible</b>, and <b>completely free</b> open source components.
4
4
 
5
- ## 🚀 Quick Start
5
+ <a alt="Zard Ui logo" href="https://www.zardui.com/" target="_blank" rel="noreferrer">
6
+ <img align="center" width=100% src="https://www.zardui.com/images/github_banner.png"/>
7
+ </a>
6
8
 
7
- ```bash
8
- # Init the CLI
9
- npx @ngzard/ui@latest init
10
- ```
11
-
12
- ## ✨ Features
13
-
14
- - 🎨 **Beautiful Components** - Modern, accessible UI components
15
- - ⚡ **TailwindCSS v4** - Latest CSS framework with native cascade layers
16
- - 🔧 **TypeScript First** - Built for modern Angular with full type safety
17
- - 🎯 **Angular Focused** - Designed specifically for the Angular ecosystem
18
- - 📱 **Responsive** - Mobile-first components that work everywhere
19
- - 🌙 **Dark Mode** - Built-in dark mode support
20
- - 🧩 **Modular** - Add only the components you need
21
-
22
- ## Installation
9
+ <p align="center">Made with ❤️ from 🇧🇷</p>
10
+ <p align="center">
11
+ <img src="https://img.shields.io/github/stars/zard-ui/zardui" alt="zard ui repository stars"/>
12
+ </p>
23
13
 
24
- Use the `ngzard` to add components to your Angular project:
25
-
26
- ```bash
27
- # Initialize your project
28
- npx @ngzard/ui@latest init
29
-
30
- # Add components to your project
31
- npx @ngzard/ui@latest add button
32
- npx @ngzard/ui@latest add button card dialog
33
-
34
- # Add all components
35
- npx @ngzard/ui@latest add --all
36
- ```
14
+ ## Stack
37
15
 
38
- ## Commands
16
+ ![Angular](https://img.shields.io/badge/angular-%23DD0031.svg?style=for-the-badge&logo=angular&logoColor=white)
17
+ ![TailwindCSS](https://img.shields.io/badge/tailwindcss-%2338B2AC.svg?style=for-the-badge&logo=tailwind-css&logoColor=white)
18
+ ![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
39
19
 
40
- ### `init`
20
+ ## Documentation
41
21
 
42
- Initialize your project and install dependencies for ZardUI components.
22
+ Visit https://www.zardui.com/docs to view the documentation
43
23
 
44
- ```bash
45
- npx @ngzard/ui@latest init
46
- ```
24
+ ## Contributing
47
25
 
48
- This will:
49
- - Install required dependencies (Tailwind CSS v4, class-variance-authority, etc.)
50
- - Create `.postcssrc.json` for Tailwind CSS PostCSS plugin
51
- - Set up `src/styles.css` with Tailwind configuration and design tokens
52
- - Configure TypeScript path mappings in `tsconfig.json`
53
- - Create utility functions in `src/app/shared/utils/`
26
+ We follow a **simple GitHub Flow** with automated releases. Please read our [contributing guide](/CONTRIBUTING.md) to get started.
54
27
 
55
- **Options:**
56
- - `-y, --yes` - Skip confirmation prompts
57
- - `-c, --cwd <path>` - Specify working directory
28
+ ### Quick Start for Contributors
58
29
 
59
- ### `add`
30
+ 1. Fork the repository
31
+ 2. Create your feature branch: `git checkout -b feat/#123-your-feature`
32
+ 3. Develop with as many commits as you want
33
+ 4. Open a PR to `master`
34
+ 5. After review + merge = automatic release!
60
35
 
61
- Add components to your project.
36
+ ### Development Commands
62
37
 
63
38
  ```bash
64
- npx @ngzard/ui@latest add [components...]
65
- ```
66
-
67
- **Examples:**
68
- ```bash
69
- # Add a single component
70
- npx @ngzard/ui@latest add button
71
-
72
- # Add multiple components
73
- npx @ngzard/ui@latest add button card badge
74
-
75
- # Add all components
76
- npx @ngzard/ui@latest add --all
77
-
78
- # Interactive selection
79
- npx @ngzard/ui@latest add
39
+ npm start # Start dev server (port 4222)
40
+ npm test # Run all tests
41
+ npm run build # Build production
42
+ npm run release # Automated release
80
43
  ```
81
44
 
82
- **Options:**
83
- - `-y, --yes` - Skip confirmation prompts
84
- - `-o, --overwrite` - Overwrite existing files
85
- - `-c, --cwd <path>` - Specify working directory
86
- - `-a, --all` - Add all available components
87
- - `-p, --path <path>` - Custom path for components
88
-
89
- ## Available Components
90
-
91
- - `accordion` - Collapsible content panels
92
- - `alert` - Alert messages with variants
93
- - `avatar` - User profile pictures with fallbacks
94
- - `badge` - Small status indicators
95
- - `breadcrumb` - Navigation breadcrumbs
96
- - `button` - Interactive buttons with variants
97
- - `card` - Content containers
98
- - `checkbox` - Form checkboxes
99
- - `dialog` - Modal dialogs
100
- - `divider` - Visual separators
101
- - `dropdown` - Dropdown menus
102
- - `input` - Form inputs
103
- - `loader` - Loading indicators
104
- - `progress-bar` - Progress indicators
105
- - `radio` - Radio button inputs
106
- - `select` - Select dropdowns
107
- - `slider` - Range sliders
108
- - `switch` - Toggle switches
109
- - `tabs` - Tabbed interfaces
110
- - `toggle` - Toggle buttons
111
- - `tooltip` - Hover tooltips
112
-
113
- ## Configuration
114
-
115
- The CLI stores configuration in `components.json`:
116
-
117
- ```json
118
- {
119
- "style": "css",
120
- "tailwind": {
121
- "css": "src/styles.css",
122
- "baseColor": "slate"
123
- },
124
- "baseUrl": "src/app",
125
- "aliases": {
126
- "components": "@/shared/components",
127
- "utils": "@/shared/utils",
128
- "core": "@/shared/core",
129
- "services": "@/shared/services"
130
- }
131
- }
132
- ```
133
-
134
- ## Requirements
135
-
136
- - Angular 19+
137
- - Node.js 20 or 22
138
- - TypeScript project
139
-
140
- ## Path Mappings
141
-
142
- The CLI automatically configures TypeScript path mappings in your `tsconfig.json`:
143
-
144
- ```json
145
- {
146
- "compilerOptions": {
147
- "baseUrl": "./",
148
- "paths": {
149
- "@/*": ["src/app/*"]
150
- }
151
- }
152
- }
153
- ```
154
-
155
- This allows you to import components and utilities using clean paths:
156
-
157
- ```typescript
158
- import { ZardButtonComponent } from '@/shared/components/button';
159
- import { mergeClasses } from '@/shared/utils/merge-classes';
160
- ```
161
-
162
- ## Tailwind CSS v4 Support
163
-
164
- ZardUI CLI is built specifically for Tailwind CSS v4, using the new inline configuration approach:
165
-
166
- - No `tailwind.config.js` needed
167
- - Configuration via `.postcssrc.json`
168
- - Design tokens defined in CSS with `@theme`
169
- - Plugin configuration with `@plugin`
170
-
171
- ## Troubleshooting
172
-
173
- ### "Configuration not found"
174
- Run `npx @ngzard/ui@latest init` first to initialize your project.
175
-
176
- ### "Not an Angular project"
177
- Make sure you're in the root directory of an Angular project with a `package.json` that includes `@angular/core`.
45
+ ## License
178
46
 
179
- ### Rate limiting from GitHub
180
- The CLI fetches components from GitHub. If you encounter rate limiting, wait a few minutes before retrying.
47
+ Licensed under the [MIT license](/LICENSE.md).
181
48
 
182
- ## Contributing
49
+ ## Get In Touch
183
50
 
184
- This CLI is part of the [ZardUI](https://github.com/zard-ui/zardui) project. Please refer to the main repository for contribution guidelines.
51
+ <p>Click on one of the icons and Help us on this journey and be part of our community.</p>
185
52
 
186
- ## License
53
+ <a href="https://chat.whatsapp.com/Dctdh6Huhvm24OX6js5XKT" target="_blank">
54
+ <img src="https://img.shields.io/badge/WhatsApp-25D366?style=for-the-badge&logo=whatsapp&logoColor=white" alt="whatsapp" />
55
+ </a>
56
+ <img src="https://dcbadge.limes.pink/api/server/https://discord.com/invite/yP8Uj9rAX9" alt="discord" />
187
57
 
188
- MIT © ZardUI
58
+ <span>Follow us in</span> <a href="https://x.com/zard_ui" target="_blank">
59
+ <img src="https://img.shields.io/badge/X-%23000000.svg?logo=X&logoColor=white" alt="X" />
60
+ </a>
@@ -1,4 +1,4 @@
1
- import type { Config } from '../../utils/config.js';
1
+ import { Config } from '../../utils/config';
2
2
  export declare function installComponent(componentName: string, targetDir: string, config: Config & {
3
3
  resolvedPaths: any;
4
4
  }): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"component-installer.d.ts","sourceRoot":"","sources":["../../../src/commands/add/component-installer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,wBAAsB,gBAAgB,CACpC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GAAG;IAAE,aAAa,EAAE,GAAG,CAAA;CAAE,GACtC,OAAO,CAAC,IAAI,CAAC,CAQf"}
1
+ {"version":3,"file":"component-installer.d.ts","sourceRoot":"","sources":["../../../src/commands/add/component-installer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAK3C,wBAAsB,gBAAgB,CACpC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GAAG;IAAE,aAAa,EAAE,GAAG,CAAA;CAAE,GACtC,OAAO,CAAC,IAAI,CAAC,CAQf"}
@@ -1,6 +1,6 @@
1
+ import { fetchComponent } from '../../utils/registry.js';
1
2
  import { promises as fs } from 'node:fs';
2
3
  import * as path from 'node:path';
3
- import { fetchComponent } from '../../utils/registry.js';
4
4
  export async function installComponent(componentName, targetDir, config) {
5
5
  const component = await fetchComponent(componentName, config);
6
6
  await fs.mkdir(targetDir, { recursive: true });
@@ -1 +1 @@
1
- {"version":3,"file":"component-installer.js","sourceRoot":"","sources":["../../../src/commands/add/component-installer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAC;AAE5E,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,aAAqB,EACrB,SAAiB,EACjB,MAAuC;IAEvC,MAAM,SAAS,GAAG,MAAM,cAAc,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAE9D,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE/C,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,KA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E,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEvC,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC"}
@@ -1,7 +1,9 @@
1
+ import { type Config } from '../../utils/config.js';
1
2
  export declare function updateProvideZardWithDarkMode(cwd: string, resolvedConfig: {
2
3
  resolvedPaths: {
3
4
  core: string;
4
5
  services: string;
5
6
  };
7
+ aliases?: Config['aliases'];
6
8
  }): Promise<void>;
7
9
  //# sourceMappingURL=dark-mode-setup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dark-mode-setup.d.ts","sourceRoot":"","sources":["../../../src/commands/add/dark-mode-setup.ts"],"names":[],"mappings":"AAQA,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,MAAM,EACX,cAAc,EAAE;IAAE,aAAa,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GACpE,OAAO,CAAC,IAAI,CAAC,CAmDf"}
1
+ {"version":3,"file":"dark-mode-setup.d.ts","sourceRoot":"","sources":["../../../src/commands/add/dark-mode-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAYnD,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,MAAM,EACX,cAAc,EAAE;IAAE,aAAa,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAA;CAAE,GACjG,OAAO,CAAC,IAAI,CAAC,CAoDf"}
@@ -2,7 +2,9 @@ import { logger } from '../../utils/logger.js';
2
2
  import { existsSync } from 'fs';
3
3
  import * as fsPromises from 'fs/promises';
4
4
  import * as path from 'path';
5
- const DARK_MODE_IMPORT = "import { ZardDarkMode } from '../../services/dark-mode';";
5
+ function getDarkModeImport(servicesAlias) {
6
+ return `import { ZardDarkMode } from '${servicesAlias ?? '@/shared/services'}/dark-mode';`;
7
+ }
6
8
  const DARK_MODE_INITIALIZER = 'provideAppInitializer(() => inject(ZardDarkMode).init())';
7
9
  export async function updateProvideZardWithDarkMode(cwd, resolvedConfig) {
8
10
  const provideZardPath = path.join(resolvedConfig.resolvedPaths.core, 'provider/providezard.ts');
@@ -29,7 +31,8 @@ export async function updateProvideZardWithDarkMode(cwd, resolvedConfig) {
29
31
  }
30
32
  if (lastImportMatch) {
31
33
  const insertionIndex = lastImportMatch.index + lastImportMatch[0].length;
32
- content = content.slice(0, insertionIndex) + DARK_MODE_IMPORT + '\n' + content.slice(insertionIndex);
34
+ const darkModeImport = getDarkModeImport(resolvedConfig.aliases?.services);
35
+ content = content.slice(0, insertionIndex) + darkModeImport + '\n' + content.slice(insertionIndex);
33
36
  }
34
37
  content = content.replace(/return makeEnvironmentProviders\(\[(.*?)\]\);/s, (match, providers) => {
35
38
  const trimmedProviders = providers.trim();
@@ -1 +1 @@
1
- {"version":3,"file":"dark-mode-setup.js","sourceRoot":"","sources":["../../../src/commands/add/dark-mode-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,gBAAgB,GAAG,0DAA0D,CAAC;AACpF,MAAM,qBAAqB,GAAG,0DAA0D,CAAC;AAEzF,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,GAAW,EACX,cAAqE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C,IAAI,gBAAgB,EAAE,CAAC;YACrB,OAAO,oCAAoC,qBAAqB,KAAK,gBAAgB,KAAK,CAAC;QAC7F,CAAC;QACD,OAAO,oCAAoC,qBAAqB,KAAK,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,MAAM,UAAU,CAAC,SAAS,CAAC,eAAe,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAC/D,CAAC"}
@@ -4,68 +4,27 @@ import { z } from 'zod';
4
4
  export declare const SCHEMA_URL = "https://zardui.com/schema.json";
5
5
  export declare const configSchema: z.ZodObject<{
6
6
  $schema: z.ZodString;
7
- style: z.ZodEnum<["css"]>;
7
+ style: z.ZodEnum<{
8
+ css: "css";
9
+ }>;
8
10
  appConfigFile: z.ZodString;
9
- packageManager: z.ZodEnum<["npm", "yarn", "pnpm", "bun"]>;
11
+ packageManager: z.ZodEnum<{
12
+ npm: "npm";
13
+ yarn: "yarn";
14
+ pnpm: "pnpm";
15
+ bun: "bun";
16
+ }>;
10
17
  tailwind: z.ZodObject<{
11
18
  css: z.ZodString;
12
19
  baseColor: z.ZodString;
13
- }, "strip", z.ZodTypeAny, {
14
- css?: string;
15
- baseColor?: string;
16
- }, {
17
- css?: string;
18
- baseColor?: string;
19
- }>;
20
+ }, z.core.$strip>;
20
21
  baseUrl: z.ZodString;
21
22
  aliases: z.ZodObject<{
22
23
  components: z.ZodString;
23
24
  utils: z.ZodString;
24
25
  core: z.ZodString;
25
26
  services: z.ZodString;
26
- }, "strip", z.ZodTypeAny, {
27
- components?: string;
28
- utils?: string;
29
- core?: string;
30
- services?: string;
31
- }, {
32
- components?: string;
33
- utils?: string;
34
- core?: string;
35
- services?: string;
36
- }>;
37
- }, "strip", z.ZodTypeAny, {
38
- $schema?: string;
39
- appConfigFile?: string;
40
- style?: "css";
41
- packageManager?: "npm" | "yarn" | "pnpm" | "bun";
42
- tailwind?: {
43
- css?: string;
44
- baseColor?: string;
45
- };
46
- baseUrl?: string;
47
- aliases?: {
48
- components?: string;
49
- utils?: string;
50
- core?: string;
51
- services?: string;
52
- };
53
- }, {
54
- $schema?: string;
55
- appConfigFile?: string;
56
- style?: "css";
57
- packageManager?: "npm" | "yarn" | "pnpm" | "bun";
58
- tailwind?: {
59
- css?: string;
60
- baseColor?: string;
61
- };
62
- baseUrl?: string;
63
- aliases?: {
64
- components?: string;
65
- utils?: string;
66
- core?: string;
67
- services?: string;
68
- };
69
- }>;
27
+ }, z.core.$strip>;
28
+ }, z.core.$strip>;
70
29
  export declare function promptForConfig(cwd: string, projectInfo: ProjectInfo, packageManager: 'npm' | 'yarn' | 'pnpm' | 'bun'): Promise<Config>;
71
30
  //# sourceMappingURL=config-prompter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-prompter.d.ts","sourceRoot":"","sources":["../../../src/commands/init/config-prompter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAQ1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU,mCAAmC,CAAC;AAE3D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBvB,CAAC;AAEH,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAC9C,OAAO,CAAC,MAAM,CAAC,CAiEjB"}
1
+ {"version":3,"file":"config-prompter.d.ts","sourceRoot":"","sources":["../../../src/commands/init/config-prompter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAQ1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU,mCAAmC,CAAC;AAE3D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;iBAgBvB,CAAC;AAEH,wBAAsB,eAAe,CACnC,GAAG,EAAE,MAAM,EACX,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAC9C,OAAO,CAAC,MAAM,CAAC,CAiEjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"theme-loader.d.ts","sourceRoot":"","sources":["../../../src/commands/init/theme-loader.ts"],"names":[],"mappings":"AA2BA,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCrF"}
1
+ {"version":3,"file":"theme-loader.d.ts","sourceRoot":"","sources":["../../../src/commands/init/theme-loader.ts"],"names":[],"mappings":"AAyBA,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCrF"}
@@ -13,11 +13,9 @@ const THEME_SCRIPT_CONTENT = `
13
13
 
14
14
  const isSystem = theme === 'system' || !('theme' in localStorage);
15
15
  const isDark = theme === 'dark' || (isSystem && prefersDark);
16
- const resolvedTheme = isDark ? 'dark' : 'light';
16
+ html.classList.add('scheme-light-dark');
17
17
  html.classList.toggle('dark', isDark);
18
- html.classList.toggle('dark-theme', isDark);
19
18
  html.setAttribute('data-theme', theme ?? 'system');
20
- html.style.colorScheme = resolvedTheme;
21
19
  } catch (_) {}
22
20
  })();
23
21
  </script>
@@ -1 +1 @@
1
- {"version":3,"file":"theme-loader.js","sourceRoot":"","sources":["../../../src/commands/init/theme-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAA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G;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,iBAAiB,EAo1BvC,CAAC"}
1
+ {"version":3,"file":"registry-data.d.ts","sourceRoot":"","sources":["../../../src/core/registry/registry-data.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,iBAAiB,EA4iCvC,CAAC"}