@almadar/ui 2.19.1 → 2.20.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/dist/avl/index.cjs +4509 -35
- package/dist/avl/index.d.cts +275 -1
- package/dist/avl/index.d.ts +1 -0
- package/dist/avl/index.js +4501 -38
- package/dist/components/organisms/avl/AvlApplicationScene.d.ts +17 -0
- package/dist/components/organisms/avl/AvlClickTarget.d.ts +31 -0
- package/dist/components/organisms/avl/AvlCosmicZoom.d.ts +38 -0
- package/dist/components/organisms/avl/AvlLegend.d.ts +15 -0
- package/dist/components/organisms/avl/AvlOrbitalScene.d.ts +17 -0
- package/dist/components/organisms/avl/AvlTraitScene.d.ts +17 -0
- package/dist/components/organisms/avl/AvlTransitionScene.d.ts +16 -0
- package/dist/components/organisms/avl/avl-schema-parser.d.ts +126 -0
- package/dist/components/organisms/avl/avl-zoom-state.d.ts +57 -0
- package/dist/components/organisms/avl/index.d.ts +14 -0
- package/package.json +2 -1
package/dist/avl/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import React6 from 'react';
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import React6, { createContext, useCallback, useContext, useState, useMemo, useEffect, useReducer, useRef } from 'react';
|
|
3
|
+
import ELK from 'elkjs/lib/elk.bundled.js';
|
|
3
4
|
|
|
4
5
|
// components/atoms/avl/types.ts
|
|
5
6
|
var AVL_OPERATOR_COLORS = {
|
|
@@ -24,7 +25,7 @@ var AVL_FIELD_TYPE_SHAPES = {
|
|
|
24
25
|
var AvlOrbital = ({
|
|
25
26
|
cx = 0,
|
|
26
27
|
cy = 0,
|
|
27
|
-
r = 80,
|
|
28
|
+
r: r2 = 80,
|
|
28
29
|
label,
|
|
29
30
|
color = "var(--color-primary)",
|
|
30
31
|
opacity = 1,
|
|
@@ -36,7 +37,7 @@ var AvlOrbital = ({
|
|
|
36
37
|
{
|
|
37
38
|
cx,
|
|
38
39
|
cy,
|
|
39
|
-
r,
|
|
40
|
+
r: r2,
|
|
40
41
|
fill: "none",
|
|
41
42
|
stroke: color,
|
|
42
43
|
strokeWidth: 2
|
|
@@ -47,7 +48,7 @@ var AvlOrbital = ({
|
|
|
47
48
|
{
|
|
48
49
|
cx,
|
|
49
50
|
cy,
|
|
50
|
-
r,
|
|
51
|
+
r: r2,
|
|
51
52
|
fill: color,
|
|
52
53
|
opacity: 0.03
|
|
53
54
|
}
|
|
@@ -56,7 +57,7 @@ var AvlOrbital = ({
|
|
|
56
57
|
"text",
|
|
57
58
|
{
|
|
58
59
|
x: cx,
|
|
59
|
-
y: cy -
|
|
60
|
+
y: cy - r2 - 8,
|
|
60
61
|
textAnchor: "middle",
|
|
61
62
|
fill: color,
|
|
62
63
|
fontSize: 11,
|
|
@@ -83,7 +84,7 @@ function persistenceStroke(kind) {
|
|
|
83
84
|
var AvlEntity = ({
|
|
84
85
|
x = 0,
|
|
85
86
|
y = 0,
|
|
86
|
-
r = 18,
|
|
87
|
+
r: r2 = 18,
|
|
87
88
|
fieldCount = 0,
|
|
88
89
|
persistence = "persistent",
|
|
89
90
|
label,
|
|
@@ -94,8 +95,8 @@ var AvlEntity = ({
|
|
|
94
95
|
const strokeProps = persistenceStroke(persistence);
|
|
95
96
|
const facets = Array.from({ length: fieldCount }, (_, i) => {
|
|
96
97
|
const angle = Math.PI * 2 * i / fieldCount - Math.PI / 2;
|
|
97
|
-
const innerR =
|
|
98
|
-
const outerR =
|
|
98
|
+
const innerR = r2 + 2;
|
|
99
|
+
const outerR = r2 + 10;
|
|
99
100
|
return {
|
|
100
101
|
x1: x + innerR * Math.cos(angle),
|
|
101
102
|
y1: y + innerR * Math.sin(angle),
|
|
@@ -104,13 +105,13 @@ var AvlEntity = ({
|
|
|
104
105
|
};
|
|
105
106
|
});
|
|
106
107
|
return /* @__PURE__ */ jsxs("g", { className, opacity, children: [
|
|
107
|
-
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r, fill: color, opacity: 0.15 }),
|
|
108
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: r2, fill: color, opacity: 0.15 }),
|
|
108
109
|
/* @__PURE__ */ jsx(
|
|
109
110
|
"circle",
|
|
110
111
|
{
|
|
111
112
|
cx: x,
|
|
112
113
|
cy: y,
|
|
113
|
-
r,
|
|
114
|
+
r: r2,
|
|
114
115
|
fill: "none",
|
|
115
116
|
stroke: color,
|
|
116
117
|
strokeWidth: strokeProps.strokeWidth,
|
|
@@ -122,7 +123,7 @@ var AvlEntity = ({
|
|
|
122
123
|
{
|
|
123
124
|
cx: x,
|
|
124
125
|
cy: y,
|
|
125
|
-
r:
|
|
126
|
+
r: r2 - 4,
|
|
126
127
|
fill: "none",
|
|
127
128
|
stroke: color,
|
|
128
129
|
strokeWidth: 1.5
|
|
@@ -145,7 +146,7 @@ var AvlEntity = ({
|
|
|
145
146
|
"text",
|
|
146
147
|
{
|
|
147
148
|
x,
|
|
148
|
-
y: y +
|
|
149
|
+
y: y + r2 + (fieldCount > 0 ? 18 : 14),
|
|
149
150
|
textAnchor: "middle",
|
|
150
151
|
fill: color,
|
|
151
152
|
fontSize: 10,
|
|
@@ -1048,33 +1049,33 @@ var AvlBindingRef = ({
|
|
|
1048
1049
|
AvlBindingRef.displayName = "AvlBindingRef";
|
|
1049
1050
|
|
|
1050
1051
|
// components/molecules/avl/avl-layout.ts
|
|
1051
|
-
function ringPositions(cx, cy,
|
|
1052
|
+
function ringPositions(cx, cy, r2, count, startAngle = -Math.PI / 2) {
|
|
1052
1053
|
if (count === 0) return [];
|
|
1053
1054
|
if (count === 1) {
|
|
1054
1055
|
return [{ x: cx, y: cy, angle: 0 }];
|
|
1055
1056
|
}
|
|
1056
1057
|
if (count === 2) {
|
|
1057
1058
|
return [
|
|
1058
|
-
{ x: cx -
|
|
1059
|
-
{ x: cx +
|
|
1059
|
+
{ x: cx - r2 * 0.7, y: cy, angle: Math.PI },
|
|
1060
|
+
{ x: cx + r2 * 0.7, y: cy, angle: 0 }
|
|
1060
1061
|
];
|
|
1061
1062
|
}
|
|
1062
1063
|
return Array.from({ length: count }, (_, i) => {
|
|
1063
1064
|
const angle = startAngle + Math.PI * 2 * i / count;
|
|
1064
1065
|
return {
|
|
1065
|
-
x: cx +
|
|
1066
|
-
y: cy +
|
|
1066
|
+
x: cx + r2 * Math.cos(angle),
|
|
1067
|
+
y: cy + r2 * Math.sin(angle),
|
|
1067
1068
|
angle
|
|
1068
1069
|
};
|
|
1069
1070
|
});
|
|
1070
1071
|
}
|
|
1071
|
-
function arcPath(cx, cy,
|
|
1072
|
-
const x1 = cx +
|
|
1073
|
-
const y1 = cy +
|
|
1074
|
-
const x2 = cx +
|
|
1075
|
-
const y2 = cy +
|
|
1072
|
+
function arcPath(cx, cy, r2, startAngle, endAngle) {
|
|
1073
|
+
const x1 = cx + r2 * Math.cos(startAngle);
|
|
1074
|
+
const y1 = cy + r2 * Math.sin(startAngle);
|
|
1075
|
+
const x2 = cx + r2 * Math.cos(endAngle);
|
|
1076
|
+
const y2 = cy + r2 * Math.sin(endAngle);
|
|
1076
1077
|
const largeArc = endAngle - startAngle > Math.PI ? 1 : 0;
|
|
1077
|
-
return `M${x1},${y1} A${
|
|
1078
|
+
return `M${x1},${y1} A${r2},${r2} 0 ${largeArc},1 ${x2},${y2}`;
|
|
1078
1079
|
}
|
|
1079
1080
|
function radialPositions(cx, cy, innerR, outerR, count, startAngle = -Math.PI / 2) {
|
|
1080
1081
|
return Array.from({ length: count }, (_, i) => {
|
|
@@ -1126,10 +1127,10 @@ var AvlStateMachine = ({
|
|
|
1126
1127
|
}, []);
|
|
1127
1128
|
const cx = 300;
|
|
1128
1129
|
const cy = 200;
|
|
1129
|
-
const
|
|
1130
|
+
const r2 = 150;
|
|
1130
1131
|
const stateWidth = 90;
|
|
1131
1132
|
const stateHeight = 36;
|
|
1132
|
-
const positions = ringPositions(cx, cy,
|
|
1133
|
+
const positions = ringPositions(cx, cy, r2, states.length);
|
|
1133
1134
|
const stateIndex = new Map(states.map((s, i) => [s.name, i]));
|
|
1134
1135
|
const pairCount = /* @__PURE__ */ new Map();
|
|
1135
1136
|
const pairSeen = /* @__PURE__ */ new Map();
|
|
@@ -1154,7 +1155,7 @@ var AvlStateMachine = ({
|
|
|
1154
1155
|
animated && /* @__PURE__ */ jsx("style", { children: `
|
|
1155
1156
|
@keyframes avl-sm-dash { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
|
|
1156
1157
|
` }),
|
|
1157
|
-
/* @__PURE__ */ jsx("circle", { cx, cy, r:
|
|
1158
|
+
/* @__PURE__ */ jsx("circle", { cx, cy, r: r2 + 30, fill: `url(#${ids.grad})` }),
|
|
1158
1159
|
transitions.map((tr, i) => {
|
|
1159
1160
|
if (tr.from !== tr.to) return null;
|
|
1160
1161
|
const idx = stateIndex.get(tr.from);
|
|
@@ -1413,10 +1414,10 @@ var AvlClosedCircuit = ({
|
|
|
1413
1414
|
}, []);
|
|
1414
1415
|
const cx = 300;
|
|
1415
1416
|
const cy = 200;
|
|
1416
|
-
const
|
|
1417
|
+
const r2 = 120;
|
|
1417
1418
|
const stateW = 80;
|
|
1418
1419
|
const stateH = 32;
|
|
1419
|
-
const positions = ringPositions(cx, cy,
|
|
1420
|
+
const positions = ringPositions(cx, cy, r2, states.length);
|
|
1420
1421
|
const stateIndex = new Map(states.map((s, i) => [s.name, i]));
|
|
1421
1422
|
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 400", xmlns: "http://www.w3.org/2000/svg", className, children: [
|
|
1422
1423
|
/* @__PURE__ */ jsxs("defs", { children: [
|
|
@@ -1449,7 +1450,7 @@ var AvlClosedCircuit = ({
|
|
|
1449
1450
|
animated && /* @__PURE__ */ jsx("style", { children: `
|
|
1450
1451
|
@keyframes avl-cc-flow { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
|
|
1451
1452
|
` }),
|
|
1452
|
-
/* @__PURE__ */ jsx("circle", { cx, cy, r:
|
|
1453
|
+
/* @__PURE__ */ jsx("circle", { cx, cy, r: r2 + 30, fill: "none", stroke: color, strokeWidth: 0.3, opacity: 0.06 }),
|
|
1453
1454
|
/* @__PURE__ */ jsx("circle", { cx, cy, r: 50, fill: "none", stroke: color, strokeWidth: 0.5, opacity: 0.08 }),
|
|
1454
1455
|
transitions.map((tr, i) => {
|
|
1455
1456
|
const fromIdx = stateIndex.get(tr.from);
|
|
@@ -1811,7 +1812,7 @@ function nodeColor(type, baseColor) {
|
|
|
1811
1812
|
function renderNode(node, color, glowId) {
|
|
1812
1813
|
const labelLen = node.label.length;
|
|
1813
1814
|
const baseR = node.type === "operator" ? 20 : 16;
|
|
1814
|
-
const
|
|
1815
|
+
const r2 = Math.max(baseR, labelLen * 3.5 + 6);
|
|
1815
1816
|
const nc = nodeColor(node.type, color);
|
|
1816
1817
|
return /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
1817
1818
|
node.children.map((child, i) => {
|
|
@@ -1823,7 +1824,7 @@ function renderNode(node, color, glowId) {
|
|
|
1823
1824
|
"line",
|
|
1824
1825
|
{
|
|
1825
1826
|
x1: node.x,
|
|
1826
|
-
y1: node.y + (node.type === "operator" ?
|
|
1827
|
+
y1: node.y + (node.type === "operator" ? r2 * 0.7 : r2),
|
|
1827
1828
|
x2: child.x,
|
|
1828
1829
|
y2: child.y - (child.type === "operator" ? childR * 0.7 : childR),
|
|
1829
1830
|
stroke: color,
|
|
@@ -1836,10 +1837,10 @@ function renderNode(node, color, glowId) {
|
|
|
1836
1837
|
node.type === "operator" ? /* @__PURE__ */ jsx(
|
|
1837
1838
|
"rect",
|
|
1838
1839
|
{
|
|
1839
|
-
x: node.x -
|
|
1840
|
-
y: node.y -
|
|
1841
|
-
width:
|
|
1842
|
-
height:
|
|
1840
|
+
x: node.x - r2,
|
|
1841
|
+
y: node.y - r2 * 0.6,
|
|
1842
|
+
width: r2 * 2,
|
|
1843
|
+
height: r2 * 1.2,
|
|
1843
1844
|
rx: 4,
|
|
1844
1845
|
ry: 4,
|
|
1845
1846
|
fill: color,
|
|
@@ -1847,7 +1848,7 @@ function renderNode(node, color, glowId) {
|
|
|
1847
1848
|
stroke: nc,
|
|
1848
1849
|
strokeWidth: 1.5
|
|
1849
1850
|
}
|
|
1850
|
-
) : node.type === "binding" ? /* @__PURE__ */ jsx("circle", { cx: node.x, cy: node.y, r, fill: "none", stroke: nc, strokeWidth: 1.5, strokeDasharray: "3 2" }) : /* @__PURE__ */ jsx("circle", { cx: node.x, cy: node.y, r, fill: "none", stroke: nc, strokeWidth: 1, opacity: 0.5 }),
|
|
1851
|
+
) : node.type === "binding" ? /* @__PURE__ */ jsx("circle", { cx: node.x, cy: node.y, r: r2, fill: "none", stroke: nc, strokeWidth: 1.5, strokeDasharray: "3 2" }) : /* @__PURE__ */ jsx("circle", { cx: node.x, cy: node.y, r: r2, fill: "none", stroke: nc, strokeWidth: 1, opacity: 0.5 }),
|
|
1851
1852
|
/* @__PURE__ */ jsx(
|
|
1852
1853
|
"text",
|
|
1853
1854
|
{
|
|
@@ -1888,4 +1889,4466 @@ var AvlExprTree = ({
|
|
|
1888
1889
|
};
|
|
1889
1890
|
AvlExprTree.displayName = "AvlExprTree";
|
|
1890
1891
|
|
|
1891
|
-
|
|
1892
|
+
// node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
1893
|
+
function r(e) {
|
|
1894
|
+
var t, f, n = "";
|
|
1895
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
1896
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
1897
|
+
var o = e.length;
|
|
1898
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
1899
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
1900
|
+
return n;
|
|
1901
|
+
}
|
|
1902
|
+
function clsx() {
|
|
1903
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
1904
|
+
return n;
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
// node_modules/.pnpm/tailwind-merge@2.6.1/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
1908
|
+
var CLASS_PART_SEPARATOR = "-";
|
|
1909
|
+
var createClassGroupUtils = (config) => {
|
|
1910
|
+
const classMap = createClassMap(config);
|
|
1911
|
+
const {
|
|
1912
|
+
conflictingClassGroups,
|
|
1913
|
+
conflictingClassGroupModifiers
|
|
1914
|
+
} = config;
|
|
1915
|
+
const getClassGroupId = (className) => {
|
|
1916
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
1917
|
+
if (classParts[0] === "" && classParts.length !== 1) {
|
|
1918
|
+
classParts.shift();
|
|
1919
|
+
}
|
|
1920
|
+
return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
|
|
1921
|
+
};
|
|
1922
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
1923
|
+
const conflicts = conflictingClassGroups[classGroupId] || [];
|
|
1924
|
+
if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
|
|
1925
|
+
return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
|
|
1926
|
+
}
|
|
1927
|
+
return conflicts;
|
|
1928
|
+
};
|
|
1929
|
+
return {
|
|
1930
|
+
getClassGroupId,
|
|
1931
|
+
getConflictingClassGroupIds
|
|
1932
|
+
};
|
|
1933
|
+
};
|
|
1934
|
+
var getGroupRecursive = (classParts, classPartObject) => {
|
|
1935
|
+
if (classParts.length === 0) {
|
|
1936
|
+
return classPartObject.classGroupId;
|
|
1937
|
+
}
|
|
1938
|
+
const currentClassPart = classParts[0];
|
|
1939
|
+
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
1940
|
+
const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
|
|
1941
|
+
if (classGroupFromNextClassPart) {
|
|
1942
|
+
return classGroupFromNextClassPart;
|
|
1943
|
+
}
|
|
1944
|
+
if (classPartObject.validators.length === 0) {
|
|
1945
|
+
return void 0;
|
|
1946
|
+
}
|
|
1947
|
+
const classRest = classParts.join(CLASS_PART_SEPARATOR);
|
|
1948
|
+
return classPartObject.validators.find(({
|
|
1949
|
+
validator
|
|
1950
|
+
}) => validator(classRest))?.classGroupId;
|
|
1951
|
+
};
|
|
1952
|
+
var arbitraryPropertyRegex = /^\[(.+)\]$/;
|
|
1953
|
+
var getGroupIdForArbitraryProperty = (className) => {
|
|
1954
|
+
if (arbitraryPropertyRegex.test(className)) {
|
|
1955
|
+
const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1];
|
|
1956
|
+
const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(":"));
|
|
1957
|
+
if (property) {
|
|
1958
|
+
return "arbitrary.." + property;
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
};
|
|
1962
|
+
var createClassMap = (config) => {
|
|
1963
|
+
const {
|
|
1964
|
+
theme,
|
|
1965
|
+
prefix
|
|
1966
|
+
} = config;
|
|
1967
|
+
const classMap = {
|
|
1968
|
+
nextPart: /* @__PURE__ */ new Map(),
|
|
1969
|
+
validators: []
|
|
1970
|
+
};
|
|
1971
|
+
const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix);
|
|
1972
|
+
prefixedClassGroupEntries.forEach(([classGroupId, classGroup]) => {
|
|
1973
|
+
processClassesRecursively(classGroup, classMap, classGroupId, theme);
|
|
1974
|
+
});
|
|
1975
|
+
return classMap;
|
|
1976
|
+
};
|
|
1977
|
+
var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
1978
|
+
classGroup.forEach((classDefinition) => {
|
|
1979
|
+
if (typeof classDefinition === "string") {
|
|
1980
|
+
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
1981
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
1982
|
+
return;
|
|
1983
|
+
}
|
|
1984
|
+
if (typeof classDefinition === "function") {
|
|
1985
|
+
if (isThemeGetter(classDefinition)) {
|
|
1986
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
1987
|
+
return;
|
|
1988
|
+
}
|
|
1989
|
+
classPartObject.validators.push({
|
|
1990
|
+
validator: classDefinition,
|
|
1991
|
+
classGroupId
|
|
1992
|
+
});
|
|
1993
|
+
return;
|
|
1994
|
+
}
|
|
1995
|
+
Object.entries(classDefinition).forEach(([key, classGroup2]) => {
|
|
1996
|
+
processClassesRecursively(classGroup2, getPart(classPartObject, key), classGroupId, theme);
|
|
1997
|
+
});
|
|
1998
|
+
});
|
|
1999
|
+
};
|
|
2000
|
+
var getPart = (classPartObject, path) => {
|
|
2001
|
+
let currentClassPartObject = classPartObject;
|
|
2002
|
+
path.split(CLASS_PART_SEPARATOR).forEach((pathPart) => {
|
|
2003
|
+
if (!currentClassPartObject.nextPart.has(pathPart)) {
|
|
2004
|
+
currentClassPartObject.nextPart.set(pathPart, {
|
|
2005
|
+
nextPart: /* @__PURE__ */ new Map(),
|
|
2006
|
+
validators: []
|
|
2007
|
+
});
|
|
2008
|
+
}
|
|
2009
|
+
currentClassPartObject = currentClassPartObject.nextPart.get(pathPart);
|
|
2010
|
+
});
|
|
2011
|
+
return currentClassPartObject;
|
|
2012
|
+
};
|
|
2013
|
+
var isThemeGetter = (func) => func.isThemeGetter;
|
|
2014
|
+
var getPrefixedClassGroupEntries = (classGroupEntries, prefix) => {
|
|
2015
|
+
if (!prefix) {
|
|
2016
|
+
return classGroupEntries;
|
|
2017
|
+
}
|
|
2018
|
+
return classGroupEntries.map(([classGroupId, classGroup]) => {
|
|
2019
|
+
const prefixedClassGroup = classGroup.map((classDefinition) => {
|
|
2020
|
+
if (typeof classDefinition === "string") {
|
|
2021
|
+
return prefix + classDefinition;
|
|
2022
|
+
}
|
|
2023
|
+
if (typeof classDefinition === "object") {
|
|
2024
|
+
return Object.fromEntries(Object.entries(classDefinition).map(([key, value]) => [prefix + key, value]));
|
|
2025
|
+
}
|
|
2026
|
+
return classDefinition;
|
|
2027
|
+
});
|
|
2028
|
+
return [classGroupId, prefixedClassGroup];
|
|
2029
|
+
});
|
|
2030
|
+
};
|
|
2031
|
+
var createLruCache = (maxCacheSize) => {
|
|
2032
|
+
if (maxCacheSize < 1) {
|
|
2033
|
+
return {
|
|
2034
|
+
get: () => void 0,
|
|
2035
|
+
set: () => {
|
|
2036
|
+
}
|
|
2037
|
+
};
|
|
2038
|
+
}
|
|
2039
|
+
let cacheSize = 0;
|
|
2040
|
+
let cache = /* @__PURE__ */ new Map();
|
|
2041
|
+
let previousCache = /* @__PURE__ */ new Map();
|
|
2042
|
+
const update = (key, value) => {
|
|
2043
|
+
cache.set(key, value);
|
|
2044
|
+
cacheSize++;
|
|
2045
|
+
if (cacheSize > maxCacheSize) {
|
|
2046
|
+
cacheSize = 0;
|
|
2047
|
+
previousCache = cache;
|
|
2048
|
+
cache = /* @__PURE__ */ new Map();
|
|
2049
|
+
}
|
|
2050
|
+
};
|
|
2051
|
+
return {
|
|
2052
|
+
get(key) {
|
|
2053
|
+
let value = cache.get(key);
|
|
2054
|
+
if (value !== void 0) {
|
|
2055
|
+
return value;
|
|
2056
|
+
}
|
|
2057
|
+
if ((value = previousCache.get(key)) !== void 0) {
|
|
2058
|
+
update(key, value);
|
|
2059
|
+
return value;
|
|
2060
|
+
}
|
|
2061
|
+
},
|
|
2062
|
+
set(key, value) {
|
|
2063
|
+
if (cache.has(key)) {
|
|
2064
|
+
cache.set(key, value);
|
|
2065
|
+
} else {
|
|
2066
|
+
update(key, value);
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
};
|
|
2070
|
+
};
|
|
2071
|
+
var IMPORTANT_MODIFIER = "!";
|
|
2072
|
+
var createParseClassName = (config) => {
|
|
2073
|
+
const {
|
|
2074
|
+
separator,
|
|
2075
|
+
experimentalParseClassName
|
|
2076
|
+
} = config;
|
|
2077
|
+
const isSeparatorSingleCharacter = separator.length === 1;
|
|
2078
|
+
const firstSeparatorCharacter = separator[0];
|
|
2079
|
+
const separatorLength = separator.length;
|
|
2080
|
+
const parseClassName = (className) => {
|
|
2081
|
+
const modifiers = [];
|
|
2082
|
+
let bracketDepth = 0;
|
|
2083
|
+
let modifierStart = 0;
|
|
2084
|
+
let postfixModifierPosition;
|
|
2085
|
+
for (let index = 0; index < className.length; index++) {
|
|
2086
|
+
let currentCharacter = className[index];
|
|
2087
|
+
if (bracketDepth === 0) {
|
|
2088
|
+
if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) {
|
|
2089
|
+
modifiers.push(className.slice(modifierStart, index));
|
|
2090
|
+
modifierStart = index + separatorLength;
|
|
2091
|
+
continue;
|
|
2092
|
+
}
|
|
2093
|
+
if (currentCharacter === "/") {
|
|
2094
|
+
postfixModifierPosition = index;
|
|
2095
|
+
continue;
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
if (currentCharacter === "[") {
|
|
2099
|
+
bracketDepth++;
|
|
2100
|
+
} else if (currentCharacter === "]") {
|
|
2101
|
+
bracketDepth--;
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart);
|
|
2105
|
+
const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER);
|
|
2106
|
+
const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier;
|
|
2107
|
+
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
|
|
2108
|
+
return {
|
|
2109
|
+
modifiers,
|
|
2110
|
+
hasImportantModifier,
|
|
2111
|
+
baseClassName,
|
|
2112
|
+
maybePostfixModifierPosition
|
|
2113
|
+
};
|
|
2114
|
+
};
|
|
2115
|
+
if (experimentalParseClassName) {
|
|
2116
|
+
return (className) => experimentalParseClassName({
|
|
2117
|
+
className,
|
|
2118
|
+
parseClassName
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
2121
|
+
return parseClassName;
|
|
2122
|
+
};
|
|
2123
|
+
var sortModifiers = (modifiers) => {
|
|
2124
|
+
if (modifiers.length <= 1) {
|
|
2125
|
+
return modifiers;
|
|
2126
|
+
}
|
|
2127
|
+
const sortedModifiers = [];
|
|
2128
|
+
let unsortedModifiers = [];
|
|
2129
|
+
modifiers.forEach((modifier) => {
|
|
2130
|
+
const isArbitraryVariant = modifier[0] === "[";
|
|
2131
|
+
if (isArbitraryVariant) {
|
|
2132
|
+
sortedModifiers.push(...unsortedModifiers.sort(), modifier);
|
|
2133
|
+
unsortedModifiers = [];
|
|
2134
|
+
} else {
|
|
2135
|
+
unsortedModifiers.push(modifier);
|
|
2136
|
+
}
|
|
2137
|
+
});
|
|
2138
|
+
sortedModifiers.push(...unsortedModifiers.sort());
|
|
2139
|
+
return sortedModifiers;
|
|
2140
|
+
};
|
|
2141
|
+
var createConfigUtils = (config) => ({
|
|
2142
|
+
cache: createLruCache(config.cacheSize),
|
|
2143
|
+
parseClassName: createParseClassName(config),
|
|
2144
|
+
...createClassGroupUtils(config)
|
|
2145
|
+
});
|
|
2146
|
+
var SPLIT_CLASSES_REGEX = /\s+/;
|
|
2147
|
+
var mergeClassList = (classList, configUtils) => {
|
|
2148
|
+
const {
|
|
2149
|
+
parseClassName,
|
|
2150
|
+
getClassGroupId,
|
|
2151
|
+
getConflictingClassGroupIds
|
|
2152
|
+
} = configUtils;
|
|
2153
|
+
const classGroupsInConflict = [];
|
|
2154
|
+
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
2155
|
+
let result = "";
|
|
2156
|
+
for (let index = classNames.length - 1; index >= 0; index -= 1) {
|
|
2157
|
+
const originalClassName = classNames[index];
|
|
2158
|
+
const {
|
|
2159
|
+
modifiers,
|
|
2160
|
+
hasImportantModifier,
|
|
2161
|
+
baseClassName,
|
|
2162
|
+
maybePostfixModifierPosition
|
|
2163
|
+
} = parseClassName(originalClassName);
|
|
2164
|
+
let hasPostfixModifier = Boolean(maybePostfixModifierPosition);
|
|
2165
|
+
let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
|
|
2166
|
+
if (!classGroupId) {
|
|
2167
|
+
if (!hasPostfixModifier) {
|
|
2168
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
2169
|
+
continue;
|
|
2170
|
+
}
|
|
2171
|
+
classGroupId = getClassGroupId(baseClassName);
|
|
2172
|
+
if (!classGroupId) {
|
|
2173
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
2174
|
+
continue;
|
|
2175
|
+
}
|
|
2176
|
+
hasPostfixModifier = false;
|
|
2177
|
+
}
|
|
2178
|
+
const variantModifier = sortModifiers(modifiers).join(":");
|
|
2179
|
+
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
2180
|
+
const classId = modifierId + classGroupId;
|
|
2181
|
+
if (classGroupsInConflict.includes(classId)) {
|
|
2182
|
+
continue;
|
|
2183
|
+
}
|
|
2184
|
+
classGroupsInConflict.push(classId);
|
|
2185
|
+
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
2186
|
+
for (let i = 0; i < conflictGroups.length; ++i) {
|
|
2187
|
+
const group = conflictGroups[i];
|
|
2188
|
+
classGroupsInConflict.push(modifierId + group);
|
|
2189
|
+
}
|
|
2190
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
2191
|
+
}
|
|
2192
|
+
return result;
|
|
2193
|
+
};
|
|
2194
|
+
function twJoin() {
|
|
2195
|
+
let index = 0;
|
|
2196
|
+
let argument;
|
|
2197
|
+
let resolvedValue;
|
|
2198
|
+
let string = "";
|
|
2199
|
+
while (index < arguments.length) {
|
|
2200
|
+
if (argument = arguments[index++]) {
|
|
2201
|
+
if (resolvedValue = toValue(argument)) {
|
|
2202
|
+
string && (string += " ");
|
|
2203
|
+
string += resolvedValue;
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
return string;
|
|
2208
|
+
}
|
|
2209
|
+
var toValue = (mix) => {
|
|
2210
|
+
if (typeof mix === "string") {
|
|
2211
|
+
return mix;
|
|
2212
|
+
}
|
|
2213
|
+
let resolvedValue;
|
|
2214
|
+
let string = "";
|
|
2215
|
+
for (let k = 0; k < mix.length; k++) {
|
|
2216
|
+
if (mix[k]) {
|
|
2217
|
+
if (resolvedValue = toValue(mix[k])) {
|
|
2218
|
+
string && (string += " ");
|
|
2219
|
+
string += resolvedValue;
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
return string;
|
|
2224
|
+
};
|
|
2225
|
+
function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
2226
|
+
let configUtils;
|
|
2227
|
+
let cacheGet;
|
|
2228
|
+
let cacheSet;
|
|
2229
|
+
let functionToCall = initTailwindMerge;
|
|
2230
|
+
function initTailwindMerge(classList) {
|
|
2231
|
+
const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
|
|
2232
|
+
configUtils = createConfigUtils(config);
|
|
2233
|
+
cacheGet = configUtils.cache.get;
|
|
2234
|
+
cacheSet = configUtils.cache.set;
|
|
2235
|
+
functionToCall = tailwindMerge;
|
|
2236
|
+
return tailwindMerge(classList);
|
|
2237
|
+
}
|
|
2238
|
+
function tailwindMerge(classList) {
|
|
2239
|
+
const cachedResult = cacheGet(classList);
|
|
2240
|
+
if (cachedResult) {
|
|
2241
|
+
return cachedResult;
|
|
2242
|
+
}
|
|
2243
|
+
const result = mergeClassList(classList, configUtils);
|
|
2244
|
+
cacheSet(classList, result);
|
|
2245
|
+
return result;
|
|
2246
|
+
}
|
|
2247
|
+
return function callTailwindMerge() {
|
|
2248
|
+
return functionToCall(twJoin.apply(null, arguments));
|
|
2249
|
+
};
|
|
2250
|
+
}
|
|
2251
|
+
var fromTheme = (key) => {
|
|
2252
|
+
const themeGetter = (theme) => theme[key] || [];
|
|
2253
|
+
themeGetter.isThemeGetter = true;
|
|
2254
|
+
return themeGetter;
|
|
2255
|
+
};
|
|
2256
|
+
var arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i;
|
|
2257
|
+
var fractionRegex = /^\d+\/\d+$/;
|
|
2258
|
+
var stringLengths = /* @__PURE__ */ new Set(["px", "full", "screen"]);
|
|
2259
|
+
var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
2260
|
+
var lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
|
|
2261
|
+
var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
|
|
2262
|
+
var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
2263
|
+
var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
2264
|
+
var isLength = (value) => isNumber(value) || stringLengths.has(value) || fractionRegex.test(value);
|
|
2265
|
+
var isArbitraryLength = (value) => getIsArbitraryValue(value, "length", isLengthOnly);
|
|
2266
|
+
var isNumber = (value) => Boolean(value) && !Number.isNaN(Number(value));
|
|
2267
|
+
var isArbitraryNumber = (value) => getIsArbitraryValue(value, "number", isNumber);
|
|
2268
|
+
var isInteger = (value) => Boolean(value) && Number.isInteger(Number(value));
|
|
2269
|
+
var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
2270
|
+
var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
|
|
2271
|
+
var isTshirtSize = (value) => tshirtUnitRegex.test(value);
|
|
2272
|
+
var sizeLabels = /* @__PURE__ */ new Set(["length", "size", "percentage"]);
|
|
2273
|
+
var isArbitrarySize = (value) => getIsArbitraryValue(value, sizeLabels, isNever);
|
|
2274
|
+
var isArbitraryPosition = (value) => getIsArbitraryValue(value, "position", isNever);
|
|
2275
|
+
var imageLabels = /* @__PURE__ */ new Set(["image", "url"]);
|
|
2276
|
+
var isArbitraryImage = (value) => getIsArbitraryValue(value, imageLabels, isImage);
|
|
2277
|
+
var isArbitraryShadow = (value) => getIsArbitraryValue(value, "", isShadow);
|
|
2278
|
+
var isAny = () => true;
|
|
2279
|
+
var getIsArbitraryValue = (value, label, testValue) => {
|
|
2280
|
+
const result = arbitraryValueRegex.exec(value);
|
|
2281
|
+
if (result) {
|
|
2282
|
+
if (result[1]) {
|
|
2283
|
+
return typeof label === "string" ? result[1] === label : label.has(result[1]);
|
|
2284
|
+
}
|
|
2285
|
+
return testValue(result[2]);
|
|
2286
|
+
}
|
|
2287
|
+
return false;
|
|
2288
|
+
};
|
|
2289
|
+
var isLengthOnly = (value) => (
|
|
2290
|
+
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
2291
|
+
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
2292
|
+
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
2293
|
+
lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
|
|
2294
|
+
);
|
|
2295
|
+
var isNever = () => false;
|
|
2296
|
+
var isShadow = (value) => shadowRegex.test(value);
|
|
2297
|
+
var isImage = (value) => imageRegex.test(value);
|
|
2298
|
+
var getDefaultConfig = () => {
|
|
2299
|
+
const colors = fromTheme("colors");
|
|
2300
|
+
const spacing = fromTheme("spacing");
|
|
2301
|
+
const blur = fromTheme("blur");
|
|
2302
|
+
const brightness = fromTheme("brightness");
|
|
2303
|
+
const borderColor = fromTheme("borderColor");
|
|
2304
|
+
const borderRadius = fromTheme("borderRadius");
|
|
2305
|
+
const borderSpacing = fromTheme("borderSpacing");
|
|
2306
|
+
const borderWidth = fromTheme("borderWidth");
|
|
2307
|
+
const contrast = fromTheme("contrast");
|
|
2308
|
+
const grayscale = fromTheme("grayscale");
|
|
2309
|
+
const hueRotate = fromTheme("hueRotate");
|
|
2310
|
+
const invert = fromTheme("invert");
|
|
2311
|
+
const gap = fromTheme("gap");
|
|
2312
|
+
const gradientColorStops = fromTheme("gradientColorStops");
|
|
2313
|
+
const gradientColorStopPositions = fromTheme("gradientColorStopPositions");
|
|
2314
|
+
const inset = fromTheme("inset");
|
|
2315
|
+
const margin = fromTheme("margin");
|
|
2316
|
+
const opacity = fromTheme("opacity");
|
|
2317
|
+
const padding = fromTheme("padding");
|
|
2318
|
+
const saturate = fromTheme("saturate");
|
|
2319
|
+
const scale = fromTheme("scale");
|
|
2320
|
+
const sepia = fromTheme("sepia");
|
|
2321
|
+
const skew = fromTheme("skew");
|
|
2322
|
+
const space = fromTheme("space");
|
|
2323
|
+
const translate = fromTheme("translate");
|
|
2324
|
+
const getOverscroll = () => ["auto", "contain", "none"];
|
|
2325
|
+
const getOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
|
|
2326
|
+
const getSpacingWithAutoAndArbitrary = () => ["auto", isArbitraryValue, spacing];
|
|
2327
|
+
const getSpacingWithArbitrary = () => [isArbitraryValue, spacing];
|
|
2328
|
+
const getLengthWithEmptyAndArbitrary = () => ["", isLength, isArbitraryLength];
|
|
2329
|
+
const getNumberWithAutoAndArbitrary = () => ["auto", isNumber, isArbitraryValue];
|
|
2330
|
+
const getPositions = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"];
|
|
2331
|
+
const getLineStyles = () => ["solid", "dashed", "dotted", "double", "none"];
|
|
2332
|
+
const getBlendModes = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
|
|
2333
|
+
const getAlign = () => ["start", "end", "center", "between", "around", "evenly", "stretch"];
|
|
2334
|
+
const getZeroAndEmpty = () => ["", "0", isArbitraryValue];
|
|
2335
|
+
const getBreaks = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
|
|
2336
|
+
const getNumberAndArbitrary = () => [isNumber, isArbitraryValue];
|
|
2337
|
+
return {
|
|
2338
|
+
cacheSize: 500,
|
|
2339
|
+
separator: ":",
|
|
2340
|
+
theme: {
|
|
2341
|
+
colors: [isAny],
|
|
2342
|
+
spacing: [isLength, isArbitraryLength],
|
|
2343
|
+
blur: ["none", "", isTshirtSize, isArbitraryValue],
|
|
2344
|
+
brightness: getNumberAndArbitrary(),
|
|
2345
|
+
borderColor: [colors],
|
|
2346
|
+
borderRadius: ["none", "", "full", isTshirtSize, isArbitraryValue],
|
|
2347
|
+
borderSpacing: getSpacingWithArbitrary(),
|
|
2348
|
+
borderWidth: getLengthWithEmptyAndArbitrary(),
|
|
2349
|
+
contrast: getNumberAndArbitrary(),
|
|
2350
|
+
grayscale: getZeroAndEmpty(),
|
|
2351
|
+
hueRotate: getNumberAndArbitrary(),
|
|
2352
|
+
invert: getZeroAndEmpty(),
|
|
2353
|
+
gap: getSpacingWithArbitrary(),
|
|
2354
|
+
gradientColorStops: [colors],
|
|
2355
|
+
gradientColorStopPositions: [isPercent, isArbitraryLength],
|
|
2356
|
+
inset: getSpacingWithAutoAndArbitrary(),
|
|
2357
|
+
margin: getSpacingWithAutoAndArbitrary(),
|
|
2358
|
+
opacity: getNumberAndArbitrary(),
|
|
2359
|
+
padding: getSpacingWithArbitrary(),
|
|
2360
|
+
saturate: getNumberAndArbitrary(),
|
|
2361
|
+
scale: getNumberAndArbitrary(),
|
|
2362
|
+
sepia: getZeroAndEmpty(),
|
|
2363
|
+
skew: getNumberAndArbitrary(),
|
|
2364
|
+
space: getSpacingWithArbitrary(),
|
|
2365
|
+
translate: getSpacingWithArbitrary()
|
|
2366
|
+
},
|
|
2367
|
+
classGroups: {
|
|
2368
|
+
// Layout
|
|
2369
|
+
/**
|
|
2370
|
+
* Aspect Ratio
|
|
2371
|
+
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
2372
|
+
*/
|
|
2373
|
+
aspect: [{
|
|
2374
|
+
aspect: ["auto", "square", "video", isArbitraryValue]
|
|
2375
|
+
}],
|
|
2376
|
+
/**
|
|
2377
|
+
* Container
|
|
2378
|
+
* @see https://tailwindcss.com/docs/container
|
|
2379
|
+
*/
|
|
2380
|
+
container: ["container"],
|
|
2381
|
+
/**
|
|
2382
|
+
* Columns
|
|
2383
|
+
* @see https://tailwindcss.com/docs/columns
|
|
2384
|
+
*/
|
|
2385
|
+
columns: [{
|
|
2386
|
+
columns: [isTshirtSize]
|
|
2387
|
+
}],
|
|
2388
|
+
/**
|
|
2389
|
+
* Break After
|
|
2390
|
+
* @see https://tailwindcss.com/docs/break-after
|
|
2391
|
+
*/
|
|
2392
|
+
"break-after": [{
|
|
2393
|
+
"break-after": getBreaks()
|
|
2394
|
+
}],
|
|
2395
|
+
/**
|
|
2396
|
+
* Break Before
|
|
2397
|
+
* @see https://tailwindcss.com/docs/break-before
|
|
2398
|
+
*/
|
|
2399
|
+
"break-before": [{
|
|
2400
|
+
"break-before": getBreaks()
|
|
2401
|
+
}],
|
|
2402
|
+
/**
|
|
2403
|
+
* Break Inside
|
|
2404
|
+
* @see https://tailwindcss.com/docs/break-inside
|
|
2405
|
+
*/
|
|
2406
|
+
"break-inside": [{
|
|
2407
|
+
"break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
|
|
2408
|
+
}],
|
|
2409
|
+
/**
|
|
2410
|
+
* Box Decoration Break
|
|
2411
|
+
* @see https://tailwindcss.com/docs/box-decoration-break
|
|
2412
|
+
*/
|
|
2413
|
+
"box-decoration": [{
|
|
2414
|
+
"box-decoration": ["slice", "clone"]
|
|
2415
|
+
}],
|
|
2416
|
+
/**
|
|
2417
|
+
* Box Sizing
|
|
2418
|
+
* @see https://tailwindcss.com/docs/box-sizing
|
|
2419
|
+
*/
|
|
2420
|
+
box: [{
|
|
2421
|
+
box: ["border", "content"]
|
|
2422
|
+
}],
|
|
2423
|
+
/**
|
|
2424
|
+
* Display
|
|
2425
|
+
* @see https://tailwindcss.com/docs/display
|
|
2426
|
+
*/
|
|
2427
|
+
display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
|
|
2428
|
+
/**
|
|
2429
|
+
* Floats
|
|
2430
|
+
* @see https://tailwindcss.com/docs/float
|
|
2431
|
+
*/
|
|
2432
|
+
float: [{
|
|
2433
|
+
float: ["right", "left", "none", "start", "end"]
|
|
2434
|
+
}],
|
|
2435
|
+
/**
|
|
2436
|
+
* Clear
|
|
2437
|
+
* @see https://tailwindcss.com/docs/clear
|
|
2438
|
+
*/
|
|
2439
|
+
clear: [{
|
|
2440
|
+
clear: ["left", "right", "both", "none", "start", "end"]
|
|
2441
|
+
}],
|
|
2442
|
+
/**
|
|
2443
|
+
* Isolation
|
|
2444
|
+
* @see https://tailwindcss.com/docs/isolation
|
|
2445
|
+
*/
|
|
2446
|
+
isolation: ["isolate", "isolation-auto"],
|
|
2447
|
+
/**
|
|
2448
|
+
* Object Fit
|
|
2449
|
+
* @see https://tailwindcss.com/docs/object-fit
|
|
2450
|
+
*/
|
|
2451
|
+
"object-fit": [{
|
|
2452
|
+
object: ["contain", "cover", "fill", "none", "scale-down"]
|
|
2453
|
+
}],
|
|
2454
|
+
/**
|
|
2455
|
+
* Object Position
|
|
2456
|
+
* @see https://tailwindcss.com/docs/object-position
|
|
2457
|
+
*/
|
|
2458
|
+
"object-position": [{
|
|
2459
|
+
object: [...getPositions(), isArbitraryValue]
|
|
2460
|
+
}],
|
|
2461
|
+
/**
|
|
2462
|
+
* Overflow
|
|
2463
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
2464
|
+
*/
|
|
2465
|
+
overflow: [{
|
|
2466
|
+
overflow: getOverflow()
|
|
2467
|
+
}],
|
|
2468
|
+
/**
|
|
2469
|
+
* Overflow X
|
|
2470
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
2471
|
+
*/
|
|
2472
|
+
"overflow-x": [{
|
|
2473
|
+
"overflow-x": getOverflow()
|
|
2474
|
+
}],
|
|
2475
|
+
/**
|
|
2476
|
+
* Overflow Y
|
|
2477
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
2478
|
+
*/
|
|
2479
|
+
"overflow-y": [{
|
|
2480
|
+
"overflow-y": getOverflow()
|
|
2481
|
+
}],
|
|
2482
|
+
/**
|
|
2483
|
+
* Overscroll Behavior
|
|
2484
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2485
|
+
*/
|
|
2486
|
+
overscroll: [{
|
|
2487
|
+
overscroll: getOverscroll()
|
|
2488
|
+
}],
|
|
2489
|
+
/**
|
|
2490
|
+
* Overscroll Behavior X
|
|
2491
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2492
|
+
*/
|
|
2493
|
+
"overscroll-x": [{
|
|
2494
|
+
"overscroll-x": getOverscroll()
|
|
2495
|
+
}],
|
|
2496
|
+
/**
|
|
2497
|
+
* Overscroll Behavior Y
|
|
2498
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2499
|
+
*/
|
|
2500
|
+
"overscroll-y": [{
|
|
2501
|
+
"overscroll-y": getOverscroll()
|
|
2502
|
+
}],
|
|
2503
|
+
/**
|
|
2504
|
+
* Position
|
|
2505
|
+
* @see https://tailwindcss.com/docs/position
|
|
2506
|
+
*/
|
|
2507
|
+
position: ["static", "fixed", "absolute", "relative", "sticky"],
|
|
2508
|
+
/**
|
|
2509
|
+
* Top / Right / Bottom / Left
|
|
2510
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2511
|
+
*/
|
|
2512
|
+
inset: [{
|
|
2513
|
+
inset: [inset]
|
|
2514
|
+
}],
|
|
2515
|
+
/**
|
|
2516
|
+
* Right / Left
|
|
2517
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2518
|
+
*/
|
|
2519
|
+
"inset-x": [{
|
|
2520
|
+
"inset-x": [inset]
|
|
2521
|
+
}],
|
|
2522
|
+
/**
|
|
2523
|
+
* Top / Bottom
|
|
2524
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2525
|
+
*/
|
|
2526
|
+
"inset-y": [{
|
|
2527
|
+
"inset-y": [inset]
|
|
2528
|
+
}],
|
|
2529
|
+
/**
|
|
2530
|
+
* Start
|
|
2531
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2532
|
+
*/
|
|
2533
|
+
start: [{
|
|
2534
|
+
start: [inset]
|
|
2535
|
+
}],
|
|
2536
|
+
/**
|
|
2537
|
+
* End
|
|
2538
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2539
|
+
*/
|
|
2540
|
+
end: [{
|
|
2541
|
+
end: [inset]
|
|
2542
|
+
}],
|
|
2543
|
+
/**
|
|
2544
|
+
* Top
|
|
2545
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2546
|
+
*/
|
|
2547
|
+
top: [{
|
|
2548
|
+
top: [inset]
|
|
2549
|
+
}],
|
|
2550
|
+
/**
|
|
2551
|
+
* Right
|
|
2552
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2553
|
+
*/
|
|
2554
|
+
right: [{
|
|
2555
|
+
right: [inset]
|
|
2556
|
+
}],
|
|
2557
|
+
/**
|
|
2558
|
+
* Bottom
|
|
2559
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2560
|
+
*/
|
|
2561
|
+
bottom: [{
|
|
2562
|
+
bottom: [inset]
|
|
2563
|
+
}],
|
|
2564
|
+
/**
|
|
2565
|
+
* Left
|
|
2566
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2567
|
+
*/
|
|
2568
|
+
left: [{
|
|
2569
|
+
left: [inset]
|
|
2570
|
+
}],
|
|
2571
|
+
/**
|
|
2572
|
+
* Visibility
|
|
2573
|
+
* @see https://tailwindcss.com/docs/visibility
|
|
2574
|
+
*/
|
|
2575
|
+
visibility: ["visible", "invisible", "collapse"],
|
|
2576
|
+
/**
|
|
2577
|
+
* Z-Index
|
|
2578
|
+
* @see https://tailwindcss.com/docs/z-index
|
|
2579
|
+
*/
|
|
2580
|
+
z: [{
|
|
2581
|
+
z: ["auto", isInteger, isArbitraryValue]
|
|
2582
|
+
}],
|
|
2583
|
+
// Flexbox and Grid
|
|
2584
|
+
/**
|
|
2585
|
+
* Flex Basis
|
|
2586
|
+
* @see https://tailwindcss.com/docs/flex-basis
|
|
2587
|
+
*/
|
|
2588
|
+
basis: [{
|
|
2589
|
+
basis: getSpacingWithAutoAndArbitrary()
|
|
2590
|
+
}],
|
|
2591
|
+
/**
|
|
2592
|
+
* Flex Direction
|
|
2593
|
+
* @see https://tailwindcss.com/docs/flex-direction
|
|
2594
|
+
*/
|
|
2595
|
+
"flex-direction": [{
|
|
2596
|
+
flex: ["row", "row-reverse", "col", "col-reverse"]
|
|
2597
|
+
}],
|
|
2598
|
+
/**
|
|
2599
|
+
* Flex Wrap
|
|
2600
|
+
* @see https://tailwindcss.com/docs/flex-wrap
|
|
2601
|
+
*/
|
|
2602
|
+
"flex-wrap": [{
|
|
2603
|
+
flex: ["wrap", "wrap-reverse", "nowrap"]
|
|
2604
|
+
}],
|
|
2605
|
+
/**
|
|
2606
|
+
* Flex
|
|
2607
|
+
* @see https://tailwindcss.com/docs/flex
|
|
2608
|
+
*/
|
|
2609
|
+
flex: [{
|
|
2610
|
+
flex: ["1", "auto", "initial", "none", isArbitraryValue]
|
|
2611
|
+
}],
|
|
2612
|
+
/**
|
|
2613
|
+
* Flex Grow
|
|
2614
|
+
* @see https://tailwindcss.com/docs/flex-grow
|
|
2615
|
+
*/
|
|
2616
|
+
grow: [{
|
|
2617
|
+
grow: getZeroAndEmpty()
|
|
2618
|
+
}],
|
|
2619
|
+
/**
|
|
2620
|
+
* Flex Shrink
|
|
2621
|
+
* @see https://tailwindcss.com/docs/flex-shrink
|
|
2622
|
+
*/
|
|
2623
|
+
shrink: [{
|
|
2624
|
+
shrink: getZeroAndEmpty()
|
|
2625
|
+
}],
|
|
2626
|
+
/**
|
|
2627
|
+
* Order
|
|
2628
|
+
* @see https://tailwindcss.com/docs/order
|
|
2629
|
+
*/
|
|
2630
|
+
order: [{
|
|
2631
|
+
order: ["first", "last", "none", isInteger, isArbitraryValue]
|
|
2632
|
+
}],
|
|
2633
|
+
/**
|
|
2634
|
+
* Grid Template Columns
|
|
2635
|
+
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
2636
|
+
*/
|
|
2637
|
+
"grid-cols": [{
|
|
2638
|
+
"grid-cols": [isAny]
|
|
2639
|
+
}],
|
|
2640
|
+
/**
|
|
2641
|
+
* Grid Column Start / End
|
|
2642
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
2643
|
+
*/
|
|
2644
|
+
"col-start-end": [{
|
|
2645
|
+
col: ["auto", {
|
|
2646
|
+
span: ["full", isInteger, isArbitraryValue]
|
|
2647
|
+
}, isArbitraryValue]
|
|
2648
|
+
}],
|
|
2649
|
+
/**
|
|
2650
|
+
* Grid Column Start
|
|
2651
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
2652
|
+
*/
|
|
2653
|
+
"col-start": [{
|
|
2654
|
+
"col-start": getNumberWithAutoAndArbitrary()
|
|
2655
|
+
}],
|
|
2656
|
+
/**
|
|
2657
|
+
* Grid Column End
|
|
2658
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
2659
|
+
*/
|
|
2660
|
+
"col-end": [{
|
|
2661
|
+
"col-end": getNumberWithAutoAndArbitrary()
|
|
2662
|
+
}],
|
|
2663
|
+
/**
|
|
2664
|
+
* Grid Template Rows
|
|
2665
|
+
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
2666
|
+
*/
|
|
2667
|
+
"grid-rows": [{
|
|
2668
|
+
"grid-rows": [isAny]
|
|
2669
|
+
}],
|
|
2670
|
+
/**
|
|
2671
|
+
* Grid Row Start / End
|
|
2672
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
2673
|
+
*/
|
|
2674
|
+
"row-start-end": [{
|
|
2675
|
+
row: ["auto", {
|
|
2676
|
+
span: [isInteger, isArbitraryValue]
|
|
2677
|
+
}, isArbitraryValue]
|
|
2678
|
+
}],
|
|
2679
|
+
/**
|
|
2680
|
+
* Grid Row Start
|
|
2681
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
2682
|
+
*/
|
|
2683
|
+
"row-start": [{
|
|
2684
|
+
"row-start": getNumberWithAutoAndArbitrary()
|
|
2685
|
+
}],
|
|
2686
|
+
/**
|
|
2687
|
+
* Grid Row End
|
|
2688
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
2689
|
+
*/
|
|
2690
|
+
"row-end": [{
|
|
2691
|
+
"row-end": getNumberWithAutoAndArbitrary()
|
|
2692
|
+
}],
|
|
2693
|
+
/**
|
|
2694
|
+
* Grid Auto Flow
|
|
2695
|
+
* @see https://tailwindcss.com/docs/grid-auto-flow
|
|
2696
|
+
*/
|
|
2697
|
+
"grid-flow": [{
|
|
2698
|
+
"grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
|
|
2699
|
+
}],
|
|
2700
|
+
/**
|
|
2701
|
+
* Grid Auto Columns
|
|
2702
|
+
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2703
|
+
*/
|
|
2704
|
+
"auto-cols": [{
|
|
2705
|
+
"auto-cols": ["auto", "min", "max", "fr", isArbitraryValue]
|
|
2706
|
+
}],
|
|
2707
|
+
/**
|
|
2708
|
+
* Grid Auto Rows
|
|
2709
|
+
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2710
|
+
*/
|
|
2711
|
+
"auto-rows": [{
|
|
2712
|
+
"auto-rows": ["auto", "min", "max", "fr", isArbitraryValue]
|
|
2713
|
+
}],
|
|
2714
|
+
/**
|
|
2715
|
+
* Gap
|
|
2716
|
+
* @see https://tailwindcss.com/docs/gap
|
|
2717
|
+
*/
|
|
2718
|
+
gap: [{
|
|
2719
|
+
gap: [gap]
|
|
2720
|
+
}],
|
|
2721
|
+
/**
|
|
2722
|
+
* Gap X
|
|
2723
|
+
* @see https://tailwindcss.com/docs/gap
|
|
2724
|
+
*/
|
|
2725
|
+
"gap-x": [{
|
|
2726
|
+
"gap-x": [gap]
|
|
2727
|
+
}],
|
|
2728
|
+
/**
|
|
2729
|
+
* Gap Y
|
|
2730
|
+
* @see https://tailwindcss.com/docs/gap
|
|
2731
|
+
*/
|
|
2732
|
+
"gap-y": [{
|
|
2733
|
+
"gap-y": [gap]
|
|
2734
|
+
}],
|
|
2735
|
+
/**
|
|
2736
|
+
* Justify Content
|
|
2737
|
+
* @see https://tailwindcss.com/docs/justify-content
|
|
2738
|
+
*/
|
|
2739
|
+
"justify-content": [{
|
|
2740
|
+
justify: ["normal", ...getAlign()]
|
|
2741
|
+
}],
|
|
2742
|
+
/**
|
|
2743
|
+
* Justify Items
|
|
2744
|
+
* @see https://tailwindcss.com/docs/justify-items
|
|
2745
|
+
*/
|
|
2746
|
+
"justify-items": [{
|
|
2747
|
+
"justify-items": ["start", "end", "center", "stretch"]
|
|
2748
|
+
}],
|
|
2749
|
+
/**
|
|
2750
|
+
* Justify Self
|
|
2751
|
+
* @see https://tailwindcss.com/docs/justify-self
|
|
2752
|
+
*/
|
|
2753
|
+
"justify-self": [{
|
|
2754
|
+
"justify-self": ["auto", "start", "end", "center", "stretch"]
|
|
2755
|
+
}],
|
|
2756
|
+
/**
|
|
2757
|
+
* Align Content
|
|
2758
|
+
* @see https://tailwindcss.com/docs/align-content
|
|
2759
|
+
*/
|
|
2760
|
+
"align-content": [{
|
|
2761
|
+
content: ["normal", ...getAlign(), "baseline"]
|
|
2762
|
+
}],
|
|
2763
|
+
/**
|
|
2764
|
+
* Align Items
|
|
2765
|
+
* @see https://tailwindcss.com/docs/align-items
|
|
2766
|
+
*/
|
|
2767
|
+
"align-items": [{
|
|
2768
|
+
items: ["start", "end", "center", "baseline", "stretch"]
|
|
2769
|
+
}],
|
|
2770
|
+
/**
|
|
2771
|
+
* Align Self
|
|
2772
|
+
* @see https://tailwindcss.com/docs/align-self
|
|
2773
|
+
*/
|
|
2774
|
+
"align-self": [{
|
|
2775
|
+
self: ["auto", "start", "end", "center", "stretch", "baseline"]
|
|
2776
|
+
}],
|
|
2777
|
+
/**
|
|
2778
|
+
* Place Content
|
|
2779
|
+
* @see https://tailwindcss.com/docs/place-content
|
|
2780
|
+
*/
|
|
2781
|
+
"place-content": [{
|
|
2782
|
+
"place-content": [...getAlign(), "baseline"]
|
|
2783
|
+
}],
|
|
2784
|
+
/**
|
|
2785
|
+
* Place Items
|
|
2786
|
+
* @see https://tailwindcss.com/docs/place-items
|
|
2787
|
+
*/
|
|
2788
|
+
"place-items": [{
|
|
2789
|
+
"place-items": ["start", "end", "center", "baseline", "stretch"]
|
|
2790
|
+
}],
|
|
2791
|
+
/**
|
|
2792
|
+
* Place Self
|
|
2793
|
+
* @see https://tailwindcss.com/docs/place-self
|
|
2794
|
+
*/
|
|
2795
|
+
"place-self": [{
|
|
2796
|
+
"place-self": ["auto", "start", "end", "center", "stretch"]
|
|
2797
|
+
}],
|
|
2798
|
+
// Spacing
|
|
2799
|
+
/**
|
|
2800
|
+
* Padding
|
|
2801
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2802
|
+
*/
|
|
2803
|
+
p: [{
|
|
2804
|
+
p: [padding]
|
|
2805
|
+
}],
|
|
2806
|
+
/**
|
|
2807
|
+
* Padding X
|
|
2808
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2809
|
+
*/
|
|
2810
|
+
px: [{
|
|
2811
|
+
px: [padding]
|
|
2812
|
+
}],
|
|
2813
|
+
/**
|
|
2814
|
+
* Padding Y
|
|
2815
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2816
|
+
*/
|
|
2817
|
+
py: [{
|
|
2818
|
+
py: [padding]
|
|
2819
|
+
}],
|
|
2820
|
+
/**
|
|
2821
|
+
* Padding Start
|
|
2822
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2823
|
+
*/
|
|
2824
|
+
ps: [{
|
|
2825
|
+
ps: [padding]
|
|
2826
|
+
}],
|
|
2827
|
+
/**
|
|
2828
|
+
* Padding End
|
|
2829
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2830
|
+
*/
|
|
2831
|
+
pe: [{
|
|
2832
|
+
pe: [padding]
|
|
2833
|
+
}],
|
|
2834
|
+
/**
|
|
2835
|
+
* Padding Top
|
|
2836
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2837
|
+
*/
|
|
2838
|
+
pt: [{
|
|
2839
|
+
pt: [padding]
|
|
2840
|
+
}],
|
|
2841
|
+
/**
|
|
2842
|
+
* Padding Right
|
|
2843
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2844
|
+
*/
|
|
2845
|
+
pr: [{
|
|
2846
|
+
pr: [padding]
|
|
2847
|
+
}],
|
|
2848
|
+
/**
|
|
2849
|
+
* Padding Bottom
|
|
2850
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2851
|
+
*/
|
|
2852
|
+
pb: [{
|
|
2853
|
+
pb: [padding]
|
|
2854
|
+
}],
|
|
2855
|
+
/**
|
|
2856
|
+
* Padding Left
|
|
2857
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2858
|
+
*/
|
|
2859
|
+
pl: [{
|
|
2860
|
+
pl: [padding]
|
|
2861
|
+
}],
|
|
2862
|
+
/**
|
|
2863
|
+
* Margin
|
|
2864
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2865
|
+
*/
|
|
2866
|
+
m: [{
|
|
2867
|
+
m: [margin]
|
|
2868
|
+
}],
|
|
2869
|
+
/**
|
|
2870
|
+
* Margin X
|
|
2871
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2872
|
+
*/
|
|
2873
|
+
mx: [{
|
|
2874
|
+
mx: [margin]
|
|
2875
|
+
}],
|
|
2876
|
+
/**
|
|
2877
|
+
* Margin Y
|
|
2878
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2879
|
+
*/
|
|
2880
|
+
my: [{
|
|
2881
|
+
my: [margin]
|
|
2882
|
+
}],
|
|
2883
|
+
/**
|
|
2884
|
+
* Margin Start
|
|
2885
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2886
|
+
*/
|
|
2887
|
+
ms: [{
|
|
2888
|
+
ms: [margin]
|
|
2889
|
+
}],
|
|
2890
|
+
/**
|
|
2891
|
+
* Margin End
|
|
2892
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2893
|
+
*/
|
|
2894
|
+
me: [{
|
|
2895
|
+
me: [margin]
|
|
2896
|
+
}],
|
|
2897
|
+
/**
|
|
2898
|
+
* Margin Top
|
|
2899
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2900
|
+
*/
|
|
2901
|
+
mt: [{
|
|
2902
|
+
mt: [margin]
|
|
2903
|
+
}],
|
|
2904
|
+
/**
|
|
2905
|
+
* Margin Right
|
|
2906
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2907
|
+
*/
|
|
2908
|
+
mr: [{
|
|
2909
|
+
mr: [margin]
|
|
2910
|
+
}],
|
|
2911
|
+
/**
|
|
2912
|
+
* Margin Bottom
|
|
2913
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2914
|
+
*/
|
|
2915
|
+
mb: [{
|
|
2916
|
+
mb: [margin]
|
|
2917
|
+
}],
|
|
2918
|
+
/**
|
|
2919
|
+
* Margin Left
|
|
2920
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2921
|
+
*/
|
|
2922
|
+
ml: [{
|
|
2923
|
+
ml: [margin]
|
|
2924
|
+
}],
|
|
2925
|
+
/**
|
|
2926
|
+
* Space Between X
|
|
2927
|
+
* @see https://tailwindcss.com/docs/space
|
|
2928
|
+
*/
|
|
2929
|
+
"space-x": [{
|
|
2930
|
+
"space-x": [space]
|
|
2931
|
+
}],
|
|
2932
|
+
/**
|
|
2933
|
+
* Space Between X Reverse
|
|
2934
|
+
* @see https://tailwindcss.com/docs/space
|
|
2935
|
+
*/
|
|
2936
|
+
"space-x-reverse": ["space-x-reverse"],
|
|
2937
|
+
/**
|
|
2938
|
+
* Space Between Y
|
|
2939
|
+
* @see https://tailwindcss.com/docs/space
|
|
2940
|
+
*/
|
|
2941
|
+
"space-y": [{
|
|
2942
|
+
"space-y": [space]
|
|
2943
|
+
}],
|
|
2944
|
+
/**
|
|
2945
|
+
* Space Between Y Reverse
|
|
2946
|
+
* @see https://tailwindcss.com/docs/space
|
|
2947
|
+
*/
|
|
2948
|
+
"space-y-reverse": ["space-y-reverse"],
|
|
2949
|
+
// Sizing
|
|
2950
|
+
/**
|
|
2951
|
+
* Width
|
|
2952
|
+
* @see https://tailwindcss.com/docs/width
|
|
2953
|
+
*/
|
|
2954
|
+
w: [{
|
|
2955
|
+
w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", isArbitraryValue, spacing]
|
|
2956
|
+
}],
|
|
2957
|
+
/**
|
|
2958
|
+
* Min-Width
|
|
2959
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
2960
|
+
*/
|
|
2961
|
+
"min-w": [{
|
|
2962
|
+
"min-w": [isArbitraryValue, spacing, "min", "max", "fit"]
|
|
2963
|
+
}],
|
|
2964
|
+
/**
|
|
2965
|
+
* Max-Width
|
|
2966
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
2967
|
+
*/
|
|
2968
|
+
"max-w": [{
|
|
2969
|
+
"max-w": [isArbitraryValue, spacing, "none", "full", "min", "max", "fit", "prose", {
|
|
2970
|
+
screen: [isTshirtSize]
|
|
2971
|
+
}, isTshirtSize]
|
|
2972
|
+
}],
|
|
2973
|
+
/**
|
|
2974
|
+
* Height
|
|
2975
|
+
* @see https://tailwindcss.com/docs/height
|
|
2976
|
+
*/
|
|
2977
|
+
h: [{
|
|
2978
|
+
h: [isArbitraryValue, spacing, "auto", "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
2979
|
+
}],
|
|
2980
|
+
/**
|
|
2981
|
+
* Min-Height
|
|
2982
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
2983
|
+
*/
|
|
2984
|
+
"min-h": [{
|
|
2985
|
+
"min-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
2986
|
+
}],
|
|
2987
|
+
/**
|
|
2988
|
+
* Max-Height
|
|
2989
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
2990
|
+
*/
|
|
2991
|
+
"max-h": [{
|
|
2992
|
+
"max-h": [isArbitraryValue, spacing, "min", "max", "fit", "svh", "lvh", "dvh"]
|
|
2993
|
+
}],
|
|
2994
|
+
/**
|
|
2995
|
+
* Size
|
|
2996
|
+
* @see https://tailwindcss.com/docs/size
|
|
2997
|
+
*/
|
|
2998
|
+
size: [{
|
|
2999
|
+
size: [isArbitraryValue, spacing, "auto", "min", "max", "fit"]
|
|
3000
|
+
}],
|
|
3001
|
+
// Typography
|
|
3002
|
+
/**
|
|
3003
|
+
* Font Size
|
|
3004
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
3005
|
+
*/
|
|
3006
|
+
"font-size": [{
|
|
3007
|
+
text: ["base", isTshirtSize, isArbitraryLength]
|
|
3008
|
+
}],
|
|
3009
|
+
/**
|
|
3010
|
+
* Font Smoothing
|
|
3011
|
+
* @see https://tailwindcss.com/docs/font-smoothing
|
|
3012
|
+
*/
|
|
3013
|
+
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
3014
|
+
/**
|
|
3015
|
+
* Font Style
|
|
3016
|
+
* @see https://tailwindcss.com/docs/font-style
|
|
3017
|
+
*/
|
|
3018
|
+
"font-style": ["italic", "not-italic"],
|
|
3019
|
+
/**
|
|
3020
|
+
* Font Weight
|
|
3021
|
+
* @see https://tailwindcss.com/docs/font-weight
|
|
3022
|
+
*/
|
|
3023
|
+
"font-weight": [{
|
|
3024
|
+
font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", isArbitraryNumber]
|
|
3025
|
+
}],
|
|
3026
|
+
/**
|
|
3027
|
+
* Font Family
|
|
3028
|
+
* @see https://tailwindcss.com/docs/font-family
|
|
3029
|
+
*/
|
|
3030
|
+
"font-family": [{
|
|
3031
|
+
font: [isAny]
|
|
3032
|
+
}],
|
|
3033
|
+
/**
|
|
3034
|
+
* Font Variant Numeric
|
|
3035
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3036
|
+
*/
|
|
3037
|
+
"fvn-normal": ["normal-nums"],
|
|
3038
|
+
/**
|
|
3039
|
+
* Font Variant Numeric
|
|
3040
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3041
|
+
*/
|
|
3042
|
+
"fvn-ordinal": ["ordinal"],
|
|
3043
|
+
/**
|
|
3044
|
+
* Font Variant Numeric
|
|
3045
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3046
|
+
*/
|
|
3047
|
+
"fvn-slashed-zero": ["slashed-zero"],
|
|
3048
|
+
/**
|
|
3049
|
+
* Font Variant Numeric
|
|
3050
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3051
|
+
*/
|
|
3052
|
+
"fvn-figure": ["lining-nums", "oldstyle-nums"],
|
|
3053
|
+
/**
|
|
3054
|
+
* Font Variant Numeric
|
|
3055
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3056
|
+
*/
|
|
3057
|
+
"fvn-spacing": ["proportional-nums", "tabular-nums"],
|
|
3058
|
+
/**
|
|
3059
|
+
* Font Variant Numeric
|
|
3060
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3061
|
+
*/
|
|
3062
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
3063
|
+
/**
|
|
3064
|
+
* Letter Spacing
|
|
3065
|
+
* @see https://tailwindcss.com/docs/letter-spacing
|
|
3066
|
+
*/
|
|
3067
|
+
tracking: [{
|
|
3068
|
+
tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", isArbitraryValue]
|
|
3069
|
+
}],
|
|
3070
|
+
/**
|
|
3071
|
+
* Line Clamp
|
|
3072
|
+
* @see https://tailwindcss.com/docs/line-clamp
|
|
3073
|
+
*/
|
|
3074
|
+
"line-clamp": [{
|
|
3075
|
+
"line-clamp": ["none", isNumber, isArbitraryNumber]
|
|
3076
|
+
}],
|
|
3077
|
+
/**
|
|
3078
|
+
* Line Height
|
|
3079
|
+
* @see https://tailwindcss.com/docs/line-height
|
|
3080
|
+
*/
|
|
3081
|
+
leading: [{
|
|
3082
|
+
leading: ["none", "tight", "snug", "normal", "relaxed", "loose", isLength, isArbitraryValue]
|
|
3083
|
+
}],
|
|
3084
|
+
/**
|
|
3085
|
+
* List Style Image
|
|
3086
|
+
* @see https://tailwindcss.com/docs/list-style-image
|
|
3087
|
+
*/
|
|
3088
|
+
"list-image": [{
|
|
3089
|
+
"list-image": ["none", isArbitraryValue]
|
|
3090
|
+
}],
|
|
3091
|
+
/**
|
|
3092
|
+
* List Style Type
|
|
3093
|
+
* @see https://tailwindcss.com/docs/list-style-type
|
|
3094
|
+
*/
|
|
3095
|
+
"list-style-type": [{
|
|
3096
|
+
list: ["none", "disc", "decimal", isArbitraryValue]
|
|
3097
|
+
}],
|
|
3098
|
+
/**
|
|
3099
|
+
* List Style Position
|
|
3100
|
+
* @see https://tailwindcss.com/docs/list-style-position
|
|
3101
|
+
*/
|
|
3102
|
+
"list-style-position": [{
|
|
3103
|
+
list: ["inside", "outside"]
|
|
3104
|
+
}],
|
|
3105
|
+
/**
|
|
3106
|
+
* Placeholder Color
|
|
3107
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
3108
|
+
* @see https://tailwindcss.com/docs/placeholder-color
|
|
3109
|
+
*/
|
|
3110
|
+
"placeholder-color": [{
|
|
3111
|
+
placeholder: [colors]
|
|
3112
|
+
}],
|
|
3113
|
+
/**
|
|
3114
|
+
* Placeholder Opacity
|
|
3115
|
+
* @see https://tailwindcss.com/docs/placeholder-opacity
|
|
3116
|
+
*/
|
|
3117
|
+
"placeholder-opacity": [{
|
|
3118
|
+
"placeholder-opacity": [opacity]
|
|
3119
|
+
}],
|
|
3120
|
+
/**
|
|
3121
|
+
* Text Alignment
|
|
3122
|
+
* @see https://tailwindcss.com/docs/text-align
|
|
3123
|
+
*/
|
|
3124
|
+
"text-alignment": [{
|
|
3125
|
+
text: ["left", "center", "right", "justify", "start", "end"]
|
|
3126
|
+
}],
|
|
3127
|
+
/**
|
|
3128
|
+
* Text Color
|
|
3129
|
+
* @see https://tailwindcss.com/docs/text-color
|
|
3130
|
+
*/
|
|
3131
|
+
"text-color": [{
|
|
3132
|
+
text: [colors]
|
|
3133
|
+
}],
|
|
3134
|
+
/**
|
|
3135
|
+
* Text Opacity
|
|
3136
|
+
* @see https://tailwindcss.com/docs/text-opacity
|
|
3137
|
+
*/
|
|
3138
|
+
"text-opacity": [{
|
|
3139
|
+
"text-opacity": [opacity]
|
|
3140
|
+
}],
|
|
3141
|
+
/**
|
|
3142
|
+
* Text Decoration
|
|
3143
|
+
* @see https://tailwindcss.com/docs/text-decoration
|
|
3144
|
+
*/
|
|
3145
|
+
"text-decoration": ["underline", "overline", "line-through", "no-underline"],
|
|
3146
|
+
/**
|
|
3147
|
+
* Text Decoration Style
|
|
3148
|
+
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
3149
|
+
*/
|
|
3150
|
+
"text-decoration-style": [{
|
|
3151
|
+
decoration: [...getLineStyles(), "wavy"]
|
|
3152
|
+
}],
|
|
3153
|
+
/**
|
|
3154
|
+
* Text Decoration Thickness
|
|
3155
|
+
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
3156
|
+
*/
|
|
3157
|
+
"text-decoration-thickness": [{
|
|
3158
|
+
decoration: ["auto", "from-font", isLength, isArbitraryLength]
|
|
3159
|
+
}],
|
|
3160
|
+
/**
|
|
3161
|
+
* Text Underline Offset
|
|
3162
|
+
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3163
|
+
*/
|
|
3164
|
+
"underline-offset": [{
|
|
3165
|
+
"underline-offset": ["auto", isLength, isArbitraryValue]
|
|
3166
|
+
}],
|
|
3167
|
+
/**
|
|
3168
|
+
* Text Decoration Color
|
|
3169
|
+
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
3170
|
+
*/
|
|
3171
|
+
"text-decoration-color": [{
|
|
3172
|
+
decoration: [colors]
|
|
3173
|
+
}],
|
|
3174
|
+
/**
|
|
3175
|
+
* Text Transform
|
|
3176
|
+
* @see https://tailwindcss.com/docs/text-transform
|
|
3177
|
+
*/
|
|
3178
|
+
"text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
|
|
3179
|
+
/**
|
|
3180
|
+
* Text Overflow
|
|
3181
|
+
* @see https://tailwindcss.com/docs/text-overflow
|
|
3182
|
+
*/
|
|
3183
|
+
"text-overflow": ["truncate", "text-ellipsis", "text-clip"],
|
|
3184
|
+
/**
|
|
3185
|
+
* Text Wrap
|
|
3186
|
+
* @see https://tailwindcss.com/docs/text-wrap
|
|
3187
|
+
*/
|
|
3188
|
+
"text-wrap": [{
|
|
3189
|
+
text: ["wrap", "nowrap", "balance", "pretty"]
|
|
3190
|
+
}],
|
|
3191
|
+
/**
|
|
3192
|
+
* Text Indent
|
|
3193
|
+
* @see https://tailwindcss.com/docs/text-indent
|
|
3194
|
+
*/
|
|
3195
|
+
indent: [{
|
|
3196
|
+
indent: getSpacingWithArbitrary()
|
|
3197
|
+
}],
|
|
3198
|
+
/**
|
|
3199
|
+
* Vertical Alignment
|
|
3200
|
+
* @see https://tailwindcss.com/docs/vertical-align
|
|
3201
|
+
*/
|
|
3202
|
+
"vertical-align": [{
|
|
3203
|
+
align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryValue]
|
|
3204
|
+
}],
|
|
3205
|
+
/**
|
|
3206
|
+
* Whitespace
|
|
3207
|
+
* @see https://tailwindcss.com/docs/whitespace
|
|
3208
|
+
*/
|
|
3209
|
+
whitespace: [{
|
|
3210
|
+
whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
|
|
3211
|
+
}],
|
|
3212
|
+
/**
|
|
3213
|
+
* Word Break
|
|
3214
|
+
* @see https://tailwindcss.com/docs/word-break
|
|
3215
|
+
*/
|
|
3216
|
+
break: [{
|
|
3217
|
+
break: ["normal", "words", "all", "keep"]
|
|
3218
|
+
}],
|
|
3219
|
+
/**
|
|
3220
|
+
* Hyphens
|
|
3221
|
+
* @see https://tailwindcss.com/docs/hyphens
|
|
3222
|
+
*/
|
|
3223
|
+
hyphens: [{
|
|
3224
|
+
hyphens: ["none", "manual", "auto"]
|
|
3225
|
+
}],
|
|
3226
|
+
/**
|
|
3227
|
+
* Content
|
|
3228
|
+
* @see https://tailwindcss.com/docs/content
|
|
3229
|
+
*/
|
|
3230
|
+
content: [{
|
|
3231
|
+
content: ["none", isArbitraryValue]
|
|
3232
|
+
}],
|
|
3233
|
+
// Backgrounds
|
|
3234
|
+
/**
|
|
3235
|
+
* Background Attachment
|
|
3236
|
+
* @see https://tailwindcss.com/docs/background-attachment
|
|
3237
|
+
*/
|
|
3238
|
+
"bg-attachment": [{
|
|
3239
|
+
bg: ["fixed", "local", "scroll"]
|
|
3240
|
+
}],
|
|
3241
|
+
/**
|
|
3242
|
+
* Background Clip
|
|
3243
|
+
* @see https://tailwindcss.com/docs/background-clip
|
|
3244
|
+
*/
|
|
3245
|
+
"bg-clip": [{
|
|
3246
|
+
"bg-clip": ["border", "padding", "content", "text"]
|
|
3247
|
+
}],
|
|
3248
|
+
/**
|
|
3249
|
+
* Background Opacity
|
|
3250
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
3251
|
+
* @see https://tailwindcss.com/docs/background-opacity
|
|
3252
|
+
*/
|
|
3253
|
+
"bg-opacity": [{
|
|
3254
|
+
"bg-opacity": [opacity]
|
|
3255
|
+
}],
|
|
3256
|
+
/**
|
|
3257
|
+
* Background Origin
|
|
3258
|
+
* @see https://tailwindcss.com/docs/background-origin
|
|
3259
|
+
*/
|
|
3260
|
+
"bg-origin": [{
|
|
3261
|
+
"bg-origin": ["border", "padding", "content"]
|
|
3262
|
+
}],
|
|
3263
|
+
/**
|
|
3264
|
+
* Background Position
|
|
3265
|
+
* @see https://tailwindcss.com/docs/background-position
|
|
3266
|
+
*/
|
|
3267
|
+
"bg-position": [{
|
|
3268
|
+
bg: [...getPositions(), isArbitraryPosition]
|
|
3269
|
+
}],
|
|
3270
|
+
/**
|
|
3271
|
+
* Background Repeat
|
|
3272
|
+
* @see https://tailwindcss.com/docs/background-repeat
|
|
3273
|
+
*/
|
|
3274
|
+
"bg-repeat": [{
|
|
3275
|
+
bg: ["no-repeat", {
|
|
3276
|
+
repeat: ["", "x", "y", "round", "space"]
|
|
3277
|
+
}]
|
|
3278
|
+
}],
|
|
3279
|
+
/**
|
|
3280
|
+
* Background Size
|
|
3281
|
+
* @see https://tailwindcss.com/docs/background-size
|
|
3282
|
+
*/
|
|
3283
|
+
"bg-size": [{
|
|
3284
|
+
bg: ["auto", "cover", "contain", isArbitrarySize]
|
|
3285
|
+
}],
|
|
3286
|
+
/**
|
|
3287
|
+
* Background Image
|
|
3288
|
+
* @see https://tailwindcss.com/docs/background-image
|
|
3289
|
+
*/
|
|
3290
|
+
"bg-image": [{
|
|
3291
|
+
bg: ["none", {
|
|
3292
|
+
"gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
|
|
3293
|
+
}, isArbitraryImage]
|
|
3294
|
+
}],
|
|
3295
|
+
/**
|
|
3296
|
+
* Background Color
|
|
3297
|
+
* @see https://tailwindcss.com/docs/background-color
|
|
3298
|
+
*/
|
|
3299
|
+
"bg-color": [{
|
|
3300
|
+
bg: [colors]
|
|
3301
|
+
}],
|
|
3302
|
+
/**
|
|
3303
|
+
* Gradient Color Stops From Position
|
|
3304
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3305
|
+
*/
|
|
3306
|
+
"gradient-from-pos": [{
|
|
3307
|
+
from: [gradientColorStopPositions]
|
|
3308
|
+
}],
|
|
3309
|
+
/**
|
|
3310
|
+
* Gradient Color Stops Via Position
|
|
3311
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3312
|
+
*/
|
|
3313
|
+
"gradient-via-pos": [{
|
|
3314
|
+
via: [gradientColorStopPositions]
|
|
3315
|
+
}],
|
|
3316
|
+
/**
|
|
3317
|
+
* Gradient Color Stops To Position
|
|
3318
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3319
|
+
*/
|
|
3320
|
+
"gradient-to-pos": [{
|
|
3321
|
+
to: [gradientColorStopPositions]
|
|
3322
|
+
}],
|
|
3323
|
+
/**
|
|
3324
|
+
* Gradient Color Stops From
|
|
3325
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3326
|
+
*/
|
|
3327
|
+
"gradient-from": [{
|
|
3328
|
+
from: [gradientColorStops]
|
|
3329
|
+
}],
|
|
3330
|
+
/**
|
|
3331
|
+
* Gradient Color Stops Via
|
|
3332
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3333
|
+
*/
|
|
3334
|
+
"gradient-via": [{
|
|
3335
|
+
via: [gradientColorStops]
|
|
3336
|
+
}],
|
|
3337
|
+
/**
|
|
3338
|
+
* Gradient Color Stops To
|
|
3339
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3340
|
+
*/
|
|
3341
|
+
"gradient-to": [{
|
|
3342
|
+
to: [gradientColorStops]
|
|
3343
|
+
}],
|
|
3344
|
+
// Borders
|
|
3345
|
+
/**
|
|
3346
|
+
* Border Radius
|
|
3347
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3348
|
+
*/
|
|
3349
|
+
rounded: [{
|
|
3350
|
+
rounded: [borderRadius]
|
|
3351
|
+
}],
|
|
3352
|
+
/**
|
|
3353
|
+
* Border Radius Start
|
|
3354
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3355
|
+
*/
|
|
3356
|
+
"rounded-s": [{
|
|
3357
|
+
"rounded-s": [borderRadius]
|
|
3358
|
+
}],
|
|
3359
|
+
/**
|
|
3360
|
+
* Border Radius End
|
|
3361
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3362
|
+
*/
|
|
3363
|
+
"rounded-e": [{
|
|
3364
|
+
"rounded-e": [borderRadius]
|
|
3365
|
+
}],
|
|
3366
|
+
/**
|
|
3367
|
+
* Border Radius Top
|
|
3368
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3369
|
+
*/
|
|
3370
|
+
"rounded-t": [{
|
|
3371
|
+
"rounded-t": [borderRadius]
|
|
3372
|
+
}],
|
|
3373
|
+
/**
|
|
3374
|
+
* Border Radius Right
|
|
3375
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3376
|
+
*/
|
|
3377
|
+
"rounded-r": [{
|
|
3378
|
+
"rounded-r": [borderRadius]
|
|
3379
|
+
}],
|
|
3380
|
+
/**
|
|
3381
|
+
* Border Radius Bottom
|
|
3382
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3383
|
+
*/
|
|
3384
|
+
"rounded-b": [{
|
|
3385
|
+
"rounded-b": [borderRadius]
|
|
3386
|
+
}],
|
|
3387
|
+
/**
|
|
3388
|
+
* Border Radius Left
|
|
3389
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3390
|
+
*/
|
|
3391
|
+
"rounded-l": [{
|
|
3392
|
+
"rounded-l": [borderRadius]
|
|
3393
|
+
}],
|
|
3394
|
+
/**
|
|
3395
|
+
* Border Radius Start Start
|
|
3396
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3397
|
+
*/
|
|
3398
|
+
"rounded-ss": [{
|
|
3399
|
+
"rounded-ss": [borderRadius]
|
|
3400
|
+
}],
|
|
3401
|
+
/**
|
|
3402
|
+
* Border Radius Start End
|
|
3403
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3404
|
+
*/
|
|
3405
|
+
"rounded-se": [{
|
|
3406
|
+
"rounded-se": [borderRadius]
|
|
3407
|
+
}],
|
|
3408
|
+
/**
|
|
3409
|
+
* Border Radius End End
|
|
3410
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3411
|
+
*/
|
|
3412
|
+
"rounded-ee": [{
|
|
3413
|
+
"rounded-ee": [borderRadius]
|
|
3414
|
+
}],
|
|
3415
|
+
/**
|
|
3416
|
+
* Border Radius End Start
|
|
3417
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3418
|
+
*/
|
|
3419
|
+
"rounded-es": [{
|
|
3420
|
+
"rounded-es": [borderRadius]
|
|
3421
|
+
}],
|
|
3422
|
+
/**
|
|
3423
|
+
* Border Radius Top Left
|
|
3424
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3425
|
+
*/
|
|
3426
|
+
"rounded-tl": [{
|
|
3427
|
+
"rounded-tl": [borderRadius]
|
|
3428
|
+
}],
|
|
3429
|
+
/**
|
|
3430
|
+
* Border Radius Top Right
|
|
3431
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3432
|
+
*/
|
|
3433
|
+
"rounded-tr": [{
|
|
3434
|
+
"rounded-tr": [borderRadius]
|
|
3435
|
+
}],
|
|
3436
|
+
/**
|
|
3437
|
+
* Border Radius Bottom Right
|
|
3438
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3439
|
+
*/
|
|
3440
|
+
"rounded-br": [{
|
|
3441
|
+
"rounded-br": [borderRadius]
|
|
3442
|
+
}],
|
|
3443
|
+
/**
|
|
3444
|
+
* Border Radius Bottom Left
|
|
3445
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3446
|
+
*/
|
|
3447
|
+
"rounded-bl": [{
|
|
3448
|
+
"rounded-bl": [borderRadius]
|
|
3449
|
+
}],
|
|
3450
|
+
/**
|
|
3451
|
+
* Border Width
|
|
3452
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3453
|
+
*/
|
|
3454
|
+
"border-w": [{
|
|
3455
|
+
border: [borderWidth]
|
|
3456
|
+
}],
|
|
3457
|
+
/**
|
|
3458
|
+
* Border Width X
|
|
3459
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3460
|
+
*/
|
|
3461
|
+
"border-w-x": [{
|
|
3462
|
+
"border-x": [borderWidth]
|
|
3463
|
+
}],
|
|
3464
|
+
/**
|
|
3465
|
+
* Border Width Y
|
|
3466
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3467
|
+
*/
|
|
3468
|
+
"border-w-y": [{
|
|
3469
|
+
"border-y": [borderWidth]
|
|
3470
|
+
}],
|
|
3471
|
+
/**
|
|
3472
|
+
* Border Width Start
|
|
3473
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3474
|
+
*/
|
|
3475
|
+
"border-w-s": [{
|
|
3476
|
+
"border-s": [borderWidth]
|
|
3477
|
+
}],
|
|
3478
|
+
/**
|
|
3479
|
+
* Border Width End
|
|
3480
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3481
|
+
*/
|
|
3482
|
+
"border-w-e": [{
|
|
3483
|
+
"border-e": [borderWidth]
|
|
3484
|
+
}],
|
|
3485
|
+
/**
|
|
3486
|
+
* Border Width Top
|
|
3487
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3488
|
+
*/
|
|
3489
|
+
"border-w-t": [{
|
|
3490
|
+
"border-t": [borderWidth]
|
|
3491
|
+
}],
|
|
3492
|
+
/**
|
|
3493
|
+
* Border Width Right
|
|
3494
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3495
|
+
*/
|
|
3496
|
+
"border-w-r": [{
|
|
3497
|
+
"border-r": [borderWidth]
|
|
3498
|
+
}],
|
|
3499
|
+
/**
|
|
3500
|
+
* Border Width Bottom
|
|
3501
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3502
|
+
*/
|
|
3503
|
+
"border-w-b": [{
|
|
3504
|
+
"border-b": [borderWidth]
|
|
3505
|
+
}],
|
|
3506
|
+
/**
|
|
3507
|
+
* Border Width Left
|
|
3508
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3509
|
+
*/
|
|
3510
|
+
"border-w-l": [{
|
|
3511
|
+
"border-l": [borderWidth]
|
|
3512
|
+
}],
|
|
3513
|
+
/**
|
|
3514
|
+
* Border Opacity
|
|
3515
|
+
* @see https://tailwindcss.com/docs/border-opacity
|
|
3516
|
+
*/
|
|
3517
|
+
"border-opacity": [{
|
|
3518
|
+
"border-opacity": [opacity]
|
|
3519
|
+
}],
|
|
3520
|
+
/**
|
|
3521
|
+
* Border Style
|
|
3522
|
+
* @see https://tailwindcss.com/docs/border-style
|
|
3523
|
+
*/
|
|
3524
|
+
"border-style": [{
|
|
3525
|
+
border: [...getLineStyles(), "hidden"]
|
|
3526
|
+
}],
|
|
3527
|
+
/**
|
|
3528
|
+
* Divide Width X
|
|
3529
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
3530
|
+
*/
|
|
3531
|
+
"divide-x": [{
|
|
3532
|
+
"divide-x": [borderWidth]
|
|
3533
|
+
}],
|
|
3534
|
+
/**
|
|
3535
|
+
* Divide Width X Reverse
|
|
3536
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
3537
|
+
*/
|
|
3538
|
+
"divide-x-reverse": ["divide-x-reverse"],
|
|
3539
|
+
/**
|
|
3540
|
+
* Divide Width Y
|
|
3541
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
3542
|
+
*/
|
|
3543
|
+
"divide-y": [{
|
|
3544
|
+
"divide-y": [borderWidth]
|
|
3545
|
+
}],
|
|
3546
|
+
/**
|
|
3547
|
+
* Divide Width Y Reverse
|
|
3548
|
+
* @see https://tailwindcss.com/docs/divide-width
|
|
3549
|
+
*/
|
|
3550
|
+
"divide-y-reverse": ["divide-y-reverse"],
|
|
3551
|
+
/**
|
|
3552
|
+
* Divide Opacity
|
|
3553
|
+
* @see https://tailwindcss.com/docs/divide-opacity
|
|
3554
|
+
*/
|
|
3555
|
+
"divide-opacity": [{
|
|
3556
|
+
"divide-opacity": [opacity]
|
|
3557
|
+
}],
|
|
3558
|
+
/**
|
|
3559
|
+
* Divide Style
|
|
3560
|
+
* @see https://tailwindcss.com/docs/divide-style
|
|
3561
|
+
*/
|
|
3562
|
+
"divide-style": [{
|
|
3563
|
+
divide: getLineStyles()
|
|
3564
|
+
}],
|
|
3565
|
+
/**
|
|
3566
|
+
* Border Color
|
|
3567
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3568
|
+
*/
|
|
3569
|
+
"border-color": [{
|
|
3570
|
+
border: [borderColor]
|
|
3571
|
+
}],
|
|
3572
|
+
/**
|
|
3573
|
+
* Border Color X
|
|
3574
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3575
|
+
*/
|
|
3576
|
+
"border-color-x": [{
|
|
3577
|
+
"border-x": [borderColor]
|
|
3578
|
+
}],
|
|
3579
|
+
/**
|
|
3580
|
+
* Border Color Y
|
|
3581
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3582
|
+
*/
|
|
3583
|
+
"border-color-y": [{
|
|
3584
|
+
"border-y": [borderColor]
|
|
3585
|
+
}],
|
|
3586
|
+
/**
|
|
3587
|
+
* Border Color S
|
|
3588
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3589
|
+
*/
|
|
3590
|
+
"border-color-s": [{
|
|
3591
|
+
"border-s": [borderColor]
|
|
3592
|
+
}],
|
|
3593
|
+
/**
|
|
3594
|
+
* Border Color E
|
|
3595
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3596
|
+
*/
|
|
3597
|
+
"border-color-e": [{
|
|
3598
|
+
"border-e": [borderColor]
|
|
3599
|
+
}],
|
|
3600
|
+
/**
|
|
3601
|
+
* Border Color Top
|
|
3602
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3603
|
+
*/
|
|
3604
|
+
"border-color-t": [{
|
|
3605
|
+
"border-t": [borderColor]
|
|
3606
|
+
}],
|
|
3607
|
+
/**
|
|
3608
|
+
* Border Color Right
|
|
3609
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3610
|
+
*/
|
|
3611
|
+
"border-color-r": [{
|
|
3612
|
+
"border-r": [borderColor]
|
|
3613
|
+
}],
|
|
3614
|
+
/**
|
|
3615
|
+
* Border Color Bottom
|
|
3616
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3617
|
+
*/
|
|
3618
|
+
"border-color-b": [{
|
|
3619
|
+
"border-b": [borderColor]
|
|
3620
|
+
}],
|
|
3621
|
+
/**
|
|
3622
|
+
* Border Color Left
|
|
3623
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3624
|
+
*/
|
|
3625
|
+
"border-color-l": [{
|
|
3626
|
+
"border-l": [borderColor]
|
|
3627
|
+
}],
|
|
3628
|
+
/**
|
|
3629
|
+
* Divide Color
|
|
3630
|
+
* @see https://tailwindcss.com/docs/divide-color
|
|
3631
|
+
*/
|
|
3632
|
+
"divide-color": [{
|
|
3633
|
+
divide: [borderColor]
|
|
3634
|
+
}],
|
|
3635
|
+
/**
|
|
3636
|
+
* Outline Style
|
|
3637
|
+
* @see https://tailwindcss.com/docs/outline-style
|
|
3638
|
+
*/
|
|
3639
|
+
"outline-style": [{
|
|
3640
|
+
outline: ["", ...getLineStyles()]
|
|
3641
|
+
}],
|
|
3642
|
+
/**
|
|
3643
|
+
* Outline Offset
|
|
3644
|
+
* @see https://tailwindcss.com/docs/outline-offset
|
|
3645
|
+
*/
|
|
3646
|
+
"outline-offset": [{
|
|
3647
|
+
"outline-offset": [isLength, isArbitraryValue]
|
|
3648
|
+
}],
|
|
3649
|
+
/**
|
|
3650
|
+
* Outline Width
|
|
3651
|
+
* @see https://tailwindcss.com/docs/outline-width
|
|
3652
|
+
*/
|
|
3653
|
+
"outline-w": [{
|
|
3654
|
+
outline: [isLength, isArbitraryLength]
|
|
3655
|
+
}],
|
|
3656
|
+
/**
|
|
3657
|
+
* Outline Color
|
|
3658
|
+
* @see https://tailwindcss.com/docs/outline-color
|
|
3659
|
+
*/
|
|
3660
|
+
"outline-color": [{
|
|
3661
|
+
outline: [colors]
|
|
3662
|
+
}],
|
|
3663
|
+
/**
|
|
3664
|
+
* Ring Width
|
|
3665
|
+
* @see https://tailwindcss.com/docs/ring-width
|
|
3666
|
+
*/
|
|
3667
|
+
"ring-w": [{
|
|
3668
|
+
ring: getLengthWithEmptyAndArbitrary()
|
|
3669
|
+
}],
|
|
3670
|
+
/**
|
|
3671
|
+
* Ring Width Inset
|
|
3672
|
+
* @see https://tailwindcss.com/docs/ring-width
|
|
3673
|
+
*/
|
|
3674
|
+
"ring-w-inset": ["ring-inset"],
|
|
3675
|
+
/**
|
|
3676
|
+
* Ring Color
|
|
3677
|
+
* @see https://tailwindcss.com/docs/ring-color
|
|
3678
|
+
*/
|
|
3679
|
+
"ring-color": [{
|
|
3680
|
+
ring: [colors]
|
|
3681
|
+
}],
|
|
3682
|
+
/**
|
|
3683
|
+
* Ring Opacity
|
|
3684
|
+
* @see https://tailwindcss.com/docs/ring-opacity
|
|
3685
|
+
*/
|
|
3686
|
+
"ring-opacity": [{
|
|
3687
|
+
"ring-opacity": [opacity]
|
|
3688
|
+
}],
|
|
3689
|
+
/**
|
|
3690
|
+
* Ring Offset Width
|
|
3691
|
+
* @see https://tailwindcss.com/docs/ring-offset-width
|
|
3692
|
+
*/
|
|
3693
|
+
"ring-offset-w": [{
|
|
3694
|
+
"ring-offset": [isLength, isArbitraryLength]
|
|
3695
|
+
}],
|
|
3696
|
+
/**
|
|
3697
|
+
* Ring Offset Color
|
|
3698
|
+
* @see https://tailwindcss.com/docs/ring-offset-color
|
|
3699
|
+
*/
|
|
3700
|
+
"ring-offset-color": [{
|
|
3701
|
+
"ring-offset": [colors]
|
|
3702
|
+
}],
|
|
3703
|
+
// Effects
|
|
3704
|
+
/**
|
|
3705
|
+
* Box Shadow
|
|
3706
|
+
* @see https://tailwindcss.com/docs/box-shadow
|
|
3707
|
+
*/
|
|
3708
|
+
shadow: [{
|
|
3709
|
+
shadow: ["", "inner", "none", isTshirtSize, isArbitraryShadow]
|
|
3710
|
+
}],
|
|
3711
|
+
/**
|
|
3712
|
+
* Box Shadow Color
|
|
3713
|
+
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
3714
|
+
*/
|
|
3715
|
+
"shadow-color": [{
|
|
3716
|
+
shadow: [isAny]
|
|
3717
|
+
}],
|
|
3718
|
+
/**
|
|
3719
|
+
* Opacity
|
|
3720
|
+
* @see https://tailwindcss.com/docs/opacity
|
|
3721
|
+
*/
|
|
3722
|
+
opacity: [{
|
|
3723
|
+
opacity: [opacity]
|
|
3724
|
+
}],
|
|
3725
|
+
/**
|
|
3726
|
+
* Mix Blend Mode
|
|
3727
|
+
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
3728
|
+
*/
|
|
3729
|
+
"mix-blend": [{
|
|
3730
|
+
"mix-blend": [...getBlendModes(), "plus-lighter", "plus-darker"]
|
|
3731
|
+
}],
|
|
3732
|
+
/**
|
|
3733
|
+
* Background Blend Mode
|
|
3734
|
+
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
3735
|
+
*/
|
|
3736
|
+
"bg-blend": [{
|
|
3737
|
+
"bg-blend": getBlendModes()
|
|
3738
|
+
}],
|
|
3739
|
+
// Filters
|
|
3740
|
+
/**
|
|
3741
|
+
* Filter
|
|
3742
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
3743
|
+
* @see https://tailwindcss.com/docs/filter
|
|
3744
|
+
*/
|
|
3745
|
+
filter: [{
|
|
3746
|
+
filter: ["", "none"]
|
|
3747
|
+
}],
|
|
3748
|
+
/**
|
|
3749
|
+
* Blur
|
|
3750
|
+
* @see https://tailwindcss.com/docs/blur
|
|
3751
|
+
*/
|
|
3752
|
+
blur: [{
|
|
3753
|
+
blur: [blur]
|
|
3754
|
+
}],
|
|
3755
|
+
/**
|
|
3756
|
+
* Brightness
|
|
3757
|
+
* @see https://tailwindcss.com/docs/brightness
|
|
3758
|
+
*/
|
|
3759
|
+
brightness: [{
|
|
3760
|
+
brightness: [brightness]
|
|
3761
|
+
}],
|
|
3762
|
+
/**
|
|
3763
|
+
* Contrast
|
|
3764
|
+
* @see https://tailwindcss.com/docs/contrast
|
|
3765
|
+
*/
|
|
3766
|
+
contrast: [{
|
|
3767
|
+
contrast: [contrast]
|
|
3768
|
+
}],
|
|
3769
|
+
/**
|
|
3770
|
+
* Drop Shadow
|
|
3771
|
+
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3772
|
+
*/
|
|
3773
|
+
"drop-shadow": [{
|
|
3774
|
+
"drop-shadow": ["", "none", isTshirtSize, isArbitraryValue]
|
|
3775
|
+
}],
|
|
3776
|
+
/**
|
|
3777
|
+
* Grayscale
|
|
3778
|
+
* @see https://tailwindcss.com/docs/grayscale
|
|
3779
|
+
*/
|
|
3780
|
+
grayscale: [{
|
|
3781
|
+
grayscale: [grayscale]
|
|
3782
|
+
}],
|
|
3783
|
+
/**
|
|
3784
|
+
* Hue Rotate
|
|
3785
|
+
* @see https://tailwindcss.com/docs/hue-rotate
|
|
3786
|
+
*/
|
|
3787
|
+
"hue-rotate": [{
|
|
3788
|
+
"hue-rotate": [hueRotate]
|
|
3789
|
+
}],
|
|
3790
|
+
/**
|
|
3791
|
+
* Invert
|
|
3792
|
+
* @see https://tailwindcss.com/docs/invert
|
|
3793
|
+
*/
|
|
3794
|
+
invert: [{
|
|
3795
|
+
invert: [invert]
|
|
3796
|
+
}],
|
|
3797
|
+
/**
|
|
3798
|
+
* Saturate
|
|
3799
|
+
* @see https://tailwindcss.com/docs/saturate
|
|
3800
|
+
*/
|
|
3801
|
+
saturate: [{
|
|
3802
|
+
saturate: [saturate]
|
|
3803
|
+
}],
|
|
3804
|
+
/**
|
|
3805
|
+
* Sepia
|
|
3806
|
+
* @see https://tailwindcss.com/docs/sepia
|
|
3807
|
+
*/
|
|
3808
|
+
sepia: [{
|
|
3809
|
+
sepia: [sepia]
|
|
3810
|
+
}],
|
|
3811
|
+
/**
|
|
3812
|
+
* Backdrop Filter
|
|
3813
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
3814
|
+
* @see https://tailwindcss.com/docs/backdrop-filter
|
|
3815
|
+
*/
|
|
3816
|
+
"backdrop-filter": [{
|
|
3817
|
+
"backdrop-filter": ["", "none"]
|
|
3818
|
+
}],
|
|
3819
|
+
/**
|
|
3820
|
+
* Backdrop Blur
|
|
3821
|
+
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
3822
|
+
*/
|
|
3823
|
+
"backdrop-blur": [{
|
|
3824
|
+
"backdrop-blur": [blur]
|
|
3825
|
+
}],
|
|
3826
|
+
/**
|
|
3827
|
+
* Backdrop Brightness
|
|
3828
|
+
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
3829
|
+
*/
|
|
3830
|
+
"backdrop-brightness": [{
|
|
3831
|
+
"backdrop-brightness": [brightness]
|
|
3832
|
+
}],
|
|
3833
|
+
/**
|
|
3834
|
+
* Backdrop Contrast
|
|
3835
|
+
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
3836
|
+
*/
|
|
3837
|
+
"backdrop-contrast": [{
|
|
3838
|
+
"backdrop-contrast": [contrast]
|
|
3839
|
+
}],
|
|
3840
|
+
/**
|
|
3841
|
+
* Backdrop Grayscale
|
|
3842
|
+
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
3843
|
+
*/
|
|
3844
|
+
"backdrop-grayscale": [{
|
|
3845
|
+
"backdrop-grayscale": [grayscale]
|
|
3846
|
+
}],
|
|
3847
|
+
/**
|
|
3848
|
+
* Backdrop Hue Rotate
|
|
3849
|
+
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
3850
|
+
*/
|
|
3851
|
+
"backdrop-hue-rotate": [{
|
|
3852
|
+
"backdrop-hue-rotate": [hueRotate]
|
|
3853
|
+
}],
|
|
3854
|
+
/**
|
|
3855
|
+
* Backdrop Invert
|
|
3856
|
+
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
3857
|
+
*/
|
|
3858
|
+
"backdrop-invert": [{
|
|
3859
|
+
"backdrop-invert": [invert]
|
|
3860
|
+
}],
|
|
3861
|
+
/**
|
|
3862
|
+
* Backdrop Opacity
|
|
3863
|
+
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
3864
|
+
*/
|
|
3865
|
+
"backdrop-opacity": [{
|
|
3866
|
+
"backdrop-opacity": [opacity]
|
|
3867
|
+
}],
|
|
3868
|
+
/**
|
|
3869
|
+
* Backdrop Saturate
|
|
3870
|
+
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
3871
|
+
*/
|
|
3872
|
+
"backdrop-saturate": [{
|
|
3873
|
+
"backdrop-saturate": [saturate]
|
|
3874
|
+
}],
|
|
3875
|
+
/**
|
|
3876
|
+
* Backdrop Sepia
|
|
3877
|
+
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
3878
|
+
*/
|
|
3879
|
+
"backdrop-sepia": [{
|
|
3880
|
+
"backdrop-sepia": [sepia]
|
|
3881
|
+
}],
|
|
3882
|
+
// Tables
|
|
3883
|
+
/**
|
|
3884
|
+
* Border Collapse
|
|
3885
|
+
* @see https://tailwindcss.com/docs/border-collapse
|
|
3886
|
+
*/
|
|
3887
|
+
"border-collapse": [{
|
|
3888
|
+
border: ["collapse", "separate"]
|
|
3889
|
+
}],
|
|
3890
|
+
/**
|
|
3891
|
+
* Border Spacing
|
|
3892
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
3893
|
+
*/
|
|
3894
|
+
"border-spacing": [{
|
|
3895
|
+
"border-spacing": [borderSpacing]
|
|
3896
|
+
}],
|
|
3897
|
+
/**
|
|
3898
|
+
* Border Spacing X
|
|
3899
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
3900
|
+
*/
|
|
3901
|
+
"border-spacing-x": [{
|
|
3902
|
+
"border-spacing-x": [borderSpacing]
|
|
3903
|
+
}],
|
|
3904
|
+
/**
|
|
3905
|
+
* Border Spacing Y
|
|
3906
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
3907
|
+
*/
|
|
3908
|
+
"border-spacing-y": [{
|
|
3909
|
+
"border-spacing-y": [borderSpacing]
|
|
3910
|
+
}],
|
|
3911
|
+
/**
|
|
3912
|
+
* Table Layout
|
|
3913
|
+
* @see https://tailwindcss.com/docs/table-layout
|
|
3914
|
+
*/
|
|
3915
|
+
"table-layout": [{
|
|
3916
|
+
table: ["auto", "fixed"]
|
|
3917
|
+
}],
|
|
3918
|
+
/**
|
|
3919
|
+
* Caption Side
|
|
3920
|
+
* @see https://tailwindcss.com/docs/caption-side
|
|
3921
|
+
*/
|
|
3922
|
+
caption: [{
|
|
3923
|
+
caption: ["top", "bottom"]
|
|
3924
|
+
}],
|
|
3925
|
+
// Transitions and Animation
|
|
3926
|
+
/**
|
|
3927
|
+
* Tranisition Property
|
|
3928
|
+
* @see https://tailwindcss.com/docs/transition-property
|
|
3929
|
+
*/
|
|
3930
|
+
transition: [{
|
|
3931
|
+
transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", isArbitraryValue]
|
|
3932
|
+
}],
|
|
3933
|
+
/**
|
|
3934
|
+
* Transition Duration
|
|
3935
|
+
* @see https://tailwindcss.com/docs/transition-duration
|
|
3936
|
+
*/
|
|
3937
|
+
duration: [{
|
|
3938
|
+
duration: getNumberAndArbitrary()
|
|
3939
|
+
}],
|
|
3940
|
+
/**
|
|
3941
|
+
* Transition Timing Function
|
|
3942
|
+
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
3943
|
+
*/
|
|
3944
|
+
ease: [{
|
|
3945
|
+
ease: ["linear", "in", "out", "in-out", isArbitraryValue]
|
|
3946
|
+
}],
|
|
3947
|
+
/**
|
|
3948
|
+
* Transition Delay
|
|
3949
|
+
* @see https://tailwindcss.com/docs/transition-delay
|
|
3950
|
+
*/
|
|
3951
|
+
delay: [{
|
|
3952
|
+
delay: getNumberAndArbitrary()
|
|
3953
|
+
}],
|
|
3954
|
+
/**
|
|
3955
|
+
* Animation
|
|
3956
|
+
* @see https://tailwindcss.com/docs/animation
|
|
3957
|
+
*/
|
|
3958
|
+
animate: [{
|
|
3959
|
+
animate: ["none", "spin", "ping", "pulse", "bounce", isArbitraryValue]
|
|
3960
|
+
}],
|
|
3961
|
+
// Transforms
|
|
3962
|
+
/**
|
|
3963
|
+
* Transform
|
|
3964
|
+
* @see https://tailwindcss.com/docs/transform
|
|
3965
|
+
*/
|
|
3966
|
+
transform: [{
|
|
3967
|
+
transform: ["", "gpu", "none"]
|
|
3968
|
+
}],
|
|
3969
|
+
/**
|
|
3970
|
+
* Scale
|
|
3971
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3972
|
+
*/
|
|
3973
|
+
scale: [{
|
|
3974
|
+
scale: [scale]
|
|
3975
|
+
}],
|
|
3976
|
+
/**
|
|
3977
|
+
* Scale X
|
|
3978
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3979
|
+
*/
|
|
3980
|
+
"scale-x": [{
|
|
3981
|
+
"scale-x": [scale]
|
|
3982
|
+
}],
|
|
3983
|
+
/**
|
|
3984
|
+
* Scale Y
|
|
3985
|
+
* @see https://tailwindcss.com/docs/scale
|
|
3986
|
+
*/
|
|
3987
|
+
"scale-y": [{
|
|
3988
|
+
"scale-y": [scale]
|
|
3989
|
+
}],
|
|
3990
|
+
/**
|
|
3991
|
+
* Rotate
|
|
3992
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
3993
|
+
*/
|
|
3994
|
+
rotate: [{
|
|
3995
|
+
rotate: [isInteger, isArbitraryValue]
|
|
3996
|
+
}],
|
|
3997
|
+
/**
|
|
3998
|
+
* Translate X
|
|
3999
|
+
* @see https://tailwindcss.com/docs/translate
|
|
4000
|
+
*/
|
|
4001
|
+
"translate-x": [{
|
|
4002
|
+
"translate-x": [translate]
|
|
4003
|
+
}],
|
|
4004
|
+
/**
|
|
4005
|
+
* Translate Y
|
|
4006
|
+
* @see https://tailwindcss.com/docs/translate
|
|
4007
|
+
*/
|
|
4008
|
+
"translate-y": [{
|
|
4009
|
+
"translate-y": [translate]
|
|
4010
|
+
}],
|
|
4011
|
+
/**
|
|
4012
|
+
* Skew X
|
|
4013
|
+
* @see https://tailwindcss.com/docs/skew
|
|
4014
|
+
*/
|
|
4015
|
+
"skew-x": [{
|
|
4016
|
+
"skew-x": [skew]
|
|
4017
|
+
}],
|
|
4018
|
+
/**
|
|
4019
|
+
* Skew Y
|
|
4020
|
+
* @see https://tailwindcss.com/docs/skew
|
|
4021
|
+
*/
|
|
4022
|
+
"skew-y": [{
|
|
4023
|
+
"skew-y": [skew]
|
|
4024
|
+
}],
|
|
4025
|
+
/**
|
|
4026
|
+
* Transform Origin
|
|
4027
|
+
* @see https://tailwindcss.com/docs/transform-origin
|
|
4028
|
+
*/
|
|
4029
|
+
"transform-origin": [{
|
|
4030
|
+
origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", isArbitraryValue]
|
|
4031
|
+
}],
|
|
4032
|
+
// Interactivity
|
|
4033
|
+
/**
|
|
4034
|
+
* Accent Color
|
|
4035
|
+
* @see https://tailwindcss.com/docs/accent-color
|
|
4036
|
+
*/
|
|
4037
|
+
accent: [{
|
|
4038
|
+
accent: ["auto", colors]
|
|
4039
|
+
}],
|
|
4040
|
+
/**
|
|
4041
|
+
* Appearance
|
|
4042
|
+
* @see https://tailwindcss.com/docs/appearance
|
|
4043
|
+
*/
|
|
4044
|
+
appearance: [{
|
|
4045
|
+
appearance: ["none", "auto"]
|
|
4046
|
+
}],
|
|
4047
|
+
/**
|
|
4048
|
+
* Cursor
|
|
4049
|
+
* @see https://tailwindcss.com/docs/cursor
|
|
4050
|
+
*/
|
|
4051
|
+
cursor: [{
|
|
4052
|
+
cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryValue]
|
|
4053
|
+
}],
|
|
4054
|
+
/**
|
|
4055
|
+
* Caret Color
|
|
4056
|
+
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
4057
|
+
*/
|
|
4058
|
+
"caret-color": [{
|
|
4059
|
+
caret: [colors]
|
|
4060
|
+
}],
|
|
4061
|
+
/**
|
|
4062
|
+
* Pointer Events
|
|
4063
|
+
* @see https://tailwindcss.com/docs/pointer-events
|
|
4064
|
+
*/
|
|
4065
|
+
"pointer-events": [{
|
|
4066
|
+
"pointer-events": ["none", "auto"]
|
|
4067
|
+
}],
|
|
4068
|
+
/**
|
|
4069
|
+
* Resize
|
|
4070
|
+
* @see https://tailwindcss.com/docs/resize
|
|
4071
|
+
*/
|
|
4072
|
+
resize: [{
|
|
4073
|
+
resize: ["none", "y", "x", ""]
|
|
4074
|
+
}],
|
|
4075
|
+
/**
|
|
4076
|
+
* Scroll Behavior
|
|
4077
|
+
* @see https://tailwindcss.com/docs/scroll-behavior
|
|
4078
|
+
*/
|
|
4079
|
+
"scroll-behavior": [{
|
|
4080
|
+
scroll: ["auto", "smooth"]
|
|
4081
|
+
}],
|
|
4082
|
+
/**
|
|
4083
|
+
* Scroll Margin
|
|
4084
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4085
|
+
*/
|
|
4086
|
+
"scroll-m": [{
|
|
4087
|
+
"scroll-m": getSpacingWithArbitrary()
|
|
4088
|
+
}],
|
|
4089
|
+
/**
|
|
4090
|
+
* Scroll Margin X
|
|
4091
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4092
|
+
*/
|
|
4093
|
+
"scroll-mx": [{
|
|
4094
|
+
"scroll-mx": getSpacingWithArbitrary()
|
|
4095
|
+
}],
|
|
4096
|
+
/**
|
|
4097
|
+
* Scroll Margin Y
|
|
4098
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4099
|
+
*/
|
|
4100
|
+
"scroll-my": [{
|
|
4101
|
+
"scroll-my": getSpacingWithArbitrary()
|
|
4102
|
+
}],
|
|
4103
|
+
/**
|
|
4104
|
+
* Scroll Margin Start
|
|
4105
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4106
|
+
*/
|
|
4107
|
+
"scroll-ms": [{
|
|
4108
|
+
"scroll-ms": getSpacingWithArbitrary()
|
|
4109
|
+
}],
|
|
4110
|
+
/**
|
|
4111
|
+
* Scroll Margin End
|
|
4112
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4113
|
+
*/
|
|
4114
|
+
"scroll-me": [{
|
|
4115
|
+
"scroll-me": getSpacingWithArbitrary()
|
|
4116
|
+
}],
|
|
4117
|
+
/**
|
|
4118
|
+
* Scroll Margin Top
|
|
4119
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4120
|
+
*/
|
|
4121
|
+
"scroll-mt": [{
|
|
4122
|
+
"scroll-mt": getSpacingWithArbitrary()
|
|
4123
|
+
}],
|
|
4124
|
+
/**
|
|
4125
|
+
* Scroll Margin Right
|
|
4126
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4127
|
+
*/
|
|
4128
|
+
"scroll-mr": [{
|
|
4129
|
+
"scroll-mr": getSpacingWithArbitrary()
|
|
4130
|
+
}],
|
|
4131
|
+
/**
|
|
4132
|
+
* Scroll Margin Bottom
|
|
4133
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4134
|
+
*/
|
|
4135
|
+
"scroll-mb": [{
|
|
4136
|
+
"scroll-mb": getSpacingWithArbitrary()
|
|
4137
|
+
}],
|
|
4138
|
+
/**
|
|
4139
|
+
* Scroll Margin Left
|
|
4140
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4141
|
+
*/
|
|
4142
|
+
"scroll-ml": [{
|
|
4143
|
+
"scroll-ml": getSpacingWithArbitrary()
|
|
4144
|
+
}],
|
|
4145
|
+
/**
|
|
4146
|
+
* Scroll Padding
|
|
4147
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4148
|
+
*/
|
|
4149
|
+
"scroll-p": [{
|
|
4150
|
+
"scroll-p": getSpacingWithArbitrary()
|
|
4151
|
+
}],
|
|
4152
|
+
/**
|
|
4153
|
+
* Scroll Padding X
|
|
4154
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4155
|
+
*/
|
|
4156
|
+
"scroll-px": [{
|
|
4157
|
+
"scroll-px": getSpacingWithArbitrary()
|
|
4158
|
+
}],
|
|
4159
|
+
/**
|
|
4160
|
+
* Scroll Padding Y
|
|
4161
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4162
|
+
*/
|
|
4163
|
+
"scroll-py": [{
|
|
4164
|
+
"scroll-py": getSpacingWithArbitrary()
|
|
4165
|
+
}],
|
|
4166
|
+
/**
|
|
4167
|
+
* Scroll Padding Start
|
|
4168
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4169
|
+
*/
|
|
4170
|
+
"scroll-ps": [{
|
|
4171
|
+
"scroll-ps": getSpacingWithArbitrary()
|
|
4172
|
+
}],
|
|
4173
|
+
/**
|
|
4174
|
+
* Scroll Padding End
|
|
4175
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4176
|
+
*/
|
|
4177
|
+
"scroll-pe": [{
|
|
4178
|
+
"scroll-pe": getSpacingWithArbitrary()
|
|
4179
|
+
}],
|
|
4180
|
+
/**
|
|
4181
|
+
* Scroll Padding Top
|
|
4182
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4183
|
+
*/
|
|
4184
|
+
"scroll-pt": [{
|
|
4185
|
+
"scroll-pt": getSpacingWithArbitrary()
|
|
4186
|
+
}],
|
|
4187
|
+
/**
|
|
4188
|
+
* Scroll Padding Right
|
|
4189
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4190
|
+
*/
|
|
4191
|
+
"scroll-pr": [{
|
|
4192
|
+
"scroll-pr": getSpacingWithArbitrary()
|
|
4193
|
+
}],
|
|
4194
|
+
/**
|
|
4195
|
+
* Scroll Padding Bottom
|
|
4196
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4197
|
+
*/
|
|
4198
|
+
"scroll-pb": [{
|
|
4199
|
+
"scroll-pb": getSpacingWithArbitrary()
|
|
4200
|
+
}],
|
|
4201
|
+
/**
|
|
4202
|
+
* Scroll Padding Left
|
|
4203
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4204
|
+
*/
|
|
4205
|
+
"scroll-pl": [{
|
|
4206
|
+
"scroll-pl": getSpacingWithArbitrary()
|
|
4207
|
+
}],
|
|
4208
|
+
/**
|
|
4209
|
+
* Scroll Snap Align
|
|
4210
|
+
* @see https://tailwindcss.com/docs/scroll-snap-align
|
|
4211
|
+
*/
|
|
4212
|
+
"snap-align": [{
|
|
4213
|
+
snap: ["start", "end", "center", "align-none"]
|
|
4214
|
+
}],
|
|
4215
|
+
/**
|
|
4216
|
+
* Scroll Snap Stop
|
|
4217
|
+
* @see https://tailwindcss.com/docs/scroll-snap-stop
|
|
4218
|
+
*/
|
|
4219
|
+
"snap-stop": [{
|
|
4220
|
+
snap: ["normal", "always"]
|
|
4221
|
+
}],
|
|
4222
|
+
/**
|
|
4223
|
+
* Scroll Snap Type
|
|
4224
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
4225
|
+
*/
|
|
4226
|
+
"snap-type": [{
|
|
4227
|
+
snap: ["none", "x", "y", "both"]
|
|
4228
|
+
}],
|
|
4229
|
+
/**
|
|
4230
|
+
* Scroll Snap Type Strictness
|
|
4231
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
4232
|
+
*/
|
|
4233
|
+
"snap-strictness": [{
|
|
4234
|
+
snap: ["mandatory", "proximity"]
|
|
4235
|
+
}],
|
|
4236
|
+
/**
|
|
4237
|
+
* Touch Action
|
|
4238
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4239
|
+
*/
|
|
4240
|
+
touch: [{
|
|
4241
|
+
touch: ["auto", "none", "manipulation"]
|
|
4242
|
+
}],
|
|
4243
|
+
/**
|
|
4244
|
+
* Touch Action X
|
|
4245
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4246
|
+
*/
|
|
4247
|
+
"touch-x": [{
|
|
4248
|
+
"touch-pan": ["x", "left", "right"]
|
|
4249
|
+
}],
|
|
4250
|
+
/**
|
|
4251
|
+
* Touch Action Y
|
|
4252
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4253
|
+
*/
|
|
4254
|
+
"touch-y": [{
|
|
4255
|
+
"touch-pan": ["y", "up", "down"]
|
|
4256
|
+
}],
|
|
4257
|
+
/**
|
|
4258
|
+
* Touch Action Pinch Zoom
|
|
4259
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4260
|
+
*/
|
|
4261
|
+
"touch-pz": ["touch-pinch-zoom"],
|
|
4262
|
+
/**
|
|
4263
|
+
* User Select
|
|
4264
|
+
* @see https://tailwindcss.com/docs/user-select
|
|
4265
|
+
*/
|
|
4266
|
+
select: [{
|
|
4267
|
+
select: ["none", "text", "all", "auto"]
|
|
4268
|
+
}],
|
|
4269
|
+
/**
|
|
4270
|
+
* Will Change
|
|
4271
|
+
* @see https://tailwindcss.com/docs/will-change
|
|
4272
|
+
*/
|
|
4273
|
+
"will-change": [{
|
|
4274
|
+
"will-change": ["auto", "scroll", "contents", "transform", isArbitraryValue]
|
|
4275
|
+
}],
|
|
4276
|
+
// SVG
|
|
4277
|
+
/**
|
|
4278
|
+
* Fill
|
|
4279
|
+
* @see https://tailwindcss.com/docs/fill
|
|
4280
|
+
*/
|
|
4281
|
+
fill: [{
|
|
4282
|
+
fill: [colors, "none"]
|
|
4283
|
+
}],
|
|
4284
|
+
/**
|
|
4285
|
+
* Stroke Width
|
|
4286
|
+
* @see https://tailwindcss.com/docs/stroke-width
|
|
4287
|
+
*/
|
|
4288
|
+
"stroke-w": [{
|
|
4289
|
+
stroke: [isLength, isArbitraryLength, isArbitraryNumber]
|
|
4290
|
+
}],
|
|
4291
|
+
/**
|
|
4292
|
+
* Stroke
|
|
4293
|
+
* @see https://tailwindcss.com/docs/stroke
|
|
4294
|
+
*/
|
|
4295
|
+
stroke: [{
|
|
4296
|
+
stroke: [colors, "none"]
|
|
4297
|
+
}],
|
|
4298
|
+
// Accessibility
|
|
4299
|
+
/**
|
|
4300
|
+
* Screen Readers
|
|
4301
|
+
* @see https://tailwindcss.com/docs/screen-readers
|
|
4302
|
+
*/
|
|
4303
|
+
sr: ["sr-only", "not-sr-only"],
|
|
4304
|
+
/**
|
|
4305
|
+
* Forced Color Adjust
|
|
4306
|
+
* @see https://tailwindcss.com/docs/forced-color-adjust
|
|
4307
|
+
*/
|
|
4308
|
+
"forced-color-adjust": [{
|
|
4309
|
+
"forced-color-adjust": ["auto", "none"]
|
|
4310
|
+
}]
|
|
4311
|
+
},
|
|
4312
|
+
conflictingClassGroups: {
|
|
4313
|
+
overflow: ["overflow-x", "overflow-y"],
|
|
4314
|
+
overscroll: ["overscroll-x", "overscroll-y"],
|
|
4315
|
+
inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
|
|
4316
|
+
"inset-x": ["right", "left"],
|
|
4317
|
+
"inset-y": ["top", "bottom"],
|
|
4318
|
+
flex: ["basis", "grow", "shrink"],
|
|
4319
|
+
gap: ["gap-x", "gap-y"],
|
|
4320
|
+
p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
|
|
4321
|
+
px: ["pr", "pl"],
|
|
4322
|
+
py: ["pt", "pb"],
|
|
4323
|
+
m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
|
|
4324
|
+
mx: ["mr", "ml"],
|
|
4325
|
+
my: ["mt", "mb"],
|
|
4326
|
+
size: ["w", "h"],
|
|
4327
|
+
"font-size": ["leading"],
|
|
4328
|
+
"fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
|
|
4329
|
+
"fvn-ordinal": ["fvn-normal"],
|
|
4330
|
+
"fvn-slashed-zero": ["fvn-normal"],
|
|
4331
|
+
"fvn-figure": ["fvn-normal"],
|
|
4332
|
+
"fvn-spacing": ["fvn-normal"],
|
|
4333
|
+
"fvn-fraction": ["fvn-normal"],
|
|
4334
|
+
"line-clamp": ["display", "overflow"],
|
|
4335
|
+
rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
|
|
4336
|
+
"rounded-s": ["rounded-ss", "rounded-es"],
|
|
4337
|
+
"rounded-e": ["rounded-se", "rounded-ee"],
|
|
4338
|
+
"rounded-t": ["rounded-tl", "rounded-tr"],
|
|
4339
|
+
"rounded-r": ["rounded-tr", "rounded-br"],
|
|
4340
|
+
"rounded-b": ["rounded-br", "rounded-bl"],
|
|
4341
|
+
"rounded-l": ["rounded-tl", "rounded-bl"],
|
|
4342
|
+
"border-spacing": ["border-spacing-x", "border-spacing-y"],
|
|
4343
|
+
"border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
|
|
4344
|
+
"border-w-x": ["border-w-r", "border-w-l"],
|
|
4345
|
+
"border-w-y": ["border-w-t", "border-w-b"],
|
|
4346
|
+
"border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
|
|
4347
|
+
"border-color-x": ["border-color-r", "border-color-l"],
|
|
4348
|
+
"border-color-y": ["border-color-t", "border-color-b"],
|
|
4349
|
+
"scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
|
|
4350
|
+
"scroll-mx": ["scroll-mr", "scroll-ml"],
|
|
4351
|
+
"scroll-my": ["scroll-mt", "scroll-mb"],
|
|
4352
|
+
"scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
|
|
4353
|
+
"scroll-px": ["scroll-pr", "scroll-pl"],
|
|
4354
|
+
"scroll-py": ["scroll-pt", "scroll-pb"],
|
|
4355
|
+
touch: ["touch-x", "touch-y", "touch-pz"],
|
|
4356
|
+
"touch-x": ["touch"],
|
|
4357
|
+
"touch-y": ["touch"],
|
|
4358
|
+
"touch-pz": ["touch"]
|
|
4359
|
+
},
|
|
4360
|
+
conflictingClassGroupModifiers: {
|
|
4361
|
+
"font-size": ["leading"]
|
|
4362
|
+
}
|
|
4363
|
+
};
|
|
4364
|
+
};
|
|
4365
|
+
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
4366
|
+
|
|
4367
|
+
// lib/cn.ts
|
|
4368
|
+
function cn(...inputs) {
|
|
4369
|
+
return twMerge(clsx(inputs));
|
|
4370
|
+
}
|
|
4371
|
+
var EventBusContext = createContext(null);
|
|
4372
|
+
|
|
4373
|
+
// hooks/useEventBus.ts
|
|
4374
|
+
function getGlobalEventBus() {
|
|
4375
|
+
if (typeof window !== "undefined") {
|
|
4376
|
+
return window.__kflowEventBus ?? null;
|
|
4377
|
+
}
|
|
4378
|
+
return null;
|
|
4379
|
+
}
|
|
4380
|
+
var fallbackListeners = /* @__PURE__ */ new Map();
|
|
4381
|
+
var fallbackAnyListeners = /* @__PURE__ */ new Set();
|
|
4382
|
+
var fallbackEventBus = {
|
|
4383
|
+
emit: (type, payload) => {
|
|
4384
|
+
const event = {
|
|
4385
|
+
type,
|
|
4386
|
+
payload,
|
|
4387
|
+
timestamp: Date.now()
|
|
4388
|
+
};
|
|
4389
|
+
const handlers = fallbackListeners.get(type);
|
|
4390
|
+
if (handlers) {
|
|
4391
|
+
handlers.forEach((handler) => {
|
|
4392
|
+
try {
|
|
4393
|
+
handler(event);
|
|
4394
|
+
} catch (error) {
|
|
4395
|
+
console.error(`[EventBus] Error in listener for '${type}':`, error);
|
|
4396
|
+
}
|
|
4397
|
+
});
|
|
4398
|
+
}
|
|
4399
|
+
fallbackAnyListeners.forEach((handler) => {
|
|
4400
|
+
try {
|
|
4401
|
+
handler(event);
|
|
4402
|
+
} catch (error) {
|
|
4403
|
+
console.error(`[EventBus] Error in onAny listener for '${type}':`, error);
|
|
4404
|
+
}
|
|
4405
|
+
});
|
|
4406
|
+
},
|
|
4407
|
+
on: (type, listener) => {
|
|
4408
|
+
if (!fallbackListeners.has(type)) {
|
|
4409
|
+
fallbackListeners.set(type, /* @__PURE__ */ new Set());
|
|
4410
|
+
}
|
|
4411
|
+
fallbackListeners.get(type).add(listener);
|
|
4412
|
+
return () => {
|
|
4413
|
+
const handlers = fallbackListeners.get(type);
|
|
4414
|
+
if (handlers) {
|
|
4415
|
+
handlers.delete(listener);
|
|
4416
|
+
if (handlers.size === 0) {
|
|
4417
|
+
fallbackListeners.delete(type);
|
|
4418
|
+
}
|
|
4419
|
+
}
|
|
4420
|
+
};
|
|
4421
|
+
},
|
|
4422
|
+
once: (type, listener) => {
|
|
4423
|
+
const wrappedListener = (event) => {
|
|
4424
|
+
fallbackListeners.get(type)?.delete(wrappedListener);
|
|
4425
|
+
listener(event);
|
|
4426
|
+
};
|
|
4427
|
+
return fallbackEventBus.on(type, wrappedListener);
|
|
4428
|
+
},
|
|
4429
|
+
hasListeners: (type) => {
|
|
4430
|
+
const handlers = fallbackListeners.get(type);
|
|
4431
|
+
return handlers !== void 0 && handlers.size > 0;
|
|
4432
|
+
},
|
|
4433
|
+
onAny: (listener) => {
|
|
4434
|
+
fallbackAnyListeners.add(listener);
|
|
4435
|
+
return () => {
|
|
4436
|
+
fallbackAnyListeners.delete(listener);
|
|
4437
|
+
};
|
|
4438
|
+
}
|
|
4439
|
+
};
|
|
4440
|
+
function useEventBus() {
|
|
4441
|
+
const context = useContext(EventBusContext);
|
|
4442
|
+
return context ?? getGlobalEventBus() ?? fallbackEventBus;
|
|
4443
|
+
}
|
|
4444
|
+
var paddingStyles = {
|
|
4445
|
+
none: "p-0",
|
|
4446
|
+
xs: "p-1",
|
|
4447
|
+
sm: "p-2",
|
|
4448
|
+
md: "p-4",
|
|
4449
|
+
lg: "p-6",
|
|
4450
|
+
xl: "p-8",
|
|
4451
|
+
"2xl": "p-12"
|
|
4452
|
+
};
|
|
4453
|
+
var paddingXStyles = {
|
|
4454
|
+
none: "px-0",
|
|
4455
|
+
xs: "px-1",
|
|
4456
|
+
sm: "px-2",
|
|
4457
|
+
md: "px-4",
|
|
4458
|
+
lg: "px-6",
|
|
4459
|
+
xl: "px-8",
|
|
4460
|
+
"2xl": "px-12"
|
|
4461
|
+
};
|
|
4462
|
+
var paddingYStyles = {
|
|
4463
|
+
none: "py-0",
|
|
4464
|
+
xs: "py-1",
|
|
4465
|
+
sm: "py-2",
|
|
4466
|
+
md: "py-4",
|
|
4467
|
+
lg: "py-6",
|
|
4468
|
+
xl: "py-8",
|
|
4469
|
+
"2xl": "py-12"
|
|
4470
|
+
};
|
|
4471
|
+
var marginStyles = {
|
|
4472
|
+
none: "m-0",
|
|
4473
|
+
xs: "m-1",
|
|
4474
|
+
sm: "m-2",
|
|
4475
|
+
md: "m-4",
|
|
4476
|
+
lg: "m-6",
|
|
4477
|
+
xl: "m-8",
|
|
4478
|
+
"2xl": "m-12",
|
|
4479
|
+
auto: "m-auto"
|
|
4480
|
+
};
|
|
4481
|
+
var marginXStyles = {
|
|
4482
|
+
none: "mx-0",
|
|
4483
|
+
xs: "mx-1",
|
|
4484
|
+
sm: "mx-2",
|
|
4485
|
+
md: "mx-4",
|
|
4486
|
+
lg: "mx-6",
|
|
4487
|
+
xl: "mx-8",
|
|
4488
|
+
"2xl": "mx-12",
|
|
4489
|
+
auto: "mx-auto"
|
|
4490
|
+
};
|
|
4491
|
+
var marginYStyles = {
|
|
4492
|
+
none: "my-0",
|
|
4493
|
+
xs: "my-1",
|
|
4494
|
+
sm: "my-2",
|
|
4495
|
+
md: "my-4",
|
|
4496
|
+
lg: "my-6",
|
|
4497
|
+
xl: "my-8",
|
|
4498
|
+
"2xl": "my-12",
|
|
4499
|
+
auto: "my-auto"
|
|
4500
|
+
};
|
|
4501
|
+
var bgStyles = {
|
|
4502
|
+
transparent: "bg-transparent",
|
|
4503
|
+
primary: "bg-[var(--color-primary)] text-[var(--color-primary-foreground)]",
|
|
4504
|
+
secondary: "bg-[var(--color-secondary)] text-[var(--color-secondary-foreground)]",
|
|
4505
|
+
muted: "bg-[var(--color-muted)] text-[var(--color-foreground)]",
|
|
4506
|
+
accent: "bg-[var(--color-accent)] text-[var(--color-accent-foreground)]",
|
|
4507
|
+
surface: "bg-[var(--color-card)]",
|
|
4508
|
+
overlay: "bg-[var(--color-card)]/80 backdrop-blur-sm"
|
|
4509
|
+
};
|
|
4510
|
+
var roundedStyles = {
|
|
4511
|
+
none: "rounded-none",
|
|
4512
|
+
sm: "rounded-[var(--radius-sm)]",
|
|
4513
|
+
md: "rounded-[var(--radius-md)]",
|
|
4514
|
+
lg: "rounded-[var(--radius-lg)]",
|
|
4515
|
+
xl: "rounded-[var(--radius-xl)]",
|
|
4516
|
+
"2xl": "rounded-[var(--radius-xl)]",
|
|
4517
|
+
full: "rounded-[var(--radius-full)]"
|
|
4518
|
+
};
|
|
4519
|
+
var shadowStyles = {
|
|
4520
|
+
none: "shadow-none",
|
|
4521
|
+
sm: "shadow-[var(--shadow-sm)]",
|
|
4522
|
+
md: "shadow-[var(--shadow-main)]",
|
|
4523
|
+
lg: "shadow-[var(--shadow-lg)]",
|
|
4524
|
+
xl: "shadow-[var(--shadow-lg)]"
|
|
4525
|
+
};
|
|
4526
|
+
var displayStyles = {
|
|
4527
|
+
block: "block",
|
|
4528
|
+
inline: "inline",
|
|
4529
|
+
"inline-block": "inline-block",
|
|
4530
|
+
flex: "flex",
|
|
4531
|
+
"inline-flex": "inline-flex",
|
|
4532
|
+
grid: "grid"
|
|
4533
|
+
};
|
|
4534
|
+
var overflowStyles = {
|
|
4535
|
+
auto: "overflow-auto",
|
|
4536
|
+
hidden: "overflow-hidden",
|
|
4537
|
+
visible: "overflow-visible",
|
|
4538
|
+
scroll: "overflow-scroll"
|
|
4539
|
+
};
|
|
4540
|
+
var positionStyles = {
|
|
4541
|
+
relative: "relative",
|
|
4542
|
+
absolute: "absolute",
|
|
4543
|
+
fixed: "fixed",
|
|
4544
|
+
sticky: "sticky"
|
|
4545
|
+
};
|
|
4546
|
+
var Box = React6.forwardRef(
|
|
4547
|
+
({
|
|
4548
|
+
padding,
|
|
4549
|
+
paddingX,
|
|
4550
|
+
paddingY,
|
|
4551
|
+
margin,
|
|
4552
|
+
marginX,
|
|
4553
|
+
marginY,
|
|
4554
|
+
bg = "transparent",
|
|
4555
|
+
border = false,
|
|
4556
|
+
rounded = "none",
|
|
4557
|
+
shadow = "none",
|
|
4558
|
+
display,
|
|
4559
|
+
fullWidth = false,
|
|
4560
|
+
fullHeight = false,
|
|
4561
|
+
overflow,
|
|
4562
|
+
position,
|
|
4563
|
+
className,
|
|
4564
|
+
children,
|
|
4565
|
+
as: Component = "div",
|
|
4566
|
+
action,
|
|
4567
|
+
actionPayload,
|
|
4568
|
+
hoverEvent,
|
|
4569
|
+
onClick,
|
|
4570
|
+
onMouseEnter,
|
|
4571
|
+
onMouseLeave,
|
|
4572
|
+
...rest
|
|
4573
|
+
}, ref) => {
|
|
4574
|
+
const eventBus = useEventBus();
|
|
4575
|
+
const handleClick = useCallback((e) => {
|
|
4576
|
+
if (action) {
|
|
4577
|
+
e.stopPropagation();
|
|
4578
|
+
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
4579
|
+
}
|
|
4580
|
+
onClick?.(e);
|
|
4581
|
+
}, [action, actionPayload, eventBus, onClick]);
|
|
4582
|
+
const handleMouseEnter = useCallback((e) => {
|
|
4583
|
+
if (hoverEvent) {
|
|
4584
|
+
eventBus.emit(`UI:${hoverEvent}`, { hovered: true });
|
|
4585
|
+
}
|
|
4586
|
+
onMouseEnter?.(e);
|
|
4587
|
+
}, [hoverEvent, eventBus, onMouseEnter]);
|
|
4588
|
+
const handleMouseLeave = useCallback((e) => {
|
|
4589
|
+
if (hoverEvent) {
|
|
4590
|
+
eventBus.emit(`UI:${hoverEvent}`, { hovered: false });
|
|
4591
|
+
}
|
|
4592
|
+
onMouseLeave?.(e);
|
|
4593
|
+
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
4594
|
+
const isClickable = action || onClick;
|
|
4595
|
+
const Comp = Component;
|
|
4596
|
+
return /* @__PURE__ */ jsx(
|
|
4597
|
+
Comp,
|
|
4598
|
+
{
|
|
4599
|
+
ref,
|
|
4600
|
+
className: cn(
|
|
4601
|
+
// Padding
|
|
4602
|
+
padding && paddingStyles[padding],
|
|
4603
|
+
paddingX && paddingXStyles[paddingX],
|
|
4604
|
+
paddingY && paddingYStyles[paddingY],
|
|
4605
|
+
// Margin
|
|
4606
|
+
margin && marginStyles[margin],
|
|
4607
|
+
marginX && marginXStyles[marginX],
|
|
4608
|
+
marginY && marginYStyles[marginY],
|
|
4609
|
+
// Background
|
|
4610
|
+
bgStyles[bg],
|
|
4611
|
+
// Border - uses theme variables
|
|
4612
|
+
border && "border-[length:var(--border-width)] border-[var(--color-border)]",
|
|
4613
|
+
// Rounded
|
|
4614
|
+
roundedStyles[rounded],
|
|
4615
|
+
// Shadow
|
|
4616
|
+
shadowStyles[shadow],
|
|
4617
|
+
// Display
|
|
4618
|
+
display && displayStyles[display],
|
|
4619
|
+
// Dimensions
|
|
4620
|
+
fullWidth && "w-full",
|
|
4621
|
+
fullHeight && "h-full",
|
|
4622
|
+
// Overflow
|
|
4623
|
+
overflow && overflowStyles[overflow],
|
|
4624
|
+
// Position
|
|
4625
|
+
position && positionStyles[position],
|
|
4626
|
+
// Cursor for clickable
|
|
4627
|
+
isClickable && "cursor-pointer",
|
|
4628
|
+
className
|
|
4629
|
+
),
|
|
4630
|
+
onClick: isClickable ? handleClick : void 0,
|
|
4631
|
+
onMouseEnter: hoverEvent || onMouseEnter ? handleMouseEnter : void 0,
|
|
4632
|
+
onMouseLeave: hoverEvent || onMouseLeave ? handleMouseLeave : void 0,
|
|
4633
|
+
...rest,
|
|
4634
|
+
children
|
|
4635
|
+
}
|
|
4636
|
+
);
|
|
4637
|
+
}
|
|
4638
|
+
);
|
|
4639
|
+
Box.displayName = "Box";
|
|
4640
|
+
var variantStyles = {
|
|
4641
|
+
h1: "text-4xl font-bold tracking-tight text-[var(--color-foreground)]",
|
|
4642
|
+
h2: "text-3xl font-bold tracking-tight text-[var(--color-foreground)]",
|
|
4643
|
+
h3: "text-2xl font-bold text-[var(--color-foreground)]",
|
|
4644
|
+
h4: "text-xl font-bold text-[var(--color-foreground)]",
|
|
4645
|
+
h5: "text-lg font-bold text-[var(--color-foreground)]",
|
|
4646
|
+
h6: "text-base font-bold text-[var(--color-foreground)]",
|
|
4647
|
+
heading: "text-2xl font-bold text-[var(--color-foreground)]",
|
|
4648
|
+
subheading: "text-lg font-semibold text-[var(--color-foreground)]",
|
|
4649
|
+
body1: "text-base font-normal text-[var(--color-foreground)]",
|
|
4650
|
+
body2: "text-sm font-normal text-[var(--color-foreground)]",
|
|
4651
|
+
body: "text-base font-normal text-[var(--color-foreground)]",
|
|
4652
|
+
caption: "text-xs font-normal text-[var(--color-muted-foreground)]",
|
|
4653
|
+
overline: "text-xs uppercase tracking-wide font-bold text-[var(--color-muted-foreground)]",
|
|
4654
|
+
small: "text-sm font-normal text-[var(--color-foreground)]",
|
|
4655
|
+
large: "text-lg font-medium text-[var(--color-foreground)]",
|
|
4656
|
+
label: "text-sm font-medium text-[var(--color-foreground)]"
|
|
4657
|
+
};
|
|
4658
|
+
var colorStyles = {
|
|
4659
|
+
primary: "text-[var(--color-foreground)]",
|
|
4660
|
+
secondary: "text-[var(--color-muted-foreground)]",
|
|
4661
|
+
muted: "text-[var(--color-muted-foreground)]",
|
|
4662
|
+
error: "text-[var(--color-error)]",
|
|
4663
|
+
success: "text-[var(--color-success)]",
|
|
4664
|
+
warning: "text-[var(--color-warning)]",
|
|
4665
|
+
inherit: "text-inherit"
|
|
4666
|
+
};
|
|
4667
|
+
var weightStyles = {
|
|
4668
|
+
light: "font-light",
|
|
4669
|
+
normal: "font-normal",
|
|
4670
|
+
medium: "font-medium",
|
|
4671
|
+
semibold: "font-semibold",
|
|
4672
|
+
bold: "font-bold"
|
|
4673
|
+
};
|
|
4674
|
+
var defaultElements = {
|
|
4675
|
+
h1: "h1",
|
|
4676
|
+
h2: "h2",
|
|
4677
|
+
h3: "h3",
|
|
4678
|
+
h4: "h4",
|
|
4679
|
+
h5: "h5",
|
|
4680
|
+
h6: "h6",
|
|
4681
|
+
heading: "h2",
|
|
4682
|
+
subheading: "h3",
|
|
4683
|
+
body1: "p",
|
|
4684
|
+
body2: "p",
|
|
4685
|
+
body: "p",
|
|
4686
|
+
caption: "span",
|
|
4687
|
+
overline: "span",
|
|
4688
|
+
small: "span",
|
|
4689
|
+
large: "p",
|
|
4690
|
+
label: "span"
|
|
4691
|
+
};
|
|
4692
|
+
var typographySizeStyles = {
|
|
4693
|
+
xs: "text-xs",
|
|
4694
|
+
sm: "text-sm",
|
|
4695
|
+
md: "text-base",
|
|
4696
|
+
lg: "text-lg",
|
|
4697
|
+
xl: "text-xl",
|
|
4698
|
+
"2xl": "text-2xl",
|
|
4699
|
+
"3xl": "text-3xl"
|
|
4700
|
+
};
|
|
4701
|
+
var overflowStyles2 = {
|
|
4702
|
+
visible: "overflow-visible",
|
|
4703
|
+
hidden: "overflow-hidden",
|
|
4704
|
+
wrap: "break-words overflow-hidden",
|
|
4705
|
+
"clamp-2": "overflow-hidden line-clamp-2",
|
|
4706
|
+
"clamp-3": "overflow-hidden line-clamp-3"
|
|
4707
|
+
};
|
|
4708
|
+
var Typography = ({
|
|
4709
|
+
variant: variantProp,
|
|
4710
|
+
level,
|
|
4711
|
+
color = "primary",
|
|
4712
|
+
align,
|
|
4713
|
+
weight,
|
|
4714
|
+
size,
|
|
4715
|
+
truncate = false,
|
|
4716
|
+
overflow,
|
|
4717
|
+
as,
|
|
4718
|
+
id,
|
|
4719
|
+
className,
|
|
4720
|
+
style,
|
|
4721
|
+
content,
|
|
4722
|
+
children
|
|
4723
|
+
}) => {
|
|
4724
|
+
const variant = variantProp ?? (level ? `h${level}` : "body1");
|
|
4725
|
+
const Component = as || defaultElements[variant];
|
|
4726
|
+
const Comp = Component;
|
|
4727
|
+
return /* @__PURE__ */ jsx(
|
|
4728
|
+
Comp,
|
|
4729
|
+
{
|
|
4730
|
+
id,
|
|
4731
|
+
className: cn(
|
|
4732
|
+
variantStyles[variant],
|
|
4733
|
+
colorStyles[color],
|
|
4734
|
+
weight && weightStyles[weight],
|
|
4735
|
+
size && typographySizeStyles[size],
|
|
4736
|
+
align && `text-${align}`,
|
|
4737
|
+
truncate && "truncate overflow-hidden text-ellipsis",
|
|
4738
|
+
overflow && overflowStyles2[overflow],
|
|
4739
|
+
className
|
|
4740
|
+
),
|
|
4741
|
+
style,
|
|
4742
|
+
children: children ?? content
|
|
4743
|
+
}
|
|
4744
|
+
);
|
|
4745
|
+
};
|
|
4746
|
+
Typography.displayName = "Typography";
|
|
4747
|
+
var gapStyles = {
|
|
4748
|
+
none: "gap-0",
|
|
4749
|
+
xs: "gap-1",
|
|
4750
|
+
sm: "gap-2",
|
|
4751
|
+
md: "gap-4",
|
|
4752
|
+
lg: "gap-6",
|
|
4753
|
+
xl: "gap-8",
|
|
4754
|
+
"2xl": "gap-12"
|
|
4755
|
+
};
|
|
4756
|
+
var alignStyles = {
|
|
4757
|
+
start: "items-start",
|
|
4758
|
+
center: "items-center",
|
|
4759
|
+
end: "items-end",
|
|
4760
|
+
stretch: "items-stretch",
|
|
4761
|
+
baseline: "items-baseline"
|
|
4762
|
+
};
|
|
4763
|
+
var justifyStyles = {
|
|
4764
|
+
start: "justify-start",
|
|
4765
|
+
center: "justify-center",
|
|
4766
|
+
end: "justify-end",
|
|
4767
|
+
between: "justify-between",
|
|
4768
|
+
around: "justify-around",
|
|
4769
|
+
evenly: "justify-evenly"
|
|
4770
|
+
};
|
|
4771
|
+
var Stack = ({
|
|
4772
|
+
direction = "vertical",
|
|
4773
|
+
gap = "md",
|
|
4774
|
+
align = "stretch",
|
|
4775
|
+
justify = "start",
|
|
4776
|
+
wrap = false,
|
|
4777
|
+
reverse = false,
|
|
4778
|
+
flex = false,
|
|
4779
|
+
className,
|
|
4780
|
+
style,
|
|
4781
|
+
children,
|
|
4782
|
+
as: Component = "div",
|
|
4783
|
+
onClick,
|
|
4784
|
+
onKeyDown,
|
|
4785
|
+
role,
|
|
4786
|
+
tabIndex,
|
|
4787
|
+
action,
|
|
4788
|
+
actionPayload,
|
|
4789
|
+
responsive = false
|
|
4790
|
+
}) => {
|
|
4791
|
+
const eventBus = useEventBus();
|
|
4792
|
+
const handleClick = (e) => {
|
|
4793
|
+
if (action) {
|
|
4794
|
+
eventBus.emit(`UI:${action}`, actionPayload ?? {});
|
|
4795
|
+
}
|
|
4796
|
+
onClick?.(e);
|
|
4797
|
+
};
|
|
4798
|
+
const isHorizontal = direction === "horizontal";
|
|
4799
|
+
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
4800
|
+
const Comp = Component;
|
|
4801
|
+
return /* @__PURE__ */ jsx(
|
|
4802
|
+
Comp,
|
|
4803
|
+
{
|
|
4804
|
+
className: cn(
|
|
4805
|
+
"flex",
|
|
4806
|
+
directionClass,
|
|
4807
|
+
gapStyles[gap],
|
|
4808
|
+
alignStyles[align],
|
|
4809
|
+
justifyStyles[justify],
|
|
4810
|
+
wrap && "flex-wrap",
|
|
4811
|
+
flex && "flex-1",
|
|
4812
|
+
className
|
|
4813
|
+
),
|
|
4814
|
+
style,
|
|
4815
|
+
onClick: action || onClick ? handleClick : void 0,
|
|
4816
|
+
onKeyDown,
|
|
4817
|
+
role,
|
|
4818
|
+
tabIndex,
|
|
4819
|
+
children
|
|
4820
|
+
}
|
|
4821
|
+
);
|
|
4822
|
+
};
|
|
4823
|
+
var HStack = (props) => /* @__PURE__ */ jsx(Stack, { direction: "horizontal", ...props });
|
|
4824
|
+
|
|
4825
|
+
// components/organisms/avl/avl-schema-parser.ts
|
|
4826
|
+
function getEntity(orbital) {
|
|
4827
|
+
const entity = orbital.entity;
|
|
4828
|
+
if (typeof entity === "string") {
|
|
4829
|
+
return { name: entity, fields: [], persistence: "runtime" };
|
|
4830
|
+
}
|
|
4831
|
+
const e = entity;
|
|
4832
|
+
return {
|
|
4833
|
+
name: e.name ?? orbital.name,
|
|
4834
|
+
fields: e.fields ?? [],
|
|
4835
|
+
persistence: e.persistence ?? "runtime"
|
|
4836
|
+
};
|
|
4837
|
+
}
|
|
4838
|
+
function getTraits(orbital) {
|
|
4839
|
+
if (!orbital.traits) return [];
|
|
4840
|
+
return orbital.traits.map((t) => {
|
|
4841
|
+
if (typeof t === "string") return { name: t };
|
|
4842
|
+
return t;
|
|
4843
|
+
});
|
|
4844
|
+
}
|
|
4845
|
+
function getPages(orbital) {
|
|
4846
|
+
if (!orbital.pages) return [];
|
|
4847
|
+
return orbital.pages.map((p) => {
|
|
4848
|
+
if (typeof p === "string") return { name: p, path: `/${p.toLowerCase()}` };
|
|
4849
|
+
return p;
|
|
4850
|
+
});
|
|
4851
|
+
}
|
|
4852
|
+
function getStateMachine(trait) {
|
|
4853
|
+
return trait.stateMachine ?? null;
|
|
4854
|
+
}
|
|
4855
|
+
function getStates(sm) {
|
|
4856
|
+
return sm.states ?? [];
|
|
4857
|
+
}
|
|
4858
|
+
function getTransitions(sm) {
|
|
4859
|
+
return sm.transitions ?? [];
|
|
4860
|
+
}
|
|
4861
|
+
function getEvents(sm) {
|
|
4862
|
+
return sm.events ?? [];
|
|
4863
|
+
}
|
|
4864
|
+
function getEmits(trait) {
|
|
4865
|
+
const emits = trait.emits;
|
|
4866
|
+
if (!emits) return [];
|
|
4867
|
+
return emits.map((e) => typeof e === "string" ? e : e.event ?? e.name ?? "");
|
|
4868
|
+
}
|
|
4869
|
+
function getListens(trait) {
|
|
4870
|
+
const listens = trait.listens;
|
|
4871
|
+
if (!listens) return [];
|
|
4872
|
+
return listens.map((l) => typeof l === "string" ? l : l.event ?? "");
|
|
4873
|
+
}
|
|
4874
|
+
function parseEffectType(effect) {
|
|
4875
|
+
if (Array.isArray(effect)) {
|
|
4876
|
+
const [type, ...args] = effect;
|
|
4877
|
+
return { type: String(type), args };
|
|
4878
|
+
}
|
|
4879
|
+
return { type: "unknown", args: [] };
|
|
4880
|
+
}
|
|
4881
|
+
function exprToTree(expr) {
|
|
4882
|
+
if (Array.isArray(expr)) {
|
|
4883
|
+
const [op, ...args] = expr;
|
|
4884
|
+
return {
|
|
4885
|
+
label: String(op),
|
|
4886
|
+
type: "operator",
|
|
4887
|
+
children: args.map((a) => exprToTree(a))
|
|
4888
|
+
};
|
|
4889
|
+
}
|
|
4890
|
+
if (typeof expr === "string") {
|
|
4891
|
+
if (expr.startsWith("@")) {
|
|
4892
|
+
return { label: expr, type: "binding" };
|
|
4893
|
+
}
|
|
4894
|
+
return { label: expr, type: "literal" };
|
|
4895
|
+
}
|
|
4896
|
+
return { label: String(expr), type: "literal" };
|
|
4897
|
+
}
|
|
4898
|
+
function parseApplicationLevel(schema) {
|
|
4899
|
+
const orbitals = [];
|
|
4900
|
+
const crossLinks = [];
|
|
4901
|
+
const count = schema.orbitals.length;
|
|
4902
|
+
const cols = Math.ceil(Math.sqrt(count));
|
|
4903
|
+
const rows = Math.ceil(count / cols);
|
|
4904
|
+
const spacing = 200;
|
|
4905
|
+
const gridW = cols * spacing;
|
|
4906
|
+
const gridH = rows * spacing;
|
|
4907
|
+
const originX = (600 - gridW) / 2 + spacing / 2;
|
|
4908
|
+
const originY = (400 - gridH) / 2 + spacing / 2;
|
|
4909
|
+
schema.orbitals.forEach((orbital, i) => {
|
|
4910
|
+
const entity = getEntity(orbital);
|
|
4911
|
+
const traits = getTraits(orbital);
|
|
4912
|
+
const pages = getPages(orbital);
|
|
4913
|
+
orbitals.push({
|
|
4914
|
+
name: orbital.name,
|
|
4915
|
+
entityName: entity.name,
|
|
4916
|
+
fieldCount: entity.fields.length,
|
|
4917
|
+
persistence: entity.persistence,
|
|
4918
|
+
traitNames: traits.map((t) => t.name ?? ""),
|
|
4919
|
+
pageNames: pages.map((p) => p.name ?? ""),
|
|
4920
|
+
position: {
|
|
4921
|
+
x: originX + i % cols * spacing,
|
|
4922
|
+
y: originY + Math.floor(i / cols) * spacing
|
|
4923
|
+
}
|
|
4924
|
+
});
|
|
4925
|
+
});
|
|
4926
|
+
const emitMap = [];
|
|
4927
|
+
const listenMap = [];
|
|
4928
|
+
for (const orbital of schema.orbitals) {
|
|
4929
|
+
for (const traitRef of getTraits(orbital)) {
|
|
4930
|
+
const traitName = traitRef.name ?? "";
|
|
4931
|
+
for (const event of getEmits(traitRef)) {
|
|
4932
|
+
emitMap.push({ orbital: orbital.name, trait: traitName, event });
|
|
4933
|
+
}
|
|
4934
|
+
for (const event of getListens(traitRef)) {
|
|
4935
|
+
listenMap.push({ orbital: orbital.name, trait: traitName, event });
|
|
4936
|
+
}
|
|
4937
|
+
}
|
|
4938
|
+
}
|
|
4939
|
+
for (const emit of emitMap) {
|
|
4940
|
+
for (const listen of listenMap) {
|
|
4941
|
+
if (emit.event === listen.event && emit.orbital !== listen.orbital) {
|
|
4942
|
+
crossLinks.push({
|
|
4943
|
+
emitterOrbital: emit.orbital,
|
|
4944
|
+
listenerOrbital: listen.orbital,
|
|
4945
|
+
eventName: emit.event,
|
|
4946
|
+
emitterTrait: emit.trait,
|
|
4947
|
+
listenerTrait: listen.trait
|
|
4948
|
+
});
|
|
4949
|
+
}
|
|
4950
|
+
}
|
|
4951
|
+
}
|
|
4952
|
+
return { orbitals, crossLinks };
|
|
4953
|
+
}
|
|
4954
|
+
function parseOrbitalLevel(schema, orbitalName) {
|
|
4955
|
+
const orbital = schema.orbitals.find((o) => o.name === orbitalName);
|
|
4956
|
+
if (!orbital) return null;
|
|
4957
|
+
const entity = getEntity(orbital);
|
|
4958
|
+
const traits = getTraits(orbital);
|
|
4959
|
+
const pages = getPages(orbital);
|
|
4960
|
+
const fields = entity.fields.map((f) => ({
|
|
4961
|
+
name: f.name ?? "",
|
|
4962
|
+
type: f.type ?? "string",
|
|
4963
|
+
required: f.required ?? false,
|
|
4964
|
+
hasDefault: f.default !== void 0
|
|
4965
|
+
}));
|
|
4966
|
+
const traitInfos = traits.map((t) => {
|
|
4967
|
+
const sm = getStateMachine(t);
|
|
4968
|
+
return {
|
|
4969
|
+
name: t.name ?? "",
|
|
4970
|
+
stateCount: sm ? getStates(sm).length : 0,
|
|
4971
|
+
eventCount: sm ? getEvents(sm).length : 0,
|
|
4972
|
+
transitionCount: sm ? getTransitions(sm).length : 0,
|
|
4973
|
+
emits: getEmits(t),
|
|
4974
|
+
listens: getListens(t)
|
|
4975
|
+
};
|
|
4976
|
+
});
|
|
4977
|
+
const pageInfos = pages.map((p) => ({
|
|
4978
|
+
name: p.name ?? "",
|
|
4979
|
+
route: p.path ?? `/${(p.name ?? "").toLowerCase()}`
|
|
4980
|
+
}));
|
|
4981
|
+
const externalLinks = [];
|
|
4982
|
+
const thisTraitEmits = traits.flatMap((t) => getEmits(t).map((e) => ({ trait: t.name ?? "", event: e })));
|
|
4983
|
+
const thisTraitListens = traits.flatMap((t) => getListens(t).map((e) => ({ trait: t.name ?? "", event: e })));
|
|
4984
|
+
for (const other of schema.orbitals) {
|
|
4985
|
+
if (other.name === orbitalName) continue;
|
|
4986
|
+
const otherTraits = getTraits(other);
|
|
4987
|
+
const otherListens = otherTraits.flatMap((t) => getListens(t));
|
|
4988
|
+
const otherEmits = otherTraits.flatMap((t) => getEmits(t));
|
|
4989
|
+
for (const emit of thisTraitEmits) {
|
|
4990
|
+
if (otherListens.includes(emit.event)) {
|
|
4991
|
+
externalLinks.push({
|
|
4992
|
+
targetOrbital: other.name,
|
|
4993
|
+
eventName: emit.event,
|
|
4994
|
+
direction: "out",
|
|
4995
|
+
traitName: emit.trait
|
|
4996
|
+
});
|
|
4997
|
+
}
|
|
4998
|
+
}
|
|
4999
|
+
for (const listen of thisTraitListens) {
|
|
5000
|
+
if (otherEmits.includes(listen.event)) {
|
|
5001
|
+
externalLinks.push({
|
|
5002
|
+
targetOrbital: other.name,
|
|
5003
|
+
eventName: listen.event,
|
|
5004
|
+
direction: "in",
|
|
5005
|
+
traitName: listen.trait
|
|
5006
|
+
});
|
|
5007
|
+
}
|
|
5008
|
+
}
|
|
5009
|
+
}
|
|
5010
|
+
return {
|
|
5011
|
+
name: orbital.name,
|
|
5012
|
+
entity: {
|
|
5013
|
+
name: entity.name,
|
|
5014
|
+
fields,
|
|
5015
|
+
persistence: entity.persistence
|
|
5016
|
+
},
|
|
5017
|
+
traits: traitInfos,
|
|
5018
|
+
pages: pageInfos,
|
|
5019
|
+
externalLinks
|
|
5020
|
+
};
|
|
5021
|
+
}
|
|
5022
|
+
function parseTraitLevel(schema, orbitalName, traitName) {
|
|
5023
|
+
const orbital = schema.orbitals.find((o) => o.name === orbitalName);
|
|
5024
|
+
if (!orbital) return null;
|
|
5025
|
+
const traits = getTraits(orbital);
|
|
5026
|
+
const trait = traits.find((t) => t.name === traitName);
|
|
5027
|
+
if (!trait) return null;
|
|
5028
|
+
const sm = getStateMachine(trait);
|
|
5029
|
+
if (!sm) return null;
|
|
5030
|
+
const states = getStates(sm).map((s) => ({
|
|
5031
|
+
name: s.name ?? "",
|
|
5032
|
+
isInitial: s.isInitial ?? false,
|
|
5033
|
+
isTerminal: s.isTerminal ?? false
|
|
5034
|
+
}));
|
|
5035
|
+
const transitions = getTransitions(sm).map((t, i) => ({
|
|
5036
|
+
from: t.from ?? "",
|
|
5037
|
+
to: t.to ?? "",
|
|
5038
|
+
event: t.event ?? "",
|
|
5039
|
+
guard: t.guard,
|
|
5040
|
+
effects: (t.effects ?? []).map(parseEffectType),
|
|
5041
|
+
index: i
|
|
5042
|
+
}));
|
|
5043
|
+
const entity = getEntity(orbital);
|
|
5044
|
+
return {
|
|
5045
|
+
name: traitName,
|
|
5046
|
+
linkedEntity: entity.name,
|
|
5047
|
+
states,
|
|
5048
|
+
transitions,
|
|
5049
|
+
emittedEvents: getEmits(trait),
|
|
5050
|
+
listenedEvents: getListens(trait)
|
|
5051
|
+
};
|
|
5052
|
+
}
|
|
5053
|
+
function parseTransitionLevel(schema, orbitalName, traitName, transitionIndex) {
|
|
5054
|
+
const traitData = parseTraitLevel(schema, orbitalName, traitName);
|
|
5055
|
+
if (!traitData) return null;
|
|
5056
|
+
const transition = traitData.transitions[transitionIndex];
|
|
5057
|
+
if (!transition) return null;
|
|
5058
|
+
const guard = transition.guard ? exprToTree(transition.guard) : null;
|
|
5059
|
+
const effects = transition.effects.map(
|
|
5060
|
+
(e) => exprToTree([e.type, ...e.args])
|
|
5061
|
+
);
|
|
5062
|
+
const slotTargets = transition.effects.filter((e) => e.type === "render-ui").map((e) => ({
|
|
5063
|
+
name: String(e.args[0] ?? "main"),
|
|
5064
|
+
pattern: typeof e.args[1] === "object" && e.args[1] !== null ? e.args[1].type ?? "unknown" : String(e.args[1] ?? "unknown")
|
|
5065
|
+
}));
|
|
5066
|
+
return {
|
|
5067
|
+
from: transition.from,
|
|
5068
|
+
to: transition.to,
|
|
5069
|
+
event: transition.event,
|
|
5070
|
+
guard,
|
|
5071
|
+
effects,
|
|
5072
|
+
slotTargets
|
|
5073
|
+
};
|
|
5074
|
+
}
|
|
5075
|
+
|
|
5076
|
+
// components/organisms/avl/avl-zoom-state.ts
|
|
5077
|
+
var initialZoomState = {
|
|
5078
|
+
level: "application",
|
|
5079
|
+
selectedOrbital: null,
|
|
5080
|
+
selectedTrait: null,
|
|
5081
|
+
selectedTransition: null,
|
|
5082
|
+
animating: false,
|
|
5083
|
+
animationDirection: "in",
|
|
5084
|
+
animationTarget: null
|
|
5085
|
+
};
|
|
5086
|
+
function zoomReducer(state, action) {
|
|
5087
|
+
switch (action.type) {
|
|
5088
|
+
case "ZOOM_INTO_ORBITAL": {
|
|
5089
|
+
if (state.level !== "application" || state.animating) return state;
|
|
5090
|
+
return {
|
|
5091
|
+
...state,
|
|
5092
|
+
animating: true,
|
|
5093
|
+
animationDirection: "in",
|
|
5094
|
+
animationTarget: { x: action.targetPosition.x, y: action.targetPosition.y, scale: 3 },
|
|
5095
|
+
selectedOrbital: action.orbital
|
|
5096
|
+
};
|
|
5097
|
+
}
|
|
5098
|
+
case "ZOOM_INTO_TRAIT": {
|
|
5099
|
+
if (state.level !== "orbital" || state.animating) return state;
|
|
5100
|
+
return {
|
|
5101
|
+
...state,
|
|
5102
|
+
animating: true,
|
|
5103
|
+
animationDirection: "in",
|
|
5104
|
+
animationTarget: { x: action.targetPosition.x, y: action.targetPosition.y, scale: 3 },
|
|
5105
|
+
selectedTrait: action.trait
|
|
5106
|
+
};
|
|
5107
|
+
}
|
|
5108
|
+
case "ZOOM_INTO_TRANSITION": {
|
|
5109
|
+
if (state.level !== "trait" || state.animating) return state;
|
|
5110
|
+
return {
|
|
5111
|
+
...state,
|
|
5112
|
+
animating: true,
|
|
5113
|
+
animationDirection: "in",
|
|
5114
|
+
animationTarget: { x: action.targetPosition.x, y: action.targetPosition.y, scale: 3 },
|
|
5115
|
+
selectedTransition: action.transitionIndex
|
|
5116
|
+
};
|
|
5117
|
+
}
|
|
5118
|
+
case "ZOOM_OUT": {
|
|
5119
|
+
if (state.level === "application" || state.animating) return state;
|
|
5120
|
+
return {
|
|
5121
|
+
...state,
|
|
5122
|
+
animating: true,
|
|
5123
|
+
animationDirection: "out",
|
|
5124
|
+
animationTarget: { x: 300, y: 200, scale: 0.3 }
|
|
5125
|
+
};
|
|
5126
|
+
}
|
|
5127
|
+
case "ANIMATION_COMPLETE": {
|
|
5128
|
+
if (!state.animating) return state;
|
|
5129
|
+
if (state.animationDirection === "in") {
|
|
5130
|
+
const nextLevel = state.level === "application" ? "orbital" : state.level === "orbital" ? "trait" : "transition";
|
|
5131
|
+
return {
|
|
5132
|
+
...state,
|
|
5133
|
+
level: nextLevel,
|
|
5134
|
+
animating: false,
|
|
5135
|
+
animationTarget: null
|
|
5136
|
+
};
|
|
5137
|
+
}
|
|
5138
|
+
if (state.level === "transition") {
|
|
5139
|
+
return {
|
|
5140
|
+
...state,
|
|
5141
|
+
level: "trait",
|
|
5142
|
+
selectedTransition: null,
|
|
5143
|
+
animating: false,
|
|
5144
|
+
animationTarget: null
|
|
5145
|
+
};
|
|
5146
|
+
}
|
|
5147
|
+
if (state.level === "trait") {
|
|
5148
|
+
return {
|
|
5149
|
+
...state,
|
|
5150
|
+
level: "orbital",
|
|
5151
|
+
selectedTrait: null,
|
|
5152
|
+
animating: false,
|
|
5153
|
+
animationTarget: null
|
|
5154
|
+
};
|
|
5155
|
+
}
|
|
5156
|
+
if (state.level === "orbital") {
|
|
5157
|
+
return {
|
|
5158
|
+
...state,
|
|
5159
|
+
level: "application",
|
|
5160
|
+
selectedOrbital: null,
|
|
5161
|
+
animating: false,
|
|
5162
|
+
animationTarget: null
|
|
5163
|
+
};
|
|
5164
|
+
}
|
|
5165
|
+
return state;
|
|
5166
|
+
}
|
|
5167
|
+
case "RESET": {
|
|
5168
|
+
return initialZoomState;
|
|
5169
|
+
}
|
|
5170
|
+
default:
|
|
5171
|
+
return state;
|
|
5172
|
+
}
|
|
5173
|
+
}
|
|
5174
|
+
function getBreadcrumbs(state) {
|
|
5175
|
+
const crumbs = [{ label: "Application", level: "application" }];
|
|
5176
|
+
if (state.selectedOrbital) {
|
|
5177
|
+
crumbs.push({ label: state.selectedOrbital, level: "orbital" });
|
|
5178
|
+
}
|
|
5179
|
+
if (state.selectedTrait) {
|
|
5180
|
+
crumbs.push({ label: state.selectedTrait, level: "trait" });
|
|
5181
|
+
}
|
|
5182
|
+
if (state.selectedTransition !== null) {
|
|
5183
|
+
crumbs.push({ label: `Transition #${state.selectedTransition}`, level: "transition" });
|
|
5184
|
+
}
|
|
5185
|
+
return crumbs;
|
|
5186
|
+
}
|
|
5187
|
+
var AvlClickTarget = ({
|
|
5188
|
+
x,
|
|
5189
|
+
y,
|
|
5190
|
+
width,
|
|
5191
|
+
height,
|
|
5192
|
+
onClick,
|
|
5193
|
+
onHover,
|
|
5194
|
+
cursor = "pointer",
|
|
5195
|
+
glowColor = "var(--color-primary)",
|
|
5196
|
+
label,
|
|
5197
|
+
children
|
|
5198
|
+
}) => {
|
|
5199
|
+
const [hovering, setHovering] = useState(false);
|
|
5200
|
+
const handleMouseEnter = useCallback(() => {
|
|
5201
|
+
setHovering(true);
|
|
5202
|
+
onHover?.(true);
|
|
5203
|
+
}, [onHover]);
|
|
5204
|
+
const handleMouseLeave = useCallback(() => {
|
|
5205
|
+
setHovering(false);
|
|
5206
|
+
onHover?.(false);
|
|
5207
|
+
}, [onHover]);
|
|
5208
|
+
const handleKeyDown = useCallback((e) => {
|
|
5209
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
5210
|
+
e.preventDefault();
|
|
5211
|
+
onClick();
|
|
5212
|
+
}
|
|
5213
|
+
}, [onClick]);
|
|
5214
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5215
|
+
hovering && /* @__PURE__ */ jsx(
|
|
5216
|
+
"rect",
|
|
5217
|
+
{
|
|
5218
|
+
x: x - 4,
|
|
5219
|
+
y: y - 4,
|
|
5220
|
+
width: width + 8,
|
|
5221
|
+
height: height + 8,
|
|
5222
|
+
rx: 8,
|
|
5223
|
+
fill: glowColor,
|
|
5224
|
+
opacity: 0.08
|
|
5225
|
+
}
|
|
5226
|
+
),
|
|
5227
|
+
children,
|
|
5228
|
+
/* @__PURE__ */ jsx(
|
|
5229
|
+
"rect",
|
|
5230
|
+
{
|
|
5231
|
+
x,
|
|
5232
|
+
y,
|
|
5233
|
+
width,
|
|
5234
|
+
height,
|
|
5235
|
+
fill: "transparent",
|
|
5236
|
+
style: { cursor },
|
|
5237
|
+
pointerEvents: "all",
|
|
5238
|
+
onClick,
|
|
5239
|
+
onMouseEnter: handleMouseEnter,
|
|
5240
|
+
onMouseLeave: handleMouseLeave,
|
|
5241
|
+
onKeyDown: handleKeyDown,
|
|
5242
|
+
tabIndex: 0,
|
|
5243
|
+
role: "button",
|
|
5244
|
+
"aria-label": label
|
|
5245
|
+
}
|
|
5246
|
+
)
|
|
5247
|
+
] });
|
|
5248
|
+
};
|
|
5249
|
+
AvlClickTarget.displayName = "AvlClickTarget";
|
|
5250
|
+
var ORBITAL_R = 60;
|
|
5251
|
+
var ENTITY_R = 14;
|
|
5252
|
+
function bundleCrossLinks(links) {
|
|
5253
|
+
const bundles = /* @__PURE__ */ new Map();
|
|
5254
|
+
for (const link of links) {
|
|
5255
|
+
const key = [link.emitterOrbital, link.listenerOrbital].sort().join("::");
|
|
5256
|
+
if (!bundles.has(key)) bundles.set(key, []);
|
|
5257
|
+
bundles.get(key).push(link);
|
|
5258
|
+
}
|
|
5259
|
+
return bundles;
|
|
5260
|
+
}
|
|
5261
|
+
var AvlApplicationScene = ({
|
|
5262
|
+
data,
|
|
5263
|
+
color = "var(--color-primary)",
|
|
5264
|
+
onOrbitalClick
|
|
5265
|
+
}) => {
|
|
5266
|
+
const posMap = /* @__PURE__ */ new Map();
|
|
5267
|
+
data.orbitals.forEach((o) => posMap.set(o.name, o.position));
|
|
5268
|
+
const bundles = bundleCrossLinks(data.crossLinks);
|
|
5269
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5270
|
+
Array.from(bundles.entries()).map(([key, links]) => {
|
|
5271
|
+
const first = links[0];
|
|
5272
|
+
const fromPos = posMap.get(first.emitterOrbital);
|
|
5273
|
+
const toPos = posMap.get(first.listenerOrbital);
|
|
5274
|
+
if (!fromPos || !toPos) return null;
|
|
5275
|
+
const cp = curveControlPoint(fromPos.x, fromPos.y, toPos.x, toPos.y, 40);
|
|
5276
|
+
const midX = cp.cpx;
|
|
5277
|
+
const midY = cp.cpy;
|
|
5278
|
+
return /* @__PURE__ */ jsxs("g", { opacity: 0.5, children: [
|
|
5279
|
+
/* @__PURE__ */ jsx(
|
|
5280
|
+
"path",
|
|
5281
|
+
{
|
|
5282
|
+
d: `M${fromPos.x},${fromPos.y} Q${midX},${midY} ${toPos.x},${toPos.y}`,
|
|
5283
|
+
fill: "none",
|
|
5284
|
+
stroke: color,
|
|
5285
|
+
strokeWidth: 1.5,
|
|
5286
|
+
strokeDasharray: "6 3",
|
|
5287
|
+
markerEnd: "url(#cosmicArrow)"
|
|
5288
|
+
}
|
|
5289
|
+
),
|
|
5290
|
+
links.map((link, i) => /* @__PURE__ */ jsxs("g", { children: [
|
|
5291
|
+
/* @__PURE__ */ jsx(
|
|
5292
|
+
AvlEffect,
|
|
5293
|
+
{
|
|
5294
|
+
x: midX - 12,
|
|
5295
|
+
y: midY - 10 + i * 16,
|
|
5296
|
+
effectType: "emit",
|
|
5297
|
+
size: 8,
|
|
5298
|
+
color
|
|
5299
|
+
}
|
|
5300
|
+
),
|
|
5301
|
+
/* @__PURE__ */ jsx(
|
|
5302
|
+
"text",
|
|
5303
|
+
{
|
|
5304
|
+
x: midX + 2,
|
|
5305
|
+
y: midY - 6 + i * 16,
|
|
5306
|
+
fill: color,
|
|
5307
|
+
fontSize: 7,
|
|
5308
|
+
opacity: 0.7,
|
|
5309
|
+
children: link.eventName
|
|
5310
|
+
}
|
|
5311
|
+
)
|
|
5312
|
+
] }, `${key}-${i}`))
|
|
5313
|
+
] }, key);
|
|
5314
|
+
}),
|
|
5315
|
+
data.orbitals.map((orbital) => {
|
|
5316
|
+
const { x, y } = orbital.position;
|
|
5317
|
+
const traitAngleStart = -60;
|
|
5318
|
+
const traitAngleStep = orbital.traitNames.length > 1 ? 120 / (orbital.traitNames.length - 1) : 0;
|
|
5319
|
+
const pageAngleStart = -Math.PI / 3;
|
|
5320
|
+
const pageAngleStep = orbital.pageNames.length > 1 ? Math.PI * 0.8 / (orbital.pageNames.length - 1) : 0;
|
|
5321
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5322
|
+
/* @__PURE__ */ jsx(AvlOrbital, { cx: x, cy: y, r: ORBITAL_R, label: orbital.name, color }),
|
|
5323
|
+
orbital.traitNames.map((trait, i) => /* @__PURE__ */ jsx(
|
|
5324
|
+
AvlTrait,
|
|
5325
|
+
{
|
|
5326
|
+
cx: x,
|
|
5327
|
+
cy: y,
|
|
5328
|
+
rx: 25 + i * 10,
|
|
5329
|
+
ry: 12 + i * 4,
|
|
5330
|
+
rotation: traitAngleStart + i * traitAngleStep,
|
|
5331
|
+
color,
|
|
5332
|
+
opacity: 0.4
|
|
5333
|
+
},
|
|
5334
|
+
trait
|
|
5335
|
+
)),
|
|
5336
|
+
/* @__PURE__ */ jsx(
|
|
5337
|
+
AvlEntity,
|
|
5338
|
+
{
|
|
5339
|
+
x,
|
|
5340
|
+
y,
|
|
5341
|
+
r: ENTITY_R,
|
|
5342
|
+
fieldCount: orbital.fieldCount,
|
|
5343
|
+
persistence: orbital.persistence,
|
|
5344
|
+
color
|
|
5345
|
+
}
|
|
5346
|
+
),
|
|
5347
|
+
orbital.pageNames.map((page, i) => {
|
|
5348
|
+
const angle = pageAngleStart + i * pageAngleStep;
|
|
5349
|
+
const px = x + (ORBITAL_R + 12) * Math.cos(angle);
|
|
5350
|
+
const py = y + (ORBITAL_R + 12) * Math.sin(angle);
|
|
5351
|
+
return /* @__PURE__ */ jsx(AvlPage, { x: px, y: py, size: 6, label: page, color }, page);
|
|
5352
|
+
}),
|
|
5353
|
+
onOrbitalClick && /* @__PURE__ */ jsx(
|
|
5354
|
+
AvlClickTarget,
|
|
5355
|
+
{
|
|
5356
|
+
x: x - ORBITAL_R,
|
|
5357
|
+
y: y - ORBITAL_R,
|
|
5358
|
+
width: ORBITAL_R * 2,
|
|
5359
|
+
height: ORBITAL_R * 2,
|
|
5360
|
+
onClick: () => onOrbitalClick(orbital.name, { x, y }),
|
|
5361
|
+
label: `Orbital: ${orbital.name} (${orbital.traitNames.length} traits, ${orbital.pageNames.length} pages)`,
|
|
5362
|
+
glowColor: color,
|
|
5363
|
+
children: /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: 0, height: 0, fill: "transparent" })
|
|
5364
|
+
}
|
|
5365
|
+
)
|
|
5366
|
+
] }, orbital.name);
|
|
5367
|
+
}),
|
|
5368
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "cosmicArrow", viewBox: "0 0 10 10", refX: "8", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: color, opacity: 0.5 }) }) })
|
|
5369
|
+
] });
|
|
5370
|
+
};
|
|
5371
|
+
AvlApplicationScene.displayName = "AvlApplicationScene";
|
|
5372
|
+
var CX = 300;
|
|
5373
|
+
var CY = 200;
|
|
5374
|
+
var ORBITAL_R2 = 130;
|
|
5375
|
+
var ENTITY_R2 = 24;
|
|
5376
|
+
var AvlOrbitalScene = ({
|
|
5377
|
+
data,
|
|
5378
|
+
color = "var(--color-primary)",
|
|
5379
|
+
onTraitClick
|
|
5380
|
+
}) => {
|
|
5381
|
+
const traitAngleStart = -Math.PI / 3;
|
|
5382
|
+
const traitAngleStep = data.traits.length > 1 ? Math.PI * 1.2 / (data.traits.length - 1) : 0;
|
|
5383
|
+
const pageAngleStart = -Math.PI / 3;
|
|
5384
|
+
const pageAngleStep = data.pages.length > 1 ? Math.PI * 0.8 / (data.pages.length - 1) : 0;
|
|
5385
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5386
|
+
/* @__PURE__ */ jsx(AvlOrbital, { cx: CX, cy: CY, r: ORBITAL_R2, label: data.name, color }),
|
|
5387
|
+
data.traits.map((trait, i) => {
|
|
5388
|
+
const rotation = traitAngleStart + i * traitAngleStep;
|
|
5389
|
+
const rotationDeg = rotation * 180 / Math.PI;
|
|
5390
|
+
const baseRx = 55 + i * 20;
|
|
5391
|
+
const baseRy = 24 + i * 8;
|
|
5392
|
+
const labelX = CX - baseRx - 10;
|
|
5393
|
+
const labelY = CY;
|
|
5394
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5395
|
+
/* @__PURE__ */ jsx(
|
|
5396
|
+
AvlTrait,
|
|
5397
|
+
{
|
|
5398
|
+
cx: CX,
|
|
5399
|
+
cy: CY,
|
|
5400
|
+
rx: baseRx,
|
|
5401
|
+
ry: baseRy,
|
|
5402
|
+
rotation: rotationDeg,
|
|
5403
|
+
label: trait.name,
|
|
5404
|
+
color,
|
|
5405
|
+
opacity: 0.7
|
|
5406
|
+
}
|
|
5407
|
+
),
|
|
5408
|
+
onTraitClick && /* @__PURE__ */ jsx(
|
|
5409
|
+
AvlClickTarget,
|
|
5410
|
+
{
|
|
5411
|
+
x: CX - baseRx,
|
|
5412
|
+
y: CY - baseRy,
|
|
5413
|
+
width: baseRx * 2,
|
|
5414
|
+
height: baseRy * 2,
|
|
5415
|
+
onClick: () => onTraitClick(trait.name, { x: CX, y: CY }),
|
|
5416
|
+
label: `Trait: ${trait.name} (${trait.stateCount} states)`,
|
|
5417
|
+
glowColor: color,
|
|
5418
|
+
children: /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: 0, height: 0, fill: "transparent" })
|
|
5419
|
+
}
|
|
5420
|
+
),
|
|
5421
|
+
/* @__PURE__ */ jsxs(
|
|
5422
|
+
"text",
|
|
5423
|
+
{
|
|
5424
|
+
x: labelX - 20,
|
|
5425
|
+
y: labelY + 12,
|
|
5426
|
+
textAnchor: "end",
|
|
5427
|
+
fill: color,
|
|
5428
|
+
fontSize: 7,
|
|
5429
|
+
opacity: 0.4,
|
|
5430
|
+
transform: `rotate(${-rotationDeg},${labelX - 20},${labelY + 12})`,
|
|
5431
|
+
children: [
|
|
5432
|
+
trait.stateCount,
|
|
5433
|
+
"s ",
|
|
5434
|
+
trait.eventCount,
|
|
5435
|
+
"e"
|
|
5436
|
+
]
|
|
5437
|
+
}
|
|
5438
|
+
)
|
|
5439
|
+
] }, trait.name);
|
|
5440
|
+
}),
|
|
5441
|
+
/* @__PURE__ */ jsx(
|
|
5442
|
+
AvlEntity,
|
|
5443
|
+
{
|
|
5444
|
+
x: CX,
|
|
5445
|
+
y: CY,
|
|
5446
|
+
r: ENTITY_R2,
|
|
5447
|
+
fieldCount: data.entity.fields.length,
|
|
5448
|
+
persistence: data.entity.persistence,
|
|
5449
|
+
color
|
|
5450
|
+
}
|
|
5451
|
+
),
|
|
5452
|
+
/* @__PURE__ */ jsx("text", { x: CX, y: CY + ENTITY_R2 + 16, textAnchor: "middle", fill: color, fontSize: 10, fontWeight: "bold", children: data.entity.name }),
|
|
5453
|
+
data.entity.fields.slice(0, 8).map((field, i) => {
|
|
5454
|
+
const angle = -Math.PI / 2 + Math.PI * 2 * i / Math.min(data.entity.fields.length, 8);
|
|
5455
|
+
const fx = CX + (ENTITY_R2 + 30) * Math.cos(angle);
|
|
5456
|
+
const fy = CY + (ENTITY_R2 + 30) * Math.sin(angle);
|
|
5457
|
+
return /* @__PURE__ */ jsx(
|
|
5458
|
+
"text",
|
|
5459
|
+
{
|
|
5460
|
+
x: fx,
|
|
5461
|
+
y: fy,
|
|
5462
|
+
textAnchor: "middle",
|
|
5463
|
+
dominantBaseline: "central",
|
|
5464
|
+
fill: color,
|
|
5465
|
+
fontSize: 7,
|
|
5466
|
+
opacity: 0.5,
|
|
5467
|
+
children: field.name
|
|
5468
|
+
},
|
|
5469
|
+
field.name
|
|
5470
|
+
);
|
|
5471
|
+
}),
|
|
5472
|
+
data.pages.map((page, i) => {
|
|
5473
|
+
const angle = pageAngleStart + i * pageAngleStep;
|
|
5474
|
+
const px = CX + (ORBITAL_R2 + 15) * Math.cos(angle);
|
|
5475
|
+
const py = CY + (ORBITAL_R2 + 15) * Math.sin(angle);
|
|
5476
|
+
return /* @__PURE__ */ jsx(AvlPage, { x: px, y: py, label: page.route, color }, page.name);
|
|
5477
|
+
}),
|
|
5478
|
+
data.externalLinks.map((link, i) => {
|
|
5479
|
+
const isOut = link.direction === "out";
|
|
5480
|
+
const edgeX = isOut ? 580 : 20;
|
|
5481
|
+
const y = 50 + i * 24;
|
|
5482
|
+
return /* @__PURE__ */ jsxs("g", { opacity: 0.3, children: [
|
|
5483
|
+
/* @__PURE__ */ jsx(
|
|
5484
|
+
"line",
|
|
5485
|
+
{
|
|
5486
|
+
x1: isOut ? CX + ORBITAL_R2 + 10 : edgeX,
|
|
5487
|
+
y1: y,
|
|
5488
|
+
x2: isOut ? edgeX : CX - ORBITAL_R2 - 10,
|
|
5489
|
+
y2: y,
|
|
5490
|
+
stroke: color,
|
|
5491
|
+
strokeWidth: 1,
|
|
5492
|
+
strokeDasharray: "6 3"
|
|
5493
|
+
}
|
|
5494
|
+
),
|
|
5495
|
+
/* @__PURE__ */ jsxs(
|
|
5496
|
+
"text",
|
|
5497
|
+
{
|
|
5498
|
+
x: isOut ? 585 : 5,
|
|
5499
|
+
y: y + 4,
|
|
5500
|
+
textAnchor: isOut ? "start" : "start",
|
|
5501
|
+
fill: color,
|
|
5502
|
+
fontSize: 7,
|
|
5503
|
+
opacity: 0.7,
|
|
5504
|
+
children: [
|
|
5505
|
+
isOut ? "emit" : "listen",
|
|
5506
|
+
": ",
|
|
5507
|
+
link.eventName,
|
|
5508
|
+
" (",
|
|
5509
|
+
link.targetOrbital,
|
|
5510
|
+
")"
|
|
5511
|
+
]
|
|
5512
|
+
}
|
|
5513
|
+
)
|
|
5514
|
+
] }, `ext-${i}`);
|
|
5515
|
+
})
|
|
5516
|
+
] });
|
|
5517
|
+
};
|
|
5518
|
+
AvlOrbitalScene.displayName = "AvlOrbitalScene";
|
|
5519
|
+
var STATE_W = 110;
|
|
5520
|
+
var STATE_H = 38;
|
|
5521
|
+
var LABEL_W = 90;
|
|
5522
|
+
var LABEL_H = 20;
|
|
5523
|
+
var elk = new ELK();
|
|
5524
|
+
async function computeLayout(data) {
|
|
5525
|
+
const elkGraph = {
|
|
5526
|
+
id: "root",
|
|
5527
|
+
layoutOptions: {
|
|
5528
|
+
"elk.algorithm": "layered",
|
|
5529
|
+
"elk.direction": "DOWN",
|
|
5530
|
+
"elk.spacing.nodeNode": "50",
|
|
5531
|
+
"elk.spacing.edgeNode": "30",
|
|
5532
|
+
"elk.spacing.edgeEdge": "20",
|
|
5533
|
+
"elk.spacing.edgeLabel": "8",
|
|
5534
|
+
"elk.spacing.labelLabel": "6",
|
|
5535
|
+
"elk.layered.spacing.nodeNodeBetweenLayers": "60",
|
|
5536
|
+
"elk.edgeLabels.placement": "CENTER",
|
|
5537
|
+
"elk.layered.mergeEdges": "false",
|
|
5538
|
+
"elk.layered.nodePlacement.strategy": "NETWORK_SIMPLEX"
|
|
5539
|
+
},
|
|
5540
|
+
children: data.states.map((s) => ({
|
|
5541
|
+
id: s.name,
|
|
5542
|
+
width: STATE_W,
|
|
5543
|
+
height: STATE_H,
|
|
5544
|
+
labels: [{ text: s.name, width: STATE_W - 10, height: 14 }]
|
|
5545
|
+
})),
|
|
5546
|
+
edges: data.transitions.map((t, i) => {
|
|
5547
|
+
const hasEffects = t.effects.length > 0;
|
|
5548
|
+
const labelH = hasEffects ? 38 : LABEL_H;
|
|
5549
|
+
const textW = Math.max(t.event.length * 7, 40);
|
|
5550
|
+
const iconsW = Math.min(t.effects.length, 4) * 14;
|
|
5551
|
+
const labelW = Math.max(textW, iconsW, LABEL_W) + 20;
|
|
5552
|
+
return {
|
|
5553
|
+
id: `e${i}`,
|
|
5554
|
+
sources: [t.from],
|
|
5555
|
+
targets: [t.to],
|
|
5556
|
+
labels: [{
|
|
5557
|
+
text: t.event,
|
|
5558
|
+
width: labelW,
|
|
5559
|
+
height: labelH
|
|
5560
|
+
}]
|
|
5561
|
+
};
|
|
5562
|
+
})
|
|
5563
|
+
};
|
|
5564
|
+
const layout = await elk.layout(elkGraph);
|
|
5565
|
+
const layoutChildren = layout.children ?? [];
|
|
5566
|
+
const layoutEdges = layout.edges ?? [];
|
|
5567
|
+
const nodes = layoutChildren.map((n) => ({
|
|
5568
|
+
id: n.id,
|
|
5569
|
+
x: n.x ?? 0,
|
|
5570
|
+
y: n.y ?? 0,
|
|
5571
|
+
width: n.width ?? STATE_W,
|
|
5572
|
+
height: n.height ?? STATE_H,
|
|
5573
|
+
isInitial: data.states.find((s) => s.name === n.id)?.isInitial,
|
|
5574
|
+
isTerminal: data.states.find((s) => s.name === n.id)?.isTerminal
|
|
5575
|
+
}));
|
|
5576
|
+
const edges = layoutEdges.map((e, i) => {
|
|
5577
|
+
const t = data.transitions[i];
|
|
5578
|
+
const labels = e.labels ?? [];
|
|
5579
|
+
const label = labels[0];
|
|
5580
|
+
const sections = e.sections ?? [];
|
|
5581
|
+
const points = [];
|
|
5582
|
+
for (const section of sections) {
|
|
5583
|
+
const startPoint = section.startPoint;
|
|
5584
|
+
const endPoint = section.endPoint;
|
|
5585
|
+
const bendPoints = section.bendPoints ?? [];
|
|
5586
|
+
points.push({ x: startPoint.x, y: startPoint.y });
|
|
5587
|
+
for (const bp of bendPoints) {
|
|
5588
|
+
points.push({ x: bp.x, y: bp.y });
|
|
5589
|
+
}
|
|
5590
|
+
points.push({ x: endPoint.x, y: endPoint.y });
|
|
5591
|
+
}
|
|
5592
|
+
return {
|
|
5593
|
+
id: e.id,
|
|
5594
|
+
from: t.from,
|
|
5595
|
+
to: t.to,
|
|
5596
|
+
event: t.event,
|
|
5597
|
+
effects: t.effects,
|
|
5598
|
+
guard: !!t.guard,
|
|
5599
|
+
index: t.index,
|
|
5600
|
+
labelX: (label?.x ?? 0) + (label?.width ?? 0) / 2,
|
|
5601
|
+
labelY: (label?.y ?? 0) + (label?.height ?? 0) / 2,
|
|
5602
|
+
points,
|
|
5603
|
+
isSelf: t.from === t.to
|
|
5604
|
+
};
|
|
5605
|
+
});
|
|
5606
|
+
return {
|
|
5607
|
+
nodes,
|
|
5608
|
+
edges,
|
|
5609
|
+
width: layout.width ?? 600,
|
|
5610
|
+
height: layout.height ?? 400
|
|
5611
|
+
};
|
|
5612
|
+
}
|
|
5613
|
+
function edgePath(points) {
|
|
5614
|
+
if (points.length === 0) return "";
|
|
5615
|
+
let d = `M ${points[0].x},${points[0].y}`;
|
|
5616
|
+
for (let i = 1; i < points.length; i++) {
|
|
5617
|
+
d += ` L ${points[i].x},${points[i].y}`;
|
|
5618
|
+
}
|
|
5619
|
+
return d;
|
|
5620
|
+
}
|
|
5621
|
+
function mapEffectType(label) {
|
|
5622
|
+
const map = {
|
|
5623
|
+
"render-ui": "render-ui",
|
|
5624
|
+
set: "set",
|
|
5625
|
+
persist: "persist",
|
|
5626
|
+
fetch: "fetch",
|
|
5627
|
+
emit: "emit",
|
|
5628
|
+
navigate: "navigate",
|
|
5629
|
+
notify: "notify",
|
|
5630
|
+
"call-service": "call-service",
|
|
5631
|
+
log: "log"
|
|
5632
|
+
};
|
|
5633
|
+
return map[label] ?? "log";
|
|
5634
|
+
}
|
|
5635
|
+
var AvlTraitScene = ({
|
|
5636
|
+
data,
|
|
5637
|
+
color = "var(--color-primary)",
|
|
5638
|
+
onTransitionClick
|
|
5639
|
+
}) => {
|
|
5640
|
+
const [layout, setLayout] = useState(null);
|
|
5641
|
+
const dataKey = useMemo(() => JSON.stringify(data), [data]);
|
|
5642
|
+
useEffect(() => {
|
|
5643
|
+
computeLayout(data).then(setLayout).catch(console.error);
|
|
5644
|
+
}, [dataKey]);
|
|
5645
|
+
if (!layout) {
|
|
5646
|
+
return /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("text", { x: 300, y: 200, textAnchor: "middle", fill: color, fontSize: 12, opacity: 0.5, children: "Computing layout..." }) });
|
|
5647
|
+
}
|
|
5648
|
+
const padding = 30;
|
|
5649
|
+
const availW = 600 - padding * 2;
|
|
5650
|
+
const availH = 340;
|
|
5651
|
+
const scale = Math.min(1, availW / layout.width, availH / layout.height);
|
|
5652
|
+
const scaledW = layout.width * scale;
|
|
5653
|
+
const scaledH = layout.height * scale;
|
|
5654
|
+
const offsetX = padding + (availW - scaledW) / 2;
|
|
5655
|
+
const offsetY = 60 + (availH - scaledH) / 2;
|
|
5656
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5657
|
+
/* @__PURE__ */ jsx("text", { x: 300, y: 24, textAnchor: "middle", fill: color, fontSize: 16, fontWeight: "bold", children: data.name }),
|
|
5658
|
+
/* @__PURE__ */ jsxs("text", { x: 300, y: 42, textAnchor: "middle", fill: color, fontSize: 11, opacity: 0.5, children: [
|
|
5659
|
+
"linked to ",
|
|
5660
|
+
data.linkedEntity
|
|
5661
|
+
] }),
|
|
5662
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "traitArrow", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: color, opacity: 0.6 }) }) }),
|
|
5663
|
+
/* @__PURE__ */ jsxs("g", { transform: `translate(${offsetX},${offsetY}) scale(${scale})`, children: [
|
|
5664
|
+
layout.edges.map((edge) => {
|
|
5665
|
+
const hasEmit = edge.effects.some((e) => e.type === "emit");
|
|
5666
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5667
|
+
/* @__PURE__ */ jsx(
|
|
5668
|
+
"path",
|
|
5669
|
+
{
|
|
5670
|
+
d: edgePath(edge.points),
|
|
5671
|
+
fill: "none",
|
|
5672
|
+
stroke: color,
|
|
5673
|
+
strokeWidth: 1.5,
|
|
5674
|
+
opacity: 0.4,
|
|
5675
|
+
markerEnd: "url(#traitArrow)"
|
|
5676
|
+
}
|
|
5677
|
+
),
|
|
5678
|
+
(() => {
|
|
5679
|
+
const visibleEffects = edge.effects.slice(0, 4);
|
|
5680
|
+
const textW = Math.max(edge.event.length * 7, 40);
|
|
5681
|
+
const iconsW = visibleEffects.length * 14;
|
|
5682
|
+
const cardW = Math.max(textW, iconsW) + 20;
|
|
5683
|
+
const hasEffects = visibleEffects.length > 0;
|
|
5684
|
+
const cardH = hasEffects ? 34 : 20;
|
|
5685
|
+
const cardX = edge.labelX - cardW / 2;
|
|
5686
|
+
const cardY = edge.labelY - 10;
|
|
5687
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5688
|
+
/* @__PURE__ */ jsx(
|
|
5689
|
+
"rect",
|
|
5690
|
+
{
|
|
5691
|
+
x: cardX,
|
|
5692
|
+
y: cardY,
|
|
5693
|
+
width: cardW,
|
|
5694
|
+
height: cardH,
|
|
5695
|
+
rx: 5,
|
|
5696
|
+
fill: "var(--color-surface, white)",
|
|
5697
|
+
stroke: color,
|
|
5698
|
+
strokeWidth: 0.8,
|
|
5699
|
+
opacity: 0.95
|
|
5700
|
+
}
|
|
5701
|
+
),
|
|
5702
|
+
/* @__PURE__ */ jsx(
|
|
5703
|
+
"text",
|
|
5704
|
+
{
|
|
5705
|
+
x: edge.labelX,
|
|
5706
|
+
y: cardY + 13,
|
|
5707
|
+
textAnchor: "middle",
|
|
5708
|
+
fill: color,
|
|
5709
|
+
fontSize: 11,
|
|
5710
|
+
fontWeight: "600",
|
|
5711
|
+
children: edge.event
|
|
5712
|
+
}
|
|
5713
|
+
),
|
|
5714
|
+
hasEffects && /* @__PURE__ */ jsx("g", { children: visibleEffects.map((eff, ei) => {
|
|
5715
|
+
const iconX = edge.labelX - (visibleEffects.length - 1) * 7 + ei * 14;
|
|
5716
|
+
return /* @__PURE__ */ jsx(
|
|
5717
|
+
AvlEffect,
|
|
5718
|
+
{
|
|
5719
|
+
x: iconX,
|
|
5720
|
+
y: cardY + 25,
|
|
5721
|
+
effectType: mapEffectType(eff.type),
|
|
5722
|
+
size: 9,
|
|
5723
|
+
color
|
|
5724
|
+
},
|
|
5725
|
+
`${edge.id}-eff-${ei}`
|
|
5726
|
+
);
|
|
5727
|
+
}) }),
|
|
5728
|
+
edge.guard && /* @__PURE__ */ jsx(
|
|
5729
|
+
AvlGuard,
|
|
5730
|
+
{
|
|
5731
|
+
x: cardX + cardW - 10,
|
|
5732
|
+
y: cardY + 10,
|
|
5733
|
+
label: "",
|
|
5734
|
+
color,
|
|
5735
|
+
size: 6
|
|
5736
|
+
}
|
|
5737
|
+
),
|
|
5738
|
+
hasEmit && /* @__PURE__ */ jsxs("circle", { cx: cardX - 8, cy: cardY + cardH / 2, r: 3, fill: color, opacity: 0.5, children: [
|
|
5739
|
+
/* @__PURE__ */ jsx("animate", { attributeName: "r", values: "2;5;2", dur: "1.5s", repeatCount: "indefinite" }),
|
|
5740
|
+
/* @__PURE__ */ jsx("animate", { attributeName: "opacity", values: "0.5;0.15;0.5", dur: "1.5s", repeatCount: "indefinite" })
|
|
5741
|
+
] })
|
|
5742
|
+
] });
|
|
5743
|
+
})(),
|
|
5744
|
+
onTransitionClick && /* @__PURE__ */ jsx(
|
|
5745
|
+
AvlClickTarget,
|
|
5746
|
+
{
|
|
5747
|
+
x: edge.labelX - 50,
|
|
5748
|
+
y: edge.labelY - 15,
|
|
5749
|
+
width: 100,
|
|
5750
|
+
height: 30,
|
|
5751
|
+
onClick: () => onTransitionClick(edge.index, { x: edge.labelX + offsetX, y: edge.labelY + offsetY }),
|
|
5752
|
+
label: `${edge.event}: ${edge.from} -> ${edge.to}`,
|
|
5753
|
+
glowColor: color,
|
|
5754
|
+
children: /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: 0, height: 0, fill: "transparent" })
|
|
5755
|
+
}
|
|
5756
|
+
)
|
|
5757
|
+
] }, edge.id);
|
|
5758
|
+
}),
|
|
5759
|
+
layout.nodes.map((node) => /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx(
|
|
5760
|
+
AvlState,
|
|
5761
|
+
{
|
|
5762
|
+
x: node.x,
|
|
5763
|
+
y: node.y,
|
|
5764
|
+
width: node.width,
|
|
5765
|
+
height: node.height,
|
|
5766
|
+
name: node.id,
|
|
5767
|
+
isInitial: node.isInitial,
|
|
5768
|
+
isTerminal: node.isTerminal,
|
|
5769
|
+
color
|
|
5770
|
+
}
|
|
5771
|
+
) }, node.id))
|
|
5772
|
+
] }),
|
|
5773
|
+
data.emittedEvents.map((evt, i) => /* @__PURE__ */ jsxs("g", { children: [
|
|
5774
|
+
/* @__PURE__ */ jsx("line", { x1: 450, y1: 55 + i * 22, x2: 585, y2: 55 + i * 22, stroke: color, strokeWidth: 1, strokeDasharray: "4 3", opacity: 0.3 }),
|
|
5775
|
+
/* @__PURE__ */ jsxs("text", { x: 588, y: 59 + i * 22, fill: color, fontSize: 10, opacity: 0.5, children: [
|
|
5776
|
+
"emit: ",
|
|
5777
|
+
evt
|
|
5778
|
+
] })
|
|
5779
|
+
] }, `emit-${i}`)),
|
|
5780
|
+
data.listenedEvents.map((evt, i) => /* @__PURE__ */ jsxs("g", { children: [
|
|
5781
|
+
/* @__PURE__ */ jsx("line", { x1: 15, y1: 55 + i * 22, x2: 150, y2: 55 + i * 22, stroke: color, strokeWidth: 1, strokeDasharray: "4 3", opacity: 0.3 }),
|
|
5782
|
+
/* @__PURE__ */ jsxs("text", { x: 5, y: 59 + i * 22, fill: color, fontSize: 10, opacity: 0.5, children: [
|
|
5783
|
+
"listen: ",
|
|
5784
|
+
evt
|
|
5785
|
+
] })
|
|
5786
|
+
] }, `listen-${i}`))
|
|
5787
|
+
] });
|
|
5788
|
+
};
|
|
5789
|
+
AvlTraitScene.displayName = "AvlTraitScene";
|
|
5790
|
+
var CX2 = 300;
|
|
5791
|
+
var STATE_W2 = 120;
|
|
5792
|
+
var STATE_H2 = 40;
|
|
5793
|
+
var CARD_W = 140;
|
|
5794
|
+
function mapEffectType2(label) {
|
|
5795
|
+
const map = {
|
|
5796
|
+
"render-ui": "render-ui",
|
|
5797
|
+
set: "set",
|
|
5798
|
+
persist: "persist",
|
|
5799
|
+
fetch: "fetch",
|
|
5800
|
+
emit: "emit",
|
|
5801
|
+
navigate: "navigate",
|
|
5802
|
+
notify: "notify",
|
|
5803
|
+
"call-service": "call-service",
|
|
5804
|
+
log: "log"
|
|
5805
|
+
};
|
|
5806
|
+
return map[label] ?? "log";
|
|
5807
|
+
}
|
|
5808
|
+
function EffectNode({ node, x, y, color, id }) {
|
|
5809
|
+
if (node.type === "operator") {
|
|
5810
|
+
const children = node.children ?? [];
|
|
5811
|
+
const maxLabelLen = Math.max(...children.map((c) => c.label.length), 4);
|
|
5812
|
+
const childSpacing = Math.max(90, maxLabelLen * 8 + 20);
|
|
5813
|
+
const totalW = (children.length - 1) * childSpacing;
|
|
5814
|
+
const startX = x - totalW / 2;
|
|
5815
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5816
|
+
/* @__PURE__ */ jsx("rect", { x: x - 30, y: y - 10, width: 60, height: 20, rx: 4, fill: "var(--color-surface, white)", stroke: color, strokeWidth: 0.8 }),
|
|
5817
|
+
/* @__PURE__ */ jsx(AvlEffect, { x: x - 16, y, effectType: mapEffectType2(node.label), size: 10, color }),
|
|
5818
|
+
/* @__PURE__ */ jsx("text", { x: x + 2, y: y + 4, fill: color, fontSize: 9, fontWeight: "500", children: node.label }),
|
|
5819
|
+
children.map((child, i) => {
|
|
5820
|
+
const cx = startX + i * childSpacing;
|
|
5821
|
+
const cy = y + 40;
|
|
5822
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5823
|
+
/* @__PURE__ */ jsx("line", { x1: x, y1: y + 10, x2: cx, y2: cy - 10, stroke: color, strokeWidth: 0.8, opacity: 0.3 }),
|
|
5824
|
+
/* @__PURE__ */ jsx(EffectNode, { node: child, x: cx, y: cy, color, id: `${id}-${i}` })
|
|
5825
|
+
] }, `${id}-${i}`);
|
|
5826
|
+
})
|
|
5827
|
+
] });
|
|
5828
|
+
}
|
|
5829
|
+
const isBinding = node.type === "binding";
|
|
5830
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5831
|
+
/* @__PURE__ */ jsx(
|
|
5832
|
+
"circle",
|
|
5833
|
+
{
|
|
5834
|
+
cx: x,
|
|
5835
|
+
cy: y,
|
|
5836
|
+
r: isBinding ? 6 : 5,
|
|
5837
|
+
fill: isBinding ? "none" : color,
|
|
5838
|
+
opacity: isBinding ? 1 : 0.15,
|
|
5839
|
+
stroke: color,
|
|
5840
|
+
strokeWidth: 1,
|
|
5841
|
+
strokeDasharray: isBinding ? "2 1.5" : "none"
|
|
5842
|
+
}
|
|
5843
|
+
),
|
|
5844
|
+
/* @__PURE__ */ jsx("text", { x, y: y + 16, textAnchor: "middle", fill: color, fontSize: 8, opacity: 0.7, children: node.label })
|
|
5845
|
+
] });
|
|
5846
|
+
}
|
|
5847
|
+
var AvlTransitionScene = ({
|
|
5848
|
+
data,
|
|
5849
|
+
color = "var(--color-primary)"
|
|
5850
|
+
}) => {
|
|
5851
|
+
let curY = 30;
|
|
5852
|
+
const fromY = curY;
|
|
5853
|
+
curY += STATE_H2;
|
|
5854
|
+
curY += 15;
|
|
5855
|
+
const eventY = curY;
|
|
5856
|
+
const eventH = 24;
|
|
5857
|
+
curY += eventH + 8;
|
|
5858
|
+
const guardY = curY;
|
|
5859
|
+
const hasGuard = !!data.guard;
|
|
5860
|
+
if (hasGuard) {
|
|
5861
|
+
curY += 24 + 8;
|
|
5862
|
+
}
|
|
5863
|
+
curY += 15;
|
|
5864
|
+
const effectsY = curY;
|
|
5865
|
+
const hasEffects = data.effects.length > 0;
|
|
5866
|
+
const effectsH = hasEffects ? 80 : 0;
|
|
5867
|
+
if (hasEffects) curY += effectsH + 8;
|
|
5868
|
+
const slotsY = curY;
|
|
5869
|
+
const hasSlots = data.slotTargets.length > 0;
|
|
5870
|
+
const slotsH = hasSlots ? 30 : 0;
|
|
5871
|
+
if (hasSlots) curY += slotsH + 8;
|
|
5872
|
+
curY += 15;
|
|
5873
|
+
const toY = curY;
|
|
5874
|
+
curY += STATE_H2;
|
|
5875
|
+
const totalH = curY;
|
|
5876
|
+
const offsetY = Math.max(0, (400 - totalH) / 2);
|
|
5877
|
+
return /* @__PURE__ */ jsxs("g", { transform: `translate(0,${offsetY})`, children: [
|
|
5878
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "transArrow", viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "5", markerHeight: "5", orient: "auto-start-reverse", children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: color, opacity: 0.5 }) }) }),
|
|
5879
|
+
/* @__PURE__ */ jsx(AvlState, { x: CX2 - STATE_W2 / 2, y: fromY, width: STATE_W2, height: STATE_H2, name: data.from, isInitial: true, color }),
|
|
5880
|
+
/* @__PURE__ */ jsx("line", { x1: CX2, y1: fromY + STATE_H2, x2: CX2, y2: eventY - 2, stroke: color, strokeWidth: 1.5, opacity: 0.4, markerEnd: "url(#transArrow)" }),
|
|
5881
|
+
/* @__PURE__ */ jsx(
|
|
5882
|
+
"rect",
|
|
5883
|
+
{
|
|
5884
|
+
x: CX2 - CARD_W / 2,
|
|
5885
|
+
y: eventY,
|
|
5886
|
+
width: CARD_W,
|
|
5887
|
+
height: eventH,
|
|
5888
|
+
rx: 5,
|
|
5889
|
+
fill: "var(--color-surface, white)",
|
|
5890
|
+
stroke: color,
|
|
5891
|
+
strokeWidth: 1
|
|
5892
|
+
}
|
|
5893
|
+
),
|
|
5894
|
+
/* @__PURE__ */ jsx("text", { x: CX2, y: eventY + 15, textAnchor: "middle", fill: color, fontSize: 13, fontWeight: "700", children: data.event }),
|
|
5895
|
+
hasGuard && data.guard && /* @__PURE__ */ jsxs("g", { children: [
|
|
5896
|
+
/* @__PURE__ */ jsx("line", { x1: CX2, y1: eventY + eventH, x2: CX2, y2: guardY - 2, stroke: color, strokeWidth: 1, opacity: 0.3 }),
|
|
5897
|
+
/* @__PURE__ */ jsx(
|
|
5898
|
+
"rect",
|
|
5899
|
+
{
|
|
5900
|
+
x: CX2 - 50,
|
|
5901
|
+
y: guardY,
|
|
5902
|
+
width: 100,
|
|
5903
|
+
height: 20,
|
|
5904
|
+
rx: 4,
|
|
5905
|
+
fill: "var(--color-surface, white)",
|
|
5906
|
+
stroke: color,
|
|
5907
|
+
strokeWidth: 0.8,
|
|
5908
|
+
opacity: 0.9
|
|
5909
|
+
}
|
|
5910
|
+
),
|
|
5911
|
+
/* @__PURE__ */ jsx("text", { x: CX2 - 6, y: guardY + 14, textAnchor: "middle", fill: color, fontSize: 10, children: data.guard.label }),
|
|
5912
|
+
/* @__PURE__ */ jsx(
|
|
5913
|
+
"polygon",
|
|
5914
|
+
{
|
|
5915
|
+
points: `${CX2 - 40},${guardY + 10} ${CX2 - 46},${guardY + 10 - 5} ${CX2 - 40},${guardY + 10 - 10} ${CX2 - 34},${guardY + 10 - 5}`,
|
|
5916
|
+
fill: color,
|
|
5917
|
+
opacity: 0.2,
|
|
5918
|
+
stroke: color,
|
|
5919
|
+
strokeWidth: 0.8
|
|
5920
|
+
}
|
|
5921
|
+
)
|
|
5922
|
+
] }),
|
|
5923
|
+
/* @__PURE__ */ jsx(
|
|
5924
|
+
"line",
|
|
5925
|
+
{
|
|
5926
|
+
x1: CX2,
|
|
5927
|
+
y1: hasGuard ? guardY + 20 : eventY + eventH,
|
|
5928
|
+
x2: CX2,
|
|
5929
|
+
y2: hasEffects ? effectsY - 8 : hasSlots ? slotsY - 8 : toY - 2,
|
|
5930
|
+
stroke: color,
|
|
5931
|
+
strokeWidth: 1.5,
|
|
5932
|
+
opacity: 0.4,
|
|
5933
|
+
markerEnd: "url(#transArrow)"
|
|
5934
|
+
}
|
|
5935
|
+
),
|
|
5936
|
+
hasEffects && /* @__PURE__ */ jsxs("g", { children: [
|
|
5937
|
+
/* @__PURE__ */ jsx("text", { x: CX2, y: effectsY - 2, textAnchor: "middle", fill: color, fontSize: 9, fontWeight: "600", opacity: 0.5, children: "EFFECTS" }),
|
|
5938
|
+
data.effects.map((effect, i) => {
|
|
5939
|
+
const effectSpacing = 130;
|
|
5940
|
+
const effectX = CX2 - (data.effects.length - 1) * effectSpacing / 2 + i * effectSpacing;
|
|
5941
|
+
return /* @__PURE__ */ jsx(EffectNode, { node: effect, x: effectX, y: effectsY + 20, color, id: `eff-${i}` }, `eff-${i}`);
|
|
5942
|
+
})
|
|
5943
|
+
] }),
|
|
5944
|
+
hasSlots && /* @__PURE__ */ jsxs("g", { children: [
|
|
5945
|
+
hasEffects && /* @__PURE__ */ jsx("line", { x1: CX2, y1: effectsY + effectsH - 10, x2: CX2, y2: slotsY - 4, stroke: color, strokeWidth: 1, opacity: 0.3 }),
|
|
5946
|
+
/* @__PURE__ */ jsx("text", { x: CX2, y: slotsY - 2, textAnchor: "middle", fill: color, fontSize: 9, fontWeight: "600", opacity: 0.5, children: "SLOTS" }),
|
|
5947
|
+
data.slotTargets.map((slot, i) => {
|
|
5948
|
+
const sx = CX2 - (data.slotTargets.length - 1) * 90 / 2 + i * 90;
|
|
5949
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
5950
|
+
/* @__PURE__ */ jsx(
|
|
5951
|
+
"rect",
|
|
5952
|
+
{
|
|
5953
|
+
x: sx - 35,
|
|
5954
|
+
y: slotsY + 4,
|
|
5955
|
+
width: 70,
|
|
5956
|
+
height: 20,
|
|
5957
|
+
rx: 4,
|
|
5958
|
+
fill: color,
|
|
5959
|
+
opacity: 0.08,
|
|
5960
|
+
stroke: color,
|
|
5961
|
+
strokeWidth: 0.8
|
|
5962
|
+
}
|
|
5963
|
+
),
|
|
5964
|
+
/* @__PURE__ */ jsxs("text", { x: sx, y: slotsY + 17, textAnchor: "middle", fill: color, fontSize: 9, children: [
|
|
5965
|
+
slot.name,
|
|
5966
|
+
": ",
|
|
5967
|
+
slot.pattern
|
|
5968
|
+
] })
|
|
5969
|
+
] }, `slot-${i}`);
|
|
5970
|
+
})
|
|
5971
|
+
] }),
|
|
5972
|
+
(hasEffects || hasSlots) && /* @__PURE__ */ jsx(
|
|
5973
|
+
"line",
|
|
5974
|
+
{
|
|
5975
|
+
x1: CX2,
|
|
5976
|
+
y1: hasSlots ? slotsY + slotsH : effectsY + effectsH - 10,
|
|
5977
|
+
x2: CX2,
|
|
5978
|
+
y2: toY - 2,
|
|
5979
|
+
stroke: color,
|
|
5980
|
+
strokeWidth: 1.5,
|
|
5981
|
+
opacity: 0.4,
|
|
5982
|
+
markerEnd: "url(#transArrow)"
|
|
5983
|
+
}
|
|
5984
|
+
),
|
|
5985
|
+
/* @__PURE__ */ jsx(AvlState, { x: CX2 - STATE_W2 / 2, y: toY, width: STATE_W2, height: STATE_H2, name: data.to, color })
|
|
5986
|
+
] });
|
|
5987
|
+
};
|
|
5988
|
+
AvlTransitionScene.displayName = "AvlTransitionScene";
|
|
5989
|
+
var APPLICATION_ITEMS = [
|
|
5990
|
+
{
|
|
5991
|
+
label: "Orbital",
|
|
5992
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 8, fill: "none", stroke: c, strokeWidth: 1.5 })
|
|
5993
|
+
},
|
|
5994
|
+
{
|
|
5995
|
+
label: "Entity",
|
|
5996
|
+
render: (x, y, c) => /* @__PURE__ */ jsxs("g", { children: [
|
|
5997
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 5, fill: c, opacity: 0.2 }),
|
|
5998
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 5, fill: "none", stroke: c, strokeWidth: 1.5 })
|
|
5999
|
+
] })
|
|
6000
|
+
},
|
|
6001
|
+
{
|
|
6002
|
+
label: "Trait",
|
|
6003
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("ellipse", { cx: x, cy: y, rx: 10, ry: 5, fill: "none", stroke: c, strokeWidth: 1, strokeDasharray: "3 1.5" })
|
|
6004
|
+
},
|
|
6005
|
+
{
|
|
6006
|
+
label: "Page",
|
|
6007
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("rect", { x: x - 3, y: y - 3, width: 6, height: 6, fill: c, opacity: 0.3, stroke: c, strokeWidth: 1 })
|
|
6008
|
+
},
|
|
6009
|
+
{
|
|
6010
|
+
label: "Event flow",
|
|
6011
|
+
render: (x, y, c) => /* @__PURE__ */ jsxs("g", { children: [
|
|
6012
|
+
/* @__PURE__ */ jsx("line", { x1: x - 10, y1: y, x2: x + 10, y2: y, stroke: c, strokeWidth: 1, strokeDasharray: "4 2" }),
|
|
6013
|
+
/* @__PURE__ */ jsx("polygon", { points: `${x + 10},${y} ${x + 6},${y - 3} ${x + 6},${y + 3}`, fill: c, opacity: 0.5 })
|
|
6014
|
+
] })
|
|
6015
|
+
}
|
|
6016
|
+
];
|
|
6017
|
+
var ORBITAL_ITEMS = [
|
|
6018
|
+
{
|
|
6019
|
+
label: "Orbital boundary",
|
|
6020
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 8, fill: "none", stroke: c, strokeWidth: 1.5 })
|
|
6021
|
+
},
|
|
6022
|
+
{
|
|
6023
|
+
label: "Entity (nucleus)",
|
|
6024
|
+
render: (x, y, c) => /* @__PURE__ */ jsxs("g", { children: [
|
|
6025
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 5, fill: c, opacity: 0.15 }),
|
|
6026
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 5, fill: "none", stroke: c, strokeWidth: 2 }),
|
|
6027
|
+
/* @__PURE__ */ jsx("line", { x1: x, y1: y - 7, x2: x, y2: y - 9, stroke: c, strokeWidth: 0.8, opacity: 0.5 })
|
|
6028
|
+
] })
|
|
6029
|
+
},
|
|
6030
|
+
{
|
|
6031
|
+
label: "Trait ring",
|
|
6032
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("ellipse", { cx: x, cy: y, rx: 10, ry: 5, fill: "none", stroke: c, strokeWidth: 1, strokeDasharray: "3 1.5" })
|
|
6033
|
+
},
|
|
6034
|
+
{
|
|
6035
|
+
label: "Page",
|
|
6036
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("rect", { x: x - 3, y: y - 3, width: 6, height: 6, fill: c, opacity: 0.3, stroke: c, strokeWidth: 1 })
|
|
6037
|
+
},
|
|
6038
|
+
{
|
|
6039
|
+
label: "External link",
|
|
6040
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("line", { x1: x - 8, y1: y, x2: x + 8, y2: y, stroke: c, strokeWidth: 1, strokeDasharray: "4 2", opacity: 0.4 })
|
|
6041
|
+
}
|
|
6042
|
+
];
|
|
6043
|
+
var TRAIT_ITEMS = [
|
|
6044
|
+
{
|
|
6045
|
+
label: "State",
|
|
6046
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("rect", { x: x - 12, y: y - 6, width: 24, height: 12, rx: 6, fill: "none", stroke: c, strokeWidth: 1.5 })
|
|
6047
|
+
},
|
|
6048
|
+
{
|
|
6049
|
+
label: "Initial state",
|
|
6050
|
+
render: (x, y, c) => /* @__PURE__ */ jsxs("g", { children: [
|
|
6051
|
+
/* @__PURE__ */ jsx("circle", { cx: x - 10, cy: y, r: 3, fill: c }),
|
|
6052
|
+
/* @__PURE__ */ jsx("rect", { x: x - 4, y: y - 6, width: 20, height: 12, rx: 6, fill: "none", stroke: c, strokeWidth: 1.5 })
|
|
6053
|
+
] })
|
|
6054
|
+
},
|
|
6055
|
+
{
|
|
6056
|
+
label: "Transition",
|
|
6057
|
+
render: (x, y, c) => /* @__PURE__ */ jsxs("g", { children: [
|
|
6058
|
+
/* @__PURE__ */ jsx("line", { x1: x - 10, y1: y, x2: x + 8, y2: y, stroke: c, strokeWidth: 1.2, opacity: 0.5 }),
|
|
6059
|
+
/* @__PURE__ */ jsx("polygon", { points: `${x + 10},${y} ${x + 6},${y - 3} ${x + 6},${y + 3}`, fill: c, opacity: 0.5 })
|
|
6060
|
+
] })
|
|
6061
|
+
},
|
|
6062
|
+
{
|
|
6063
|
+
label: "Event + effects",
|
|
6064
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("rect", { x: x - 14, y: y - 7, width: 28, height: 14, rx: 3, fill: "var(--color-surface, white)", stroke: c, strokeWidth: 0.8 })
|
|
6065
|
+
},
|
|
6066
|
+
{
|
|
6067
|
+
label: "Emit (external)",
|
|
6068
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 3, fill: c, opacity: 0.5, children: /* @__PURE__ */ jsx("animate", { attributeName: "r", values: "2;4;2", dur: "1.5s", repeatCount: "indefinite" }) })
|
|
6069
|
+
}
|
|
6070
|
+
];
|
|
6071
|
+
var TRANSITION_ITEMS = [
|
|
6072
|
+
{
|
|
6073
|
+
label: "State",
|
|
6074
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("rect", { x: x - 12, y: y - 6, width: 24, height: 12, rx: 6, fill: "none", stroke: c, strokeWidth: 1.5 })
|
|
6075
|
+
},
|
|
6076
|
+
{
|
|
6077
|
+
label: "Effect",
|
|
6078
|
+
render: (x, y, c) => /* @__PURE__ */ jsxs("g", { children: [
|
|
6079
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 5, fill: c, opacity: 0.15 }),
|
|
6080
|
+
/* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 5, fill: "none", stroke: c, strokeWidth: 1 })
|
|
6081
|
+
] })
|
|
6082
|
+
},
|
|
6083
|
+
{
|
|
6084
|
+
label: "Slot target",
|
|
6085
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("rect", { x: x - 10, y: y - 5, width: 20, height: 10, rx: 2, fill: c, opacity: 0.1, stroke: c, strokeWidth: 0.8 })
|
|
6086
|
+
},
|
|
6087
|
+
{
|
|
6088
|
+
label: "Binding (@path)",
|
|
6089
|
+
render: (x, y, c) => /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: 5, fill: "none", stroke: c, strokeWidth: 1, strokeDasharray: "2 1.5", opacity: 0.6 })
|
|
6090
|
+
}
|
|
6091
|
+
];
|
|
6092
|
+
var ITEMS_BY_LEVEL = {
|
|
6093
|
+
application: APPLICATION_ITEMS,
|
|
6094
|
+
orbital: ORBITAL_ITEMS,
|
|
6095
|
+
trait: TRAIT_ITEMS,
|
|
6096
|
+
transition: TRANSITION_ITEMS
|
|
6097
|
+
};
|
|
6098
|
+
var AvlLegend = ({
|
|
6099
|
+
level,
|
|
6100
|
+
color = "var(--color-primary)",
|
|
6101
|
+
x = 10,
|
|
6102
|
+
y = 360
|
|
6103
|
+
}) => {
|
|
6104
|
+
const items = ITEMS_BY_LEVEL[level];
|
|
6105
|
+
const itemSpacing = 16;
|
|
6106
|
+
const legendH = items.length * itemSpacing + 16;
|
|
6107
|
+
return /* @__PURE__ */ jsxs("g", { opacity: 0.6, children: [
|
|
6108
|
+
/* @__PURE__ */ jsx(
|
|
6109
|
+
"rect",
|
|
6110
|
+
{
|
|
6111
|
+
x,
|
|
6112
|
+
y: y - legendH + 10,
|
|
6113
|
+
width: 130,
|
|
6114
|
+
height: legendH,
|
|
6115
|
+
rx: 6,
|
|
6116
|
+
fill: "var(--color-surface, white)",
|
|
6117
|
+
stroke: color,
|
|
6118
|
+
strokeWidth: 0.5,
|
|
6119
|
+
opacity: 0.8
|
|
6120
|
+
}
|
|
6121
|
+
),
|
|
6122
|
+
items.map((item, i) => {
|
|
6123
|
+
const iy = y - legendH + 22 + i * itemSpacing;
|
|
6124
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
6125
|
+
item.render(x + 18, iy, color),
|
|
6126
|
+
/* @__PURE__ */ jsx(
|
|
6127
|
+
"text",
|
|
6128
|
+
{
|
|
6129
|
+
x: x + 35,
|
|
6130
|
+
y: iy + 4,
|
|
6131
|
+
fill: color,
|
|
6132
|
+
fontSize: 8,
|
|
6133
|
+
opacity: 0.8,
|
|
6134
|
+
children: item.label
|
|
6135
|
+
}
|
|
6136
|
+
)
|
|
6137
|
+
] }, item.label);
|
|
6138
|
+
})
|
|
6139
|
+
] });
|
|
6140
|
+
};
|
|
6141
|
+
AvlLegend.displayName = "AvlLegend";
|
|
6142
|
+
var VIEWBOX_W = 600;
|
|
6143
|
+
var VIEWBOX_H = 400;
|
|
6144
|
+
var ANIMATION_DURATION = 600;
|
|
6145
|
+
var AvlCosmicZoom = ({
|
|
6146
|
+
schema: schemaProp,
|
|
6147
|
+
className,
|
|
6148
|
+
color = "var(--color-primary)",
|
|
6149
|
+
animated = true,
|
|
6150
|
+
initialOrbital,
|
|
6151
|
+
initialTrait,
|
|
6152
|
+
onZoomChange,
|
|
6153
|
+
width = "100%",
|
|
6154
|
+
height = 400,
|
|
6155
|
+
stateCoverage
|
|
6156
|
+
}) => {
|
|
6157
|
+
const schema = useMemo(() => {
|
|
6158
|
+
if (typeof schemaProp === "string") {
|
|
6159
|
+
try {
|
|
6160
|
+
return JSON.parse(schemaProp);
|
|
6161
|
+
} catch {
|
|
6162
|
+
return { name: "Error", orbitals: [] };
|
|
6163
|
+
}
|
|
6164
|
+
}
|
|
6165
|
+
return schemaProp;
|
|
6166
|
+
}, [schemaProp]);
|
|
6167
|
+
const [state, dispatch] = useReducer(zoomReducer, initialZoomState);
|
|
6168
|
+
const sceneRef = useRef(null);
|
|
6169
|
+
const [transitionStyle, setTransitionStyle] = useState({});
|
|
6170
|
+
useEffect(() => {
|
|
6171
|
+
if (initialOrbital) {
|
|
6172
|
+
dispatch({ type: "ZOOM_INTO_ORBITAL", orbital: initialOrbital, targetPosition: { x: VIEWBOX_W / 2, y: VIEWBOX_H / 2 } });
|
|
6173
|
+
setTimeout(() => dispatch({ type: "ANIMATION_COMPLETE" }), 0);
|
|
6174
|
+
if (initialTrait) {
|
|
6175
|
+
setTimeout(() => {
|
|
6176
|
+
dispatch({ type: "ZOOM_INTO_TRAIT", trait: initialTrait, targetPosition: { x: VIEWBOX_W / 2, y: VIEWBOX_H / 2 } });
|
|
6177
|
+
setTimeout(() => dispatch({ type: "ANIMATION_COMPLETE" }), 0);
|
|
6178
|
+
}, 10);
|
|
6179
|
+
}
|
|
6180
|
+
}
|
|
6181
|
+
}, [initialOrbital, initialTrait]);
|
|
6182
|
+
useEffect(() => {
|
|
6183
|
+
onZoomChange?.(state.level, {
|
|
6184
|
+
orbital: state.selectedOrbital ?? void 0,
|
|
6185
|
+
trait: state.selectedTrait ?? void 0
|
|
6186
|
+
});
|
|
6187
|
+
}, [state.level, state.selectedOrbital, state.selectedTrait, onZoomChange]);
|
|
6188
|
+
useEffect(() => {
|
|
6189
|
+
if (!state.animating || !animated) {
|
|
6190
|
+
if (state.animating) {
|
|
6191
|
+
dispatch({ type: "ANIMATION_COMPLETE" });
|
|
6192
|
+
}
|
|
6193
|
+
setTransitionStyle({});
|
|
6194
|
+
return;
|
|
6195
|
+
}
|
|
6196
|
+
const target = state.animationTarget;
|
|
6197
|
+
if (!target) return;
|
|
6198
|
+
if (state.animationDirection === "in") {
|
|
6199
|
+
setTransitionStyle({
|
|
6200
|
+
transform: `scale(${target.scale}) translate(${-(target.x - VIEWBOX_W / 2)}px, ${-(target.y - VIEWBOX_H / 2)}px)`,
|
|
6201
|
+
transformOrigin: `${target.x}px ${target.y}px`,
|
|
6202
|
+
transition: `transform ${ANIMATION_DURATION}ms cubic-bezier(0.4, 0, 0.2, 1), opacity ${ANIMATION_DURATION}ms ease`,
|
|
6203
|
+
opacity: 0.3
|
|
6204
|
+
});
|
|
6205
|
+
} else {
|
|
6206
|
+
setTransitionStyle({
|
|
6207
|
+
transform: `scale(${target.scale})`,
|
|
6208
|
+
transformOrigin: "center center",
|
|
6209
|
+
transition: `transform ${ANIMATION_DURATION}ms cubic-bezier(0.4, 0, 0.2, 1), opacity ${ANIMATION_DURATION}ms ease`,
|
|
6210
|
+
opacity: 0.3
|
|
6211
|
+
});
|
|
6212
|
+
}
|
|
6213
|
+
const timer = setTimeout(() => {
|
|
6214
|
+
dispatch({ type: "ANIMATION_COMPLETE" });
|
|
6215
|
+
setTransitionStyle({});
|
|
6216
|
+
}, ANIMATION_DURATION);
|
|
6217
|
+
return () => clearTimeout(timer);
|
|
6218
|
+
}, [state.animating, state.animationDirection, state.animationTarget, animated]);
|
|
6219
|
+
const handleKeyDown = useCallback((e) => {
|
|
6220
|
+
if (e.key === "Escape") {
|
|
6221
|
+
dispatch({ type: "ZOOM_OUT" });
|
|
6222
|
+
}
|
|
6223
|
+
}, []);
|
|
6224
|
+
const handleOrbitalClick = useCallback((name, pos) => {
|
|
6225
|
+
dispatch({ type: "ZOOM_INTO_ORBITAL", orbital: name, targetPosition: pos });
|
|
6226
|
+
}, []);
|
|
6227
|
+
const handleTraitClick = useCallback((name, pos) => {
|
|
6228
|
+
dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: pos });
|
|
6229
|
+
}, []);
|
|
6230
|
+
const handleTransitionClick = useCallback((index, pos) => {
|
|
6231
|
+
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: pos });
|
|
6232
|
+
}, []);
|
|
6233
|
+
const handleBreadcrumbClick = useCallback((targetLevel) => {
|
|
6234
|
+
const levelOrder = ["application", "orbital", "trait", "transition"];
|
|
6235
|
+
const currentIdx = levelOrder.indexOf(state.level);
|
|
6236
|
+
const targetIdx = levelOrder.indexOf(targetLevel);
|
|
6237
|
+
if (targetIdx < currentIdx) {
|
|
6238
|
+
dispatch({ type: "ZOOM_OUT" });
|
|
6239
|
+
}
|
|
6240
|
+
}, [state.level]);
|
|
6241
|
+
const sceneContent = useMemo(() => {
|
|
6242
|
+
switch (state.level) {
|
|
6243
|
+
case "application": {
|
|
6244
|
+
const data = parseApplicationLevel(schema);
|
|
6245
|
+
return /* @__PURE__ */ jsx(
|
|
6246
|
+
AvlApplicationScene,
|
|
6247
|
+
{
|
|
6248
|
+
data,
|
|
6249
|
+
color,
|
|
6250
|
+
onOrbitalClick: handleOrbitalClick
|
|
6251
|
+
}
|
|
6252
|
+
);
|
|
6253
|
+
}
|
|
6254
|
+
case "orbital": {
|
|
6255
|
+
if (!state.selectedOrbital) return null;
|
|
6256
|
+
const data = parseOrbitalLevel(schema, state.selectedOrbital);
|
|
6257
|
+
if (!data) return null;
|
|
6258
|
+
return /* @__PURE__ */ jsx(
|
|
6259
|
+
AvlOrbitalScene,
|
|
6260
|
+
{
|
|
6261
|
+
data,
|
|
6262
|
+
color,
|
|
6263
|
+
onTraitClick: handleTraitClick
|
|
6264
|
+
}
|
|
6265
|
+
);
|
|
6266
|
+
}
|
|
6267
|
+
case "trait": {
|
|
6268
|
+
if (!state.selectedOrbital || !state.selectedTrait) return null;
|
|
6269
|
+
const data = parseTraitLevel(schema, state.selectedOrbital, state.selectedTrait);
|
|
6270
|
+
if (!data) return null;
|
|
6271
|
+
return /* @__PURE__ */ jsx(
|
|
6272
|
+
AvlTraitScene,
|
|
6273
|
+
{
|
|
6274
|
+
data,
|
|
6275
|
+
color,
|
|
6276
|
+
onTransitionClick: handleTransitionClick
|
|
6277
|
+
}
|
|
6278
|
+
);
|
|
6279
|
+
}
|
|
6280
|
+
case "transition": {
|
|
6281
|
+
if (!state.selectedOrbital || !state.selectedTrait || state.selectedTransition === null) return null;
|
|
6282
|
+
const data = parseTransitionLevel(schema, state.selectedOrbital, state.selectedTrait, state.selectedTransition);
|
|
6283
|
+
if (!data) return null;
|
|
6284
|
+
return /* @__PURE__ */ jsx(
|
|
6285
|
+
AvlTransitionScene,
|
|
6286
|
+
{
|
|
6287
|
+
data,
|
|
6288
|
+
color
|
|
6289
|
+
}
|
|
6290
|
+
);
|
|
6291
|
+
}
|
|
6292
|
+
default:
|
|
6293
|
+
return null;
|
|
6294
|
+
}
|
|
6295
|
+
}, [state.level, state.selectedOrbital, state.selectedTrait, state.selectedTransition, schema, color, handleOrbitalClick, handleTraitClick, handleTransitionClick]);
|
|
6296
|
+
const breadcrumbs = getBreadcrumbs(state);
|
|
6297
|
+
return /* @__PURE__ */ jsxs(
|
|
6298
|
+
Box,
|
|
6299
|
+
{
|
|
6300
|
+
className: `relative ${className ?? ""}`,
|
|
6301
|
+
style: { width, height: typeof height === "number" ? `${height}px` : height },
|
|
6302
|
+
onKeyDown: handleKeyDown,
|
|
6303
|
+
tabIndex: 0,
|
|
6304
|
+
children: [
|
|
6305
|
+
/* @__PURE__ */ jsx(
|
|
6306
|
+
HStack,
|
|
6307
|
+
{
|
|
6308
|
+
gap: "xs",
|
|
6309
|
+
align: "center",
|
|
6310
|
+
className: "absolute top-2 left-2 z-10 bg-[var(--color-surface)]/80 backdrop-blur rounded-md px-3 py-1.5",
|
|
6311
|
+
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
6312
|
+
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
|
|
6313
|
+
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
6314
|
+
Box,
|
|
6315
|
+
{
|
|
6316
|
+
as: "span",
|
|
6317
|
+
className: "cursor-pointer hover:underline",
|
|
6318
|
+
onClick: () => handleBreadcrumbClick(crumb.level),
|
|
6319
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: crumb.label })
|
|
6320
|
+
}
|
|
6321
|
+
) : /* @__PURE__ */ jsx(Typography, { variant: "small", color: "primary", className: "font-bold", children: crumb.label })
|
|
6322
|
+
] }, crumb.level))
|
|
6323
|
+
}
|
|
6324
|
+
),
|
|
6325
|
+
state.level !== "application" && /* @__PURE__ */ jsx(
|
|
6326
|
+
Typography,
|
|
6327
|
+
{
|
|
6328
|
+
variant: "small",
|
|
6329
|
+
color: "muted",
|
|
6330
|
+
className: "absolute bottom-2 right-2 z-10 bg-[var(--color-surface)]/60 backdrop-blur rounded px-2 py-1",
|
|
6331
|
+
children: "Press Esc to zoom out"
|
|
6332
|
+
}
|
|
6333
|
+
),
|
|
6334
|
+
/* @__PURE__ */ jsxs(
|
|
6335
|
+
"svg",
|
|
6336
|
+
{
|
|
6337
|
+
viewBox: `0 0 ${VIEWBOX_W} ${VIEWBOX_H}`,
|
|
6338
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6339
|
+
className: "w-full h-full",
|
|
6340
|
+
role: "img",
|
|
6341
|
+
"aria-label": `${schema.name} orbital visualization - ${state.level} level`,
|
|
6342
|
+
children: [
|
|
6343
|
+
/* @__PURE__ */ jsx("g", { ref: sceneRef, style: transitionStyle, children: sceneContent }),
|
|
6344
|
+
/* @__PURE__ */ jsx(AvlLegend, { level: state.level, color })
|
|
6345
|
+
]
|
|
6346
|
+
}
|
|
6347
|
+
)
|
|
6348
|
+
]
|
|
6349
|
+
}
|
|
6350
|
+
);
|
|
6351
|
+
};
|
|
6352
|
+
AvlCosmicZoom.displayName = "AvlCosmicZoom";
|
|
6353
|
+
|
|
6354
|
+
export { AVL_FIELD_TYPE_SHAPES, AVL_OPERATOR_COLORS, AvlApplication, AvlApplicationScene, AvlBinding, AvlBindingRef, AvlClickTarget, AvlClosedCircuit, AvlCosmicZoom, AvlEffect, AvlEmitListen, AvlEntity, AvlEvent, AvlExprTree, AvlField, AvlFieldType, AvlGuard, AvlLiteral, AvlOperator, AvlOrbital, AvlOrbitalScene, AvlOrbitalUnit, AvlPage, AvlPersistence, AvlSExpr, AvlSlotMap, AvlState, AvlStateMachine, AvlTrait, AvlTraitScene, AvlTransition, AvlTransitionScene, arcPath, curveControlPoint, gridPositions, parseApplicationLevel, parseOrbitalLevel, parseTraitLevel, parseTransitionLevel, radialPositions, ringPositions };
|