xmlui 0.10.7 → 0.10.10

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 (61) hide show
  1. package/dist/lib/{index-CTri_fRG.mjs → index-C71PAj7E.mjs} +16456 -16219
  2. package/dist/lib/index.css +1 -1
  3. package/dist/{metadata/initMock-DzaOI8sC.mjs → lib/initMock-Bvbl2Pa3.mjs} +119 -113
  4. package/dist/lib/language-server-web-worker.mjs +1 -1
  5. package/dist/lib/language-server.mjs +1 -1
  6. package/dist/lib/{metadata-utils-DrEexTX9.mjs → metadata-utils-gIOZMGG7.mjs} +51 -46
  7. package/dist/lib/{server-common-ddmPKhK6.mjs → server-common-BfCSNpXG.mjs} +4467 -4437
  8. package/dist/lib/xmlui-parser.d.ts +3 -3
  9. package/dist/lib/xmlui.d.ts +14 -10
  10. package/dist/lib/xmlui.mjs +26 -26
  11. package/dist/metadata/{collectedComponentMetadata-Oj8WR8B1.mjs → collectedComponentMetadata-Dn91__HO.mjs} +18722 -18481
  12. package/dist/{lib/initMock-abcNyaP8.mjs → metadata/initMock-ghNfStAu.mjs} +119 -113
  13. package/dist/metadata/style.css +1 -1
  14. package/dist/metadata/xmlui-metadata.mjs +1 -1
  15. package/dist/metadata/xmlui-metadata.umd.js +99 -99
  16. package/dist/scripts/package.json +1 -1
  17. package/dist/scripts/src/components/Accordion/AccordionItemNative.js +2 -2
  18. package/dist/scripts/src/components/App/AppNative.js +6 -7
  19. package/dist/scripts/src/components/Breakout/BreakoutNative.js +2 -2
  20. package/dist/scripts/src/components/Button/ButtonNative.js +4 -0
  21. package/dist/scripts/src/components/Carousel/Carousel.js +13 -20
  22. package/dist/scripts/src/components/Carousel/CarouselContext.js +11 -2
  23. package/dist/scripts/src/components/Carousel/CarouselItemNative.js +2 -2
  24. package/dist/scripts/src/components/Carousel/CarouselNative.js +2 -2
  25. package/dist/scripts/src/components/Charts/BarChart/BarChart.js +4 -4
  26. package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +5 -1
  27. package/dist/scripts/src/components/Charts/LineChart/LineChart.js +3 -3
  28. package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +5 -1
  29. package/dist/scripts/src/components/ComponentProvider.js +2 -0
  30. package/dist/scripts/src/components/DateInput/DateInput.js +7 -9
  31. package/dist/scripts/src/components/DateInput/DateInputNative.js +101 -38
  32. package/dist/scripts/src/components/ExpandableItem/ExpandableItemNative.js +18 -12
  33. package/dist/scripts/src/components/FormItem/ItemWithLabel.js +3 -3
  34. package/dist/scripts/src/components/Input/PartialInput.js +28 -3
  35. package/dist/scripts/src/components/List/ListNative.js +6 -5
  36. package/dist/scripts/src/components/NavPanel/NavPanelNative.js +3 -8
  37. package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +2 -2
  38. package/dist/scripts/src/components/Pagination/Pagination.js +2 -1
  39. package/dist/scripts/src/components/Slider/Slider.js +10 -8
  40. package/dist/scripts/src/components/Slider/SliderNative.js +24 -21
  41. package/dist/scripts/src/components/Table/Table.js +9 -6
  42. package/dist/scripts/src/components/Table/TableNative.js +18 -13
  43. package/dist/scripts/src/components/TextArea/TextAreaNative.js +3 -3
  44. package/dist/scripts/src/components/TextBox/TextBoxNative.js +2 -2
  45. package/dist/scripts/src/components/TimeInput/TimeInput.js +10 -10
  46. package/dist/scripts/src/components/TimeInput/TimeInputNative.js +87 -38
  47. package/dist/scripts/src/components/Timer/Timer.js +62 -0
  48. package/dist/scripts/src/components/Timer/TimerNative.js +179 -0
  49. package/dist/scripts/src/components/Toggle/Toggle.js +1 -1
  50. package/dist/scripts/src/components/Tooltip/Tooltip.js +9 -9
  51. package/dist/scripts/src/components/Tooltip/TooltipNative.js +4 -4
  52. package/dist/scripts/src/components/abstractions.js +6 -3
  53. package/dist/scripts/src/components-core/ComponentDecorator.js +3 -2
  54. package/dist/scripts/src/components-core/interception/ApiInterceptor.js +4 -1
  55. package/dist/scripts/src/components-core/interception/Backend.js +14 -1
  56. package/dist/scripts/src/components-core/parts.js +0 -4
  57. package/dist/standalone/xmlui-standalone.es.d.ts +20 -14
  58. package/dist/standalone/xmlui-standalone.umd.js +265 -265
  59. package/package.json +1 -1
  60. package/dist/scripts/src/components-core/ScrollContext.js +0 -11
  61. package/dist/scripts/src/components-core/utils/audio-utils.js +0 -83
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmlui",
3
- "version": "0.10.7",
3
+ "version": "0.10.10",
4
4
  "sideEffects": false,
