@quilix/core 0.1.1

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/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@quilix/core",
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "description": "React components for Quilix framework",
6
+ "main": "./src/index.ts",
7
+ "types": "./src/index.ts",
8
+ "exports": {
9
+ ".": "./src/index.ts"
10
+ },
11
+ "scripts": {
12
+ "build": "echo 'No build required'",
13
+ "typecheck": "tsc --noEmit"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/vincentzhangz/quilix.git",
18
+ "directory": "packages/@quilix/core"
19
+ },
20
+ "keywords": ["quilix", "react", "framework"],
21
+ "license": "MIT",
22
+ "peerDependencies": {
23
+ "react": ">=19.2.4",
24
+ "react-dom": ">=19.2.4"
25
+ },
26
+ "devDependencies": {
27
+ "@types/react": "^19.2.14",
28
+ "@types/react-dom": "^19.2.3",
29
+ "typescript": "^6.0.2"
30
+ }
31
+ }
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+
3
+ interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
4
+ src: string;
5
+ alt: string;
6
+ width?: number;
7
+ height?: number;
8
+ }
9
+
10
+ /**
11
+ * Image component with standard props passthrough.
12
+ */
13
+ export function Image({ src, alt, width, height, ...props }: ImageProps) {
14
+ return (
15
+ <img
16
+ src={src}
17
+ alt={alt}
18
+ width={width}
19
+ height={height}
20
+ {...props}
21
+ />
22
+ );
23
+ }
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+
3
+ interface LayoutProps {
4
+ children: React.ReactNode;
5
+ }
6
+
7
+ /**
8
+ * Basic layout wrapper component.
9
+ */
10
+ export function Layout({ children }: LayoutProps) {
11
+ return <div className="quilix-layout">{children}</div>;
12
+ }
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+
3
+ interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
4
+ href: string;
5
+ children: React.ReactNode;
6
+ }
7
+
8
+ /**
9
+ * Link component wrapping standard anchor element.
10
+ */
11
+ export function Link({ href, children, ...props }: LinkProps) {
12
+ return (
13
+ <a href={href} {...props}>
14
+ {children}
15
+ </a>
16
+ );
17
+ }
package/src/config.ts ADDED
@@ -0,0 +1,37 @@
1
+ export interface QuilixConfig {
2
+ plugins?: PluginConfig[];
3
+ moduleFederation?: ModuleFederationConfig;
4
+ }
5
+
6
+ export interface PluginConfig {
7
+ name: string;
8
+ options?: Record<string, unknown>;
9
+ }
10
+
11
+ export interface ModuleFederationConfig {
12
+ name: string;
13
+ remotes?: Record<string, string>;
14
+ exposes?: Record<string, string>;
15
+ shared?: string[];
16
+ }
17
+
18
+ export function defineConfig(config: QuilixConfig): QuilixConfig {
19
+ return config;
20
+ }
21
+
22
+ export interface ModuleFederationOptions {
23
+ name: string;
24
+ remotes?: Record<string, string>;
25
+ exposes?: Record<string, string>;
26
+ shared?: string[];
27
+ }
28
+
29
+ /**
30
+ * Creates a Module Federation plugin configuration.
31
+ */
32
+ export function moduleFederation(options: ModuleFederationOptions): PluginConfig {
33
+ return {
34
+ name: 'module-federation',
35
+ options: options as unknown as Record<string, unknown>,
36
+ };
37
+ }
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ export { Link } from './components/Link';
2
+ export { Layout } from './components/Layout';
3
+ export { Image } from './components/Image';
4
+ export { defineConfig, moduleFederation } from './config';
5
+ export type { QuilixConfig, PluginConfig, ModuleFederationConfig, ModuleFederationOptions } from './config';