juxscript 1.0.131 → 1.1.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 (129) hide show
  1. package/README.md +1 -32
  2. package/bin/cli.js +4 -2
  3. package/index.d.ts +200 -0
  4. package/index.js +96 -22
  5. package/juxconfig.example.js +58 -63
  6. package/lib/components/alert.ts +200 -0
  7. package/lib/components/app.ts +247 -0
  8. package/lib/components/badge.ts +101 -0
  9. package/lib/components/base/BaseComponent.ts +421 -0
  10. package/lib/components/base/FormInput.ts +227 -0
  11. package/lib/components/button.ts +178 -0
  12. package/lib/components/card.ts +173 -0
  13. package/lib/components/chart.ts +231 -0
  14. package/lib/components/checkbox.ts +242 -0
  15. package/lib/components/code.ts +123 -0
  16. package/lib/components/container.ts +140 -0
  17. package/lib/components/data.ts +135 -0
  18. package/lib/components/datepicker.ts +234 -0
  19. package/lib/components/dialog.ts +172 -0
  20. package/lib/components/divider.ts +100 -0
  21. package/lib/components/dropdown.ts +186 -0
  22. package/lib/components/element.ts +267 -0
  23. package/lib/components/fileupload.ts +309 -0
  24. package/lib/components/grid.ts +291 -0
  25. package/lib/components/guard.ts +92 -0
  26. package/lib/components/heading.ts +96 -0
  27. package/lib/components/helpers.ts +41 -0
  28. package/lib/components/hero.ts +224 -0
  29. package/lib/components/icon.ts +178 -0
  30. package/lib/components/icons.ts +464 -0
  31. package/lib/components/include.ts +410 -0
  32. package/lib/components/input.ts +457 -0
  33. package/lib/components/list.ts +419 -0
  34. package/lib/components/loading.ts +100 -0
  35. package/lib/components/menu.ts +275 -0
  36. package/lib/components/modal.ts +284 -0
  37. package/lib/components/nav.ts +257 -0
  38. package/lib/components/paragraph.ts +97 -0
  39. package/lib/components/progress.ts +159 -0
  40. package/lib/components/radio.ts +278 -0
  41. package/lib/components/req.ts +303 -0
  42. package/lib/components/script.ts +41 -0
  43. package/lib/components/select.ts +252 -0
  44. package/lib/components/sidebar.ts +275 -0
  45. package/lib/components/style.ts +41 -0
  46. package/lib/components/switch.ts +246 -0
  47. package/lib/components/table.ts +1249 -0
  48. package/lib/components/tabs.ts +250 -0
  49. package/lib/components/theme-toggle.ts +293 -0
  50. package/lib/components/tooltip.ts +144 -0
  51. package/lib/components/view.ts +190 -0
  52. package/lib/components/write.ts +272 -0
  53. package/lib/globals.d.ts +19 -5
  54. package/lib/layouts/default.css +260 -0
  55. package/lib/layouts/figma.css +334 -0
  56. package/lib/reactivity/state.ts +78 -0
  57. package/lib/utils/{fetch.js → fetch.ts} +206 -81
  58. package/package.json +9 -31
  59. package/create/index.jux +0 -77
  60. package/create/layout.jux +0 -18
  61. package/create/style.css +0 -57
  62. package/create/themes/assets/jux.svg +0 -34
  63. package/create/themes/base.css +0 -197
  64. package/create/themes/base2.css +0 -54
  65. package/create/themes/layouts/base.jux +0 -16
  66. package/create/themes/layouts/base_blog.jux +0 -0
  67. package/create/themes/layouts/base_docs.jux +0 -0
  68. package/create/themes/layouts/base_login.jux +0 -0
  69. package/create/themes/layouts/base_marketing.jux +0 -0
  70. package/create/themes/layouts/base_saas.jux +0 -0
  71. package/lib/componentsv2/base/BaseEngine.d.ts +0 -112
  72. package/lib/componentsv2/base/BaseEngine.js +0 -279
  73. package/lib/componentsv2/base/BaseSkin.d.ts +0 -74
  74. package/lib/componentsv2/base/BaseSkin.js +0 -130
  75. package/lib/componentsv2/base/Neighborhood.d.ts +0 -22
  76. package/lib/componentsv2/base/Neighborhood.js +0 -56
  77. package/lib/componentsv2/base/OptionsContract.d.ts +0 -20
  78. package/lib/componentsv2/base/OptionsContract.js +0 -107
  79. package/lib/componentsv2/base/State.d.ts +0 -18
  80. package/lib/componentsv2/base/State.js +0 -68
  81. package/lib/componentsv2/element/Element.d.ts +0 -29
  82. package/lib/componentsv2/element/Element.js +0 -49
  83. package/lib/componentsv2/element/ElementEngine.d.ts +0 -58
  84. package/lib/componentsv2/element/ElementEngine.js +0 -112
  85. package/lib/componentsv2/element/ElementSkin.d.ts +0 -10
  86. package/lib/componentsv2/element/ElementSkin.js +0 -56
  87. package/lib/componentsv2/element/structure.css +0 -261
  88. package/lib/componentsv2/grid/Grid.d.ts +0 -13
  89. package/lib/componentsv2/grid/Grid.js +0 -27
  90. package/lib/componentsv2/grid/GridEngine.d.ts +0 -77
  91. package/lib/componentsv2/grid/GridEngine.js +0 -153
  92. package/lib/componentsv2/grid/GridSkin.d.ts +0 -11
  93. package/lib/componentsv2/grid/GridSkin.js +0 -84
  94. package/lib/componentsv2/grid/structure.css +0 -27
  95. package/lib/componentsv2/input/Input.d.ts +0 -6
  96. package/lib/componentsv2/input/Input.js +0 -21
  97. package/lib/componentsv2/input/InputEngine.d.ts +0 -70
  98. package/lib/componentsv2/input/InputEngine.js +0 -143
  99. package/lib/componentsv2/input/InputSkin.d.ts +0 -11
  100. package/lib/componentsv2/input/InputSkin.js +0 -89
  101. package/lib/componentsv2/input/structure.css +0 -47
  102. package/lib/componentsv2/list/List.d.ts +0 -49
  103. package/lib/componentsv2/list/List.js +0 -105
  104. package/lib/componentsv2/list/ListEngine.d.ts +0 -121
  105. package/lib/componentsv2/list/ListEngine.js +0 -322
  106. package/lib/componentsv2/list/ListSkin.d.ts +0 -20
  107. package/lib/componentsv2/list/ListSkin.js +0 -345
  108. package/lib/componentsv2/list/structure.css +0 -359
  109. package/lib/componentsv2/plugins/ClientSQLitePlugin.d.ts +0 -21
  110. package/lib/componentsv2/plugins/ClientSQLitePlugin.js +0 -130
  111. package/lib/componentsv2/plugins/IndexedDBPlugin.d.ts +0 -18
  112. package/lib/componentsv2/plugins/IndexedDBPlugin.js +0 -75
  113. package/lib/componentsv2/plugins/LocalStoragePlugin.d.ts +0 -20
  114. package/lib/componentsv2/plugins/LocalStoragePlugin.js +0 -65
  115. package/lib/componentsv2/plugins/ServerSQLitePlugin.d.ts +0 -25
  116. package/lib/componentsv2/plugins/ServerSQLitePlugin.js +0 -70
  117. package/lib/componentsv2/stubs/ComponentComposition.ts.stub +0 -32
  118. package/lib/componentsv2/stubs/ComponentEngine.ts.stub +0 -36
  119. package/lib/componentsv2/stubs/ComponentSkin.ts.stub +0 -35
  120. package/lib/componentsv2/stubs/ComponentStructure.css.d.ts.stub +0 -2
  121. package/lib/componentsv2/stubs/ComponentStructure.css.stub +0 -13
  122. package/lib/utils/fetch.d.ts +0 -176
  123. package/machinery/build3.js +0 -159
  124. package/machinery/compiler3.js +0 -688
  125. package/machinery/config.js +0 -155
  126. package/machinery/serve.js +0 -255
  127. package/machinery/validators/file-validator.js +0 -123
  128. package/machinery/watcher.js +0 -59
  129. package/types/css.d.ts +0 -10
