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.
Files changed (35) hide show
  1. package/lib/architwin.d.ts +13 -2
  2. package/lib/architwin.js +1 -1
  3. package/lib/atwinui/components/toolbar/i18n.js +71 -3
  4. package/lib/atwinui/components/toolbar/index.js +5 -1
  5. package/lib/atwinui/components/toolbar/menuBar.d.ts +1 -0
  6. package/lib/atwinui/components/toolbar/menuBar.js +12 -0
  7. package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.d.ts +2 -0
  8. package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.js +62 -24
  9. package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.d.ts +21 -3
  10. package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.js +62 -25
  11. package/lib/atwinui/components/toolbar/tagFormPane.js +2 -1
  12. package/lib/atwinui/components/toolbar/tagListPane.d.ts +7 -2
  13. package/lib/atwinui/components/toolbar/tagListPane.js +126 -38
  14. package/lib/atwinui/events.d.ts +5 -3
  15. package/lib/atwinui/events.js +633 -79
  16. package/lib/atwinui/index.js +9 -1
  17. package/lib/color.js +12 -1
  18. package/lib/loaders/polydrawerLoader.js +3 -0
  19. package/lib/types.d.ts +75 -1
  20. package/lib/types.js +17 -0
  21. package/package.json +1 -1
  22. package/static/atwinui.css +88 -7
  23. package/static/colors/SOFT_ROYAL_BLUE.png +0 -0
  24. package/static/colors/YELLOW_ORANGE.png +0 -0
  25. package/static/utility.css +157 -538
  26. package/lib/atwinui/components/toolbar/roomCreation/roomFormPane.d.ts +0 -68
  27. package/lib/atwinui/components/toolbar/roomCreation/roomFormPane.js +0 -798
  28. package/lib/atwinui/components/toolbar/roomCreation/roomLayerListPane.d.ts +0 -33
  29. package/lib/atwinui/components/toolbar/roomCreation/roomLayerListPane.js +0 -447
  30. package/lib/atwinui/components/toolbar/tagIotForm.d.ts +0 -20
  31. package/lib/atwinui/components/toolbar/tagIotForm.js +0 -391
  32. package/lib/atwinui/components/toolbar/usersPane.d.ts +0 -14
  33. package/lib/atwinui/components/toolbar/usersPane.js +0 -273
  34. package/lib/convert.d.ts +0 -13
  35. 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
- }