5
5
  "scripts": {
6
6
  "start-test-bed": "cd src/testing/infrastructure && xmlui start",
@@ -1,11 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ScrollContext = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- /**
9
- * Allows storing context information for components that support scrolling.
10
- */
11
- exports.ScrollContext = react_1.default.createContext(null);
@@ -1,83 +0,0 @@
1
- "use strict";
2
- /**
3
- * Audio utility functions
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.BeepPatterns = void 0;
7
- exports.beep = beep;
8
- exports.beepSequence = beepSequence;
9
- /**
10
- * Generates a beep sound using the Web Audio API
11
- * @param frequency - The frequency of the beep in Hz (default: 800)
12
- * @param durationInMs - The duration of the beep in milliseconds (default: 200)
13
- */
14
- function beep(frequency = 800, durationInMs = 200) {
15
- // Check if Web Audio API is supported
16
- if (typeof window === 'undefined' || !window.AudioContext && !window.webkitAudioContext) {
17
- console.warn('Web Audio API is not supported in this environment');
18
- return;
19
- }
20
- try {
21
- // Create audio context (handle both standard and webkit prefixed versions)
22
- const AudioContextClass = window.AudioContext || window.webkitAudioContext;
23
- const audioContext = new AudioContextClass();
24
- // Create oscillator for the tone
25
- const oscillator = audioContext.createOscillator();
26
- const gainNode = audioContext.createGain();
27
- // Connect nodes: oscillator -> gain -> destination
28
- oscillator.connect(gainNode);
29
- gainNode.connect(audioContext.destination);
30
- // Configure oscillator
31
- oscillator.frequency.setValueAtTime(frequency, audioContext.currentTime);
32
- oscillator.type = 'sine'; // Use sine wave for a clean tone
33
- // Configure gain (volume) with fade in/out to avoid clicking
34
- const currentTime = audioContext.currentTime;
35
- const endTime = currentTime + durationInMs / 1000;
36
- const fadeTime = Math.min(0.01, durationInMs / 1000 / 4); // Fade time is 1/4 of duration or 10ms, whichever is smaller
37
- gainNode.gain.setValueAtTime(0, currentTime);
38
- gainNode.gain.linearRampToValueAtTime(0.3, currentTime + fadeTime); // Fade in
39
- gainNode.gain.setValueAtTime(0.3, endTime - fadeTime);
40
- gainNode.gain.linearRampToValueAtTime(0, endTime); // Fade out
41
- // Start and stop the oscillator
42
- oscillator.start(currentTime);
43
- oscillator.stop(endTime);
44
- // Clean up after the beep is done
45
- oscillator.addEventListener('ended', () => {
46
- oscillator.disconnect();
47
- gainNode.disconnect();
48
- audioContext.close();
49
- });
50
- }
51
- catch (error) {
52
- console.warn('Failed to generate beep:', error);
53
- }
54
- }
55
- /**
56
- * Generates a sequence of beeps
57
- * @param count - Number of beeps
58
- * @param frequency - The frequency of each beep in Hz (default: 800)
59
- * @param durationInMs - The duration of each beep in milliseconds (default: 200)
60
- * @param intervalInMs - The interval between beeps in milliseconds (default: 300)
61
- */
62
- function beepSequence(count, frequency = 800, durationInMs = 200, intervalInMs = 300) {
63
- for (let i = 0; i < count; i++) {
64
- setTimeout(() => {
65
- beep(frequency, durationInMs);
66
- }, i * intervalInMs);
67
- }
68
- }
69
- /**
70
- * Predefined beep patterns for common use cases
71
- */
72
- exports.BeepPatterns = {
73
- /** Short, high-pitched beep for success */
74
- success: () => beep(1000, 150),
75
- /** Lower frequency beep for errors */
76
- error: () => beep(400, 300),
77
- /** Quick beep for notifications */
78
- notification: () => beep(800, 100),
79
- /** Double beep for warnings */
80
- warning: () => beepSequence(2, 600, 150, 200),
81
- /** Triple beep for alerts */
82
- alert: () => beepSequence(3, 900, 100, 150),
83
- };