@@ -0,0 +1,257 @@
1
+ import { BaseComponent } from './base/BaseComponent.js';
2
+ import { renderIcon } from './icons.js';
3
+ import { req } from './req.js';
4
+
5
+ // Event definitions
6
+ const TRIGGER_EVENTS = [] as const;
7
+ const CALLBACK_EVENTS = [] as const;
8
+
9
+ export interface NavItem {
10
+ label: string;
11
+ href: string;
12
+ active?: boolean;
13
+ itemClass?: string;
14
+ }
15
+
16
+ export interface NavBrand {
17
+ text?: string;
18
+ href?: string;
19
+ icon?: string;
20
+ }
21
+
22
+ export interface NavOptions {
23
+ items?: NavItem[];
24
+ brand?: NavBrand;
25
+ variant?: 'default' | 'pills' | 'tabs';
26
+ sticky?: boolean;
27
+ style?: string;
28
+ class?: string;
29
+ }
30
+
31
+ type NavState = {
32
+ items: NavItem[];
33
+ brand?: NavBrand;
34
+ variant: string;
35
+ sticky: boolean;
36
+ style: string;
37
+ class: string;
38
+ };
39
+
40
+ export class Nav extends BaseComponent<NavState> {
41
+ private _nav: HTMLElement | null = null;
42
+
43
+ constructor(id: string, options: NavOptions = {}) {
44
+ super(id, {
45
+ items: options.items ?? [],
46
+ brand: options.brand,
47
+ variant: options.variant ?? 'default',
48
+ sticky: options.sticky ?? false,
49
+ style: options.style ?? '',
50
+ class: options.class ?? ''
51
+ });
52
+
53
+ this._setActiveStates();
54
+ }
55
+
56
+ protected getTriggerEvents(): readonly string[] {
57
+ return TRIGGER_EVENTS;
58
+ }
59
+
60
+ protected getCallbackEvents(): readonly string[] {
61
+ return CALLBACK_EVENTS;
62
+ }
63
+
64
+ private _setActiveStates(): void {
65
+ this.state.items = this.state.items.map(item => ({
66
+ ...item,
67
+ active: req.isActiveNavItem(item.href)
68
+ }));
69
+ }
70
+
71
+ /* ═════════════════════════════════════════════════════════════════
72
+ * FLUENT API
73
+ * ═════════════════════════════════════════════════════════════════ */
74
+
75
+ // ✅ Inherited from BaseComponent
76
+
77
+ items(value: NavItem[]): this {
78
+ this.state.items = value;
79
+ this._setActiveStates();
80
+ return this;
81
+ }
82
+
83
+ addItem(item: NavItem): this {
84
+ this.state.items = [...this.state.items, item];
85
+ this._setActiveStates();
86
+ return this;
87
+ }
88
+
89
+ itemClass(className: string): this {
90
+ this.state.items = this.state.items.map(item => ({
91
+ ...item,
92
+ itemClass: className
93
+ }));
94
+ return this;
95
+ }
96
+
97
+ brand(value: NavBrand): this {
98
+ this.state.brand = value;
99
+ return this;
100
+ }
101
+
102
+ variant(value: string): this {
103
+ this.state.variant = value;
104
+ return this;
105
+ }
106
+
107
+ sticky(value: boolean): this {
108
+ this.state.sticky = value;
109
+ return this;
110
+ }
111
+
112
+ /* ═════════════════════════════════════════════════════════════════
113
+ * RENDER
114
+ * ═════════════════════════════════════════════════════════════════ */
115
+
116
+ render(targetId?: string): this {
117
+ const container = this._setupContainer(targetId);
118
+
119
+ const { brand, items, variant, sticky, style, class: className } = this.state;
120
+
121
+ const nav = document.createElement('nav');
122
+ nav.className = `jux-nav jux-nav-${variant}`;
123
+ nav.id = this._id;
124
+ if (sticky) nav.classList.add('jux-nav-sticky');
125
+ if (className) nav.className += ` ${className}`;
126
+ if (style) nav.setAttribute('style', style);
127
+
128
+ // Brand/Logo
129
+ if (brand) {
130
+ const brandEl = document.createElement('div');
131
+ brandEl.className = 'jux-nav-brand';
132
+
133
+ if (brand.href) {
134
+ const link = document.createElement('a');
135
+ link.href = brand.href;
136
+ if (brand.icon) {
137
+ const icon = document.createElement('span');
138
+ icon.appendChild(renderIcon(brand.icon));
139
+ link.appendChild(icon);
140
+ }
141
+ if (brand.text) {
142
+ const text = document.createElement('span');
143
+ text.textContent = brand.text;
144
+ link.appendChild(text);
145
+ }
146
+ brandEl.appendChild(link);
147
+ } else {
148
+ if (brand.icon) {
149
+ const icon = document.createElement('span');
150
+ icon.appendChild(renderIcon(brand.icon));
151
+ brandEl.appendChild(icon);
152
+ }
153
+ if (brand.text) {
154
+ const text = document.createElement('span');
155
+ text.textContent = brand.text;
156
+ brandEl.appendChild(text);
157
+ }
158
+ }
159
+
160
+ nav.appendChild(brandEl);
161
+ }
162
+
163
+ // Nav items container
164
+ const itemsContainer = document.createElement('div');
165
+ itemsContainer.className = 'jux-nav-items';
166
+
167
+ items.forEach(item => {
168
+ const itemWrapper = document.createElement('div');
169
+ itemWrapper.className = 'jux-nav-item-wrapper';
170
+
171
+ if (item.itemClass) {
172
+ itemWrapper.className += ` ${item.itemClass}`;
173
+ }
174
+
175
+ const navLink = document.createElement('a');
176
+ navLink.className = 'jux-nav-link';
177
+ navLink.href = item.href;
178
+ navLink.textContent = item.label;
179
+ if (item.active) {
180
+ itemWrapper.classList.add('jux-nav-item-active');
181
+ navLink.classList.add('jux-nav-link-active');
182
+ }
183
+
184
+ itemWrapper.appendChild(navLink);
185
+ itemsContainer.appendChild(itemWrapper);
186
+ });
187
+
188
+ nav.appendChild(itemsContainer);
189
+
190
+ this._wireStandardEvents(nav);
191
+
192
+ // Wire sync bindings
193
+ this._syncBindings.forEach(({ property, stateObj, toState, toComponent }) => {
194
+ if (property === 'items') {
195
+ const transform = toComponent || ((v: any) => v);
196
+
197
+ stateObj.subscribe((val: any) => {
198
+ const transformed = transform(val);
199
+ this.state.items = transformed;
200
+ this._setActiveStates();
201
+
202
+ itemsContainer.innerHTML = '';
203
+ this.state.items.forEach((item: any) => {
204
+ const itemWrapper = document.createElement('div');
205
+ itemWrapper.className = 'jux-nav-item-wrapper';
206
+
207
+ if (item.itemClass) {
208
+ itemWrapper.className += ` ${item.itemClass}`;
209
+ }
210
+
211
+ const navLink = document.createElement('a');
212
+ navLink.className = 'jux-nav-link';
213
+ navLink.href = item.href;
214
+ navLink.textContent = item.label;
215
+ if (item.active) {
216
+ itemWrapper.classList.add('jux-nav-item-active');
217
+ navLink.classList.add('jux-nav-link-active');
218
+ }
219
+
220
+ itemWrapper.appendChild(navLink);
221
+ itemsContainer.appendChild(itemWrapper);
222
+ });
223
+ });
224
+ }
225
+ else if (property === 'brand') {
226
+ const transform = toComponent || ((v: any) => v);
227
+
228
+ stateObj.subscribe((val: any) => {
229
+ const transformed = transform(val);
230
+ const brandEl = nav.querySelector('.jux-nav-brand');
231
+ if (brandEl && transformed.text) {
232
+ const textEl = brandEl.querySelector('span:last-child');
233
+ if (textEl) {
234
+ textEl.textContent = transformed.text;
235
+ }
236
+ }
237
+ this.state.brand = transformed;
238
+ });
239
+ }
240
+ });
241
+
242
+ container.appendChild(nav);
243
+ this._nav = nav;
244
+
245
+ requestAnimationFrame(() => {
246
+ if ((window as any).lucide) {
247
+ (window as any).lucide.createIcons();
248
+ }
249
+ });
250
+
251
+ return this;
252
+ }
253
+ }
254
+
255
+ export function nav(id: string, options: NavOptions = {}): Nav {
256
+ return new Nav(id, options);
257
+ }
@@ -0,0 +1,97 @@
1
+ import { BaseComponent } from './base/BaseComponent.js';
2
+
3
+ // Event definitions
4
+ const TRIGGER_EVENTS = [] as const;
5
+ const CALLBACK_EVENTS = [] as const;
6
+
7
+ export interface ParagraphOptions {
8
+ content?: string;
9
+ class?: string;
10
+ style?: string;
11
+ }
12
+
13
+ type ParagraphState = {
14
+ content: string;
15
+ class: string;
16
+ style: string;
17
+ };
18
+
19
+ export class Paragraph extends BaseComponent<ParagraphState> {
20
+ constructor(id: string, options: ParagraphOptions = {}) {
21
+ super(id, {
22
+ content: options.content ?? '',
23
+ class: options.class ?? '',
24
+ style: options.style ?? ''
25
+ });
26
+ }
27
+
28
+ protected getTriggerEvents(): readonly string[] {
29
+ return TRIGGER_EVENTS;
30
+ }
31
+
32
+ protected getCallbackEvents(): readonly string[] {
33
+ return CALLBACK_EVENTS;
34
+ }
35
+
36
+ /* ═════════════════════════════════════════════════════════════════
37
+ * FLUENT API
38
+ * ═════════════════════════════════════════════════════════════════ */
39
+
40
+ // ✅ Inherited from BaseComponent:
41
+ // - style(), class()
42
+ // - bind(), sync(), renderTo()
43
+ // - All other base methods
44
+
45
+ content(value: string): this {
46
+ this.state.content = value;
47
+ return this;
48
+ }
49
+
50
+ /* ═════════════════════════════════════════════════════════════════
51
+ * RENDER
52
+ * ═════════════════════════════════════════════════════════════════ */
53
+
54
+ render(targetId?: string): this {
55
+ const container = this._setupContainer(targetId);
56
+
57
+ const { content, style, class: className } = this.state;
58
+
59
+ const paragraph = document.createElement('p');
60
+ paragraph.className = 'jux-paragraph';
61
+ paragraph.id = this._id;
62
+ paragraph.textContent = content;
63
+ if (className) paragraph.className += ` ${className}`;
64
+ if (style) paragraph.setAttribute('style', style);
65
+
66
+ this._wireStandardEvents(paragraph);
67
+
68
+ // Wire sync bindings
69
+ this._syncBindings.forEach(({ property, stateObj, toState, toComponent }) => {
70
+ if (property === 'content') {
71
+ const transform = toComponent || ((v: any) => String(v));
72
+
73
+ stateObj.subscribe((val: any) => {
74
+ const transformed = transform(val);
75
+ paragraph.textContent = transformed;
76
+ this.state.content = transformed;
77
+ });
78
+ }
79
+ else if (property === 'class') {
80
+ const transform = toComponent || ((v: any) => String(v));
81
+
82
+ stateObj.subscribe((val: any) => {
83
+ const transformed = transform(val);
84
+ paragraph.className = `jux-paragraph ${transformed}`;
85
+ this.state.class = transformed;
86
+ });
87
+ }
88
+ });
89
+
90
+ container.appendChild(paragraph);
91
+ return this;
92
+ }
93
+ }
94
+
95
+ export function paragraph(id: string, options: ParagraphOptions = {}): Paragraph {
96
+ return new Paragraph(id, options);
97
+ }
@@ -0,0 +1,159 @@
1
+ import { BaseComponent } from './base/BaseComponent.js';
2
+
3
+ // Event definitions
4
+ const TRIGGER_EVENTS = [] as const;
5
+ const CALLBACK_EVENTS = [] as const;
6
+
7
+ export interface ProgressOptions {
8
+ value?: number;
9
+ max?: number;
10
+ variant?: 'default' | 'success' | 'warning' | 'error';
11
+ showPercentage?: boolean;
12
+ label?: string;
13
+ size?: 'sm' | 'md' | 'lg';
14
+ style?: string;
15
+ class?: string;
16
+ }
17
+
18
+ type ProgressState = {
19
+ value: number;
20
+ max: number;
21
+ variant: string;
22
+ showPercentage: boolean;
23
+ label: string;
24
+ size: string;
25
+ style: string;
26
+ class: string;
27
+ };
28
+
29
+ export class Progress extends BaseComponent<ProgressState> {
30
+ private _bar: HTMLElement | null = null;
31
+ private _label: HTMLElement | null = null;
32
+
33
+ constructor(id: string, options: ProgressOptions = {}) {
34
+ super(id, {
35
+ value: options.value ?? 0,
36
+ max: options.max ?? 100,
37
+ variant: options.variant ?? 'default',
38
+ showPercentage: options.showPercentage ?? false,
39
+ label: options.label ?? '',
40
+ size: options.size ?? 'md',
41
+ style: options.style ?? '',
42
+ class: options.class ?? ''
43
+ });
44
+ }
45
+
46
+ protected getTriggerEvents(): readonly string[] {
47
+ return TRIGGER_EVENTS;
48
+ }
49
+
50
+ protected getCallbackEvents(): readonly string[] {
51
+ return CALLBACK_EVENTS;
52
+ }
53
+
54
+ /* ═════════════════════════════════════════════════════════════════
55
+ * FLUENT API
56
+ * ═════════════════════════════════════════════════════════════════ */
57
+
58
+ value(val: number): this {
59
+ this.state.value = Math.max(0, Math.min(val, this.state.max));
60
+ this._updateProgress();
61
+ return this;
62
+ }
63
+
64
+ max(val: number): this {
65
+ this.state.max = val;
66
+ this._updateProgress();
67
+ return this;
68
+ }
69
+
70
+ variant(value: 'default' | 'success' | 'warning' | 'error'): this {
71
+ this.state.variant = value;
72
+ return this;
73
+ }
74
+
75
+ showPercentage(value: boolean): this {
76
+ this.state.showPercentage = value;
77
+ return this;
78
+ }
79
+
80
+ label(value: string): this {
81
+ this.state.label = value;
82
+ if (this._label) {
83
+ this._label.textContent = value;
84
+ }
85
+ return this;
86
+ }
87
+
88
+ size(value: 'sm' | 'md' | 'lg'): this {
89
+ this.state.size = value;
90
+ return this;
91
+ }
92
+
93
+ private _updateProgress(): void {
94
+ if (this._bar) {
95
+ const percentage = (this.state.value / this.state.max) * 100;
96
+ this._bar.style.width = `${percentage}%`;
97
+ if (this._label) {
98
+ // Use custom label if set, otherwise show percentage
99
+ this._label.textContent = this.state.label || `${Math.round(percentage)}%`;
100
+ }
101
+ }
102
+ }
103
+
104
+ /* ═════════════════════════════════════════════════════════════════
105
+ * RENDER
106
+ * ═════════════════════════════════════════════════════════════════ */
107
+
108
+ render(targetId?: string): this {
109
+ const container = this._setupContainer(targetId);
110
+
111
+ const { value, max, variant, showPercentage, label, size, style, class: className } = this.state;
112
+
113
+ const wrapper = document.createElement('div');
114
+ wrapper.className = `jux-progress jux-progress-${size}`;
115
+ wrapper.id = this._id;
116
+ if (className) wrapper.className += ` ${className}`;
117
+ if (style) wrapper.setAttribute('style', style);
118
+
119
+ const track = document.createElement('div');
120
+ track.className = 'jux-progress-track';
121
+
122
+ const bar = document.createElement('div');
123
+ bar.className = `jux-progress-bar jux-progress-bar-${variant}`;
124
+ const percentage = (value / max) * 100;
125
+ bar.style.width = `${percentage}%`;
126
+ this._bar = bar;
127
+
128
+ if (showPercentage || label) {
129
+ const labelEl = document.createElement('span');
130
+ labelEl.className = 'jux-progress-label';
131
+ labelEl.textContent = label || `${Math.round(percentage)}%`;
132
+ bar.appendChild(labelEl);
133
+ this._label = labelEl;
134
+ }
135
+
136
+ track.appendChild(bar);
137
+ wrapper.appendChild(track);
138
+
139
+ this._wireStandardEvents(wrapper);
140
+
141
+ // Wire sync for value
142
+ this._syncBindings.forEach(({ property, stateObj, toState, toComponent }) => {
143
+ if (property === 'value') {
144
+ const transform = toComponent || ((v: any) => Number(v));
145
+ stateObj.subscribe((val: any) => {
146
+ this.value(transform(val));
147
+ });
148
+ }
149
+ });
150
+
151
+ container.appendChild(wrapper);
152
+
153
+ return this;
154
+ }
155
+ }
156
+
157
+ export function progress(id: string, options: ProgressOptions = {}): Progress {
158
+ return new Progress(id, options);
159
+ }