@universe-platform/ui 0.1.0-beta.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.
@@ -0,0 +1,161 @@
1
+ /*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
2
+ @layer theme, base, components, utilities;
3
+ @layer theme {
4
+ :root, :host {
5
+ --ui-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
6
+ "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
7
+ --ui-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
8
+ "Courier New", monospace;
9
+ --ui-default-font-family: var(--ui-font-sans);
10
+ --ui-default-mono-font-family: var(--ui-font-mono);
11
+ }
12
+ }
13
+ @layer base {
14
+ *, ::after, ::before, ::backdrop, ::file-selector-button {
15
+ box-sizing: border-box;
16
+ margin: 0;
17
+ padding: 0;
18
+ border: 0 solid;
19
+ }
20
+ html, :host {
21
+ line-height: 1.5;
22
+ -webkit-text-size-adjust: 100%;
23
+ tab-size: 4;
24
+ font-family: var(--ui-default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
25
+ font-feature-settings: var(--ui-default-font-feature-settings, normal);
26
+ font-variation-settings: var(--ui-default-font-variation-settings, normal);
27
+ -webkit-tap-highlight-color: transparent;
28
+ }
29
+ hr {
30
+ height: 0;
31
+ color: inherit;
32
+ border-top-width: 1px;
33
+ }
34
+ abbr:where([title]) {
35
+ -webkit-text-decoration: underline dotted;
36
+ text-decoration: underline dotted;
37
+ }
38
+ h1, h2, h3, h4, h5, h6 {
39
+ font-size: inherit;
40
+ font-weight: inherit;
41
+ }
42
+ a {
43
+ color: inherit;
44
+ -webkit-text-decoration: inherit;
45
+ text-decoration: inherit;
46
+ }
47
+ b, strong {
48
+ font-weight: bolder;
49
+ }
50
+ code, kbd, samp, pre {
51
+ font-family: var(--ui-default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
52
+ font-feature-settings: var(--ui-default-mono-font-feature-settings, normal);
53
+ font-variation-settings: var(--ui-default-mono-font-variation-settings, normal);
54
+ font-size: 1em;
55
+ }
56
+ small {
57
+ font-size: 80%;
58
+ }
59
+ sub, sup {
60
+ font-size: 75%;
61
+ line-height: 0;
62
+ position: relative;
63
+ vertical-align: baseline;
64
+ }
65
+ sub {
66
+ bottom: -0.25em;
67
+ }
68
+ sup {
69
+ top: -0.5em;
70
+ }
71
+ table {
72
+ text-indent: 0;
73
+ border-color: inherit;
74
+ border-collapse: collapse;
75
+ }
76
+ :-moz-focusring {
77
+ outline: auto;
78
+ }
79
+ progress {
80
+ vertical-align: baseline;
81
+ }
82
+ summary {
83
+ display: list-item;
84
+ }
85
+ ol, ul, menu {
86
+ list-style: none;
87
+ }
88
+ img, svg, video, canvas, audio, iframe, embed, object {
89
+ display: block;
90
+ vertical-align: middle;
91
+ }
92
+ img, video {
93
+ max-width: 100%;
94
+ height: auto;
95
+ }
96
+ button, input, select, optgroup, textarea, ::file-selector-button {
97
+ font: inherit;
98
+ font-feature-settings: inherit;
99
+ font-variation-settings: inherit;
100
+ letter-spacing: inherit;
101
+ color: inherit;
102
+ border-radius: 0;
103
+ background-color: transparent;
104
+ opacity: 1;
105
+ }
106
+ :where(select:is([multiple], [size])) optgroup {
107
+ font-weight: bolder;
108
+ }
109
+ :where(select:is([multiple], [size])) optgroup option {
110
+ padding-inline-start: 20px;
111
+ }
112
+ ::file-selector-button {
113
+ margin-inline-end: 4px;
114
+ }
115
+ ::placeholder {
116
+ opacity: 1;
117
+ }
118
+ @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
119
+ ::placeholder {
120
+ color: currentcolor;
121
+ @supports (color: color-mix(in lab, red, red)) {
122
+ color: color-mix(in oklab, currentcolor 50%, transparent);
123
+ }
124
+ }
125
+ }
126
+ textarea {
127
+ resize: vertical;
128
+ }
129
+ ::-webkit-search-decoration {
130
+ -webkit-appearance: none;
131
+ }
132
+ ::-webkit-date-and-time-value {
133
+ min-height: 1lh;
134
+ text-align: inherit;
135
+ }
136
+ ::-webkit-datetime-edit {
137
+ display: inline-flex;
138
+ }
139
+ ::-webkit-datetime-edit-fields-wrapper {
140
+ padding: 0;
141
+ }
142
+ ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
143
+ padding-block: 0;
144
+ }
145
+ ::-webkit-calendar-picker-indicator {
146
+ line-height: 1;
147
+ }
148
+ :-moz-ui-invalid {
149
+ box-shadow: none;
150
+ }
151
+ button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
152
+ appearance: button;
153
+ }
154
+ ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
155
+ height: auto;
156
+ }
157
+ [hidden]:where(:not([hidden="until-found"])) {
158
+ display: none !important;
159
+ }
160
+ }
161
+ @layer utilities;
@@ -0,0 +1,46 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ declare function cn(...inputs: ClassValue[]): string;
4
+
5
+ /**
6
+ * Core definitions for Universe UI components.
7
+ * These interfaces define the standard contract that all generic visual components
8
+ * must implement to communicate with the host application.
9
+ */
10
+ interface ComponentState {
11
+ isLoading?: boolean;
12
+ isUpdating?: boolean;
13
+ error?: string | Error | null;
14
+ isEmpty?: boolean;
15
+ }
16
+ interface ComponentData<T = any> {
17
+ data: T;
18
+ }
19
+ interface ComponentConfig<TConfig = Record<string, any>> {
20
+ orgId: string;
21
+ componentId: string;
22
+ dataTargets?: string[];
23
+ settings: TConfig;
24
+ disabled?: boolean;
25
+ readOnly?: boolean;
26
+ }
27
+ interface ComponentCommunication {
28
+ pageState: Record<string, any>;
29
+ emitEvent: (eventName: string, payload: any) => void;
30
+ executeAction: (actionType: string, payload: Record<string, any>) => Promise<any>;
31
+ }
32
+ interface ComponentPermissions {
33
+ canCreate: boolean;
34
+ canRead: boolean;
35
+ canUpdate: boolean;
36
+ canDelete: boolean;
37
+ }
38
+ interface BaseComponentProps<TData = any, TConfig = Record<string, any>> extends ComponentState, ComponentData<TData>, ComponentConfig<TConfig>, ComponentCommunication {
39
+ permissions: ComponentPermissions;
40
+ className?: string;
41
+ "data-testid"?: string;
42
+ }
43
+
44
+ declare const isUiLibraryReady = true;
45
+
46
+ export { type BaseComponentProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentState, cn, isUiLibraryReady };
@@ -0,0 +1,46 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ declare function cn(...inputs: ClassValue[]): string;
4
+
5
+ /**
6
+ * Core definitions for Universe UI components.
7
+ * These interfaces define the standard contract that all generic visual components
8
+ * must implement to communicate with the host application.
9
+ */
10
+ interface ComponentState {
11
+ isLoading?: boolean;
12
+ isUpdating?: boolean;
13
+ error?: string | Error | null;
14
+ isEmpty?: boolean;
15
+ }
16
+ interface ComponentData<T = any> {
17
+ data: T;
18
+ }
19
+ interface ComponentConfig<TConfig = Record<string, any>> {
20
+ orgId: string;
21
+ componentId: string;
22
+ dataTargets?: string[];
23
+ settings: TConfig;
24
+ disabled?: boolean;
25
+ readOnly?: boolean;
26
+ }
27
+ interface ComponentCommunication {
28
+ pageState: Record<string, any>;
29
+ emitEvent: (eventName: string, payload: any) => void;
30
+ executeAction: (actionType: string, payload: Record<string, any>) => Promise<any>;
31
+ }
32
+ interface ComponentPermissions {
33
+ canCreate: boolean;
34
+ canRead: boolean;
35
+ canUpdate: boolean;
36
+ canDelete: boolean;
37
+ }
38
+ interface BaseComponentProps<TData = any, TConfig = Record<string, any>> extends ComponentState, ComponentData<TData>, ComponentConfig<TConfig>, ComponentCommunication {
39
+ permissions: ComponentPermissions;
40
+ className?: string;
41
+ "data-testid"?: string;
42
+ }
43
+
44
+ declare const isUiLibraryReady = true;
45
+
46
+ export { type BaseComponentProps, type ComponentCommunication, type ComponentConfig, type ComponentData, type ComponentPermissions, type ComponentState, cn, isUiLibraryReady };
package/dist/index.js ADDED
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ cn: () => cn,
24
+ isUiLibraryReady: () => isUiLibraryReady
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+
28
+ // src/utils/cn.ts
29
+ var import_clsx = require("clsx");
30
+ var import_tailwind_merge = require("tailwind-merge");
31
+ function cn(...inputs) {
32
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
33
+ }
34
+
35
+ // src/index.ts
36
+ var isUiLibraryReady = true;
37
+ // Annotate the CommonJS export names for ESM import in node:
38
+ 0 && (module.exports = {
39
+ cn,
40
+ isUiLibraryReady
41
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,13 @@
1
+ // src/utils/cn.ts
2
+ import { clsx } from "clsx";
3
+ import { twMerge } from "tailwind-merge";
4
+ function cn(...inputs) {
5
+ return twMerge(clsx(inputs));
6
+ }
7
+
8
+ // src/index.ts
9
+ var isUiLibraryReady = true;
10
+ export {
11
+ cn,
12
+ isUiLibraryReady
13
+ };
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@universe-platform/ui",
3
+ "version": "0.1.0-beta.1",
4
+ "main": "./dist/index.js",
5
+ "module": "./dist/index.mjs",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "require": "./dist/index.js",
11
+ "import": "./dist/index.mjs"
12
+ },
13
+ "./dist/globals.css": "./dist/globals.css",
14
+ "./globals.css": "./dist/globals.css"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "publishConfig": {
20
+ "access": "public",
21
+ "registry": "https://registry.npmjs.org/"
22
+ },
23
+ "style": "./dist/globals.css",
24
+ "scripts": {
25
+ "build": "tsup",
26
+ "dev": "tsup --watch"
27
+ },
28
+ "peerDependencies": {
29
+ "react": "^19.0.0",
30
+ "react-dom": "^19.0.0"
31
+ },
32
+ "devDependencies": {
33
+ "@tailwindcss/postcss": "^4.3.1",
34
+ "autoprefixer": "^10.5.2",
35
+ "postcss": "^8.5.15",
36
+ "tailwindcss": "^4.3.1",
37
+ "tsup": "^8.0.0",
38
+ "typescript": "^5.0.0"
39
+ },
40
+ "dependencies": {
41
+ "clsx": "^2.1.1",
42
+ "tailwind-merge": "^3.6.0"
43
+ }
44
+ }