architwin 1.14.15 → 1.15.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/lib/architwin.d.ts +13 -2
- package/lib/architwin.js +1 -1
- package/lib/atwinui/components/toolbar/i18n.js +71 -3
- package/lib/atwinui/components/toolbar/index.js +5 -1
- package/lib/atwinui/components/toolbar/menuBar.d.ts +1 -0
- package/lib/atwinui/components/toolbar/menuBar.js +12 -0
- package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.d.ts +2 -0
- package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.js +62 -24
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.d.ts +21 -3
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.js +62 -25
- package/lib/atwinui/components/toolbar/tagFormPane.js +2 -1
- package/lib/atwinui/components/toolbar/tagListPane.d.ts +7 -2
- package/lib/atwinui/components/toolbar/tagListPane.js +126 -38
- package/lib/atwinui/events.d.ts +5 -3
- package/lib/atwinui/events.js +633 -79
- package/lib/atwinui/index.js +9 -1
- package/lib/color.js +12 -1
- package/lib/loaders/polydrawerLoader.js +3 -0
- package/lib/types.d.ts +75 -1
- package/lib/types.js +17 -0
- package/package.json +1 -1
- package/static/atwinui.css +88 -7
- package/static/colors/SOFT_ROYAL_BLUE.png +0 -0
- package/static/colors/YELLOW_ORANGE.png +0 -0
- package/static/utility.css +157 -538
- package/lib/atwinui/components/toolbar/roomCreation/roomFormPane.d.ts +0 -68
- package/lib/atwinui/components/toolbar/roomCreation/roomFormPane.js +0 -798
- package/lib/atwinui/components/toolbar/roomCreation/roomLayerListPane.d.ts +0 -33
- package/lib/atwinui/components/toolbar/roomCreation/roomLayerListPane.js +0 -447
- package/lib/atwinui/components/toolbar/tagIotForm.d.ts +0 -20
- package/lib/atwinui/components/toolbar/tagIotForm.js +0 -391
- package/lib/atwinui/components/toolbar/usersPane.d.ts +0 -14
- package/lib/atwinui/components/toolbar/usersPane.js +0 -273
- package/lib/convert.d.ts +0 -13
- package/lib/convert.js +0 -54
package/lib/convert.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare function meterToMillimeter(meter: number, decimal?: number): number;
|
|
2
|
-
export declare function generateRandomUniqueNumber(currentIds: Array<number>): number;
|
|
3
|
-
export declare function generateUUID(): string;
|
|
4
|
-
export declare function useHexToRgb(hexcode: string): {
|
|
5
|
-
r: number;
|
|
6
|
-
g: number;
|
|
7
|
-
b: number;
|
|
8
|
-
};
|
|
9
|
-
export declare function useRgbToHex(color: {
|
|
10
|
-
r: number;
|
|
11
|
-
g: number;
|
|
12
|
-
b: number;
|
|
13
|
-
}): string;
|
package/lib/convert.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export function meterToMillimeter(meter, decimal = 2) {
|
|
2
|
-
const mm = meter * 1000;
|
|
3
|
-
return parseFloat(mm.toFixed(decimal));
|
|
4
|
-
}
|
|
5
|
-
export function generateRandomUniqueNumber(currentIds) {
|
|
6
|
-
function generateRandomNumber() {
|
|
7
|
-
return Math.floor(Math.random() * 40000);
|
|
8
|
-
}
|
|
9
|
-
// Loop until a unique number is generated
|
|
10
|
-
let randomNumber;
|
|
11
|
-
do {
|
|
12
|
-
randomNumber = generateRandomNumber();
|
|
13
|
-
} while (currentIds.indexOf(randomNumber) !== -1);
|
|
14
|
-
return randomNumber;
|
|
15
|
-
}
|
|
16
|
-
export function generateUUID() {
|
|
17
|
-
const cryptoObj = window.crypto;
|
|
18
|
-
if (!cryptoObj) {
|
|
19
|
-
console.error('crypto.getRandomValues() is not supported in this browser.');
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
const buffer = new Uint16Array(8);
|
|
23
|
-
cryptoObj.getRandomValues(buffer);
|
|
24
|
-
const hex = [];
|
|
25
|
-
for (let i = 0; i < buffer.length; i++) {
|
|
26
|
-
let val = buffer[i].toString(16);
|
|
27
|
-
while (val.length < 4) {
|
|
28
|
-
val = '0' + val;
|
|
29
|
-
}
|
|
30
|
-
hex.push(val);
|
|
31
|
-
}
|
|
32
|
-
// The UUID string format is "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
33
|
-
return `${hex[0]}${hex[1]}-${hex[2]}-${hex[3]}-${hex[4]}-${hex[5]}${hex[6]}${hex[7]}`;
|
|
34
|
-
}
|
|
35
|
-
export function useHexToRgb(hexcode) {
|
|
36
|
-
// Remove '#' symbol if it exists
|
|
37
|
-
hexcode = hexcode.replace("#", "");
|
|
38
|
-
// Parse hex values for red, green, and blue
|
|
39
|
-
const r = parseInt(hexcode.substring(0, 2), 16);
|
|
40
|
-
const g = parseInt(hexcode.substring(2, 4), 16);
|
|
41
|
-
const b = parseInt(hexcode.substring(4, 6), 16);
|
|
42
|
-
return { r, g, b };
|
|
43
|
-
}
|
|
44
|
-
export function useRgbToHex(color) {
|
|
45
|
-
// Ensure the values are within the valid range (0-255)
|
|
46
|
-
color.r = Math.min(255, Math.max(0, color.r));
|
|
47
|
-
color.g = Math.min(255, Math.max(0, color.g));
|
|
48
|
-
color.b = Math.min(255, Math.max(0, color.b));
|
|
49
|
-
// Convert to hex and pad with zeros if needed
|
|
50
|
-
const hexR = color.r.toString(16).padStart(2, "0");
|
|
51
|
-
const hexG = color.g.toString(16).padStart(2, "0");
|
|
52
|
-
const hexB = color.b.toString(16).padStart(2, "0");
|
|
53
|
-
return `${hexR}${hexG}${hexB}`;
|
|
54
|
-
}
|