isometric-angular 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/fesm2022/isometric-angular-core.mjs +165 -0
- package/fesm2022/isometric-angular-core.mjs.map +1 -0
- package/fesm2022/isometric-angular-isometric-cube.mjs +73 -0
- package/fesm2022/isometric-angular-isometric-cube.mjs.map +1 -0
- package/fesm2022/isometric-angular-isometric-grid.mjs +52 -0
- package/fesm2022/isometric-angular-isometric-grid.mjs.map +1 -0
- package/fesm2022/isometric-angular-isometric-plane.mjs +53 -0
- package/fesm2022/isometric-angular-isometric-plane.mjs.map +1 -0
- package/fesm2022/isometric-angular.mjs +33 -0
- package/fesm2022/isometric-angular.mjs.map +1 -0
- package/package.json +52 -3
- package/types/isometric-angular-core.d.ts +77 -0
- package/types/isometric-angular-isometric-cube.d.ts +33 -0
- package/types/isometric-angular-isometric-grid.d.ts +22 -0
- package/types/isometric-angular-isometric-plane.d.ts +25 -0
- package/types/isometric-angular.d.ts +11 -0
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Isometric Angular (Angular version of [IsometricSass](https://github.com/MorganCaron/IsometricSass))
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Full rewrite of IsometricSass using TypeScript, Angular and CSS variables.
|
|
4
|
+
|
|
5
|
+
For full documentation go here: https://isometric-angular-docs.vercel.app/
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { computed } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
function getCorrectValue(value, unit = "rem") {
|
|
4
|
+
if (!value) {
|
|
5
|
+
return `0${unit}`;
|
|
6
|
+
}
|
|
7
|
+
if (typeof value === "number") {
|
|
8
|
+
return `${value}${unit}`;
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const BORDER_SIZE_VARIABLE = `--isometric-border-size`;
|
|
14
|
+
const BORDER_STYLE_VARIABLE = `--isometric-border-style`;
|
|
15
|
+
const BORDER_COLOR_VARIABLE = `--isometric-border-color`;
|
|
16
|
+
function isometricBorder(border, suffix = "") {
|
|
17
|
+
return computed(() => {
|
|
18
|
+
const borderValue = border();
|
|
19
|
+
if (!borderValue) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const suffixValue = typeof suffix === "string" ? suffix : suffix();
|
|
23
|
+
return {
|
|
24
|
+
[`${BORDER_SIZE_VARIABLE}${suffixValue}`]: getCorrectValue(borderValue.size, "px"),
|
|
25
|
+
[`${BORDER_STYLE_VARIABLE}${suffixValue}`]: borderValue.style ?? "solid",
|
|
26
|
+
[`${BORDER_COLOR_VARIABLE}${suffixValue}`]: borderValue.color ?? "#000",
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const EDGE_DEPTH_VARIABLE = `--isometric-edge-depth`;
|
|
32
|
+
const EDGE_COLOR_VARIABLE = `--isometric-edge-color`;
|
|
33
|
+
function isometricEdge(edge) {
|
|
34
|
+
return computed(() => {
|
|
35
|
+
const edgeValue = edge();
|
|
36
|
+
if (!edgeValue) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
[EDGE_DEPTH_VARIABLE]: getCorrectValue(edgeValue.depth, "px"),
|
|
41
|
+
[EDGE_COLOR_VARIABLE]: edgeValue.color ?? "#fff",
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const TOP_VARIABLE = `--isometric-position-top`;
|
|
47
|
+
const LEFT_VARIABLE = `--isometric-position-left`;
|
|
48
|
+
const ELEVATION_VARIABLE = `--isometric-position-elevation`;
|
|
49
|
+
function isometricPosition(position) {
|
|
50
|
+
return computed(() => {
|
|
51
|
+
const positionValue = position();
|
|
52
|
+
if (!positionValue) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
[TOP_VARIABLE]: getCorrectValue(positionValue.top),
|
|
57
|
+
[LEFT_VARIABLE]: getCorrectValue(positionValue.left),
|
|
58
|
+
[ELEVATION_VARIABLE]: getCorrectValue(positionValue.elevation),
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const ROTATION_FROM_VARIABLE = `--isometric-rotation-from`;
|
|
64
|
+
const ROTATION_TO_VARIABLE = `--isometric-rotation-to`;
|
|
65
|
+
const ROTATION_DELAY_VARIABLE = `--isometric-rotation-delay`;
|
|
66
|
+
const ROTATION_DURATION_VARIABLE = `--isometric-rotation-duration`;
|
|
67
|
+
function isometricRotation(rotation) {
|
|
68
|
+
return computed(() => {
|
|
69
|
+
const rotationValue = rotation();
|
|
70
|
+
if (!rotationValue) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
[ROTATION_FROM_VARIABLE]: getCorrectValue(rotationValue.from, "deg"),
|
|
75
|
+
[ROTATION_TO_VARIABLE]: getCorrectValue(rotationValue.to, "deg"),
|
|
76
|
+
[ROTATION_DELAY_VARIABLE]: getCorrectValue(rotationValue.delay, "s"),
|
|
77
|
+
[ROTATION_DURATION_VARIABLE]: getCorrectValue(rotationValue.duration, "s"),
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const SHADOW_DISTANCE_VARIABLE = `--isometric-shadow-distance`;
|
|
83
|
+
const SHADOW_DISTANCE_WITH_UNIT_VARIABLE = `--isometric-shadow-distance-with-unit`;
|
|
84
|
+
const SHADOW_SPACING_X_VARIABLE = `--isometric-shadow-spacing-x`;
|
|
85
|
+
const SHADOW_SPACING_Y_VARIABLE = `--isometric-shadow-spacing-y`;
|
|
86
|
+
function isometricShadow(shadow) {
|
|
87
|
+
return computed(() => {
|
|
88
|
+
const shadowValue = shadow();
|
|
89
|
+
if (!shadowValue) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
[SHADOW_DISTANCE_VARIABLE]: parseFloat(shadowValue.distance?.toString() ?? "0").toString(),
|
|
94
|
+
[SHADOW_DISTANCE_WITH_UNIT_VARIABLE]: getCorrectValue(shadowValue.distance),
|
|
95
|
+
[SHADOW_SPACING_X_VARIABLE]: shadowValue.spacingX.toString(),
|
|
96
|
+
[SHADOW_SPACING_Y_VARIABLE]: shadowValue.spacingY.toString(),
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const SHADOW_ANIMATION_FROM_VARIABLE = `--isometric-shadow-animation-from`;
|
|
102
|
+
const SHADOW_ANIMATION_FROM_WITH_UNIT_VARIABLE = `--isometric-shadow-animation-from-with-unit`;
|
|
103
|
+
const SHADOW_ANIMATION_TO_VARIABLE = `--isometric-shadow-animation-to`;
|
|
104
|
+
const SHADOW_ANIMATION_TO_WITH_UNIT_VARIABLE = `--isometric-shadow-animation-to-with-unit`;
|
|
105
|
+
const SHADOW_ANIMATION_DELAY_VARIABLE = `--isometric-shadow-animation-delay`;
|
|
106
|
+
const SHADOW_ANIMATION_DURATION_VARIABLE = `--isometric-shadow-animation-duration`;
|
|
107
|
+
const SHADOW_ANIMATION_OPTIONS_VARIABLE = `--isometric-shadow-animation-options`;
|
|
108
|
+
function isometricShadowAnimation(shadowAnimation) {
|
|
109
|
+
const shadowPropertiesToUse = computed(() => {
|
|
110
|
+
const shadowAnimationValue = shadowAnimation();
|
|
111
|
+
return shadowAnimationValue
|
|
112
|
+
? {
|
|
113
|
+
distance: shadowAnimationValue.from,
|
|
114
|
+
spacingX: shadowAnimationValue.spacingX,
|
|
115
|
+
spacingY: shadowAnimationValue.spacingY,
|
|
116
|
+
}
|
|
117
|
+
: undefined;
|
|
118
|
+
}, ...(ngDevMode ? [{ debugName: "shadowPropertiesToUse" }] : /* istanbul ignore next */ []));
|
|
119
|
+
const shadowStyles = isometricShadow(shadowPropertiesToUse);
|
|
120
|
+
return computed(() => {
|
|
121
|
+
const shadowAnimationValue = shadowAnimation();
|
|
122
|
+
const shadowStylesValue = shadowStyles();
|
|
123
|
+
if (!shadowStylesValue) {
|
|
124
|
+
return undefined;
|
|
125
|
+
}
|
|
126
|
+
return {
|
|
127
|
+
...shadowStylesValue,
|
|
128
|
+
[SHADOW_ANIMATION_FROM_VARIABLE]: parseFloat(shadowAnimationValue?.from?.toString() ?? "0").toString(),
|
|
129
|
+
[SHADOW_ANIMATION_FROM_WITH_UNIT_VARIABLE]: getCorrectValue(shadowAnimationValue?.from),
|
|
130
|
+
[SHADOW_ANIMATION_TO_VARIABLE]: parseFloat(shadowAnimationValue?.to?.toString() ?? "0").toString(),
|
|
131
|
+
[SHADOW_ANIMATION_TO_WITH_UNIT_VARIABLE]: getCorrectValue(shadowAnimationValue?.to),
|
|
132
|
+
[SHADOW_ANIMATION_DELAY_VARIABLE]: getCorrectValue(shadowAnimationValue?.delay, "s"),
|
|
133
|
+
[SHADOW_ANIMATION_DURATION_VARIABLE]: getCorrectValue(shadowAnimationValue?.duration, "s"),
|
|
134
|
+
[SHADOW_ANIMATION_OPTIONS_VARIABLE]: shadowAnimationValue?.options ?? "normal",
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function isometricSize(size, element) {
|
|
140
|
+
return computed(() => {
|
|
141
|
+
const widthVariable = `--isometric-${element}-width`;
|
|
142
|
+
const heightVariable = `--isometric-${element}-height`;
|
|
143
|
+
const sizeValue = size();
|
|
144
|
+
if (typeof sizeValue === "number" || typeof sizeValue === "string") {
|
|
145
|
+
return {
|
|
146
|
+
[widthVariable]: getCorrectValue(sizeValue),
|
|
147
|
+
[heightVariable]: getCorrectValue(sizeValue),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
const { width, height } = sizeValue;
|
|
151
|
+
return {
|
|
152
|
+
[widthVariable]: getCorrectValue(width),
|
|
153
|
+
[heightVariable]: getCorrectValue(height),
|
|
154
|
+
};
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// internal utils
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Generated bundle index. Do not edit.
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
export { getCorrectValue as ɵgetCorrectValue, isometricBorder as ɵisometricBorder, isometricEdge as ɵisometricEdge, isometricPosition as ɵisometricPosition, isometricRotation as ɵisometricRotation, isometricShadow as ɵisometricShadow, isometricShadowAnimation as ɵisometricShadowAnimation, isometricSize as ɵisometricSize };
|
|
165
|
+
//# sourceMappingURL=isometric-angular-core.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isometric-angular-core.mjs","sources":["../../../projects/isometric-angular/core/src/utils/get-correct-value.ts","../../../projects/isometric-angular/core/src/utils/isometric-border.ts","../../../projects/isometric-angular/core/src/utils/isometric-edge.ts","../../../projects/isometric-angular/core/src/utils/isometric-position.ts","../../../projects/isometric-angular/core/src/utils/isometric-rotation.ts","../../../projects/isometric-angular/core/src/utils/isometric-shadow.ts","../../../projects/isometric-angular/core/src/utils/isometric-shadow-animation.ts","../../../projects/isometric-angular/core/src/utils/isometric-size.ts","../../../projects/isometric-angular/core/src/public-api.ts","../../../projects/isometric-angular/core/src/isometric-angular-core.ts"],"sourcesContent":["export function getCorrectValue(\r\n value: string | number | undefined,\r\n unit = \"rem\",\r\n) {\r\n if (!value) {\r\n return `0${unit}`;\r\n }\r\n\r\n if (typeof value === \"number\") {\r\n return `${value}${unit}`;\r\n }\r\n\r\n return value;\r\n}\r\n","import { computed, type Signal } from \"@angular/core\";\r\nimport { getCorrectValue } from \"./get-correct-value\";\r\nimport type { Border } from \"../types/border.types\";\r\nimport type { CSSVariables } from \"../types/common.types\";\r\n\r\nconst BORDER_SIZE_VARIABLE = `--isometric-border-size`;\r\nconst BORDER_STYLE_VARIABLE = `--isometric-border-style`;\r\nconst BORDER_COLOR_VARIABLE = `--isometric-border-color`;\r\n\r\nexport function isometricBorder(\r\n border: Signal<Border | undefined>,\r\n suffix: Signal<string> | string = \"\",\r\n): Signal<CSSVariables | undefined> {\r\n return computed(() => {\r\n const borderValue = border();\r\n\r\n if (!borderValue) {\r\n return undefined;\r\n }\r\n\r\n const suffixValue = typeof suffix === \"string\" ? suffix : suffix();\r\n\r\n return {\r\n [`${BORDER_SIZE_VARIABLE}${suffixValue}`]: getCorrectValue(\r\n borderValue.size,\r\n \"px\",\r\n ),\r\n [`${BORDER_STYLE_VARIABLE}${suffixValue}`]: borderValue.style ?? \"solid\",\r\n [`${BORDER_COLOR_VARIABLE}${suffixValue}`]: borderValue.color ?? \"#000\",\r\n };\r\n });\r\n}\r\n","import { computed, type Signal } from \"@angular/core\";\r\nimport { getCorrectValue } from \"./get-correct-value\";\r\nimport type { Edge } from \"../types/edge.types\";\r\nimport type { CSSVariables } from \"../types/common.types\";\r\n\r\nconst EDGE_DEPTH_VARIABLE = `--isometric-edge-depth`;\r\nconst EDGE_COLOR_VARIABLE = `--isometric-edge-color`;\r\n\r\nexport function isometricEdge(\r\n edge: Signal<Edge | undefined>,\r\n): Signal<CSSVariables | undefined> {\r\n return computed(() => {\r\n const edgeValue = edge();\r\n\r\n if (!edgeValue) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n [EDGE_DEPTH_VARIABLE]: getCorrectValue(edgeValue.depth, \"px\"),\r\n [EDGE_COLOR_VARIABLE]: edgeValue.color ?? \"#fff\",\r\n };\r\n });\r\n}\r\n","import { computed, type Signal } from \"@angular/core\";\r\nimport { getCorrectValue } from \"./get-correct-value\";\r\nimport type { Position } from \"../types/position.types\";\r\nimport type { CSSVariables } from \"../types/common.types\";\r\n\r\nconst TOP_VARIABLE = `--isometric-position-top`;\r\nconst LEFT_VARIABLE = `--isometric-position-left`;\r\nconst ELEVATION_VARIABLE = `--isometric-position-elevation`;\r\n\r\nexport function isometricPosition(\r\n position: Signal<Position | undefined>,\r\n): Signal<CSSVariables | undefined> {\r\n return computed(() => {\r\n const positionValue = position();\r\n\r\n if (!positionValue) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n [TOP_VARIABLE]: getCorrectValue(positionValue.top),\r\n [LEFT_VARIABLE]: getCorrectValue(positionValue.left),\r\n [ELEVATION_VARIABLE]: getCorrectValue(positionValue.elevation),\r\n };\r\n });\r\n}\r\n","import { computed, type Signal } from \"@angular/core\";\r\nimport { getCorrectValue } from \"./get-correct-value\";\r\nimport type { Rotation } from \"../types/rotation.types\";\r\nimport type { CSSVariables } from \"../types/common.types\";\r\n\r\nconst ROTATION_FROM_VARIABLE = `--isometric-rotation-from`;\r\nconst ROTATION_TO_VARIABLE = `--isometric-rotation-to`;\r\nconst ROTATION_DELAY_VARIABLE = `--isometric-rotation-delay`;\r\nconst ROTATION_DURATION_VARIABLE = `--isometric-rotation-duration`;\r\n\r\nexport function isometricRotation(\r\n rotation: Signal<Rotation | undefined>,\r\n): Signal<CSSVariables | undefined> {\r\n return computed(() => {\r\n const rotationValue = rotation();\r\n\r\n if (!rotationValue) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n [ROTATION_FROM_VARIABLE]: getCorrectValue(rotationValue.from, \"deg\"),\r\n [ROTATION_TO_VARIABLE]: getCorrectValue(rotationValue.to, \"deg\"),\r\n [ROTATION_DELAY_VARIABLE]: getCorrectValue(rotationValue.delay, \"s\"),\r\n [ROTATION_DURATION_VARIABLE]: getCorrectValue(\r\n rotationValue.duration,\r\n \"s\",\r\n ),\r\n };\r\n });\r\n}\r\n","import { computed, type Signal } from \"@angular/core\";\r\nimport { getCorrectValue } from \"./get-correct-value\";\r\nimport type { Shadow } from \"../types/shadow.types\";\r\nimport type { CSSVariables } from \"../types/common.types\";\r\n\r\nconst SHADOW_DISTANCE_VARIABLE = `--isometric-shadow-distance`;\r\nconst SHADOW_DISTANCE_WITH_UNIT_VARIABLE = `--isometric-shadow-distance-with-unit`;\r\nconst SHADOW_SPACING_X_VARIABLE = `--isometric-shadow-spacing-x`;\r\nconst SHADOW_SPACING_Y_VARIABLE = `--isometric-shadow-spacing-y`;\r\n\r\nexport function isometricShadow(\r\n shadow: Signal<Shadow | undefined>,\r\n): Signal<CSSVariables | undefined> {\r\n return computed(() => {\r\n const shadowValue = shadow();\r\n\r\n if (!shadowValue) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n [SHADOW_DISTANCE_VARIABLE]: parseFloat(\r\n shadowValue.distance?.toString() ?? \"0\",\r\n ).toString(),\r\n [SHADOW_DISTANCE_WITH_UNIT_VARIABLE]: getCorrectValue(\r\n shadowValue.distance,\r\n ),\r\n [SHADOW_SPACING_X_VARIABLE]: shadowValue.spacingX.toString(),\r\n [SHADOW_SPACING_Y_VARIABLE]: shadowValue.spacingY.toString(),\r\n };\r\n });\r\n}\r\n","import { computed, type Signal } from \"@angular/core\";\r\nimport { getCorrectValue } from \"./get-correct-value\";\r\nimport { isometricShadow } from \"./isometric-shadow\";\r\nimport type { Shadow } from \"../types/shadow.types\";\r\nimport type { ShadowAnimation } from \"../types/shadow-animation.types\";\r\nimport type { CSSVariables } from \"../types/common.types\";\r\n\r\nconst SHADOW_ANIMATION_FROM_VARIABLE = `--isometric-shadow-animation-from`;\r\nconst SHADOW_ANIMATION_FROM_WITH_UNIT_VARIABLE = `--isometric-shadow-animation-from-with-unit`;\r\nconst SHADOW_ANIMATION_TO_VARIABLE = `--isometric-shadow-animation-to`;\r\nconst SHADOW_ANIMATION_TO_WITH_UNIT_VARIABLE = `--isometric-shadow-animation-to-with-unit`;\r\nconst SHADOW_ANIMATION_DELAY_VARIABLE = `--isometric-shadow-animation-delay`;\r\nconst SHADOW_ANIMATION_DURATION_VARIABLE = `--isometric-shadow-animation-duration`;\r\nconst SHADOW_ANIMATION_OPTIONS_VARIABLE = `--isometric-shadow-animation-options`;\r\n\r\nexport function isometricShadowAnimation(\r\n shadowAnimation: Signal<ShadowAnimation | undefined>,\r\n): Signal<CSSVariables | undefined> {\r\n const shadowPropertiesToUse: Signal<Shadow | undefined> = computed(() => {\r\n const shadowAnimationValue = shadowAnimation();\r\n\r\n return shadowAnimationValue\r\n ? {\r\n distance: shadowAnimationValue.from,\r\n spacingX: shadowAnimationValue.spacingX,\r\n spacingY: shadowAnimationValue.spacingY,\r\n }\r\n : undefined;\r\n });\r\n\r\n const shadowStyles = isometricShadow(shadowPropertiesToUse);\r\n\r\n return computed(() => {\r\n const shadowAnimationValue = shadowAnimation();\r\n const shadowStylesValue = shadowStyles();\r\n\r\n if (!shadowStylesValue) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n ...shadowStylesValue,\r\n [SHADOW_ANIMATION_FROM_VARIABLE]: parseFloat(\r\n shadowAnimationValue?.from?.toString() ?? \"0\",\r\n ).toString(),\r\n [SHADOW_ANIMATION_FROM_WITH_UNIT_VARIABLE]: getCorrectValue(\r\n shadowAnimationValue?.from,\r\n ),\r\n [SHADOW_ANIMATION_TO_VARIABLE]: parseFloat(\r\n shadowAnimationValue?.to?.toString() ?? \"0\",\r\n ).toString(),\r\n [SHADOW_ANIMATION_TO_WITH_UNIT_VARIABLE]: getCorrectValue(\r\n shadowAnimationValue?.to,\r\n ),\r\n [SHADOW_ANIMATION_DELAY_VARIABLE]: getCorrectValue(\r\n shadowAnimationValue?.delay,\r\n \"s\",\r\n ),\r\n [SHADOW_ANIMATION_DURATION_VARIABLE]: getCorrectValue(\r\n shadowAnimationValue?.duration,\r\n \"s\",\r\n ),\r\n [SHADOW_ANIMATION_OPTIONS_VARIABLE]:\r\n shadowAnimationValue?.options ?? \"normal\",\r\n };\r\n });\r\n}\r\n","import { computed, type Signal } from \"@angular/core\";\r\nimport { getCorrectValue } from \"./get-correct-value\";\r\nimport type { IsometricElements } from \"../types/isometric-elements\";\r\nimport type { SizeProps } from \"../types/size.types\";\r\nimport type { CSSVariables } from \"../types/common.types\";\r\n\r\nexport function isometricSize(\r\n size: Signal<SizeProps>,\r\n element: IsometricElements,\r\n): Signal<CSSVariables> {\r\n return computed(() => {\r\n const widthVariable = `--isometric-${element}-width`;\r\n const heightVariable = `--isometric-${element}-height`;\r\n\r\n const sizeValue = size();\r\n\r\n if (typeof sizeValue === \"number\" || typeof sizeValue === \"string\") {\r\n return {\r\n [widthVariable]: getCorrectValue(sizeValue),\r\n [heightVariable]: getCorrectValue(sizeValue),\r\n };\r\n }\r\n\r\n const { width, height } = sizeValue;\r\n\r\n return {\r\n [widthVariable]: getCorrectValue(width),\r\n [heightVariable]: getCorrectValue(height),\r\n };\r\n });\r\n}\r\n","// internal utils\r\nexport { getCorrectValue as ɵgetCorrectValue } from \"./utils/get-correct-value\";\r\nexport { isometricBorder as ɵisometricBorder } from \"./utils/isometric-border\";\r\nexport { isometricEdge as ɵisometricEdge } from \"./utils/isometric-edge\";\r\nexport { isometricPosition as ɵisometricPosition } from \"./utils/isometric-position\";\r\nexport { isometricRotation as ɵisometricRotation } from \"./utils/isometric-rotation\";\r\nexport { isometricShadow as ɵisometricShadow } from \"./utils/isometric-shadow\";\r\nexport { isometricShadowAnimation as ɵisometricShadowAnimation } from \"./utils/isometric-shadow-animation\";\r\nexport { isometricSize as ɵisometricSize } from \"./utils/isometric-size\";\r\n\r\n// public types\r\nexport type { Border } from \"./types/border.types\";\r\nexport type { Edge } from \"./types/edge.types\";\r\nexport type { Position } from \"./types/position.types\";\r\nexport type { Rotation } from \"./types/rotation.types\";\r\nexport type { Shadow } from \"./types/shadow.types\";\r\nexport type { ShadowAnimation } from \"./types/shadow-animation.types\";\r\nexport type {\r\n SizeAsObject,\r\n SizeProps,\r\n SizeMultiplier,\r\n} from \"./types/size.types\";\r\nexport type { ClassValue } from \"./types/common.types\";\r\n\r\n// internal types\r\nexport type { CSSVariables as ɵCSSVariables } from \"./types/common.types\";\r\nexport type { IsometricElements as ɵIsometricElements } from \"./types/isometric-elements\";\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;SAAgB,eAAe,CAC7B,KAAkC,EAClC,IAAI,GAAG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,GAAG,CACJ;AACD,YAAA,CAAC,iCAAiC,GAChC,oBAAoB,EAAE,OAAO,IAAI,QAAQ;SAC5C;AACH,IAAA,CAAC,CAAC;AACJ;;AC5DM,SAAU,aAAa,CAC3B,IAAuB,EACvB,OAA0B,EAAA;IAE1B,OAAO,QAAQ,CAAC,MAAK;AACnB,QAAA,MAAM,aAAa,GAAG,CAAA,YAAA,EAAe,OAAO,QAAQ;AACpD,QAAA,MAAM,cAAc,GAAG,CAAA,YAAA,EAAe,OAAO,SAAS;AAEtD,QAAA,MAAM,SAAS,GAAG,IAAI,EAAE;QAExB,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;YAClE,OAAO;AACL,gBAAA,CAAC,aAAa,GAAG,eAAe,CAAC,SAAS,CAAC;AAC3C,gBAAA,CAAC,cAAc,GAAG,eAAe,CAAC,SAAS,CAAC;aAC7C;QACH;AAEA,QAAA,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS;QAEnC,OAAO;AACL,YAAA,CAAC,aAAa,GAAG,eAAe,CAAC,KAAK,CAAC;AACvC,YAAA,CAAC,cAAc,GAAG,eAAe,CAAC,MAAM,CAAC;SAC1C;AACH,IAAA,CAAC,CAAC;AACJ;;AC9BA;;ACAA;;AAEG;;"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive } from '@angular/core';
|
|
3
|
+
import { ɵisometricSize as _isometricSize, ɵisometricBorder as _isometricBorder, ɵisometricPosition as _isometricPosition, ɵisometricShadow as _isometricShadow, ɵisometricShadowAnimation as _isometricShadowAnimation, ɵisometricRotation as _isometricRotation, ɵgetCorrectValue as _getCorrectValue } from 'isometric-angular/core';
|
|
4
|
+
|
|
5
|
+
class IsometricCube {
|
|
6
|
+
size = input.required(...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
7
|
+
depth = input.required(...(ngDevMode ? [{ debugName: "depth" }] : /* istanbul ignore next */ []));
|
|
8
|
+
border = input(...(ngDevMode ? [undefined, { debugName: "border" }] : /* istanbul ignore next */ []));
|
|
9
|
+
position = input(...(ngDevMode ? [undefined, { debugName: "position" }] : /* istanbul ignore next */ []));
|
|
10
|
+
shadow = input(...(ngDevMode ? [undefined, { debugName: "shadow" }] : /* istanbul ignore next */ []));
|
|
11
|
+
shadowAnimation = input(...(ngDevMode ? [undefined, { debugName: "shadowAnimation" }] : /* istanbul ignore next */ []));
|
|
12
|
+
rotation = input(...(ngDevMode ? [undefined, { debugName: "rotation" }] : /* istanbul ignore next */ []));
|
|
13
|
+
sizeVariables = _isometricSize(this.size, "cube");
|
|
14
|
+
borderVariables = _isometricBorder(this.border, "-cube");
|
|
15
|
+
positionVariables = _isometricPosition(this.position);
|
|
16
|
+
shadowVariables = _isometricShadow(this.shadow);
|
|
17
|
+
shadowAnimationVariables = _isometricShadowAnimation(this.shadowAnimation);
|
|
18
|
+
rotationVariables = _isometricRotation(this.rotation);
|
|
19
|
+
styles = computed(() => ({
|
|
20
|
+
...this.sizeVariables(),
|
|
21
|
+
...this.borderVariables(),
|
|
22
|
+
...this.positionVariables(),
|
|
23
|
+
...this.shadowVariables(),
|
|
24
|
+
...this.shadowAnimationVariables(),
|
|
25
|
+
...this.rotationVariables(),
|
|
26
|
+
"--isometric-cube-depth": _getCorrectValue(this.depth()),
|
|
27
|
+
}), ...(ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []));
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: IsometricCube, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.26", type: IsometricCube, isStandalone: true, selector: "[isometric-cube]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: true, transformFunction: null }, depth: { classPropertyName: "depth", publicName: "depth", isSignal: true, isRequired: true, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, shadowAnimation: { classPropertyName: "shadowAnimation", publicName: "shadowAnimation", isSignal: true, isRequired: false, transformFunction: null }, rotation: { classPropertyName: "rotation", publicName: "rotation", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.isometric-position": "!!positionVariables()", "class.isometric-shadow": "!!shadowVariables() || !!shadowAnimationVariables()", "class.isometric-shadow-animation": "!!shadowAnimationVariables()", "class.isometric-rotation": "!!rotationVariables()", "style": "styles()" }, classAttribute: "isometric-cube" }, ngImport: i0, template: ` <ng-content /> `, isInline: true, styles: [".isometric-cube{position:absolute;width:var(--isometric-cube-width, 0rem);height:var(--isometric-cube-height, 0rem);transform-origin:center}.isometric-cube>*{position:absolute;border-width:var(--isometric-border-size-cube, 0px);border-color:color-mix(in srgb,var(--isometric-border-color-cube, #fff),#000 20%);border-style:var(--isometric-border-style-cube, solid);box-sizing:border-box}.isometric-cube-top{width:var(--isometric-cube-width, 0rem);height:var(--isometric-cube-height, 0rem);transform:translateZ(var(--isometric-cube-depth, 0rem))}.isometric-cube-front-left{width:var(--isometric-cube-width, 0rem);height:var(--isometric-cube-depth, 0rem);transform:translateY(calc(var(--isometric-cube-height, 0rem) - (var(--isometric-cube-depth, 0rem) / 2))) translateZ(calc(var(--isometric-cube-depth, 0rem) / 2)) rotateX(-90deg)}.isometric-cube-front-right{width:var(--isometric-cube-height, 0rem);height:var(--isometric-cube-depth, 0rem);transform:translate(calc(var(--isometric-cube-width, 0rem) - (var(--isometric-cube-height, 0rem) / 2))) translateY(calc(var(--isometric-cube-height, 0rem) / 2 - (var(--isometric-cube-depth, 0rem) / 2))) translateZ(calc(var(--isometric-cube-depth, 0rem) / 2)) rotateX(-90deg) rotateY(90deg)}.isometric-cube-bottom{width:var(--isometric-cube-width, 0rem);height:var(--isometric-cube-height, 0rem);transform:initial}.isometric-cube-back-right{width:var(--isometric-cube-width, 0rem);height:var(--isometric-cube-depth, 0rem);transform:translateY(calc(-1 * var(--isometric-cube-depth, 0rem) / 2)) translateZ(calc(var(--isometric-cube-depth, 0rem) / 2)) rotateX(-90deg)}.isometric-cube-back-left{width:var(--isometric-cube-height, 0rem);height:var(--isometric-cube-depth, 0rem);transform:translate(calc(-1 * var(--isometric-cube-height, 0rem) / 2)) translateY(calc(var(--isometric-cube-height, 0rem) / 2 - (var(--isometric-cube-depth, 0rem) / 2))) translateZ(calc(var(--isometric-cube-depth, 0rem) / 2)) rotateX(-90deg) rotateY(90deg)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: IsometricCube, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
args: [{ selector: "[isometric-cube]", host: {
|
|
34
|
+
class: "isometric-cube",
|
|
35
|
+
"[class.isometric-position]": "!!positionVariables()",
|
|
36
|
+
"[class.isometric-shadow]": "!!shadowVariables() || !!shadowAnimationVariables()",
|
|
37
|
+
"[class.isometric-shadow-animation]": "!!shadowAnimationVariables()",
|
|
38
|
+
"[class.isometric-rotation]": "!!rotationVariables()",
|
|
39
|
+
"[style]": "styles()",
|
|
40
|
+
}, template: ` <ng-content /> `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".isometric-cube{position:absolute;width:var(--isometric-cube-width, 0rem);height:var(--isometric-cube-height, 0rem);transform-origin:center}.isometric-cube>*{position:absolute;border-width:var(--isometric-border-size-cube, 0px);border-color:color-mix(in srgb,var(--isometric-border-color-cube, #fff),#000 20%);border-style:var(--isometric-border-style-cube, solid);box-sizing:border-box}.isometric-cube-top{width:var(--isometric-cube-width, 0rem);height:var(--isometric-cube-height, 0rem);transform:translateZ(var(--isometric-cube-depth, 0rem))}.isometric-cube-front-left{width:var(--isometric-cube-width, 0rem);height:var(--isometric-cube-depth, 0rem);transform:translateY(calc(var(--isometric-cube-height, 0rem) - (var(--isometric-cube-depth, 0rem) / 2))) translateZ(calc(var(--isometric-cube-depth, 0rem) / 2)) rotateX(-90deg)}.isometric-cube-front-right{width:var(--isometric-cube-height, 0rem);height:var(--isometric-cube-depth, 0rem);transform:translate(calc(var(--isometric-cube-width, 0rem) - (var(--isometric-cube-height, 0rem) / 2))) translateY(calc(var(--isometric-cube-height, 0rem) / 2 - (var(--isometric-cube-depth, 0rem) / 2))) translateZ(calc(var(--isometric-cube-depth, 0rem) / 2)) rotateX(-90deg) rotateY(90deg)}.isometric-cube-bottom{width:var(--isometric-cube-width, 0rem);height:var(--isometric-cube-height, 0rem);transform:initial}.isometric-cube-back-right{width:var(--isometric-cube-width, 0rem);height:var(--isometric-cube-depth, 0rem);transform:translateY(calc(-1 * var(--isometric-cube-depth, 0rem) / 2)) translateZ(calc(var(--isometric-cube-depth, 0rem) / 2)) rotateX(-90deg)}.isometric-cube-back-left{width:var(--isometric-cube-height, 0rem);height:var(--isometric-cube-depth, 0rem);transform:translate(calc(-1 * var(--isometric-cube-height, 0rem) / 2)) translateY(calc(var(--isometric-cube-height, 0rem) / 2 - (var(--isometric-cube-depth, 0rem) / 2))) translateZ(calc(var(--isometric-cube-depth, 0rem) / 2)) rotateX(-90deg) rotateY(90deg)}\n"] }]
|
|
41
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: true }] }], depth: [{ type: i0.Input, args: [{ isSignal: true, alias: "depth", required: true }] }], border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], shadowAnimation: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadowAnimation", required: false }] }], rotation: [{ type: i0.Input, args: [{ isSignal: true, alias: "rotation", required: false }] }] } });
|
|
42
|
+
|
|
43
|
+
const cubeSideClasses = {
|
|
44
|
+
top: "isometric-cube-top",
|
|
45
|
+
"front-left": "isometric-cube-front-left",
|
|
46
|
+
"front-right": "isometric-cube-front-right",
|
|
47
|
+
bottom: "isometric-cube-bottom",
|
|
48
|
+
"back-left": "isometric-cube-back-left",
|
|
49
|
+
"back-right": "isometric-cube-back-right",
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
class IsometricCubeSide {
|
|
53
|
+
side = input.required({ ...(ngDevMode ? { debugName: "side" } : /* istanbul ignore next */ {}), alias: "isometricCubeSide" });
|
|
54
|
+
sideClass = computed(() => cubeSideClasses[this.side()], ...(ngDevMode ? [{ debugName: "sideClass" }] : /* istanbul ignore next */ []));
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: IsometricCubeSide, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
56
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.26", type: IsometricCubeSide, isStandalone: true, selector: "[isometricCubeSide]", inputs: { side: { classPropertyName: "side", publicName: "isometricCubeSide", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "sideClass()" } }, ngImport: i0 });
|
|
57
|
+
}
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: IsometricCubeSide, decorators: [{
|
|
59
|
+
type: Directive,
|
|
60
|
+
args: [{
|
|
61
|
+
selector: "[isometricCubeSide]",
|
|
62
|
+
host: {
|
|
63
|
+
"[class]": "sideClass()",
|
|
64
|
+
},
|
|
65
|
+
}]
|
|
66
|
+
}], propDecorators: { side: [{ type: i0.Input, args: [{ isSignal: true, alias: "isometricCubeSide", required: true }] }] } });
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Generated bundle index. Do not edit.
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
export { IsometricCube, IsometricCubeSide };
|
|
73
|
+
//# sourceMappingURL=isometric-angular-isometric-cube.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isometric-angular-isometric-cube.mjs","sources":["../../../projects/isometric-angular/isometric-cube/src/components/isometric-cube.ts","../../../projects/isometric-angular/isometric-cube/src/constants/cube-side-classes.ts","../../../projects/isometric-angular/isometric-cube/src/directives/isometric-cube-side.ts","../../../projects/isometric-angular/isometric-cube/src/isometric-angular-isometric-cube.ts"],"sourcesContent":["import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n input,\r\n computed,\r\n} from \"@angular/core\";\r\nimport {\r\n ɵisometricSize as isometricSize,\r\n ɵisometricBorder as isometricBorder,\r\n ɵisometricPosition as isometricPosition,\r\n ɵisometricShadow as isometricShadow,\r\n ɵisometricShadowAnimation as isometricShadowAnimation,\r\n ɵisometricRotation as isometricRotation,\r\n ɵgetCorrectValue as getCorrectValue,\r\n type SizeAsObject,\r\n type Border,\r\n type Position,\r\n type Shadow,\r\n type ShadowAnimation,\r\n type Rotation,\r\n type ɵCSSVariables as CSSVariables,\r\n} from \"isometric-angular/core\";\r\n\r\n@Component({\r\n selector: \"[isometric-cube]\",\r\n host: {\r\n class: \"isometric-cube\",\r\n \"[class.isometric-position]\": \"!!positionVariables()\",\r\n \"[class.isometric-shadow]\":\r\n \"!!shadowVariables() || !!shadowAnimationVariables()\",\r\n \"[class.isometric-shadow-animation]\": \"!!shadowAnimationVariables()\",\r\n \"[class.isometric-rotation]\": \"!!rotationVariables()\",\r\n \"[style]\": \"styles()\",\r\n },\r\n template: ` <ng-content /> `,\r\n styleUrl: \"../styles/isometric-cube.styles.css\",\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class IsometricCube {\r\n readonly size = input.required<SizeAsObject>();\r\n readonly depth = input.required<number | string>();\r\n readonly border = input<Border>();\r\n readonly position = input<Position>();\r\n readonly shadow = input<Shadow>();\r\n readonly shadowAnimation = input<ShadowAnimation>();\r\n readonly rotation = input<Rotation>();\r\n\r\n protected readonly sizeVariables = isometricSize(this.size, \"cube\");\r\n protected readonly borderVariables = isometricBorder(this.border, \"-cube\");\r\n protected readonly positionVariables = isometricPosition(this.position);\r\n protected readonly shadowVariables = isometricShadow(this.shadow);\r\n protected readonly shadowAnimationVariables = isometricShadowAnimation(\r\n this.shadowAnimation,\r\n );\r\n protected readonly rotationVariables = isometricRotation(this.rotation);\r\n\r\n protected readonly styles = computed<CSSVariables>(() => ({\r\n ...this.sizeVariables(),\r\n ...this.borderVariables(),\r\n ...this.positionVariables(),\r\n ...this.shadowVariables(),\r\n ...this.shadowAnimationVariables(),\r\n ...this.rotationVariables(),\r\n \"--isometric-cube-depth\": getCorrectValue(this.depth()),\r\n }));\r\n}\r\n","import type { CubeSides } from \"../types/cube-sides.types\";\r\n\r\nexport const cubeSideClasses: Record<CubeSides, string> = {\r\n top: \"isometric-cube-top\",\r\n \"front-left\": \"isometric-cube-front-left\",\r\n \"front-right\": \"isometric-cube-front-right\",\r\n bottom: \"isometric-cube-bottom\",\r\n \"back-left\": \"isometric-cube-back-left\",\r\n \"back-right\": \"isometric-cube-back-right\",\r\n};\r\n","import { computed, Directive, input } from \"@angular/core\";\r\nimport { cubeSideClasses } from \"../constants/cube-side-classes\";\r\nimport type { CubeSides } from \"../types/cube-sides.types\";\r\n\r\n@Directive({\r\n selector: \"[isometricCubeSide]\",\r\n host: {\r\n \"[class]\": \"sideClass()\",\r\n },\r\n})\r\nexport class IsometricCubeSide {\r\n readonly side = input.required<CubeSides>({\r\n alias: \"isometricCubeSide\",\r\n });\r\n\r\n protected readonly sideClass = computed(() => cubeSideClasses[this.side()]);\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["isometricSize","isometricBorder","isometricPosition","isometricShadow","isometricShadowAnimation","isometricRotation","getCorrectValue"],"mappings":";;;;MAwCa,aAAa,CAAA;AACf,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAgB;AACrC,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAmB;IACzC,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACxB,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAY;IAC5B,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACxB,eAAe,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAmB;IAC1C,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAY;IAElB,aAAa,GAAGA,cAAa,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;IAChD,eAAe,GAAGC,gBAAe,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;AACvD,IAAA,iBAAiB,GAAGC,kBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC;AACpD,IAAA,eAAe,GAAGC,gBAAe,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9C,IAAA,wBAAwB,GAAGC,yBAAwB,CACpE,IAAI,CAAC,eAAe,C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
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { ɵisometricPosition as _isometricPosition, ɵisometricShadow as _isometricShadow, ɵisometricShadowAnimation as _isometricShadowAnimation, ɵisometricRotation as _isometricRotation, ɵgetCorrectValue as _getCorrectValue } from 'isometric-angular/core';
|
|
4
|
+
|
|
5
|
+
class IsometricGrid {
|
|
6
|
+
size = input.required(...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
7
|
+
sizeMultiplier = input(...(ngDevMode ? [undefined, { debugName: "sizeMultiplier" }] : /* istanbul ignore next */ []));
|
|
8
|
+
color = input("#000", ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
9
|
+
lineweight = input(...(ngDevMode ? [undefined, { debugName: "lineweight" }] : /* istanbul ignore next */ []));
|
|
10
|
+
position = input(...(ngDevMode ? [undefined, { debugName: "position" }] : /* istanbul ignore next */ []));
|
|
11
|
+
shadow = input(...(ngDevMode ? [undefined, { debugName: "shadow" }] : /* istanbul ignore next */ []));
|
|
12
|
+
shadowAnimation = input(...(ngDevMode ? [undefined, { debugName: "shadowAnimation" }] : /* istanbul ignore next */ []));
|
|
13
|
+
rotation = input(...(ngDevMode ? [undefined, { debugName: "rotation" }] : /* istanbul ignore next */ []));
|
|
14
|
+
positionVariables = _isometricPosition(this.position);
|
|
15
|
+
shadowVariables = _isometricShadow(this.shadow);
|
|
16
|
+
shadowAnimationVariables = _isometricShadowAnimation(this.shadowAnimation);
|
|
17
|
+
rotationVariables = _isometricRotation(this.rotation);
|
|
18
|
+
styles = computed(() => {
|
|
19
|
+
const { width = 1, height = 1 } = this.sizeMultiplier() ?? {};
|
|
20
|
+
return {
|
|
21
|
+
...this.positionVariables(),
|
|
22
|
+
...this.shadowVariables(),
|
|
23
|
+
...this.shadowAnimationVariables(),
|
|
24
|
+
...this.rotationVariables(),
|
|
25
|
+
"--isometric-grid-size": _getCorrectValue(this.size()),
|
|
26
|
+
"--isometric-grid-lineweight": _getCorrectValue(this.lineweight(), "%"),
|
|
27
|
+
"--isometric-grid-color": this.color(),
|
|
28
|
+
"--isometric-grid-width": String(width),
|
|
29
|
+
"--isometric-grid-height": String(height),
|
|
30
|
+
};
|
|
31
|
+
}, ...(ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []));
|
|
32
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: IsometricGrid, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.26", type: IsometricGrid, isStandalone: true, selector: "[isometric-grid]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: true, transformFunction: null }, sizeMultiplier: { classPropertyName: "sizeMultiplier", publicName: "sizeMultiplier", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, lineweight: { classPropertyName: "lineweight", publicName: "lineweight", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, shadowAnimation: { classPropertyName: "shadowAnimation", publicName: "shadowAnimation", isSignal: true, isRequired: false, transformFunction: null }, rotation: { classPropertyName: "rotation", publicName: "rotation", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.isometric-position": "!!positionVariables()", "class.isometric-shadow": "!!shadowVariables() || !!shadowAnimationVariables()", "class.isometric-shadow-animation": "!!shadowAnimationVariables()", "class.isometric-rotation": "!!rotationVariables()", "style": "styles()" }, classAttribute: "isometric-grid" }, ngImport: i0, template: ` <ng-content /> `, isInline: true, styles: [".isometric-grid{position:absolute;background-image:linear-gradient(var(--isometric-grid-color, #000) var(--isometric-grid-lineweight, 1%),transparent var(--isometric-grid-lineweight, 1%),transparent calc(100% - var(--isometric-grid-lineweight, 1%)),var(--isometric-grid-color, #000) calc(100% - var(--isometric-grid-lineweight, 1%))),linear-gradient(90deg,var(--isometric-grid-color, #000) var(--isometric-grid-lineweight, 1%),transparent var(--isometric-grid-lineweight, 1%),transparent calc(100% - var(--isometric-grid-lineweight, 1%)),var(--isometric-grid-color, #000) calc(100% - var(--isometric-grid-lineweight, 1%)));background-size:var(--isometric-grid-size, 1rem) var(--isometric-grid-size, 1rem);width:calc(var(--isometric-grid-size, 1rem) * var(--isometric-grid-width, 1));height:calc(var(--isometric-grid-size, 1rem) * var(--isometric-grid-height, 1))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
34
|
+
}
|
|
35
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: IsometricGrid, decorators: [{
|
|
36
|
+
type: Component,
|
|
37
|
+
args: [{ selector: "[isometric-grid]", host: {
|
|
38
|
+
class: "isometric-grid",
|
|
39
|
+
"[class.isometric-position]": "!!positionVariables()",
|
|
40
|
+
"[class.isometric-shadow]": "!!shadowVariables() || !!shadowAnimationVariables()",
|
|
41
|
+
"[class.isometric-shadow-animation]": "!!shadowAnimationVariables()",
|
|
42
|
+
"[class.isometric-rotation]": "!!rotationVariables()",
|
|
43
|
+
"[style]": "styles()",
|
|
44
|
+
}, template: ` <ng-content /> `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".isometric-grid{position:absolute;background-image:linear-gradient(var(--isometric-grid-color, #000) var(--isometric-grid-lineweight, 1%),transparent var(--isometric-grid-lineweight, 1%),transparent calc(100% - var(--isometric-grid-lineweight, 1%)),var(--isometric-grid-color, #000) calc(100% - var(--isometric-grid-lineweight, 1%))),linear-gradient(90deg,var(--isometric-grid-color, #000) var(--isometric-grid-lineweight, 1%),transparent var(--isometric-grid-lineweight, 1%),transparent calc(100% - var(--isometric-grid-lineweight, 1%)),var(--isometric-grid-color, #000) calc(100% - var(--isometric-grid-lineweight, 1%)));background-size:var(--isometric-grid-size, 1rem) var(--isometric-grid-size, 1rem);width:calc(var(--isometric-grid-size, 1rem) * var(--isometric-grid-width, 1));height:calc(var(--isometric-grid-size, 1rem) * var(--isometric-grid-height, 1))}\n"] }]
|
|
45
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: true }] }], sizeMultiplier: [{ type: i0.Input, args: [{ isSignal: true, alias: "sizeMultiplier", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], lineweight: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineweight", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], shadowAnimation: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadowAnimation", required: false }] }], rotation: [{ type: i0.Input, args: [{ isSignal: true, alias: "rotation", required: false }] }] } });
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Generated bundle index. Do not edit.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
export { IsometricGrid };
|
|
52
|
+
//# sourceMappingURL=isometric-angular-isometric-grid.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isometric-angular-isometric-grid.mjs","sources":["../../../projects/isometric-angular/isometric-grid/src/components/isometric-grid.ts","../../../projects/isometric-angular/isometric-grid/src/isometric-angular-isometric-grid.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n input,\r\n ViewEncapsulation,\r\n} from \"@angular/core\";\r\nimport {\r\n ɵisometricPosition as isometricPosition,\r\n ɵisometricShadow as isometricShadow,\r\n ɵisometricShadowAnimation as isometricShadowAnimation,\r\n ɵisometricRotation as isometricRotation,\r\n ɵgetCorrectValue as getCorrectValue,\r\n type SizeMultiplier,\r\n type Position,\r\n type Shadow,\r\n type ShadowAnimation,\r\n type Rotation,\r\n type ɵCSSVariables as CSSVariables,\r\n} from \"isometric-angular/core\";\r\n\r\n@Component({\r\n selector: \"[isometric-grid]\",\r\n host: {\r\n class: \"isometric-grid\",\r\n \"[class.isometric-position]\": \"!!positionVariables()\",\r\n \"[class.isometric-shadow]\":\r\n \"!!shadowVariables() || !!shadowAnimationVariables()\",\r\n \"[class.isometric-shadow-animation]\": \"!!shadowAnimationVariables()\",\r\n \"[class.isometric-rotation]\": \"!!rotationVariables()\",\r\n \"[style]\": \"styles()\",\r\n },\r\n template: ` <ng-content /> `,\r\n styleUrl: \"../styles/isometric-grid.styles.css\",\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class IsometricGrid {\r\n readonly size = input.required<string | number>();\r\n readonly sizeMultiplier = input<SizeMultiplier>();\r\n readonly color = input(\"#000\");\r\n readonly lineweight = input<string | number>();\r\n readonly position = input<Position>();\r\n readonly shadow = input<Shadow>();\r\n readonly shadowAnimation = input<ShadowAnimation>();\r\n readonly rotation = input<Rotation>();\r\n\r\n protected readonly positionVariables = isometricPosition(this.position);\r\n protected readonly shadowVariables = isometricShadow(this.shadow);\r\n protected readonly shadowAnimationVariables = isometricShadowAnimation(\r\n this.shadowAnimation,\r\n );\r\n protected readonly rotationVariables = isometricRotation(this.rotation);\r\n\r\n protected readonly styles = computed<CSSVariables>(() => {\r\n const { width = 1, height = 1 } = this.sizeMultiplier() ?? {};\r\n\r\n return {\r\n ...this.positionVariables(),\r\n ...this.shadowVariables(),\r\n ...this.shadowAnimationVariables(),\r\n ...this.rotationVariables(),\r\n \"--isometric-grid-size\": getCorrectValue(this.size()),\r\n \"--isometric-grid-lineweight\": getCorrectValue(this.lineweight(), \"%\"),\r\n \"--isometric-grid-color\": this.color(),\r\n \"--isometric-grid-width\": String(width),\r\n \"--isometric-grid-height\": String(height),\r\n };\r\n });\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["isometricPosition","isometricShadow","isometricShadowAnimation","isometricRotation","getCorrectValue"],"mappings":";;;;MAqCa,aAAa,CAAA;AACf,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,0EAAmB;IACxC,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAkB;AACxC,IAAA,KAAK,GAAG,KAAK,CAAC,MAAM,4EAAC;IACrB,UAAU,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAmB;IACrC,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAY;IAC5B,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACxB,eAAe,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAmB;IAC1C,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAY;AAElB,IAAA,iBAAiB,GAAGA,kBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC;AACpD,IAAA,eAAe,GAAGC,gBAAe,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9C,IAAA,wBAAwB,GAAGC,y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BzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,IAAA,EACtB;AACJ,wBAAA,KAAK,EAAE,gBAAgB;AACvB,wBAAA,4BAA4B,EAAE,uBAAuB;AACrD,wBAAA,0BAA0B,EACxB,qDAAqD;AACvD,wBAAA,oCAAoC,EAAE,8BAA8B;AACpE,wBAAA,4BAA4B,EAAE,uBAAuB;AACrD,wBAAA,SAAS,EAAE,UAAU;qBACtB,EAAA,QAAA,EACS,CAAA,gBAAA,CAAkB,iBAEb,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,m2BAAA,CAAA,EAAA;;;ACnCjD;;AAEG;;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { ɵisometricSize as _isometricSize, ɵisometricPosition as _isometricPosition, ɵisometricBorder as _isometricBorder, ɵisometricEdge as _isometricEdge, ɵisometricShadow as _isometricShadow, ɵisometricShadowAnimation as _isometricShadowAnimation, ɵisometricRotation as _isometricRotation } from 'isometric-angular/core';
|
|
4
|
+
|
|
5
|
+
class IsometricPlane {
|
|
6
|
+
size = input.required(...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
7
|
+
color = input("#000", ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
8
|
+
position = input(...(ngDevMode ? [undefined, { debugName: "position" }] : /* istanbul ignore next */ []));
|
|
9
|
+
border = input(...(ngDevMode ? [undefined, { debugName: "border" }] : /* istanbul ignore next */ []));
|
|
10
|
+
edge = input(...(ngDevMode ? [undefined, { debugName: "edge" }] : /* istanbul ignore next */ []));
|
|
11
|
+
shadow = input(...(ngDevMode ? [undefined, { debugName: "shadow" }] : /* istanbul ignore next */ []));
|
|
12
|
+
shadowAnimation = input(...(ngDevMode ? [undefined, { debugName: "shadowAnimation" }] : /* istanbul ignore next */ []));
|
|
13
|
+
rotation = input(...(ngDevMode ? [undefined, { debugName: "rotation" }] : /* istanbul ignore next */ []));
|
|
14
|
+
sizeVariables = _isometricSize(this.size, "plane");
|
|
15
|
+
positionVariables = _isometricPosition(this.position);
|
|
16
|
+
borderVariables = _isometricBorder(this.border);
|
|
17
|
+
edgeVariables = _isometricEdge(this.edge);
|
|
18
|
+
shadowVariables = _isometricShadow(this.shadow);
|
|
19
|
+
shadowAnimationVariables = _isometricShadowAnimation(this.shadowAnimation);
|
|
20
|
+
rotationVariables = _isometricRotation(this.rotation);
|
|
21
|
+
styles = computed(() => ({
|
|
22
|
+
...this.sizeVariables(),
|
|
23
|
+
...this.positionVariables(),
|
|
24
|
+
...this.borderVariables(),
|
|
25
|
+
...this.edgeVariables(),
|
|
26
|
+
...this.shadowVariables(),
|
|
27
|
+
...this.shadowAnimationVariables(),
|
|
28
|
+
...this.rotationVariables(),
|
|
29
|
+
"--isometric-plane-color": this.color(),
|
|
30
|
+
}), ...(ngDevMode ? [{ debugName: "styles" }] : /* istanbul ignore next */ []));
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: IsometricPlane, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.26", type: IsometricPlane, isStandalone: true, selector: "[isometric-plane]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: true, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, edge: { classPropertyName: "edge", publicName: "edge", isSignal: true, isRequired: false, transformFunction: null }, shadow: { classPropertyName: "shadow", publicName: "shadow", isSignal: true, isRequired: false, transformFunction: null }, shadowAnimation: { classPropertyName: "shadowAnimation", publicName: "shadowAnimation", isSignal: true, isRequired: false, transformFunction: null }, rotation: { classPropertyName: "rotation", publicName: "rotation", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.isometric-position": "!!positionVariables()", "class.isometric-border": "!!borderVariables()", "class.isometric-edge": "!!edgeVariables()", "class.isometric-shadow": "!!shadowVariables() || !!shadowAnimationVariables()", "class.isometric-shadow-animation": "!!shadowAnimationVariables()", "class.isometric-rotation": "!!rotationVariables()", "style": "styles()" }, classAttribute: "isometric-plane" }, ngImport: i0, template: ` <ng-content /> `, isInline: true, styles: [".isometric-plane{position:absolute;width:var(--isometric-plane-width, 0rem);height:var(--isometric-plane-height, 0rem);background:var(--isometric-plane-color, #000000)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
33
|
+
}
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: IsometricPlane, decorators: [{
|
|
35
|
+
type: Component,
|
|
36
|
+
args: [{ selector: "[isometric-plane]", host: {
|
|
37
|
+
class: "isometric-plane",
|
|
38
|
+
"[class.isometric-position]": "!!positionVariables()",
|
|
39
|
+
"[class.isometric-border]": "!!borderVariables()",
|
|
40
|
+
"[class.isometric-edge]": "!!edgeVariables()",
|
|
41
|
+
"[class.isometric-shadow]": "!!shadowVariables() || !!shadowAnimationVariables()",
|
|
42
|
+
"[class.isometric-shadow-animation]": "!!shadowAnimationVariables()",
|
|
43
|
+
"[class.isometric-rotation]": "!!rotationVariables()",
|
|
44
|
+
"[style]": "styles()",
|
|
45
|
+
}, template: ` <ng-content /> `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".isometric-plane{position:absolute;width:var(--isometric-plane-width, 0rem);height:var(--isometric-plane-height, 0rem);background:var(--isometric-plane-color, #000000)}\n"] }]
|
|
46
|
+
}], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: true }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], edge: [{ type: i0.Input, args: [{ isSignal: true, alias: "edge", required: false }] }], shadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadow", required: false }] }], shadowAnimation: [{ type: i0.Input, args: [{ isSignal: true, alias: "shadowAnimation", required: false }] }], rotation: [{ type: i0.Input, args: [{ isSignal: true, alias: "rotation", required: false }] }] } });
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Generated bundle index. Do not edit.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
export { IsometricPlane };
|
|
53
|
+
//# sourceMappingURL=isometric-angular-isometric-plane.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isometric-angular-isometric-plane.mjs","sources":["../../../projects/isometric-angular/isometric-plane/src/components/isometric-plane.ts","../../../projects/isometric-angular/isometric-plane/src/isometric-angular-isometric-plane.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n input,\r\n ViewEncapsulation,\r\n} from \"@angular/core\";\r\nimport {\r\n ɵisometricSize as isometricSize,\r\n ɵisometricEdge as isometricEdge,\r\n ɵisometricBorder as isometricBorder,\r\n ɵisometricPosition as isometricPosition,\r\n ɵisometricShadow as isometricShadow,\r\n ɵisometricShadowAnimation as isometricShadowAnimation,\r\n ɵisometricRotation as isometricRotation,\r\n type SizeAsObject,\r\n type Border,\r\n type Edge,\r\n type Position,\r\n type Shadow,\r\n type ShadowAnimation,\r\n type Rotation,\r\n type ɵCSSVariables as CSSVariables,\r\n} from \"isometric-angular/core\";\r\n\r\n@Component({\r\n selector: \"[isometric-plane]\",\r\n host: {\r\n class: \"isometric-plane\",\r\n \"[class.isometric-position]\": \"!!positionVariables()\",\r\n \"[class.isometric-border]\": \"!!borderVariables()\",\r\n \"[class.isometric-edge]\": \"!!edgeVariables()\",\r\n \"[class.isometric-shadow]\":\r\n \"!!shadowVariables() || !!shadowAnimationVariables()\",\r\n \"[class.isometric-shadow-animation]\": \"!!shadowAnimationVariables()\",\r\n \"[class.isometric-rotation]\": \"!!rotationVariables()\",\r\n \"[style]\": \"styles()\",\r\n },\r\n template: ` <ng-content /> `,\r\n styleUrl: \"../styles/isometric-plane.styles.css\",\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class IsometricPlane {\r\n readonly size = input.required<SizeAsObject>();\r\n readonly color = input(\"#000\");\r\n readonly position = input<Position>();\r\n readonly border = input<Border>();\r\n readonly edge = input<Edge>();\r\n readonly shadow = input<Shadow>();\r\n readonly shadowAnimation = input<ShadowAnimation>();\r\n readonly rotation = input<Rotation>();\r\n\r\n protected readonly sizeVariables = isometricSize(this.size, \"plane\");\r\n protected readonly positionVariables = isometricPosition(this.position);\r\n protected readonly borderVariables = isometricBorder(this.border);\r\n protected readonly edgeVariables = isometricEdge(this.edge);\r\n protected readonly shadowVariables = isometricShadow(this.shadow);\r\n protected readonly shadowAnimationVariables = isometricShadowAnimation(\r\n this.shadowAnimation,\r\n );\r\n protected readonly rotationVariables = isometricRotation(this.rotation);\r\n\r\n protected readonly styles = computed<CSSVariables>(() => ({\r\n ...this.sizeVariables(),\r\n ...this.positionVariables(),\r\n ...this.borderVariables(),\r\n ...this.edgeVariables(),\r\n ...this.shadowVariables(),\r\n ...this.shadowAnimationVariables(),\r\n ...this.rotationVariables(),\r\n \"--isometric-plane-color\": this.color(),\r\n }));\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["isometricSize","isometricPosition","isometricBorder","isometricEdge","isometricShadow","isometricShadowAnimation","isometricRotation"],"mappings":";;;;MA2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D;AACvD,wBAAA,oCAAoC,EAAE,8BAA8B;AACpE,wBAAA,4BAA4B,EAAE,uBAAuB;AACrD,wBAAA,SAAS,EAAE,UAAU;qBACtB,EAAA,QAAA,EACS,CAAA,gBAAA,CAAkB,iBAEb,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,4KAAA,CAAA,EAAA;;;ACzCjD;;AAEG;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class Isometric {
|
|
5
|
+
isometricClass = input(...(ngDevMode ? [undefined, { debugName: "isometricClass" }] : /* istanbul ignore next */ []));
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: Isometric, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.26", type: Isometric, isStandalone: true, selector: "[isometric-root]", inputs: { isometricClass: { classPropertyName: "isometricClass", publicName: "isometricClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "isometric-container" }, ngImport: i0, template: `
|
|
8
|
+
<div class="isometric" [class]="isometricClass()">
|
|
9
|
+
<ng-content />
|
|
10
|
+
</div>
|
|
11
|
+
`, isInline: true, styles: [".isometric-border{border:var(--isometric-border-size, 0px) var(--isometric-border-style, solid) var(--isometric-border-color, #000000);box-sizing:border-box}.isometric-edge:before{content:\"\";display:block;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;background:color-mix(in srgb,var(--isometric-edge-color, #fff),#000 20%);box-shadow:0 0 color-mix(in srgb,var(--isometric-edge-color, #fff),#000 20%);transform:translateZ(calc(-1 * var(--isometric-edge-depth, 0px)))}.isometric-position{top:var(--isometric-position-top, 0rem);left:var(--isometric-position-left, 0rem);transform:translateZ(calc(var(--isometric-position-elevation, 0rem) * .5))}.isometric-rotation{transform-origin:center;transform:rotate(var(--isometric-rotate-from, 0deg));animation:isometric-rotation var(--isometric-rotation-duration, 1s) linear forwards infinite;animation-delay:var(--isometric-rotation-delay, 0s)}@keyframes isometric-rotation{0%{transform:rotate(var(--rotation-from, 0deg))}to{transform:rotate(var(--rotation-to, 360deg))}}.isometric-shadow:after{position:absolute;content:\"\";display:block;top:0;left:0;width:100%;height:100%;border-radius:inherit;background:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-distance, 0) / 10)));border-color:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-distance, 0) / 10)));transform:translate(calc(var(--isometric-shadow-distance-with-unit, 1rem) * var(--isometric-shadow-spacing-x, 0))) translateY(calc(var(--isometric-shadow-distance-with-unit, 1rem) * var(--isometric-shadow-spacing-y, 0))) translateZ(calc(-1 * var(--isometric-shadow-distance-with-unit, 1rem)));box-shadow:0 0 calc(var(--isometric-shadow-distance-with-unit, 1rem) / 10) #0003;filter:blur(calc(var(--isometric-shadow-distance-with-unit, 1rem) / 10))}.isometric-shadow-animation:after{animation:isometric-shadow-animation var(--isometric-shadow-animation-duration, 1s) ease-in-out forwards var(--isometric-shadow-animation-options);animation-delay:var(--isometric-shadow-animation-delay, 0s)}@keyframes isometric-shadow-animation{0%{background:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-animation-from, 0) / 10)));border-color:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-animation-from, 0) / 10)));transform:translate(calc(var(--isometric-shadow-animation-from-with-unit, 0rem) * var(--isometric-shadow-spacing-x, 0))) translateY(calc(var(--isometric-shadow-animation-from-with-unit, 0rem) * var(--isometric-shadow-spacing-y, 0))) translateZ(calc(-1 * var(--isometric-shadow-animation-from-with-unit, 0rem)));box-shadow:0 0 calc(var(--isometric-shadow-animation-from-with-unit, 0rem) * 10) #0003;filter:blur(calc(var(--isometric-shadow-animation-from-with-unit, 0rem) / 10))}to{background:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-animation-to, 0) / 10)));border-color:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-animation-to, 0) / 10)));transform:translate(calc(var(--isometric-shadow-animation-to-with-unit, 0rem) * var(--isometric-shadow-spacing-x, 0))) translateY(calc(var(--isometric-shadow-animation-to-with-unit, 0rem) * var(--isometric-shadow-spacing-y, 0))) translateZ(calc(-1 * var(--isometric-shadow-animation-to-with-unit, 0rem)));box-shadow:0 0 calc(var(--isometric-shadow-animation-to-with-unit, 0rem) * 10) #0003;filter:blur(calc(var(--isometric-shadow-animation-to-with-unit, 0rem) / 10))}}\n", ".isometric-container,.isometric-container *,.isometric-container *:before,.isometric-container *:after{box-sizing:border-box}.isometric-container{overflow:hidden}.isometric{position:absolute;top:50%;left:50%;width:0;height:0;transform-style:preserve-3d;transform:rotateX(60deg) rotateY(0) rotate(45deg)}.isometric *{transform-style:preserve-3d}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
12
|
+
}
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: Isometric, decorators: [{
|
|
14
|
+
type: Component,
|
|
15
|
+
args: [{ selector: "[isometric-root]", host: {
|
|
16
|
+
class: "isometric-container",
|
|
17
|
+
}, template: `
|
|
18
|
+
<div class="isometric" [class]="isometricClass()">
|
|
19
|
+
<ng-content />
|
|
20
|
+
</div>
|
|
21
|
+
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".isometric-border{border:var(--isometric-border-size, 0px) var(--isometric-border-style, solid) var(--isometric-border-color, #000000);box-sizing:border-box}.isometric-edge:before{content:\"\";display:block;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:inherit;background:color-mix(in srgb,var(--isometric-edge-color, #fff),#000 20%);box-shadow:0 0 color-mix(in srgb,var(--isometric-edge-color, #fff),#000 20%);transform:translateZ(calc(-1 * var(--isometric-edge-depth, 0px)))}.isometric-position{top:var(--isometric-position-top, 0rem);left:var(--isometric-position-left, 0rem);transform:translateZ(calc(var(--isometric-position-elevation, 0rem) * .5))}.isometric-rotation{transform-origin:center;transform:rotate(var(--isometric-rotate-from, 0deg));animation:isometric-rotation var(--isometric-rotation-duration, 1s) linear forwards infinite;animation-delay:var(--isometric-rotation-delay, 0s)}@keyframes isometric-rotation{0%{transform:rotate(var(--rotation-from, 0deg))}to{transform:rotate(var(--rotation-to, 360deg))}}.isometric-shadow:after{position:absolute;content:\"\";display:block;top:0;left:0;width:100%;height:100%;border-radius:inherit;background:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-distance, 0) / 10)));border-color:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-distance, 0) / 10)));transform:translate(calc(var(--isometric-shadow-distance-with-unit, 1rem) * var(--isometric-shadow-spacing-x, 0))) translateY(calc(var(--isometric-shadow-distance-with-unit, 1rem) * var(--isometric-shadow-spacing-y, 0))) translateZ(calc(-1 * var(--isometric-shadow-distance-with-unit, 1rem)));box-shadow:0 0 calc(var(--isometric-shadow-distance-with-unit, 1rem) / 10) #0003;filter:blur(calc(var(--isometric-shadow-distance-with-unit, 1rem) / 10))}.isometric-shadow-animation:after{animation:isometric-shadow-animation var(--isometric-shadow-animation-duration, 1s) ease-in-out forwards var(--isometric-shadow-animation-options);animation-delay:var(--isometric-shadow-animation-delay, 0s)}@keyframes isometric-shadow-animation{0%{background:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-animation-from, 0) / 10)));border-color:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-animation-from, 0) / 10)));transform:translate(calc(var(--isometric-shadow-animation-from-with-unit, 0rem) * var(--isometric-shadow-spacing-x, 0))) translateY(calc(var(--isometric-shadow-animation-from-with-unit, 0rem) * var(--isometric-shadow-spacing-y, 0))) translateZ(calc(-1 * var(--isometric-shadow-animation-from-with-unit, 0rem)));box-shadow:0 0 calc(var(--isometric-shadow-animation-from-with-unit, 0rem) * 10) #0003;filter:blur(calc(var(--isometric-shadow-animation-from-with-unit, 0rem) / 10))}to{background:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-animation-to, 0) / 10)));border-color:rgba(0,0,0,calc(.2 / (1 + var(--isometric-shadow-animation-to, 0) / 10)));transform:translate(calc(var(--isometric-shadow-animation-to-with-unit, 0rem) * var(--isometric-shadow-spacing-x, 0))) translateY(calc(var(--isometric-shadow-animation-to-with-unit, 0rem) * var(--isometric-shadow-spacing-y, 0))) translateZ(calc(-1 * var(--isometric-shadow-animation-to-with-unit, 0rem)));box-shadow:0 0 calc(var(--isometric-shadow-animation-to-with-unit, 0rem) * 10) #0003;filter:blur(calc(var(--isometric-shadow-animation-to-with-unit, 0rem) / 10))}}\n", ".isometric-container,.isometric-container *,.isometric-container *:before,.isometric-container *:after{box-sizing:border-box}.isometric-container{overflow:hidden}.isometric{position:absolute;top:50%;left:50%;width:0;height:0;transform-style:preserve-3d;transform:rotateX(60deg) rotateY(0) rotate(45deg)}.isometric *{transform-style:preserve-3d}\n"] }]
|
|
22
|
+
}], propDecorators: { isometricClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "isometricClass", required: false }] }] } });
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* Public API Surface of isometric-angular
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Generated bundle index. Do not edit.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
export { Isometric };
|
|
33
|
+
//# sourceMappingURL=isometric-angular.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isometric-angular.mjs","sources":["../../../projects/isometric-angular/src/components/isometric.ts","../../../projects/isometric-angular/src/public-api.ts","../../../projects/isometric-angular/src/isometric-angular.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n input,\r\n ViewEncapsulation,\r\n} from \"@angular/core\";\r\nimport type { ClassValue } from \"isometric-angular/core\";\r\n\r\n@Component({\r\n selector: \"[isometric-root]\",\r\n host: {\r\n class: \"isometric-container\",\r\n },\r\n template: `\r\n <div class=\"isometric\" [class]=\"isometricClass()\">\r\n <ng-content />\r\n </div>\r\n `,\r\n styleUrls: [\"../styles/isometric.css\", \"../styles/isometric.styles.css\"],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class Isometric {\r\n readonly isometricClass = input<ClassValue>();\r\n}\r\n","/*\n * Public API Surface of isometric-angular\n */\n\nexport { Isometric } from \"./components/isometric\";\nexport type {\n Border,\n Edge,\n Position,\n Rotation,\n Shadow,\n ShadowAnimation,\n SizeAsObject,\n SizeProps,\n SizeMultiplier,\n ClassValue,\n} from \"isometric-angular/core\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAsBa,SAAS,CAAA;IACX,cAAc,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAc;wGADlC,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,qBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EATV,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qyGAAA,EAAA,4VAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;4FAKU,SAAS,EAAA,UAAA,EAAA,CAAA;kBAdrB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,IAAA,EACtB;AACJ,wBAAA,KAAK,EAAE,qBAAqB;qBAC7B,EAAA,QAAA,EACS,CAAA;;;;AAIT,EAAA,CAAA,EAAA,aAAA,EAEc,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,MAAA,EAAA,CAAA,qyGAAA,EAAA,4VAAA,CAAA,EAAA;;;ACpBjD;;AAEG;;ACFH;;AAEG;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isometric-angular",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
3
|
+
"author": "Matej Ruzic da Silva Pereira <matej.ruzic011@gmail.com>",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/JaViLuMa/isometric-angular.git"
|
|
7
|
+
},
|
|
8
|
+
"version": "1.0.1",
|
|
9
|
+
"description": "Isometric styling library made in Angular with as much flexibility over customization as possible. Rewrite of https://morgancaron.github.io/IsometricSass/ .",
|
|
10
|
+
"homepage": "https://github.com/JaViLuMa/isometric-angular#readme",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"isometric",
|
|
13
|
+
"angular",
|
|
14
|
+
"components",
|
|
15
|
+
"css",
|
|
16
|
+
"3d"
|
|
17
|
+
],
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@angular/common": "^21.2.0",
|
|
20
|
+
"@angular/core": "^21.2.0"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"tslib": "^2.3.0",
|
|
24
|
+
"csstype": "^3.0.0"
|
|
25
|
+
},
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"module": "fesm2022/isometric-angular.mjs",
|
|
28
|
+
"typings": "types/isometric-angular.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
"./package.json": {
|
|
31
|
+
"default": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./types/isometric-angular.d.ts",
|
|
35
|
+
"default": "./fesm2022/isometric-angular.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./core": {
|
|
38
|
+
"types": "./types/isometric-angular-core.d.ts",
|
|
39
|
+
"default": "./fesm2022/isometric-angular-core.mjs"
|
|
40
|
+
},
|
|
41
|
+
"./isometric-cube": {
|
|
42
|
+
"types": "./types/isometric-angular-isometric-cube.d.ts",
|
|
43
|
+
"default": "./fesm2022/isometric-angular-isometric-cube.mjs"
|
|
44
|
+
},
|
|
45
|
+
"./isometric-grid": {
|
|
46
|
+
"types": "./types/isometric-angular-isometric-grid.d.ts",
|
|
47
|
+
"default": "./fesm2022/isometric-angular-isometric-grid.mjs"
|
|
48
|
+
},
|
|
49
|
+
"./isometric-plane": {
|
|
50
|
+
"types": "./types/isometric-angular-isometric-plane.d.ts",
|
|
51
|
+
"default": "./fesm2022/isometric-angular-isometric-plane.mjs"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"type": "module"
|
|
6
55
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
|
+
import { Property } from 'csstype';
|
|
3
|
+
|
|
4
|
+
declare function getCorrectValue(value: string | number | undefined, unit?: string): string;
|
|
5
|
+
|
|
6
|
+
type Length = number | (string & {});
|
|
7
|
+
interface Border {
|
|
8
|
+
size?: Property.BorderWidth<Length>;
|
|
9
|
+
style?: Property.BorderStyle;
|
|
10
|
+
color?: Property.BorderColor;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type ClassValue = string | string[] | Record<string, boolean> | null | undefined;
|
|
14
|
+
type CSSVariables = Record<string, string>;
|
|
15
|
+
|
|
16
|
+
declare function isometricBorder(border: Signal<Border | undefined>, suffix?: Signal<string> | string): Signal<CSSVariables | undefined>;
|
|
17
|
+
|
|
18
|
+
interface Edge {
|
|
19
|
+
depth?: string | number;
|
|
20
|
+
color?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare function isometricEdge(edge: Signal<Edge | undefined>): Signal<CSSVariables | undefined>;
|
|
24
|
+
|
|
25
|
+
interface Position {
|
|
26
|
+
top?: string | number;
|
|
27
|
+
left?: string | number;
|
|
28
|
+
elevation?: string | number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare function isometricPosition(position: Signal<Position | undefined>): Signal<CSSVariables | undefined>;
|
|
32
|
+
|
|
33
|
+
interface Rotation {
|
|
34
|
+
from: string | number;
|
|
35
|
+
to: string | number;
|
|
36
|
+
delay?: number;
|
|
37
|
+
duration?: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare function isometricRotation(rotation: Signal<Rotation | undefined>): Signal<CSSVariables | undefined>;
|
|
41
|
+
|
|
42
|
+
interface Shadow {
|
|
43
|
+
distance: string | number;
|
|
44
|
+
spacingX: number;
|
|
45
|
+
spacingY: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare function isometricShadow(shadow: Signal<Shadow | undefined>): Signal<CSSVariables | undefined>;
|
|
49
|
+
|
|
50
|
+
interface ShadowAnimation {
|
|
51
|
+
from: string | number;
|
|
52
|
+
to: string | number;
|
|
53
|
+
spacingX: number;
|
|
54
|
+
spacingY: number;
|
|
55
|
+
delay?: number;
|
|
56
|
+
duration?: number;
|
|
57
|
+
options?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare function isometricShadowAnimation(shadowAnimation: Signal<ShadowAnimation | undefined>): Signal<CSSVariables | undefined>;
|
|
61
|
+
|
|
62
|
+
type IsometricElements = "cube" | "plane" | "grid";
|
|
63
|
+
|
|
64
|
+
interface SizeAsObject {
|
|
65
|
+
width: string | number;
|
|
66
|
+
height: string | number;
|
|
67
|
+
}
|
|
68
|
+
type SizeProps = SizeAsObject | string | number;
|
|
69
|
+
interface SizeMultiplier {
|
|
70
|
+
width?: number;
|
|
71
|
+
height?: number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare function isometricSize(size: Signal<SizeProps>, element: IsometricElements): Signal<CSSVariables>;
|
|
75
|
+
|
|
76
|
+
export { getCorrectValue as ɵgetCorrectValue, isometricBorder as ɵisometricBorder, isometricEdge as ɵisometricEdge, isometricPosition as ɵisometricPosition, isometricRotation as ɵisometricRotation, isometricShadow as ɵisometricShadow, isometricShadowAnimation as ɵisometricShadowAnimation, isometricSize as ɵisometricSize };
|
|
77
|
+
export type { Border, ClassValue, Edge, Position, Rotation, Shadow, ShadowAnimation, SizeAsObject, SizeMultiplier, SizeProps, CSSVariables as ɵCSSVariables, IsometricElements as ɵIsometricElements };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { SizeAsObject, Border, Position, Shadow, ShadowAnimation, Rotation, ɵCSSVariables as _CSSVariables } from 'isometric-angular/core';
|
|
3
|
+
|
|
4
|
+
declare class IsometricCube {
|
|
5
|
+
readonly size: _angular_core.InputSignal<SizeAsObject>;
|
|
6
|
+
readonly depth: _angular_core.InputSignal<string | number>;
|
|
7
|
+
readonly border: _angular_core.InputSignal<Border | undefined>;
|
|
8
|
+
readonly position: _angular_core.InputSignal<Position | undefined>;
|
|
9
|
+
readonly shadow: _angular_core.InputSignal<Shadow | undefined>;
|
|
10
|
+
readonly shadowAnimation: _angular_core.InputSignal<ShadowAnimation | undefined>;
|
|
11
|
+
readonly rotation: _angular_core.InputSignal<Rotation | undefined>;
|
|
12
|
+
protected readonly sizeVariables: _angular_core.Signal<_CSSVariables>;
|
|
13
|
+
protected readonly borderVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
14
|
+
protected readonly positionVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
15
|
+
protected readonly shadowVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
16
|
+
protected readonly shadowAnimationVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
17
|
+
protected readonly rotationVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
18
|
+
protected readonly styles: _angular_core.Signal<_CSSVariables>;
|
|
19
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IsometricCube, never>;
|
|
20
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IsometricCube, "[isometric-cube]", never, { "size": { "alias": "size"; "required": true; "isSignal": true; }; "depth": { "alias": "depth"; "required": true; "isSignal": true; }; "border": { "alias": "border"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "shadowAnimation": { "alias": "shadowAnimation"; "required": false; "isSignal": true; }; "rotation": { "alias": "rotation"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type CubeSides = "top" | "front-left" | "front-right" | "bottom" | "back-left" | "back-right";
|
|
24
|
+
|
|
25
|
+
declare class IsometricCubeSide {
|
|
26
|
+
readonly side: _angular_core.InputSignal<CubeSides>;
|
|
27
|
+
protected readonly sideClass: _angular_core.Signal<string>;
|
|
28
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IsometricCubeSide, never>;
|
|
29
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<IsometricCubeSide, "[isometricCubeSide]", never, { "side": { "alias": "isometricCubeSide"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { IsometricCube, IsometricCubeSide };
|
|
33
|
+
export type { CubeSides };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { SizeMultiplier, Position, Shadow, ShadowAnimation, Rotation, ɵCSSVariables as _CSSVariables } from 'isometric-angular/core';
|
|
3
|
+
|
|
4
|
+
declare class IsometricGrid {
|
|
5
|
+
readonly size: _angular_core.InputSignal<string | number>;
|
|
6
|
+
readonly sizeMultiplier: _angular_core.InputSignal<SizeMultiplier | undefined>;
|
|
7
|
+
readonly color: _angular_core.InputSignal<string>;
|
|
8
|
+
readonly lineweight: _angular_core.InputSignal<string | number | undefined>;
|
|
9
|
+
readonly position: _angular_core.InputSignal<Position | undefined>;
|
|
10
|
+
readonly shadow: _angular_core.InputSignal<Shadow | undefined>;
|
|
11
|
+
readonly shadowAnimation: _angular_core.InputSignal<ShadowAnimation | undefined>;
|
|
12
|
+
readonly rotation: _angular_core.InputSignal<Rotation | undefined>;
|
|
13
|
+
protected readonly positionVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
14
|
+
protected readonly shadowVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
15
|
+
protected readonly shadowAnimationVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
16
|
+
protected readonly rotationVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
17
|
+
protected readonly styles: _angular_core.Signal<_CSSVariables>;
|
|
18
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IsometricGrid, never>;
|
|
19
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IsometricGrid, "[isometric-grid]", never, { "size": { "alias": "size"; "required": true; "isSignal": true; }; "sizeMultiplier": { "alias": "sizeMultiplier"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "lineweight": { "alias": "lineweight"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "shadowAnimation": { "alias": "shadowAnimation"; "required": false; "isSignal": true; }; "rotation": { "alias": "rotation"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { IsometricGrid };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { SizeAsObject, Position, Border, Edge, Shadow, ShadowAnimation, Rotation, ɵCSSVariables as _CSSVariables } from 'isometric-angular/core';
|
|
3
|
+
|
|
4
|
+
declare class IsometricPlane {
|
|
5
|
+
readonly size: _angular_core.InputSignal<SizeAsObject>;
|
|
6
|
+
readonly color: _angular_core.InputSignal<string>;
|
|
7
|
+
readonly position: _angular_core.InputSignal<Position | undefined>;
|
|
8
|
+
readonly border: _angular_core.InputSignal<Border | undefined>;
|
|
9
|
+
readonly edge: _angular_core.InputSignal<Edge | undefined>;
|
|
10
|
+
readonly shadow: _angular_core.InputSignal<Shadow | undefined>;
|
|
11
|
+
readonly shadowAnimation: _angular_core.InputSignal<ShadowAnimation | undefined>;
|
|
12
|
+
readonly rotation: _angular_core.InputSignal<Rotation | undefined>;
|
|
13
|
+
protected readonly sizeVariables: _angular_core.Signal<_CSSVariables>;
|
|
14
|
+
protected readonly positionVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
15
|
+
protected readonly borderVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
16
|
+
protected readonly edgeVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
17
|
+
protected readonly shadowVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
18
|
+
protected readonly shadowAnimationVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
19
|
+
protected readonly rotationVariables: _angular_core.Signal<_CSSVariables | undefined>;
|
|
20
|
+
protected readonly styles: _angular_core.Signal<_CSSVariables>;
|
|
21
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IsometricPlane, never>;
|
|
22
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IsometricPlane, "[isometric-plane]", never, { "size": { "alias": "size"; "required": true; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "border": { "alias": "border"; "required": false; "isSignal": true; }; "edge": { "alias": "edge"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "shadowAnimation": { "alias": "shadowAnimation"; "required": false; "isSignal": true; }; "rotation": { "alias": "rotation"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { IsometricPlane };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ClassValue } from 'isometric-angular/core';
|
|
3
|
+
export { Border, ClassValue, Edge, Position, Rotation, Shadow, ShadowAnimation, SizeAsObject, SizeMultiplier, SizeProps } from 'isometric-angular/core';
|
|
4
|
+
|
|
5
|
+
declare class Isometric {
|
|
6
|
+
readonly isometricClass: i0.InputSignal<ClassValue>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Isometric, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Isometric, "[isometric-root]", never, { "isometricClass": { "alias": "isometricClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { Isometric };
|