@soygalo/ui 0.0.1 → 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/dist/controls/Accordion.js +42 -0
- package/dist/controls/ActionMenu.js +64 -0
- package/dist/controls/AlertDialog.js +62 -0
- package/dist/controls/ChipGroup.js +90 -0
- package/dist/controls/Collapsible.js +6 -0
- package/dist/controls/Command.js +88 -0
- package/dist/controls/ConfirmDialog.js +42 -0
- package/dist/controls/Dialog.js +66 -0
- package/dist/controls/FilterPopover.js +161 -0
- package/dist/controls/Kbd.js +12 -0
- package/dist/controls/Popover.js +55 -0
- package/dist/controls/SegmentedControl.js +52 -0
- package/dist/controls/Sheet.js +123 -0
- package/dist/controls/Tooltip.js +15 -0
- package/dist/controls/overlay-container.js +20 -0
- package/dist/controls/return-focus.js +16 -0
- package/dist/controls.js +17 -0
- package/dist/data-attr.js +5 -0
- package/dist/data-display/Avatar.js +47 -0
- package/dist/data-display/Badge.js +88 -0
- package/dist/data-display/Board.js +73 -0
- package/dist/data-display/Card.js +141 -0
- package/dist/data-display/ChatBubble.js +44 -0
- package/dist/data-display/Code.js +32 -0
- package/dist/data-display/DataTable.js +114 -0
- package/dist/data-display/IconTile.js +60 -0
- package/dist/data-display/Item.js +128 -0
- package/dist/data-display/Overline.js +13 -0
- package/dist/data-display/Separator.js +19 -0
- package/dist/data-display/Stat.js +36 -0
- package/dist/data-display/TablePagination.js +98 -0
- package/dist/data-display/Timeline.js +58 -0
- package/dist/data-display/chart-colors.js +36 -0
- package/dist/data-display.js +16 -0
- package/dist/feedback/Callout.js +107 -0
- package/dist/feedback/FeedbackState.js +55 -0
- package/dist/feedback/LoadingState.js +24 -0
- package/dist/feedback/Progress.js +51 -0
- package/dist/feedback/ProgressRing.js +50 -0
- package/dist/feedback/Skeleton.js +12 -0
- package/dist/feedback/SplashScreen.js +145 -0
- package/dist/feedback/StatusDot.js +34 -0
- package/dist/feedback/Stepper.js +48 -0
- package/dist/feedback/Toaster.js +38 -0
- package/dist/feedback.js +11 -0
- package/dist/fonts.css +7 -0
- package/dist/forms/Button.js +128 -0
- package/dist/forms/ButtonGroup.js +14 -0
- package/dist/forms/Calendar.js +51 -0
- package/dist/forms/Checkbox.js +30 -0
- package/dist/forms/Combobox.js +123 -0
- package/dist/forms/CopyButton.js +24 -0
- package/dist/forms/DatePicker.js +146 -0
- package/dist/forms/DateTimePicker.js +97 -0
- package/dist/forms/EditableValue.js +49 -0
- package/dist/forms/FileUpload.js +99 -0
- package/dist/forms/FormField.js +47 -0
- package/dist/forms/Input.js +58 -0
- package/dist/forms/Label.js +42 -0
- package/dist/forms/MultiSelect.js +139 -0
- package/dist/forms/QuantityStepper.js +71 -0
- package/dist/forms/RadioGroup.js +21 -0
- package/dist/forms/SearchField.js +55 -0
- package/dist/forms/Select.js +79 -0
- package/dist/forms/Slider.js +23 -0
- package/dist/forms/Switch.js +23 -0
- package/dist/forms/TagInput.js +64 -0
- package/dist/forms/Textarea.js +41 -0
- package/dist/forms/control-size.js +44 -0
- package/dist/forms/use-copy-to-clipboard.js +23 -0
- package/dist/forms.js +25 -0
- package/dist/icons/create-icon.js +20 -0
- package/dist/icons/glyphs.js +9 -0
- package/dist/icons.js +3 -0
- package/dist/index.js +101 -0
- package/dist/layout/FilterBar.js +29 -0
- package/dist/layout/Page.js +44 -0
- package/dist/layout/PageHeader.js +65 -0
- package/dist/layout/PageShell.js +20 -0
- package/dist/layout/PageSurface.js +19 -0
- package/dist/layout/Resizable.js +21 -0
- package/dist/layout/ScrollArea.js +35 -0
- package/dist/layout/SelectionBar.js +41 -0
- package/dist/layout.js +9 -0
- package/dist/lite/Contact.js +59 -0
- package/dist/lite/Coupon.js +56 -0
- package/dist/lite/Loading.js +79 -0
- package/dist/lite/Order.js +216 -0
- package/dist/lite/Product.js +124 -0
- package/dist/lite/Resolver.js +181 -0
- package/dist/lite/Shell.js +178 -0
- package/dist/lite/Smart.js +48 -0
- package/dist/lite.js +9 -0
- package/dist/navigation/ApplicationSidebar.js +101 -0
- package/dist/navigation/NavigationRail.js +45 -0
- package/dist/navigation/SidebarAccountSummary.js +20 -0
- package/dist/navigation/SidebarBrandContent.js +24 -0
- package/dist/navigation/SidebarNavigationItem.js +14 -0
- package/dist/navigation/SidebarSubnavigation.js +26 -0
- package/dist/navigation/navigation-path.js +21 -0
- package/dist/navigation/sidebar-styles.js +17 -0
- package/dist/navigation.js +9 -0
- package/dist/password-manager.js +11 -0
- package/dist/preflight.css +445 -0
- package/dist/sidebar/primitives.js +253 -0
- package/dist/sidebar/use-sidebar-shortcut.js +15 -0
- package/dist/sidebar.js +2 -0
- package/dist/styles.css +3773 -0
- package/dist/tabs/Tabs.js +48 -0
- package/dist/tabs.js +2 -0
- package/dist/tailwind-preset.js +213 -0
- package/dist/type-scale.js +45 -0
- package/dist/types/src/controls/Accordion.d.ts +10 -0
- package/dist/types/src/controls/ActionMenu.d.ts +17 -0
- package/dist/types/src/controls/AlertDialog.d.ts +15 -0
- package/dist/types/src/controls/ChipGroup.d.ts +43 -0
- package/dist/types/src/controls/Collapsible.d.ts +4 -0
- package/dist/types/src/controls/Command.d.ts +83 -0
- package/dist/types/src/controls/ConfirmDialog.d.ts +17 -0
- package/dist/types/src/controls/Dialog.d.ts +20 -0
- package/dist/types/src/controls/FilterPopover.d.ts +47 -0
- package/dist/types/src/controls/Kbd.d.ts +2 -0
- package/dist/types/src/controls/Popover.d.ts +31 -0
- package/dist/types/src/controls/SegmentedControl.d.ts +32 -0
- package/dist/types/src/controls/Sheet.d.ts +34 -0
- package/dist/types/src/controls/Tooltip.d.ts +6 -0
- package/dist/types/src/controls/index.d.ts +16 -0
- package/dist/types/src/controls/overlay-container.d.ts +11 -0
- package/dist/types/src/controls/return-focus.d.ts +6 -0
- package/dist/types/src/data-attr.d.ts +3 -0
- package/dist/types/src/data-display/Avatar.d.ts +30 -0
- package/dist/types/src/data-display/Badge.d.ts +28 -0
- package/dist/types/src/data-display/Board.d.ts +21 -0
- package/dist/types/src/data-display/Card.d.ts +45 -0
- package/dist/types/src/data-display/ChatBubble.d.ts +24 -0
- package/dist/types/src/data-display/Code.d.ts +25 -0
- package/dist/types/src/data-display/DataTable.d.ts +74 -0
- package/dist/types/src/data-display/IconTile.d.ts +22 -0
- package/dist/types/src/data-display/Item.d.ts +24 -0
- package/dist/types/src/data-display/Overline.d.ts +5 -0
- package/dist/types/src/data-display/Separator.d.ts +9 -0
- package/dist/types/src/data-display/Stat.d.ts +17 -0
- package/dist/types/src/data-display/TablePagination.d.ts +23 -0
- package/dist/types/src/data-display/Timeline.d.ts +16 -0
- package/dist/types/src/data-display/chart-colors.d.ts +51 -0
- package/dist/types/src/data-display/index.d.ts +15 -0
- package/dist/types/src/feedback/Callout.d.ts +17 -0
- package/dist/types/src/feedback/FeedbackState.d.ts +16 -0
- package/dist/types/src/feedback/LoadingState.d.ts +7 -0
- package/dist/types/src/feedback/Progress.d.ts +37 -0
- package/dist/types/src/feedback/ProgressRing.d.ts +11 -0
- package/dist/types/src/feedback/Skeleton.d.ts +2 -0
- package/dist/types/src/feedback/SplashScreen.d.ts +11 -0
- package/dist/types/src/feedback/StatusDot.d.ts +27 -0
- package/dist/types/src/feedback/Stepper.d.ts +16 -0
- package/dist/types/src/feedback/Toaster.d.ts +4 -0
- package/dist/types/src/feedback/index.d.ts +10 -0
- package/dist/types/src/forms/Button.d.ts +26 -0
- package/dist/types/src/forms/ButtonGroup.d.ts +7 -0
- package/dist/types/src/forms/Calendar.d.ts +4 -0
- package/dist/types/src/forms/Checkbox.d.ts +11 -0
- package/dist/types/src/forms/Combobox.d.ts +51 -0
- package/dist/types/src/forms/CopyButton.d.ts +8 -0
- package/dist/types/src/forms/DatePicker.d.ts +34 -0
- package/dist/types/src/forms/DateTimePicker.d.ts +20 -0
- package/dist/types/src/forms/EditableValue.d.ts +14 -0
- package/dist/types/src/forms/FileUpload.d.ts +28 -0
- package/dist/types/src/forms/FormField.d.ts +12 -0
- package/dist/types/src/forms/Input.d.ts +11 -0
- package/dist/types/src/forms/Label.d.ts +11 -0
- package/dist/types/src/forms/MultiSelect.d.ts +45 -0
- package/dist/types/src/forms/QuantityStepper.d.ts +36 -0
- package/dist/types/src/forms/RadioGroup.d.ts +4 -0
- package/dist/types/src/forms/SearchField.d.ts +13 -0
- package/dist/types/src/forms/Select.d.ts +15 -0
- package/dist/types/src/forms/Slider.d.ts +9 -0
- package/dist/types/src/forms/Switch.d.ts +14 -0
- package/dist/types/src/forms/TagInput.d.ts +19 -0
- package/dist/types/src/forms/Textarea.d.ts +10 -0
- package/dist/types/src/forms/control-size.d.ts +17 -0
- package/dist/types/src/forms/index.d.ts +24 -0
- package/dist/types/src/forms/use-copy-to-clipboard.d.ts +5 -0
- package/dist/types/src/icons/create-icon.d.ts +16 -0
- package/dist/types/src/icons/glyphs.d.ts +294 -0
- package/dist/types/src/icons/index.d.ts +2 -0
- package/dist/types/src/index.d.ts +12 -0
- package/dist/types/src/layout/FilterBar.d.ts +11 -0
- package/dist/types/src/layout/Page.d.ts +19 -0
- package/dist/types/src/layout/PageHeader.d.ts +14 -0
- package/dist/types/src/layout/PageShell.d.ts +8 -0
- package/dist/types/src/layout/PageSurface.d.ts +13 -0
- package/dist/types/src/layout/Resizable.d.ts +23 -0
- package/dist/types/src/layout/ScrollArea.d.ts +9 -0
- package/dist/types/src/layout/SelectionBar.d.ts +15 -0
- package/dist/types/src/layout/index.d.ts +8 -0
- package/dist/types/src/lite/Contact.d.ts +14 -0
- package/dist/types/src/lite/Coupon.d.ts +11 -0
- package/dist/types/src/lite/Loading.d.ts +13 -0
- package/dist/types/src/lite/Order.d.ts +49 -0
- package/dist/types/src/lite/Product.d.ts +16 -0
- package/dist/types/src/lite/Resolver.d.ts +41 -0
- package/dist/types/src/lite/Shell.d.ts +44 -0
- package/dist/types/src/lite/Smart.d.ts +9 -0
- package/dist/types/src/lite/index.d.ts +8 -0
- package/dist/types/src/navigation/ApplicationSidebar.d.ts +15 -0
- package/dist/types/src/navigation/NavigationRail.d.ts +21 -0
- package/dist/types/src/navigation/SidebarAccountSummary.d.ts +8 -0
- package/dist/types/src/navigation/SidebarBrandContent.d.ts +7 -0
- package/dist/types/src/navigation/SidebarNavigationItem.d.ts +9 -0
- package/dist/types/src/navigation/SidebarSubnavigation.d.ts +15 -0
- package/dist/types/src/navigation/index.d.ts +28 -0
- package/dist/types/src/navigation/navigation-path.d.ts +9 -0
- package/dist/types/src/navigation/sidebar-styles.d.ts +14 -0
- package/dist/types/src/password-manager.d.ts +3 -0
- package/dist/types/src/sidebar/index.d.ts +1 -0
- package/dist/types/src/sidebar/primitives.d.ts +51 -0
- package/dist/types/src/sidebar/use-sidebar-shortcut.d.ts +9 -0
- package/dist/types/src/tabs/Tabs.d.ts +21 -0
- package/dist/types/src/tabs/index.d.ts +1 -0
- package/dist/types/src/type-scale.d.ts +51 -0
- package/dist/types/src/use-media-query.d.ts +2 -0
- package/dist/types/src/utils.d.ts +5 -0
- package/dist/types/tailwind-preset.d.ts +214 -0
- package/dist/use-media-query.js +12 -0
- package/dist/utils.js +24 -0
- package/eslint/eslint-plugin-galo-ds.js +314 -0
- package/eslint/eslint.design-system.js +99 -0
- package/eslint/index.js +9 -0
- package/package.json +117 -1
- package/src/styles.css +540 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
const DESIGN_SYSTEM_SOURCE = /^@(?:galo|soygalo)\/ui(?:\/|$)/;
|
|
2
|
+
const ICONS_SOURCE = /^@(?:galo|soygalo)\/ui\/icons$/;
|
|
3
|
+
|
|
4
|
+
const VARIANT_PREFIX = /^(?:[a-z0-9-]+:|\[(?:[^[\]]|\[[^\]]*\])+\]:|group-[^:]+:|peer-[^:]+:|data-\[[^\]]+\]:|aria-\[[^\]]+\]:)*!?/;
|
|
5
|
+
|
|
6
|
+
const LOOK_UTILITY =
|
|
7
|
+
/^-?(?:bg-|border(?:$|-)|rounded|shadow|ring|outline|opacity-|fill-(?!mode-)|stroke-|decoration-|font-(?!mono$|ibm-plex$|sans$|heading$)|leading-|tracking-|text-(?!left$|center$|right$|justify$|start$|end$|wrap$|nowrap$|balance$|pretty$|ellipsis$|clip$))/;
|
|
8
|
+
|
|
9
|
+
const CONTROL_SIZE_UTILITY = /^(?:h-(?:\d|\[|px$)|size-(?:\d|\[|px$)|min-h-(?:\d|\[)|p[xy]?-(?:\d|\[))/;
|
|
10
|
+
const SIZED_CONTROLS = new Set(['Button', 'Input', 'SelectTrigger', 'Badge', 'Switch', 'Checkbox', 'TabsTrigger', 'Avatar']);
|
|
11
|
+
|
|
12
|
+
const SIZED_BY_CLASSNAME = new Set(['Skeleton']);
|
|
13
|
+
|
|
14
|
+
const INDICATOR_SIZE = /^(?:size|[wh])-(?:0\.5|1|1\.5|2|2\.5|3|px)$/;
|
|
15
|
+
|
|
16
|
+
const SURFACE_ROUNDED = /^rounded(?!-none)(?:-|$)/;
|
|
17
|
+
const SURFACE_PAINT = /^(?:border(?:$|-(?!none|0$))|shadow(?!-none)|bg-(?!transparent$))/;
|
|
18
|
+
|
|
19
|
+
const utilityOf = token => token.replace(VARIANT_PREFIX, '');
|
|
20
|
+
|
|
21
|
+
const definitionOf = (context, identifier) => {
|
|
22
|
+
let scope = context.sourceCode.getScope(identifier);
|
|
23
|
+
while (scope) {
|
|
24
|
+
const variable = scope.set.get(identifier.name);
|
|
25
|
+
if (variable) {
|
|
26
|
+
const definition = variable.defs[0];
|
|
27
|
+
return definition?.type === 'Variable' ? definition.node.init : null;
|
|
28
|
+
}
|
|
29
|
+
scope = scope.upper;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const LOOK_NAME = /(?:colou?r|bg|background|border|ring|shadow|style|tone|badge|chip|theme|text|class(?:es)?)$/i;
|
|
35
|
+
const OPAQUE_LOOK = /^⟨.*⟩$/;
|
|
36
|
+
const opaqueLook = name => (name && name !== 'className' && LOOK_NAME.test(name) ? [`⟨${name}⟩`] : []);
|
|
37
|
+
|
|
38
|
+
const propertyName = member => (member.computed ? (member.property.type === 'Literal' ? String(member.property.value) : null) : member.property.name);
|
|
39
|
+
|
|
40
|
+
const objectsOf = (node, context, seen = new Set()) => {
|
|
41
|
+
if (!node || seen.has(node)) return [];
|
|
42
|
+
seen.add(node);
|
|
43
|
+
switch (node.type) {
|
|
44
|
+
case 'ObjectExpression':
|
|
45
|
+
return [node];
|
|
46
|
+
case 'Identifier':
|
|
47
|
+
return objectsOf(definitionOf(context, node), context, seen);
|
|
48
|
+
case 'TSAsExpression':
|
|
49
|
+
case 'TSSatisfiesExpression':
|
|
50
|
+
case 'TSNonNullExpression':
|
|
51
|
+
case 'ChainExpression':
|
|
52
|
+
return objectsOf(node.expression, context, seen);
|
|
53
|
+
case 'ConditionalExpression':
|
|
54
|
+
return [...objectsOf(node.consequent, context, seen), ...objectsOf(node.alternate, context, seen)];
|
|
55
|
+
case 'LogicalExpression':
|
|
56
|
+
return [...objectsOf(node.left, context, seen), ...objectsOf(node.right, context, seen)];
|
|
57
|
+
case 'MemberExpression':
|
|
58
|
+
return propertyValues(node, context).flatMap(value => objectsOf(value, context, seen));
|
|
59
|
+
default:
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const propertyValues = (member, context) => {
|
|
65
|
+
const name = propertyName(member);
|
|
66
|
+
return objectsOf(member.object, context).flatMap(object =>
|
|
67
|
+
object.properties
|
|
68
|
+
.filter(property => property.type === 'Property' && (name === null || (property.key.name ?? String(property.key.value)) === name))
|
|
69
|
+
.map(property => property.value),
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const classStrings = (node, context, seen = new Set(), asValue = false) => {
|
|
74
|
+
if (!node || seen.has(node)) return [];
|
|
75
|
+
seen.add(node);
|
|
76
|
+
const recur = (child, value = asValue) => classStrings(child, context, seen, value);
|
|
77
|
+
switch (node.type) {
|
|
78
|
+
case 'Literal':
|
|
79
|
+
return typeof node.value === 'string' ? [node.value] : [];
|
|
80
|
+
case 'TemplateLiteral':
|
|
81
|
+
return [...node.quasis.map(quasi => quasi.value.cooked ?? ''), ...node.expressions.flatMap(expression => recur(expression))];
|
|
82
|
+
case 'JSXExpressionContainer':
|
|
83
|
+
case 'TSAsExpression':
|
|
84
|
+
case 'TSSatisfiesExpression':
|
|
85
|
+
case 'TSNonNullExpression':
|
|
86
|
+
case 'ChainExpression':
|
|
87
|
+
return recur(node.expression);
|
|
88
|
+
case 'ConditionalExpression':
|
|
89
|
+
return [...recur(node.consequent), ...recur(node.alternate)];
|
|
90
|
+
case 'LogicalExpression':
|
|
91
|
+
return node.operator === '&&' ? recur(node.right) : [...recur(node.left), ...recur(node.right)];
|
|
92
|
+
case 'BinaryExpression':
|
|
93
|
+
return node.operator === '+' ? [...recur(node.left), ...recur(node.right)] : [];
|
|
94
|
+
case 'CallExpression':
|
|
95
|
+
return [...node.arguments.flatMap(argument => recur(argument, false)), ...(node.callee.type === 'Identifier' ? opaqueLook(node.callee.name) : [])];
|
|
96
|
+
case 'ArrayExpression':
|
|
97
|
+
return node.elements.flatMap(element => recur(element));
|
|
98
|
+
case 'ObjectExpression':
|
|
99
|
+
return node.properties.flatMap(property => {
|
|
100
|
+
if (property.type !== 'Property') return [];
|
|
101
|
+
return asValue ? recur(property.value, true) : recur(property.key.type === 'Literal' ? property.key : null);
|
|
102
|
+
});
|
|
103
|
+
case 'Identifier': {
|
|
104
|
+
const definition = definitionOf(context, node);
|
|
105
|
+
return definition ? recur(definition, true) : opaqueLook(node.name);
|
|
106
|
+
}
|
|
107
|
+
case 'MemberExpression': {
|
|
108
|
+
const values = propertyValues(node, context);
|
|
109
|
+
if (values.length > 0) return values.flatMap(value => recur(value, true));
|
|
110
|
+
const name = propertyName(node) ?? (node.object.type === 'Identifier' ? node.object.name : null);
|
|
111
|
+
return name === 'className' ? [`⟨${name}⟩`] : opaqueLook(name);
|
|
112
|
+
}
|
|
113
|
+
default:
|
|
114
|
+
return [];
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
const tokensOf = (attribute, context) => classStrings(attribute.value, context).flatMap(value => value.split(/\s+/)).filter(Boolean);
|
|
119
|
+
|
|
120
|
+
const classNameAttribute = node =>
|
|
121
|
+
node.attributes.find(attribute => attribute.type === 'JSXAttribute' && attribute.name?.name === 'className');
|
|
122
|
+
|
|
123
|
+
const STYLE_LOOK = /^(?:background(?:Color|Image)?|color|border(?!Collapse|Spacing)\w*|boxShadow|outline\w*)$/;
|
|
124
|
+
const styleLooks = (node, context) => {
|
|
125
|
+
const attribute = node.attributes.find(candidate => candidate.type === 'JSXAttribute' && candidate.name?.name === 'style');
|
|
126
|
+
const expression = attribute?.value?.type === 'JSXExpressionContainer' ? attribute.value.expression : null;
|
|
127
|
+
const objects = objectsOf(expression, context);
|
|
128
|
+
if (objects.length === 0 && expression) {
|
|
129
|
+
const name = expression.type === 'Identifier' ? expression.name : expression.type === 'MemberExpression' ? propertyName(expression) : null;
|
|
130
|
+
return name && name !== 'style' ? opaqueLook(name).map(look => `style${look}`) : [];
|
|
131
|
+
}
|
|
132
|
+
return objects.flatMap(object =>
|
|
133
|
+
object.properties
|
|
134
|
+
.filter(property => property.type === 'Property' && !property.computed)
|
|
135
|
+
.map(property => property.key.name ?? String(property.key.value))
|
|
136
|
+
.filter(key => STYLE_LOOK.test(key))
|
|
137
|
+
.map(key => `style.${key}`),
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const rootName = name => {
|
|
142
|
+
if (name.type === 'JSXIdentifier') return name.name;
|
|
143
|
+
if (name.type === 'JSXMemberExpression') return rootName(name.object);
|
|
144
|
+
return null;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const noRestyle = {
|
|
148
|
+
meta: {
|
|
149
|
+
type: 'problem',
|
|
150
|
+
schema: [],
|
|
151
|
+
messages: {
|
|
152
|
+
restyle:
|
|
153
|
+
'`{{component}}` es de @galo/ui: su aspecto sale de sus variantes, no de `{{token}}`. Sólo se permiten clases de layout (margen, ancho, flex, posición). Si falta una variante, agregala al paquete.',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
create(context) {
|
|
157
|
+
const designSystemNames = new Set();
|
|
158
|
+
return {
|
|
159
|
+
ImportDeclaration(node) {
|
|
160
|
+
if (typeof node.source.value !== 'string' || !DESIGN_SYSTEM_SOURCE.test(node.source.value)) return;
|
|
161
|
+
if (ICONS_SOURCE.test(node.source.value)) return;
|
|
162
|
+
node.specifiers.forEach(specifier => designSystemNames.add(specifier.local.name));
|
|
163
|
+
},
|
|
164
|
+
JSXOpeningElement(node) {
|
|
165
|
+
const component = rootName(node.name);
|
|
166
|
+
if (!component || !designSystemNames.has(component) || SIZED_BY_CLASSNAME.has(component)) return;
|
|
167
|
+
const [styleLook] = styleLooks(node, context);
|
|
168
|
+
if (styleLook) {
|
|
169
|
+
context.report({ node, messageId: 'restyle', data: { component, token: styleLook } });
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
const attribute = classNameAttribute(node);
|
|
173
|
+
if (!attribute) return;
|
|
174
|
+
const isControl = SIZED_CONTROLS.has(component);
|
|
175
|
+
const token = tokensOf(attribute, context).find(candidate => {
|
|
176
|
+
const utility = utilityOf(candidate);
|
|
177
|
+
return OPAQUE_LOOK.test(utility) || LOOK_UTILITY.test(utility) || (isControl && CONTROL_SIZE_UTILITY.test(utility));
|
|
178
|
+
});
|
|
179
|
+
if (token) context.report({ node: attribute, messageId: 'restyle', data: { component, token } });
|
|
180
|
+
},
|
|
181
|
+
};
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
const noHandmadeSurface = {
|
|
186
|
+
meta: {
|
|
187
|
+
type: 'problem',
|
|
188
|
+
schema: [],
|
|
189
|
+
messages: {
|
|
190
|
+
surface:
|
|
191
|
+
'Superficie armada a mano (`{{rounded}}` + `{{paint}}`): usá Card, Item, Badge, Callout o el componente de @galo/ui que corresponda. Si no existe, agregalo al paquete.',
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
create(context) {
|
|
195
|
+
return {
|
|
196
|
+
JSXOpeningElement(node) {
|
|
197
|
+
if (node.name.type !== 'JSXIdentifier' || !/^[a-z]/.test(node.name.name)) return;
|
|
198
|
+
const attribute = classNameAttribute(node);
|
|
199
|
+
if (!attribute) return;
|
|
200
|
+
const utilities = tokensOf(attribute, context).map(utilityOf);
|
|
201
|
+
const rounded = utilities.find(utility => SURFACE_ROUNDED.test(utility));
|
|
202
|
+
const paint = utilities.find(utility => SURFACE_PAINT.test(utility) || OPAQUE_LOOK.test(utility)) ?? styleLooks(node, context).find(look => look !== 'style.color');
|
|
203
|
+
const small = utilities.filter(utility => INDICATOR_SIZE.test(utility));
|
|
204
|
+
if (small.some(utility => utility.startsWith('size-')) || (small.some(utility => utility.startsWith('h-')) && small.some(utility => utility.startsWith('w-')))) return;
|
|
205
|
+
if (rounded && paint) context.report({ node: attribute, messageId: 'surface', data: { rounded, paint } });
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const SIZE_CONTAINERS = new Set(['PageHeader', 'FilterBar']);
|
|
212
|
+
const CONTAINER_SIZED = new Set(['Button', 'Input', 'SearchField', 'SelectTrigger', 'Combobox', 'MultiSelect', 'SegmentedControl', 'ChipGroup', 'QuantityStepper']);
|
|
213
|
+
|
|
214
|
+
const noSizeInContainer = {
|
|
215
|
+
meta: {
|
|
216
|
+
type: 'problem',
|
|
217
|
+
schema: [],
|
|
218
|
+
messages: {
|
|
219
|
+
size: '`{{component}}` está dentro de `{{container}}`, que decide el tamaño de sus controles: sacá `size`.',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
create(context) {
|
|
223
|
+
return {
|
|
224
|
+
JSXOpeningElement(node) {
|
|
225
|
+
const sizeAttribute = node.attributes.find(attribute => attribute.type === 'JSXAttribute' && attribute.name.name === 'size');
|
|
226
|
+
if (!sizeAttribute || !CONTAINER_SIZED.has(rootName(node.name))) return;
|
|
227
|
+
for (let ancestor = node.parent?.parent; ancestor; ancestor = ancestor.parent) {
|
|
228
|
+
const opening = ancestor.type === 'JSXElement' ? ancestor.openingElement : ancestor.type === 'JSXOpeningElement' ? ancestor : null;
|
|
229
|
+
const container = opening && rootName(opening.name);
|
|
230
|
+
if (container && SIZE_CONTAINERS.has(container)) {
|
|
231
|
+
context.report({ node: sizeAttribute, messageId: 'size', data: { component: rootName(node.name), container } });
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
const PAGE_PARTS = new Set(['FilterBar', 'PageHeader', 'Page', 'DashboardLayout']);
|
|
241
|
+
|
|
242
|
+
const isSolidButton = element => {
|
|
243
|
+
if (element.type !== 'JSXElement' || rootName(element.openingElement.name) !== 'Button') return false;
|
|
244
|
+
const variant = element.openingElement.attributes.find(attribute => attribute.type === 'JSXAttribute' && attribute.name.name === 'variant');
|
|
245
|
+
if (!variant) return true;
|
|
246
|
+
return variant.value?.type === 'Literal' && variant.value.value === 'solid';
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
const solidButtonsIn = node => {
|
|
250
|
+
if (!node || typeof node !== 'object') return 0;
|
|
251
|
+
if (Array.isArray(node)) return node.reduce((sum, child) => sum + solidButtonsIn(child), 0);
|
|
252
|
+
if (node.type === 'JSXElement' && rootName(node.openingElement.name) === 'ActionMenuContent') return 0;
|
|
253
|
+
let count = isSolidButton(node) ? 1 : 0;
|
|
254
|
+
for (const key of ['children', 'expression', 'consequent', 'alternate', 'right', 'left', 'body']) {
|
|
255
|
+
if (node[key]) count += solidButtonsIn(node[key]);
|
|
256
|
+
}
|
|
257
|
+
return count;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
const onePrimaryAction = {
|
|
261
|
+
meta: {
|
|
262
|
+
type: 'problem',
|
|
263
|
+
schema: [],
|
|
264
|
+
messages: { many: 'El header tiene {{count}} acciones primarias (Button sólido). Una sola primaria, al final; el resto `outline`/`ghost` o en el menú ⋯.' },
|
|
265
|
+
},
|
|
266
|
+
create(context) {
|
|
267
|
+
return {
|
|
268
|
+
JSXAttribute(node) {
|
|
269
|
+
if (node.name.name !== 'actions') return;
|
|
270
|
+
const owner = rootName(node.parent.name);
|
|
271
|
+
if (!['PageHeader', 'Page', 'DashboardLayout'].includes(owner)) return;
|
|
272
|
+
const count = solidButtonsIn(node.value);
|
|
273
|
+
if (count > 1) context.report({ node, messageId: 'many', data: { count } });
|
|
274
|
+
},
|
|
275
|
+
};
|
|
276
|
+
},
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
const noTextSegmentsInPage = {
|
|
280
|
+
meta: {
|
|
281
|
+
type: 'problem',
|
|
282
|
+
schema: [],
|
|
283
|
+
messages: {
|
|
284
|
+
pills: 'Recortar los mismos datos de la página son pills: `ChipGroup` en el `scope` de la página. `SegmentedControl` en la página sólo para cambiar de vista con íconos (`iconOnly`).',
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
create(context) {
|
|
288
|
+
return {
|
|
289
|
+
JSXOpeningElement(node) {
|
|
290
|
+
if (rootName(node.name) !== 'SegmentedControl') return;
|
|
291
|
+
if (node.attributes.some(attribute => attribute.type === 'JSXAttribute' && attribute.name.name === 'iconOnly')) return;
|
|
292
|
+
for (let ancestor = node.parent?.parent; ancestor; ancestor = ancestor.parent) {
|
|
293
|
+
const opening = ancestor.type === 'JSXElement' ? ancestor.openingElement : ancestor.type === 'JSXOpeningElement' ? ancestor : null;
|
|
294
|
+
const container = opening && rootName(opening.name);
|
|
295
|
+
if (container && PAGE_PARTS.has(container)) {
|
|
296
|
+
context.report({ node, messageId: 'pills' });
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
};
|
|
302
|
+
},
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
export default {
|
|
306
|
+
meta: { name: 'galo-ds' },
|
|
307
|
+
rules: {
|
|
308
|
+
'no-text-segments-in-page': noTextSegmentsInPage,
|
|
309
|
+
'one-primary-action': onePrimaryAction,
|
|
310
|
+
'no-restyle': noRestyle,
|
|
311
|
+
'no-handmade-surface': noHandmadeSurface,
|
|
312
|
+
'no-size-in-container': noSizeInContainer,
|
|
313
|
+
},
|
|
314
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import galoDs from "./eslint-plugin-galo-ds.js";
|
|
2
|
+
|
|
3
|
+
export const designSystemPlugins = { "galo-ds": galoDs };
|
|
4
|
+
|
|
5
|
+
const GUIDE = "Ver frontend/docs/galo-ds-migration/GUIA.md.";
|
|
6
|
+
|
|
7
|
+
const PALETTE =
|
|
8
|
+
"(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)";
|
|
9
|
+
const COLOR_UTILITIES =
|
|
10
|
+
"(bg|text|border|ring|from|via|to|fill|stroke|divide|outline|decoration|shadow|accent|caret|placeholder)";
|
|
11
|
+
const RAW_PALETTE_CLASS = `/(^|[\\s:])${COLOR_UTILITIES}-${PALETTE}-[0-9]{2,3}\\b/`;
|
|
12
|
+
const ARBITRARY_HEX_CLASS = "/\\[#[0-9a-fA-F]{3,8}\\]/";
|
|
13
|
+
const RAW_TEXT_SIZE_CLASS = "/(^|[\\s:])text-(xs|sm|base|lg|[2-9]?xl|\\[[0-9.]+(px|rem)\\])($|[\\s\\x2f])/";
|
|
14
|
+
const ARBITRARY_OPACITY_CLASS = "/(^|[\\s:])[a-z-]+\\x2f\\[[0-9.]+%?\\]/";
|
|
15
|
+
|
|
16
|
+
const LEGACY_UI_PATTERNS = [
|
|
17
|
+
{
|
|
18
|
+
group: ["@/components/ui/*", "@/components/ui", "**/components/ui/*", "**/components/ui"],
|
|
19
|
+
message: `Capa vieja de shadcn, borrada. Usá @galo/ui. ${GUIDE}`,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
group: ["@distributors/components/ui/*", "@distributors/components/ui", "**/features/components/ui/*"],
|
|
23
|
+
message: `Design system paralelo de features/, borrado. Usá @galo/ui. ${GUIDE}`,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
group: ["@galo/ui/src/*", "@galo/ui/*/*", "@soygalo/ui/src/*", "@soygalo/ui/*/*"],
|
|
27
|
+
message:
|
|
28
|
+
"Importá @galo/ui sólo por sus entry points: '@galo/ui', '/navigation', '/layout', '/tabs', '/controls', '/forms', '/data-display', '/feedback', '/sidebar', '/icons'.",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
group: ["lucide-react", "lucide-react/*", "@phosphor-icons/*"],
|
|
32
|
+
message:
|
|
33
|
+
"Los íconos salen de '@galo/ui/icons'. Si falta uno, agregalo en packages/ui/src/icons/glyphs.ts (nombre → glifo de Phosphor).",
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const UI_PRIMITIVE_PATTERNS = [
|
|
38
|
+
{
|
|
39
|
+
group: [
|
|
40
|
+
"@radix-ui/*",
|
|
41
|
+
"cmdk",
|
|
42
|
+
"vaul",
|
|
43
|
+
"react-day-picker",
|
|
44
|
+
"input-otp",
|
|
45
|
+
"embla-carousel-react",
|
|
46
|
+
"react-resizable-panels",
|
|
47
|
+
"class-variance-authority",
|
|
48
|
+
"clsx",
|
|
49
|
+
"tailwind-merge",
|
|
50
|
+
],
|
|
51
|
+
allowTypeImports: true,
|
|
52
|
+
message:
|
|
53
|
+
"Las primitivas de UI viven sólo en packages/ui. Si @galo/ui no tiene el componente, agregalo al paquete (con test y ejemplo en ui-preview) y usalo desde ahí. `cn` sale de '@galo/ui'.",
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
export const designSystemImports = (options = { primitives: true }) => ({
|
|
58
|
+
patterns: [...LEGACY_UI_PATTERNS, ...(options.primitives ? UI_PRIMITIVE_PATTERNS : [])],
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export const designSystemSyntax = [
|
|
62
|
+
{
|
|
63
|
+
selector: "JSXOpeningElement[name.name=/^(button|input|select|textarea|label|table|dialog)$/]",
|
|
64
|
+
message:
|
|
65
|
+
"Elemento HTML crudo: usá Button, Input, Select, Textarea, Label, Table/DataTable o Dialog/Sheet de @galo/ui. Si ninguno sirve, el componente falta en el paquete: agregalo ahí.",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
selector: `Literal[value=${RAW_PALETTE_CLASS}], TemplateElement[value.raw=${RAW_PALETTE_CLASS}]`,
|
|
69
|
+
message:
|
|
70
|
+
"Clase de color de la paleta cruda de Tailwind: usá tokens semánticos (primary, muted-foreground, border, success, warning, info, error…) o una variante del componente de @galo/ui.",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
selector: `Literal[value=${ARBITRARY_HEX_CLASS}], TemplateElement[value.raw=${ARBITRARY_HEX_CLASS}]`,
|
|
74
|
+
message: "Color hex en una clase: usá un token semántico del preset de @galo/ui.",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
selector: `Literal[value=${RAW_TEXT_SIZE_CLASS}], TemplateElement[value.raw=${RAW_TEXT_SIZE_CLASS}]`,
|
|
78
|
+
message:
|
|
79
|
+
"Tamaño de texto fuera de la escala: usá un rol del preset (text-heading-lg/md/sm, text-body-lg/md/sm/xs, text-label-lg/md/sm/xs, text-overline). La escala vieja (text-xs, text-sm…) ya no existe.",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
selector: `Literal[value=${ARBITRARY_OPACITY_CLASS}], TemplateElement[value.raw=${ARBITRARY_OPACITY_CLASS}]`,
|
|
83
|
+
message: "Opacidad arbitraria: usá la escala del preset (/5, /10, /20 … /90).",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
selector: "JSXOpeningElement[name.name='h1']",
|
|
87
|
+
message: "Título de página armado a mano: usá PageHeader de @galo/ui/layout (title, description, actions, navigation).",
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
export const designSystemRules = (options) => ({
|
|
92
|
+
"no-restricted-imports": ["error", designSystemImports(options)],
|
|
93
|
+
"no-restricted-syntax": ["error", ...designSystemSyntax],
|
|
94
|
+
"galo-ds/no-restyle": "error",
|
|
95
|
+
"galo-ds/no-handmade-surface": "error",
|
|
96
|
+
"galo-ds/no-size-in-container": "error",
|
|
97
|
+
"galo-ds/no-text-segments-in-page": "error",
|
|
98
|
+
"galo-ds/one-primary-action": "error",
|
|
99
|
+
});
|
package/eslint/index.js
ADDED
package/package.json
CHANGED
|
@@ -1 +1,117 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "@soygalo/ui",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/soygalo/galo.git",
|
|
10
|
+
"directory": "frontend/packages/ui"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/types/src/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./navigation": {
|
|
19
|
+
"types": "./dist/types/src/navigation/index.d.ts",
|
|
20
|
+
"import": "./dist/navigation.js"
|
|
21
|
+
},
|
|
22
|
+
"./layout": {
|
|
23
|
+
"types": "./dist/types/src/layout/index.d.ts",
|
|
24
|
+
"import": "./dist/layout.js"
|
|
25
|
+
},
|
|
26
|
+
"./tabs": {
|
|
27
|
+
"types": "./dist/types/src/tabs/index.d.ts",
|
|
28
|
+
"import": "./dist/tabs.js"
|
|
29
|
+
},
|
|
30
|
+
"./controls": {
|
|
31
|
+
"types": "./dist/types/src/controls/index.d.ts",
|
|
32
|
+
"import": "./dist/controls.js"
|
|
33
|
+
},
|
|
34
|
+
"./forms": {
|
|
35
|
+
"types": "./dist/types/src/forms/index.d.ts",
|
|
36
|
+
"import": "./dist/forms.js"
|
|
37
|
+
},
|
|
38
|
+
"./data-display": {
|
|
39
|
+
"types": "./dist/types/src/data-display/index.d.ts",
|
|
40
|
+
"import": "./dist/data-display.js"
|
|
41
|
+
},
|
|
42
|
+
"./feedback": {
|
|
43
|
+
"types": "./dist/types/src/feedback/index.d.ts",
|
|
44
|
+
"import": "./dist/feedback.js"
|
|
45
|
+
},
|
|
46
|
+
"./lite": {
|
|
47
|
+
"types": "./dist/types/src/lite/index.d.ts",
|
|
48
|
+
"import": "./dist/lite.js"
|
|
49
|
+
},
|
|
50
|
+
"./sidebar": {
|
|
51
|
+
"types": "./dist/types/src/sidebar/index.d.ts",
|
|
52
|
+
"import": "./dist/sidebar.js"
|
|
53
|
+
},
|
|
54
|
+
"./icons": {
|
|
55
|
+
"types": "./dist/types/src/icons/index.d.ts",
|
|
56
|
+
"import": "./dist/icons.js"
|
|
57
|
+
},
|
|
58
|
+
"./styles.css": "./src/styles.css",
|
|
59
|
+
"./fonts.css": "./dist/fonts.css",
|
|
60
|
+
"./styles.compiled.css": "./dist/styles.css",
|
|
61
|
+
"./preflight.css": "./dist/preflight.css",
|
|
62
|
+
"./tailwind-preset": {
|
|
63
|
+
"types": "./dist/types/tailwind-preset.d.ts",
|
|
64
|
+
"import": "./dist/tailwind-preset.js"
|
|
65
|
+
},
|
|
66
|
+
"./eslint": "./eslint/index.js"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@fontsource-variable/figtree": "^5.3.0",
|
|
70
|
+
"@fontsource-variable/ibm-plex-sans": "^5.3.0",
|
|
71
|
+
"@fontsource/ibm-plex-mono": "^5.3.0",
|
|
72
|
+
"@radix-ui/react-accordion": "^1.2.0",
|
|
73
|
+
"@radix-ui/react-alert-dialog": "^1.1.2",
|
|
74
|
+
"@radix-ui/react-avatar": "^1.1.0",
|
|
75
|
+
"@radix-ui/react-checkbox": "^1.1.1",
|
|
76
|
+
"@radix-ui/react-collapsible": "^1.1.0",
|
|
77
|
+
"@radix-ui/react-dialog": "^1.1.2",
|
|
78
|
+
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
|
79
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
80
|
+
"@radix-ui/react-popover": "^1.1.1",
|
|
81
|
+
"@radix-ui/react-progress": "^1.1.0",
|
|
82
|
+
"@radix-ui/react-radio-group": "^1.2.0",
|
|
83
|
+
"@radix-ui/react-scroll-area": "^1.1.0",
|
|
84
|
+
"@radix-ui/react-select": "^2.1.1",
|
|
85
|
+
"@radix-ui/react-separator": "^1.1.0",
|
|
86
|
+
"@radix-ui/react-slider": "^1.2.0",
|
|
87
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
88
|
+
"@radix-ui/react-switch": "^1.1.0",
|
|
89
|
+
"@radix-ui/react-tabs": "^1.1.0",
|
|
90
|
+
"@radix-ui/react-toggle-group": "^1.1.0",
|
|
91
|
+
"@radix-ui/react-tooltip": "^1.1.4",
|
|
92
|
+
"class-variance-authority": "^0.7.1",
|
|
93
|
+
"clsx": "^2.1.1",
|
|
94
|
+
"cmdk": "^1.0.0",
|
|
95
|
+
"framer-motion": "^12.23.24",
|
|
96
|
+
"react-day-picker": "^10.0.2",
|
|
97
|
+
"react-resizable-panels": "^2.1.3",
|
|
98
|
+
"tailwind-merge": "^2.5.2",
|
|
99
|
+
"tailwindcss-animate": "^1.0.7"
|
|
100
|
+
},
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"react": ">=18 <20",
|
|
103
|
+
"react-dom": ">=18 <20",
|
|
104
|
+
"sonner": "^2.0.8"
|
|
105
|
+
},
|
|
106
|
+
"devDependencies": {
|
|
107
|
+
"@phosphor-icons/core": "^2.1.1"
|
|
108
|
+
},
|
|
109
|
+
"files": [
|
|
110
|
+
"dist",
|
|
111
|
+
"eslint",
|
|
112
|
+
"src/styles.css"
|
|
113
|
+
],
|
|
114
|
+
"scripts": {
|
|
115
|
+
"build": "rm -rf dist && vite build && tsc -p tsconfig.build.json && node scripts/build-css.mjs && publint"
|
|
116
|
+
}
|
|
117
|
+
}
|