@burgantech/pseudo-ui 0.1.0
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 +336 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/adapters/vue/DynamicRenderer.vue.d.ts +8 -0
- package/dist/adapters/vue/DynamicRenderer.vue.js +7 -0
- package/dist/adapters/vue/DynamicRenderer.vue2.js +1302 -0
- package/dist/adapters/vue/ErrorBoundary.vue.d.ts +16 -0
- package/dist/adapters/vue/ErrorBoundary.vue.js +7 -0
- package/dist/adapters/vue/ErrorBoundary.vue2.js +27 -0
- package/dist/adapters/vue/NestedComponentWrapper.vue.d.ts +15 -0
- package/dist/adapters/vue/NestedComponentWrapper.vue.js +96 -0
- package/dist/adapters/vue/NestedComponentWrapper.vue2.js +4 -0
- package/dist/adapters/vue/PseudoView.vue.d.ts +18 -0
- package/dist/adapters/vue/PseudoView.vue.js +59 -0
- package/dist/adapters/vue/PseudoView.vue2.js +4 -0
- package/dist/adapters/vue/index.d.ts +6 -0
- package/dist/adapters/vue/index.js +17 -0
- package/dist/adapters/vue/injection.d.ts +3 -0
- package/dist/adapters/vue/injection.js +14 -0
- package/dist/adapters/vue/useFormContext.d.ts +4 -0
- package/dist/adapters/vue/useFormContext.js +35 -0
- package/dist/adapters/vue/useLookups.d.ts +4 -0
- package/dist/adapters/vue/useLookups.js +38 -0
- package/dist/engine/conditionalEngine.d.ts +6 -0
- package/dist/engine/conditionalEngine.js +56 -0
- package/dist/engine/dataClient.d.ts +5 -0
- package/dist/engine/dataClient.js +39 -0
- package/dist/engine/expressionResolver.d.ts +13 -0
- package/dist/engine/expressionResolver.js +136 -0
- package/dist/engine/index.d.ts +7 -0
- package/dist/engine/schemaResolver.d.ts +14 -0
- package/dist/engine/schemaResolver.js +97 -0
- package/dist/engine/types.d.ts +155 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +23 -0
- package/dist/pseudo-ui.css +1 -0
- package/package.json +57 -0
- package/vocabularies/view-model-vocabulary.json +474 -0
- package/vocabularies/view-vocabulary.json +1104 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DataSchema, SchemaProperty, LovItem } from './types';
|
|
2
|
+
export declare function getSchemaProperty(schema: DataSchema, fieldName: string): SchemaProperty | undefined;
|
|
3
|
+
export declare function getFieldLabel(prop: SchemaProperty | undefined, lang: string): string;
|
|
4
|
+
export declare function getFieldErrorMessage(prop: SchemaProperty | undefined, errorType: string, lang: string): string;
|
|
5
|
+
export declare function isFieldRequired(schema: DataSchema, fieldName: string, formData: Record<string, unknown>, instanceData?: Record<string, unknown>, params?: Record<string, unknown>): boolean;
|
|
6
|
+
export declare function getEnumOptions(prop: SchemaProperty | undefined, lang: string): Array<{
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function mapLovItemsToOptions(items: LovItem[]): Array<{
|
|
11
|
+
value: string;
|
|
12
|
+
label: string;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function validateField(prop: SchemaProperty | undefined, value: unknown, required: boolean, lang: string): string | null;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { resolveMultiLang as a } from "./expressionResolver.js";
|
|
2
|
+
function x(e, t) {
|
|
3
|
+
return e.properties?.[t];
|
|
4
|
+
}
|
|
5
|
+
function h(e, t) {
|
|
6
|
+
return e?.["x-labels"] ? a(e["x-labels"], t) : "";
|
|
7
|
+
}
|
|
8
|
+
function u(e, t, i) {
|
|
9
|
+
const n = e?.["x-errorMessages"];
|
|
10
|
+
return n?.[t] ? a(n[t], i) : "";
|
|
11
|
+
}
|
|
12
|
+
function L(e, t, i, n = {}, s = {}) {
|
|
13
|
+
if (e.required?.includes(t)) return !0;
|
|
14
|
+
if (e.allOf) {
|
|
15
|
+
const r = { ...s, ...n, ...i };
|
|
16
|
+
for (const l of e.allOf) {
|
|
17
|
+
const m = l;
|
|
18
|
+
if (m.if?.properties && m.then?.required && Object.entries(m.if.properties).every(
|
|
19
|
+
([d, f]) => r[d] === f.const
|
|
20
|
+
) && m.then.required.includes(t))
|
|
21
|
+
return !0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return !1;
|
|
25
|
+
}
|
|
26
|
+
function I(e, t) {
|
|
27
|
+
if (!e?.enum) return [];
|
|
28
|
+
const i = e["x-enum"];
|
|
29
|
+
return e.enum.map((n) => ({
|
|
30
|
+
value: n,
|
|
31
|
+
label: i?.[n] ? a(i[n], t) : n
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
function b(e) {
|
|
35
|
+
return e.map((t) => ({
|
|
36
|
+
value: t.value,
|
|
37
|
+
label: t.display
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
function M(e, t, i, n) {
|
|
41
|
+
if (i && (t == null || t === ""))
|
|
42
|
+
return u(e, "required", n) || "This field is required";
|
|
43
|
+
if (t == null || t === "") return null;
|
|
44
|
+
const s = String(t);
|
|
45
|
+
if (e?.minLength && s.length < e.minLength)
|
|
46
|
+
return u(e, "minLength", n) || `Minimum ${e.minLength} characters`;
|
|
47
|
+
if (e?.maxLength && s.length > e.maxLength)
|
|
48
|
+
return u(e, "maxLength", n) || `Maximum ${e.maxLength} characters`;
|
|
49
|
+
if (e?.pattern && !new RegExp(e.pattern).test(s))
|
|
50
|
+
return u(e, "pattern", n) || "Invalid format";
|
|
51
|
+
if (e?.type === "number" || e?.type === "integer") {
|
|
52
|
+
const r = Number(t);
|
|
53
|
+
if (e.minimum !== void 0 && r < e.minimum)
|
|
54
|
+
return u(e, "minimum", n) || `Minimum value is ${e.minimum}`;
|
|
55
|
+
if (e.maximum !== void 0 && r > e.maximum)
|
|
56
|
+
return u(e, "maximum", n) || `Maximum value is ${e.maximum}`;
|
|
57
|
+
}
|
|
58
|
+
if (e?.const !== void 0 && t !== e.const)
|
|
59
|
+
return u(e, "const", n) || "Invalid value";
|
|
60
|
+
if (e?.format && typeof t == "string") {
|
|
61
|
+
const r = c(t, e.format);
|
|
62
|
+
if (r)
|
|
63
|
+
return u(e, "format", n) || r;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
function c(e, t) {
|
|
68
|
+
switch (t) {
|
|
69
|
+
case "email":
|
|
70
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e) ? null : "Invalid email";
|
|
71
|
+
case "uri":
|
|
72
|
+
case "url":
|
|
73
|
+
return /^https?:\/\/.+/.test(e) ? null : "Invalid URL";
|
|
74
|
+
case "date":
|
|
75
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(e) && !isNaN(Date.parse(e)) ? null : "Invalid date";
|
|
76
|
+
case "date-time":
|
|
77
|
+
return isNaN(Date.parse(e)) ? "Invalid date-time" : null;
|
|
78
|
+
case "time":
|
|
79
|
+
return /^\d{2}:\d{2}(:\d{2})?$/.test(e) ? null : "Invalid time";
|
|
80
|
+
case "phone":
|
|
81
|
+
case "tel":
|
|
82
|
+
return /^\+?[\d\s()-]{7,}$/.test(e) ? null : "Invalid phone number";
|
|
83
|
+
case "iban":
|
|
84
|
+
return /^[A-Z]{2}\d{2}[A-Z0-9]{4,30}$/.test(e.replace(/\s/g, "")) ? null : "Invalid IBAN";
|
|
85
|
+
default:
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
I as getEnumOptions,
|
|
91
|
+
u as getFieldErrorMessage,
|
|
92
|
+
h as getFieldLabel,
|
|
93
|
+
x as getSchemaProperty,
|
|
94
|
+
L as isFieldRequired,
|
|
95
|
+
b as mapLovItemsToOptions,
|
|
96
|
+
M as validateField
|
|
97
|
+
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
export interface ComponentNode {
|
|
2
|
+
type: string;
|
|
3
|
+
children?: ComponentNode[];
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}
|
|
6
|
+
export interface BindableNode extends ComponentNode {
|
|
7
|
+
bind: string;
|
|
8
|
+
variant?: 'filled' | 'outlined';
|
|
9
|
+
}
|
|
10
|
+
export interface TextNode extends ComponentNode {
|
|
11
|
+
type: 'Text';
|
|
12
|
+
content: string | MultiLangText;
|
|
13
|
+
variant?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ForEachNode extends ComponentNode {
|
|
16
|
+
type: 'ForEach';
|
|
17
|
+
source: string;
|
|
18
|
+
as: string;
|
|
19
|
+
template: ComponentNode;
|
|
20
|
+
}
|
|
21
|
+
export interface NestedComponentNode extends ComponentNode {
|
|
22
|
+
type: 'Component';
|
|
23
|
+
ref: string;
|
|
24
|
+
bind?: string | Record<string, string>;
|
|
25
|
+
}
|
|
26
|
+
export type ButtonAction = 'submit' | 'cancel' | 'back';
|
|
27
|
+
export interface ButtonNode extends ComponentNode {
|
|
28
|
+
type: 'Button';
|
|
29
|
+
label: string | MultiLangText;
|
|
30
|
+
variant?: 'filled' | 'outlined' | 'text' | 'elevated' | 'tonal';
|
|
31
|
+
icon?: string;
|
|
32
|
+
action: ButtonAction | ActionDescriptor;
|
|
33
|
+
command?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface CardNode extends ComponentNode {
|
|
36
|
+
type: 'Card';
|
|
37
|
+
variant?: 'elevated' | 'filled' | 'outlined';
|
|
38
|
+
onTap?: ActionDescriptor | ActionDescriptor[];
|
|
39
|
+
}
|
|
40
|
+
export interface TabViewNode extends ComponentNode {
|
|
41
|
+
type: 'TabView';
|
|
42
|
+
tabs: TabDefinition[];
|
|
43
|
+
}
|
|
44
|
+
export interface TabDefinition {
|
|
45
|
+
title: string | MultiLangText;
|
|
46
|
+
icon?: string;
|
|
47
|
+
content: ComponentNode[];
|
|
48
|
+
}
|
|
49
|
+
export interface ActionDescriptor {
|
|
50
|
+
action: string;
|
|
51
|
+
bind?: string;
|
|
52
|
+
value?: unknown;
|
|
53
|
+
}
|
|
54
|
+
export interface MultiLangText {
|
|
55
|
+
[langCode: string]: string;
|
|
56
|
+
}
|
|
57
|
+
export interface SchemaProperty {
|
|
58
|
+
type?: string;
|
|
59
|
+
format?: string;
|
|
60
|
+
enum?: string[];
|
|
61
|
+
const?: unknown;
|
|
62
|
+
default?: unknown;
|
|
63
|
+
minimum?: number;
|
|
64
|
+
maximum?: number;
|
|
65
|
+
minLength?: number;
|
|
66
|
+
maxLength?: number;
|
|
67
|
+
pattern?: string;
|
|
68
|
+
'x-labels'?: MultiLangText;
|
|
69
|
+
'x-errorMessages'?: Record<string, MultiLangText>;
|
|
70
|
+
'x-lov'?: LovDefinition;
|
|
71
|
+
'x-lookup'?: LookupDefinition;
|
|
72
|
+
'x-enum'?: Record<string, MultiLangText>;
|
|
73
|
+
'x-binding'?: 'required' | 'optional';
|
|
74
|
+
'x-conditional'?: ConditionalDefinition;
|
|
75
|
+
'x-validation'?: ValidationDefinition;
|
|
76
|
+
}
|
|
77
|
+
export interface LookupDefinition {
|
|
78
|
+
source: string;
|
|
79
|
+
resultField: string;
|
|
80
|
+
filter?: LovFilterParam[];
|
|
81
|
+
}
|
|
82
|
+
export interface LovDefinition {
|
|
83
|
+
source: string;
|
|
84
|
+
valueField: string;
|
|
85
|
+
displayField: string;
|
|
86
|
+
filter?: LovFilterParam[];
|
|
87
|
+
}
|
|
88
|
+
export interface LovFilterParam {
|
|
89
|
+
param: string;
|
|
90
|
+
value: string;
|
|
91
|
+
required?: boolean;
|
|
92
|
+
}
|
|
93
|
+
export interface ConditionalDefinition {
|
|
94
|
+
showIf?: ConditionRule;
|
|
95
|
+
hideIf?: ConditionRule;
|
|
96
|
+
enableIf?: ConditionRule;
|
|
97
|
+
disableIf?: ConditionRule;
|
|
98
|
+
}
|
|
99
|
+
export interface ConditionRule {
|
|
100
|
+
field?: string;
|
|
101
|
+
operator?: string;
|
|
102
|
+
value?: unknown;
|
|
103
|
+
allOf?: ConditionRule[];
|
|
104
|
+
anyOf?: ConditionRule[];
|
|
105
|
+
not?: ConditionRule;
|
|
106
|
+
}
|
|
107
|
+
export interface ValidationDefinition {
|
|
108
|
+
rule: string;
|
|
109
|
+
parameters?: Record<string, unknown>;
|
|
110
|
+
errorMessages?: MultiLangText;
|
|
111
|
+
}
|
|
112
|
+
export interface DataSchema {
|
|
113
|
+
$id?: string;
|
|
114
|
+
title?: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
type?: string;
|
|
117
|
+
required?: string[];
|
|
118
|
+
properties?: Record<string, SchemaProperty>;
|
|
119
|
+
allOf?: unknown[];
|
|
120
|
+
}
|
|
121
|
+
export interface ViewDefinition {
|
|
122
|
+
$schema: string;
|
|
123
|
+
dataSchema: string;
|
|
124
|
+
lookups?: string[];
|
|
125
|
+
uiState?: Record<string, unknown>;
|
|
126
|
+
view: ComponentNode;
|
|
127
|
+
}
|
|
128
|
+
export interface LovItem {
|
|
129
|
+
value: string;
|
|
130
|
+
display: string;
|
|
131
|
+
[key: string]: unknown;
|
|
132
|
+
}
|
|
133
|
+
export interface FormContext {
|
|
134
|
+
schema: DataSchema;
|
|
135
|
+
formData: Record<string, unknown>;
|
|
136
|
+
instanceData: Record<string, unknown>;
|
|
137
|
+
params: Record<string, unknown>;
|
|
138
|
+
uiState: Record<string, unknown>;
|
|
139
|
+
lovData: Record<string, LovItem[]>;
|
|
140
|
+
lookupData: Record<string, Record<string, unknown>>;
|
|
141
|
+
lang: string;
|
|
142
|
+
errors: Record<string, string>;
|
|
143
|
+
}
|
|
144
|
+
export type RequestDataFn = (ref: string, params?: Record<string, string>) => Promise<unknown>;
|
|
145
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
146
|
+
export interface PseudoViewDelegate {
|
|
147
|
+
requestData: RequestDataFn;
|
|
148
|
+
loadComponent(ref: string): Promise<{
|
|
149
|
+
schema: DataSchema;
|
|
150
|
+
view: ViewDefinition;
|
|
151
|
+
}>;
|
|
152
|
+
onAction(action: string, formData: Record<string, unknown>, command?: string): Promise<void>;
|
|
153
|
+
onValidationRequest?(field: string, value: unknown, formData: Record<string, unknown>): Promise<string | null>;
|
|
154
|
+
onLog?(level: LogLevel, message: string, error?: unknown, context?: Record<string, unknown>): void;
|
|
155
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './engine/index';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { areRequiredFiltersMet as r, extractDynamicFilterFields as o, navigatePath as a, resolveExpression as i, resolveFilterParams as l, resolveMultiLang as s, resolveTextContent as n } from "./engine/expressionResolver.js";
|
|
2
|
+
import { evaluateConditional as p } from "./engine/conditionalEngine.js";
|
|
3
|
+
import { getEnumOptions as v, getFieldErrorMessage as F, getFieldLabel as g, getSchemaProperty as x, isFieldRequired as f, mapLovItemsToOptions as u, validateField as c } from "./engine/schemaResolver.js";
|
|
4
|
+
import { fetchLookupData as h, fetchLovData as D } from "./engine/dataClient.js";
|
|
5
|
+
export {
|
|
6
|
+
r as areRequiredFiltersMet,
|
|
7
|
+
p as evaluateConditional,
|
|
8
|
+
o as extractDynamicFilterFields,
|
|
9
|
+
h as fetchLookupData,
|
|
10
|
+
D as fetchLovData,
|
|
11
|
+
v as getEnumOptions,
|
|
12
|
+
F as getFieldErrorMessage,
|
|
13
|
+
g as getFieldLabel,
|
|
14
|
+
x as getSchemaProperty,
|
|
15
|
+
f as isFieldRequired,
|
|
16
|
+
u as mapLovItemsToOptions,
|
|
17
|
+
a as navigatePath,
|
|
18
|
+
i as resolveExpression,
|
|
19
|
+
l as resolveFilterParams,
|
|
20
|
+
s as resolveMultiLang,
|
|
21
|
+
n as resolveTextContent,
|
|
22
|
+
c as validateField
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.d-error-boundary[data-v-d8e1bfd2]{display:flex;align-items:center;padding:.75rem 1rem;border:1px solid var(--p-red-200);border-radius:8px;background:var(--p-red-50);color:var(--p-red-700);font-size:.875rem;margin:.5rem 0}.d-column[data-v-c6e3365d]{display:flex;flex-direction:column}.d-row[data-v-c6e3365d]{display:flex;flex-direction:row;flex-wrap:wrap}.d-wrap[data-v-c6e3365d]{display:flex;flex-wrap:wrap}.d-center[data-v-c6e3365d]{display:flex;align-items:center;justify-content:center}.d-scroll[data-v-c6e3365d]{overflow:auto;max-height:100%}.d-field[data-v-c6e3365d]{display:flex;flex-direction:column}.d-checkbox[data-v-c6e3365d]{flex-direction:row;align-items:center;gap:.5rem;flex-wrap:wrap}.checkbox-label[data-v-c6e3365d]{cursor:pointer;-webkit-user-select:none;user-select:none}.field-group-label[data-v-c6e3365d]{font-size:.875rem;font-weight:500;margin-bottom:.25rem;color:var(--p-text-color)}.d-radio-group[data-v-c6e3365d]{display:flex;gap:1rem;flex-wrap:wrap}.d-radio-item[data-v-c6e3365d]{display:flex;align-items:center;gap:.375rem}.d-radio-item label[data-v-c6e3365d]{cursor:pointer}.required-mark[data-v-c6e3365d]{color:var(--p-red-500)}.field-error[data-v-c6e3365d]{color:var(--p-red-500);font-size:.75rem;margin-top:.25rem}.d-card[data-v-c6e3365d]{transition:all .2s;border-radius:.75rem;overflow:hidden}.d-card--elevated[data-v-c6e3365d] .p-card{box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a}.d-card--filled[data-v-c6e3365d] .p-card{box-shadow:none;background:var(--p-surface-100, #f5f5f5);border:none}.d-card--outlined[data-v-c6e3365d] .p-card{box-shadow:none;background:transparent;border:1px solid var(--p-surface-200, #e5e5e5)}.d-card--selected[data-v-c6e3365d]{outline:2px solid var(--p-primary-color);outline-offset:-2px;background:var(--p-primary-50, rgba(103, 80, 164, .05))}.d-card--selected[data-v-c6e3365d] .p-card{background:var(--p-primary-50, rgba(103, 80, 164, .05))}.cursor-pointer[data-v-c6e3365d]{cursor:pointer}.cursor-pointer[data-v-c6e3365d]:hover{box-shadow:0 4px 12px #0000001f}.d-text--displayLarge[data-v-c6e3365d]{font-size:3.5rem;font-weight:400}.d-text--displayMedium[data-v-c6e3365d]{font-size:2.8rem;font-weight:400}.d-text--displaySmall[data-v-c6e3365d]{font-size:2.2rem;font-weight:400}.d-text--headlineLarge[data-v-c6e3365d]{font-size:2rem;font-weight:400}.d-text--headlineMedium[data-v-c6e3365d]{font-size:1.75rem;font-weight:400}.d-text--headlineSmall[data-v-c6e3365d]{font-size:1.5rem;font-weight:400}.d-text--titleLarge[data-v-c6e3365d]{font-size:1.375rem;font-weight:500}.d-text--titleMedium[data-v-c6e3365d]{font-size:1rem;font-weight:500;letter-spacing:.15px}.d-text--titleSmall[data-v-c6e3365d]{font-size:.875rem;font-weight:500;letter-spacing:.1px}.d-text--bodyLarge[data-v-c6e3365d]{font-size:1rem;font-weight:400}.d-text--bodyMedium[data-v-c6e3365d]{font-size:.875rem;font-weight:400}.d-text--bodySmall[data-v-c6e3365d]{font-size:.75rem;font-weight:400}.d-text--labelLarge[data-v-c6e3365d]{font-size:.875rem;font-weight:500}.d-text--labelMedium[data-v-c6e3365d]{font-size:.75rem;font-weight:500}.d-text--labelSmall[data-v-c6e3365d]{font-size:.6875rem;font-weight:500}.d-text[data-v-c6e3365d]{color:var(--p-text-color);margin:0}.material-icons[data-v-c6e3365d]{font-family:Material Icons,sans-serif;font-size:24px;display:inline-block;vertical-align:middle}.d-icon--sm[data-v-c6e3365d]{font-size:18px}.d-icon--md[data-v-c6e3365d]{font-size:24px}.d-icon--lg[data-v-c6e3365d]{font-size:36px}.d-switch[data-v-c6e3365d]{flex-direction:row;align-items:center;gap:.75rem}.switch-label[data-v-c6e3365d]{-webkit-user-select:none;user-select:none}.d-image[data-v-c6e3365d]{border-radius:.5rem}.d-badge-value[data-v-c6e3365d]{position:absolute;top:-6px;right:-6px;background:var(--p-red-500);color:#fff;font-size:.625rem;font-weight:700;min-width:18px;height:18px;line-height:18px;text-align:center;border-radius:9px;padding:0 4px}.d-loading[data-v-c6e3365d]{display:flex;align-items:center;gap:.5rem;padding:1rem;color:var(--p-text-muted-color)}.d-nested[data-v-c6e3365d]{width:100%}.d-tab-content[data-v-c6e3365d]{display:flex;flex-direction:column;gap:1rem;padding-top:1rem}.d-stack[data-v-c6e3365d]{position:relative}.d-grid[data-v-c6e3365d]{display:grid}.d-list-tile[data-v-c6e3365d]{display:flex;align-items:center;gap:1rem;padding:.75rem 1rem;border-bottom:1px solid var(--p-surface-200)}.d-list-tile__content[data-v-c6e3365d]{flex:1;display:flex;flex-direction:column;min-width:0}.d-list-tile__title[data-v-c6e3365d]{font-size:1rem;font-weight:500;color:var(--p-text-color)}.d-list-tile__subtitle[data-v-c6e3365d]{font-size:.875rem;color:var(--p-text-muted-color)}.d-avatar--sm[data-v-c6e3365d]{width:32px;height:32px}.d-avatar--lg[data-v-c6e3365d] .p-avatar{width:48px;height:48px;font-size:1.25rem}.d-avatar--xl[data-v-c6e3365d] .p-avatar{width:64px;height:64px;font-size:1.5rem}.d-richtext[data-v-c6e3365d]{margin:0;line-height:1.6}.font-bold[data-v-c6e3365d]{font-weight:700}.font-italic[data-v-c6e3365d]{font-style:italic}.d-expansion-content[data-v-c6e3365d]{display:flex;flex-direction:column;gap:.75rem;padding-top:.5rem}.d-step-content[data-v-c6e3365d]{display:flex;flex-direction:column;gap:.75rem;padding:1rem 0}.d-dialog-header[data-v-c6e3365d]{display:flex;align-items:center;gap:.5rem}.d-dialog-body[data-v-c6e3365d]{display:flex;flex-direction:column;gap:.75rem}.d-snackbar[data-v-c6e3365d]{display:flex;align-items:center;justify-content:space-between;padding:.75rem 1rem;border-radius:.5rem;min-height:48px;gap:1rem}.d-snackbar--standard[data-v-c6e3365d]{background:var(--p-surface-700);color:#fff}.d-snackbar--success[data-v-c6e3365d]{background:var(--p-green-600, #16a34a);color:#fff}.d-snackbar--error[data-v-c6e3365d]{background:var(--p-red-600, #dc2626);color:#fff}.d-snackbar--warning[data-v-c6e3365d]{background:var(--p-yellow-600, #ca8a04);color:#fff}.d-snackbar--info[data-v-c6e3365d]{background:var(--p-blue-600, #2563eb);color:#fff}.d-snackbar__text[data-v-c6e3365d]{flex:1;font-size:.875rem}.d-appbar[data-v-c6e3365d]{border-radius:0!important}.d-appbar__leading[data-v-c6e3365d]{margin-right:.5rem}.d-appbar__title[data-v-c6e3365d]{font-size:1.375rem;font-weight:500}.d-appbar__actions[data-v-c6e3365d]{display:flex;gap:.25rem}.d-nav-bar[data-v-c6e3365d]{display:flex;justify-content:space-around;background:var(--p-surface-0);border-top:1px solid var(--p-surface-200);padding:.5rem 0}.d-nav-bar__item[data-v-c6e3365d]{display:flex;flex-direction:column;align-items:center;gap:.25rem;cursor:pointer;padding:.25rem 1rem;border-radius:1rem;transition:all .2s;font-size:.75rem;color:var(--p-text-muted-color)}.d-nav-bar__item--active[data-v-c6e3365d]{color:var(--p-primary-color)}.d-nav-bar__item--active .material-icons[data-v-c6e3365d]{background:var(--p-primary-100, rgba(103,80,164,.12));border-radius:1rem;padding:.125rem .75rem}.d-nav-drawer[data-v-c6e3365d]{display:flex;flex-direction:column}.d-nav-drawer__header[data-v-c6e3365d]{padding:1rem 1rem .5rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--p-text-muted-color)}.d-nav-drawer__item[data-v-c6e3365d]{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;cursor:pointer;transition:background .15s;border-radius:2rem;margin:.125rem .5rem}.d-nav-drawer__item[data-v-c6e3365d]:hover{background:var(--p-surface-100)}.d-nav-drawer__badge[data-v-c6e3365d]{margin-left:auto;background:var(--p-red-500);color:#fff;font-size:.625rem;font-weight:700;min-width:18px;height:18px;line-height:18px;text-align:center;border-radius:9px;padding:0 4px}.d-toolbar__content[data-v-c6e3365d]{display:flex;gap:.5rem;align-items:center}.d-fab--small[data-v-c6e3365d]{width:40px!important;height:40px!important}.d-fab--large[data-v-c6e3365d]{width:96px!important;height:96px!important;font-size:2rem!important}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@burgantech/pseudo-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Server-Driven UI rendering engine with framework adapters. JSON Schema + Pseudo UI → platform widgets.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./vue": {
|
|
14
|
+
"import": "./dist/adapters/vue/index.js",
|
|
15
|
+
"types": "./dist/adapters/vue/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./vue/style.css": "./dist/pseudo-ui.css",
|
|
18
|
+
"./vocabularies/view-vocabulary.json": "./vocabularies/view-vocabulary.json",
|
|
19
|
+
"./vocabularies/view-model-vocabulary.json": "./vocabularies/view-model-vocabulary.json"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"vocabularies",
|
|
24
|
+
"README.md"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "vite build && vue-tsc --declaration --emitDeclarationOnly --outDir dist && npm run copy:vocabularies",
|
|
28
|
+
"copy:vocabularies": "mkdir -p vocabularies && cp ../../vocabularies/*.json vocabularies/",
|
|
29
|
+
"typecheck": "vue-tsc --noEmit",
|
|
30
|
+
"test": "vitest run",
|
|
31
|
+
"lint": "eslint src/"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"vue": "^3.5.0",
|
|
35
|
+
"primevue": "^4.5.0",
|
|
36
|
+
"@primeuix/themes": "^2.0.0",
|
|
37
|
+
"primeicons": "^7.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
41
|
+
"@vue/tsconfig": "^0.8.0",
|
|
42
|
+
"typescript": "~5.9.0",
|
|
43
|
+
"vite": "^7.3.0",
|
|
44
|
+
"vite-plugin-dts": "^4.5.0",
|
|
45
|
+
"vue-tsc": "^3.1.0"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public",
|
|
49
|
+
"registry": "https://registry.npmjs.org"
|
|
50
|
+
},
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "https://github.com/burgan-tech/pseudo-ui.git",
|
|
54
|
+
"directory": "core/ts-pseudo-ui"
|
|
55
|
+
},
|
|
56
|
+
"license": "MIT"
|
|
57
|
+
}
|