@dream-encode/wp-js-plugin-utils 0.3.0 → 0.6.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.
@@ -9,12 +9,40 @@ Object.defineProperty(exports, "AdminSettingsPage", {
9
9
  return _AdminSettingsPage.default;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "RailSettingsPage", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _RailSettingsPage.default;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "SettingsRail", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _SettingsRail.default;
22
+ }
23
+ });
12
24
  Object.defineProperty(exports, "createUseSettings", {
13
25
  enumerable: true,
14
26
  get: function () {
15
27
  return _createUseSettings.default;
16
28
  }
17
29
  });
30
+ Object.defineProperty(exports, "getLogLevelStatus", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _getLogLevelStatus.default;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "useActiveSection", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _useActiveSection.default;
40
+ }
41
+ });
18
42
  var _createUseSettings = _interopRequireDefault(require("./createUseSettings"));
19
43
  var _AdminSettingsPage = _interopRequireDefault(require("./AdminSettingsPage"));
44
+ var _RailSettingsPage = _interopRequireDefault(require("./RailSettingsPage"));
45
+ var _SettingsRail = _interopRequireDefault(require("./SettingsRail"));
46
+ var _getLogLevelStatus = _interopRequireDefault(require("./getLogLevelStatus"));
47
+ var _useActiveSection = _interopRequireDefault(require("./useActiveSection"));
20
48
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -0,0 +1,421 @@
1
+ /*
2
+ * Styling for the RailSettingsPage shell.
3
+ *
4
+ * A settings page needs both mixins:
5
+ *
6
+ * @use "@dream-encode/wp-js-plugin-utils/dist/settings/styles/settings-rail" as rail;
7
+ *
8
+ * @include rail.de-wp-plugin-utils-settings-rail-page;
9
+ *
10
+ * #my-plugin-settings {
11
+ * @include rail.de-wp-plugin-utils-settings-rail;
12
+ * }
13
+ */
14
+
15
+ /*
16
+ * Page level resets, included at the top level rather than inside the mount point.
17
+ *
18
+ * The rail runs the full width of the screen, which means clearing the left padding
19
+ * WordPress puts on the content column for its own admin menu.
20
+ */
21
+ @mixin de-wp-plugin-utils-settings-rail-page {
22
+ #wpcontent {
23
+ padding-left: 0;
24
+ }
25
+
26
+ .auto-fold #wpcontent {
27
+ padding-left: 0;
28
+ }
29
+
30
+ #wpbody-content {
31
+ padding-bottom: 0;
32
+ }
33
+ }
34
+
35
+ @mixin de-wp-plugin-utils-settings-rail {
36
+ --de-settings-rail-width: 232px;
37
+ --de-settings-header-height: 61px;
38
+ --de-settings-admin-bar: 32px;
39
+ --de-settings-surface: #ffffff;
40
+ --de-settings-ground: #f0f0f1;
41
+ --de-settings-line: #dcdcde;
42
+ --de-settings-ink: #1d2327;
43
+ --de-settings-ink-soft: #3c434a;
44
+ --de-settings-ink-faint: #646970;
45
+ --de-settings-blue: #2271b1;
46
+ --de-settings-blue-dark: #0a4b78;
47
+ --de-settings-blue-wash: #f0f6fc;
48
+ --de-settings-amber: #bd8600;
49
+ --de-settings-green: #00733f;
50
+
51
+ box-sizing: border-box;
52
+
53
+ * {
54
+ box-sizing: border-box;
55
+ }
56
+
57
+ .de-settings {
58
+ display: flex;
59
+ flex-direction: column;
60
+ min-height: calc( 100vh - var( --de-settings-admin-bar ) );
61
+ background: var( --de-settings-ground );
62
+ }
63
+
64
+ .de-settings__header {
65
+ position: sticky;
66
+ top: var( --de-settings-admin-bar );
67
+ z-index: 10;
68
+ display: flex;
69
+ align-items: center;
70
+ gap: 16px;
71
+ min-height: var( --de-settings-header-height );
72
+ padding: 10px 24px;
73
+ background: var( --de-settings-surface );
74
+ border-bottom: 1px solid var( --de-settings-line );
75
+ box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.04 );
76
+ }
77
+
78
+ .de-settings__identity {
79
+ display: flex;
80
+ align-items: baseline;
81
+ gap: 10px;
82
+ min-width: 0;
83
+ }
84
+
85
+ .de-settings__title {
86
+ margin: 0;
87
+ padding: 0;
88
+ font-size: 1.3rem;
89
+ font-weight: 600;
90
+ line-height: 1.3;
91
+ color: var( --de-settings-ink );
92
+ }
93
+
94
+ .de-settings__version {
95
+ font-size: 12px;
96
+ color: var( --de-settings-ink-faint );
97
+ font-variant-numeric: tabular-nums;
98
+ }
99
+
100
+ .de-settings__header-actions {
101
+ display: flex;
102
+ align-items: center;
103
+ gap: 10px;
104
+ margin-left: auto;
105
+ flex: none;
106
+ }
107
+
108
+ .de-settings__unsaved {
109
+ display: inline-flex;
110
+ align-items: center;
111
+ gap: 7px;
112
+ font-size: 13px;
113
+ color: var( --de-settings-amber );
114
+
115
+ &::before {
116
+ content: '';
117
+ width: 8px;
118
+ height: 8px;
119
+ border-radius: 50%;
120
+ background: var( --de-settings-amber );
121
+ }
122
+ }
123
+
124
+ .de-settings__note {
125
+ font-size: 13px;
126
+ color: var( --de-settings-ink-faint );
127
+ }
128
+
129
+ .de-settings__body {
130
+ display: grid;
131
+ grid-template-columns: var( --de-settings-rail-width ) minmax( 0, 1fr );
132
+ flex: 1;
133
+ }
134
+
135
+ .de-settings__body.is-solo {
136
+ grid-template-columns: minmax( 0, 1fr );
137
+ }
138
+
139
+ .de-settings__rail {
140
+ background: var( --de-settings-surface );
141
+ border-right: 1px solid var( --de-settings-line );
142
+ }
143
+
144
+ .de-settings__rail-inner {
145
+ position: sticky;
146
+ top: calc( var( --de-settings-admin-bar ) + var( --de-settings-header-height ) );
147
+ display: flex;
148
+ flex-direction: column;
149
+ max-height: calc( 100vh - var( --de-settings-admin-bar ) - var( --de-settings-header-height ) );
150
+ padding-top: 8px;
151
+ }
152
+
153
+ .de-settings__rail-list {
154
+ overflow-y: auto;
155
+ padding-bottom: 12px;
156
+ }
157
+
158
+ .de-settings__rail-group {
159
+ padding: 14px 16px 5px;
160
+ font-size: 11px;
161
+ font-weight: 600;
162
+ letter-spacing: 0.08em;
163
+ text-transform: uppercase;
164
+ color: #8c8f94;
165
+ }
166
+
167
+ .de-settings__rail-item {
168
+ display: flex;
169
+ align-items: center;
170
+ gap: 8px;
171
+ width: 100%;
172
+ padding: 9px 14px 9px 13px;
173
+ border: 0;
174
+ border-left: 3px solid transparent;
175
+ background: none;
176
+ font-size: 13px;
177
+ line-height: 1.4;
178
+ text-align: left;
179
+ color: var( --de-settings-ink-soft );
180
+ cursor: pointer;
181
+
182
+ &:hover {
183
+ background: #f6f7f7;
184
+ color: var( --de-settings-blue );
185
+ }
186
+
187
+ &:focus-visible {
188
+ outline: 2px solid var( --de-settings-blue );
189
+ outline-offset: -2px;
190
+ }
191
+
192
+ &[aria-selected='true'] {
193
+ background: var( --de-settings-blue-wash );
194
+ border-left-color: var( --de-settings-blue );
195
+ color: var( --de-settings-blue-dark );
196
+ font-weight: 600;
197
+ }
198
+ }
199
+
200
+ .de-settings__rail-title {
201
+ flex: 1;
202
+ min-width: 0;
203
+ }
204
+
205
+ .de-settings__rail-badge {
206
+ flex: none;
207
+ padding: 1px 7px;
208
+ border-radius: 9px;
209
+ background: var( --de-settings-ground );
210
+ font-size: 11px;
211
+ font-weight: 400;
212
+ color: var( --de-settings-ink-faint );
213
+ font-variant-numeric: tabular-nums;
214
+ }
215
+
216
+ .de-settings__rail-dirty {
217
+ flex: none;
218
+ width: 7px;
219
+ height: 7px;
220
+ border-radius: 50%;
221
+ background: var( --de-settings-amber );
222
+ }
223
+
224
+ .de-settings__rail-foot {
225
+ margin-top: auto;
226
+ padding: 12px 16px;
227
+ border-top: 1px solid var( --de-settings-line );
228
+ }
229
+
230
+ .de-settings__status {
231
+ display: flex;
232
+ align-items: center;
233
+ gap: 8px;
234
+ font-size: 12px;
235
+ color: var( --de-settings-ink-faint );
236
+
237
+ .de-settings__status-led {
238
+ flex: none;
239
+ width: 8px;
240
+ height: 8px;
241
+ border-radius: 50%;
242
+ background: #8c8f94;
243
+ }
244
+
245
+ &.is-ok .de-settings__status-led {
246
+ background: var( --de-settings-green );
247
+ box-shadow: 0 0 0 3px rgba( 0, 115, 63, 0.14 );
248
+ }
249
+
250
+ &.is-warn .de-settings__status-led {
251
+ background: var( --de-settings-amber );
252
+ box-shadow: 0 0 0 3px rgba( 189, 134, 0, 0.16 );
253
+ }
254
+ }
255
+
256
+ .de-settings__pane {
257
+ min-width: 0;
258
+ padding: 24px 28px 48px;
259
+
260
+ &:focus {
261
+ outline: none;
262
+ }
263
+ }
264
+
265
+ .de-settings__pane-head {
266
+ margin-bottom: 18px;
267
+
268
+ h2 {
269
+ margin: 0 0 4px;
270
+ padding: 0;
271
+ font-size: 1.05rem;
272
+ font-weight: 600;
273
+ color: var( --de-settings-ink );
274
+ }
275
+
276
+ p {
277
+ margin: 0;
278
+ max-width: 78ch;
279
+ font-size: 13px;
280
+ color: var( --de-settings-ink-faint );
281
+ }
282
+ }
283
+
284
+ .de-settings__card {
285
+ max-width: 1080px;
286
+ padding: 20px 22px;
287
+ background: var( --de-settings-surface );
288
+ border: 1px solid var( --de-settings-line );
289
+ border-radius: 4px;
290
+
291
+ & + & {
292
+ margin-top: 16px;
293
+ }
294
+ }
295
+
296
+ .de-settings__fields {
297
+ display: grid;
298
+ gap: 20px;
299
+ }
300
+
301
+ .de-settings__field {
302
+ max-width: 640px;
303
+
304
+ .components-base-control,
305
+ .components-base-control__field,
306
+ .components-number-control {
307
+ width: 100%;
308
+ margin-bottom: 0;
309
+
310
+ .components-flex {
311
+ width: 100%;
312
+ }
313
+ }
314
+
315
+ label,
316
+ .components-base-control__label {
317
+ font-weight: 600;
318
+ }
319
+
320
+ input[type='email'],
321
+ input[type='number'],
322
+ input[type='password'],
323
+ input[type='search'],
324
+ input[type='tel'],
325
+ input[type='text'],
326
+ input[type='url'],
327
+ textarea {
328
+ width: 100%;
329
+ }
330
+
331
+ input:disabled,
332
+ textarea:disabled {
333
+ background: #f6f7f7;
334
+ border-color: #dcdcde;
335
+ color: #a7aaad;
336
+ }
337
+
338
+ .components-input-control__prefix,
339
+ .components-input-control__suffix {
340
+ padding: 0 12px;
341
+ background: #f0f0f1;
342
+ margin: 0;
343
+ }
344
+ }
345
+
346
+ .components-placeholder {
347
+ background: var( --de-settings-surface );
348
+ border: 1px solid var( --de-settings-line );
349
+ box-shadow: none;
350
+
351
+ .components-placeholder__fieldset {
352
+ justify-content: center;
353
+ }
354
+ }
355
+
356
+ .components-notice-list {
357
+ z-index: 20;
358
+ }
359
+
360
+ @media screen and ( max-width: 1100px ) {
361
+ .de-settings__body {
362
+ grid-template-columns: minmax( 0, 1fr );
363
+ }
364
+
365
+ .de-settings__rail {
366
+ border-right: 0;
367
+ border-bottom: 1px solid var( --de-settings-line );
368
+ }
369
+
370
+ .de-settings__rail-inner {
371
+ position: static;
372
+ max-height: none;
373
+ padding-top: 0;
374
+ }
375
+
376
+ .de-settings__rail-list {
377
+ display: flex;
378
+ overflow-x: auto;
379
+ padding-bottom: 0;
380
+ }
381
+
382
+ .de-settings__rail-group {
383
+ display: none;
384
+ }
385
+
386
+ .de-settings__rail-item {
387
+ width: auto;
388
+ white-space: nowrap;
389
+ border-left: 0;
390
+ border-bottom: 3px solid transparent;
391
+
392
+ &[aria-selected='true'] {
393
+ border-left-color: transparent;
394
+ border-bottom-color: var( --de-settings-blue );
395
+ }
396
+ }
397
+
398
+ .de-settings__rail-foot {
399
+ margin-top: 0;
400
+ border-top: 1px solid var( --de-settings-line );
401
+ }
402
+
403
+ .de-settings__pane {
404
+ padding: 20px 16px 40px;
405
+ }
406
+ }
407
+
408
+ @media screen and ( max-width: 782px ) {
409
+ --de-settings-admin-bar: 46px;
410
+
411
+ .de-settings__header {
412
+ flex-wrap: wrap;
413
+ gap: 8px 12px;
414
+ }
415
+
416
+ .de-settings__header-actions {
417
+ margin-left: 0;
418
+ width: 100%;
419
+ }
420
+ }
421
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _element = require("@wordpress/element");
8
+ /**
9
+ * Read the section key carried in the URL hash.
10
+ *
11
+ * @since 0.6.0
12
+ * @param {Array} keys Known section keys.
13
+ * @return {string|null} Matching section key, or null when the hash names nothing known.
14
+ */
15
+ const readSectionFromHash = keys => {
16
+ const hash = window.location.hash.replace(/^#/, '');
17
+ return keys.includes(hash) ? hash : null;
18
+ };
19
+
20
+ /**
21
+ * Keep the open settings section in the URL.
22
+ *
23
+ * A settings section is worth linking to - in a ticket, in a message, in
24
+ * documentation - and a page that only ever opens on its first section cannot be
25
+ * linked to at all. The hash is written with `replaceState` rather than pushed, so
26
+ * the browser Back button still leaves the settings page instead of walking back
27
+ * through the sections that were opened.
28
+ *
29
+ * @since 0.6.0
30
+ * @param {Array} sections Section definitions.
31
+ * @return {Array} The active section key and a setter for it.
32
+ */
33
+ const useActiveSection = sections => {
34
+ const keySignature = sections.map(section => section.key).join('|');
35
+ const keys = (0, _element.useMemo)(() => {
36
+ return keySignature.split('|').filter(Boolean);
37
+ }, [keySignature]);
38
+ const [activeKey, setActiveKey] = (0, _element.useState)(() => {
39
+ return readSectionFromHash(keys) || keys[0] || '';
40
+ });
41
+ (0, _element.useEffect)(() => {
42
+ const handleHashChange = () => {
43
+ const nextKey = readSectionFromHash(keys);
44
+ if (nextKey) {
45
+ setActiveKey(nextKey);
46
+ }
47
+ };
48
+ window.addEventListener('hashchange', handleHashChange);
49
+ return () => {
50
+ window.removeEventListener('hashchange', handleHashChange);
51
+ };
52
+ }, [keys]);
53
+ (0, _element.useEffect)(() => {
54
+ if (keys.length && !keys.includes(activeKey)) {
55
+ setActiveKey(keys[0]);
56
+ }
57
+ }, [keys, activeKey]);
58
+ const selectSection = (0, _element.useCallback)(key => {
59
+ setActiveKey(key);
60
+ window.history.replaceState(null, '', `#${key}`);
61
+ }, []);
62
+ return [activeKey, selectSection];
63
+ };
64
+ var _default = exports.default = useActiveSection;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.secondsToDhmsShortIso = exports.secondsToDhmsShort = exports.secondsToDhms = exports.addSecondsToCurrentTime = void 0;
6
+ exports.secondsToDhmsShortIso = exports.secondsToDhmsShort = exports.secondsToDhms = exports.calculateEstimatedTimeRemainingUsingSMA = exports.calculateEstimatedTimeRemainingUsingEMA = exports.calculateEstimatedTimeRemainingSimple = exports.addSecondsToCurrentTime = void 0;
7
7
  var _strings = require("./strings");
8
8
  /**
9
9
  * Convert seconds to a human readable format.
@@ -80,4 +80,135 @@ const addSecondsToCurrentTime = seconds => {
80
80
  rawDate = new Date(rawDate.getTime() + Number(seconds * 1000));
81
81
  return rawDate.getTime() / 1000;
82
82
  };
83
- exports.addSecondsToCurrentTime = addSecondsToCurrentTime;
83
+
84
+ /**
85
+ * Calculate an estimated time remaining based on elapsed time and percent complete.
86
+ *
87
+ * @param {number} startTime Unix timestamp (seconds) when the process started.
88
+ * @param {number} percentComplete Percent complete (0-100).
89
+ * @return {number}
90
+ */
91
+ exports.addSecondsToCurrentTime = addSecondsToCurrentTime;
92
+ const calculateEstimatedTimeRemainingSimple = (startTime, percentComplete) => {
93
+ if (!startTime || percentComplete <= 0 || percentComplete >= 100) {
94
+ return 0;
95
+ }
96
+ const secondsSinceStartTime = Date.now() / 1000 - Number(startTime);
97
+ const decimalComplete = percentComplete / 100;
98
+ const totalSeconds = secondsSinceStartTime / decimalComplete;
99
+ const remaining = totalSeconds - secondsSinceStartTime;
100
+ return Math.max(1, remaining);
101
+ };
102
+
103
+ /**
104
+ * Calculate an estimated time remaining, using Simple Moving Average (SMA).
105
+ *
106
+ * @param {number[]} times Array of previous run times (seconds).
107
+ * @param {number} window Subset of times to use.
108
+ * @param {number} n Number of loops.
109
+ * @return {number[]}
110
+ */
111
+ exports.calculateEstimatedTimeRemainingSimple = calculateEstimatedTimeRemainingSimple;
112
+ const calculateEstimatedTimeRemainingUsingSMA = (times, window = 2, n = Infinity) => {
113
+ if (!times || times.length < window) {
114
+ return [];
115
+ }
116
+ let index = window - 1;
117
+ const length = times.length + 1;
118
+ const simpleMovingAverages = [];
119
+ let numberOfSMAsCalculated = 0;
120
+ while (++index < length && numberOfSMAsCalculated++ < n) {
121
+ const windowSlice = times.slice(index - window, index);
122
+ const sum = windowSlice.reduce((prev, curr) => prev + curr, 0);
123
+ simpleMovingAverages.push(sum / window);
124
+ }
125
+ return simpleMovingAverages;
126
+ };
127
+
128
+ /**
129
+ * Calculate an estimated time remaining, using Exponential Moving Average (EMA).
130
+ *
131
+ * Each run object should expose at least `start_time`. Optional fields
132
+ * `completed_time`, `last_attempt_time` and `total_time` are used when present.
133
+ *
134
+ * @param {Object[]} runs Array of process run records.
135
+ * @param {number} window Subset of times to use.
136
+ * @param {boolean} useCycleTime Whether to use full cycle time instead of pure processing time.
137
+ * @return {{emaValues: number[], avgTime: number}}
138
+ */
139
+ exports.calculateEstimatedTimeRemainingUsingSMA = calculateEstimatedTimeRemainingUsingSMA;
140
+ const calculateEstimatedTimeRemainingUsingEMA = (runs, window = 2, useCycleTime = true) => {
141
+ if (!runs || runs.length < window + 1) {
142
+ return {
143
+ emaValues: [],
144
+ avgTime: 0
145
+ };
146
+ }
147
+ const sortedRuns = [...runs].sort((a, b) => Number(a.start_time) - Number(b.start_time));
148
+ let timesToUse = [];
149
+ if (useCycleTime) {
150
+ const runsWithCycleTimes = [];
151
+ for (let i = 1; i < sortedRuns.length; i++) {
152
+ const previousRun = sortedRuns[i - 1];
153
+ const currentRun = sortedRuns[i];
154
+ const processingTime = currentRun.completed_time ? Number(currentRun.completed_time) - Number(currentRun.start_time) : currentRun.last_attempt_time ? Number(currentRun.last_attempt_time) - Number(currentRun.start_time) : 0;
155
+ const previousEndTime = previousRun.completed_time ? Number(previousRun.completed_time) : previousRun.last_attempt_time ? Number(previousRun.last_attempt_time) : Number(previousRun.start_time);
156
+ const currentEndTime = currentRun.completed_time ? Number(currentRun.completed_time) : currentRun.last_attempt_time ? Number(currentRun.last_attempt_time) : Number(currentRun.start_time);
157
+ const cycleTime = currentEndTime - previousEndTime;
158
+ if (cycleTime > 0 && processingTime > 0) {
159
+ runsWithCycleTimes.push({
160
+ ...currentRun,
161
+ total_time: processingTime,
162
+ cycle_time: cycleTime
163
+ });
164
+ }
165
+ }
166
+ if (runsWithCycleTimes.length < window) {
167
+ return {
168
+ emaValues: [],
169
+ avgTime: 0
170
+ };
171
+ }
172
+ timesToUse = runsWithCycleTimes.map(run => run.cycle_time);
173
+ } else {
174
+ timesToUse = sortedRuns.map(run => {
175
+ if (typeof run.total_time === 'number' && run.total_time > 0) {
176
+ return run.total_time;
177
+ }
178
+ const startTime = run.start_time ? Number(run.start_time) : null;
179
+ const endTime = run.completed_time ? Number(run.completed_time) : run.last_attempt_time ? Number(run.last_attempt_time) : null;
180
+ return startTime && endTime ? endTime - startTime : 0;
181
+ }).filter(time => time > 0);
182
+ if (timesToUse.length < window) {
183
+ return {
184
+ emaValues: [],
185
+ avgTime: 0
186
+ };
187
+ }
188
+ }
189
+ let index = window - 1;
190
+ let previousEmaIndex = 0;
191
+ const length = timesToUse.length;
192
+ const smoothingFactor = 2 / (window + 1);
193
+ const exponentialMovingAverages = [];
194
+ const smaValues = calculateEstimatedTimeRemainingUsingSMA(timesToUse, window, 1);
195
+ const sma = smaValues.length > 0 ? smaValues[0] : 0;
196
+ if (sma <= 0) {
197
+ return {
198
+ emaValues: [],
199
+ avgTime: 0
200
+ };
201
+ }
202
+ exponentialMovingAverages.push(sma);
203
+ while (++index < length) {
204
+ const value = timesToUse[index];
205
+ const previousEma = exponentialMovingAverages[previousEmaIndex++];
206
+ const currentEma = (value - previousEma) * smoothingFactor + previousEma;
207
+ exponentialMovingAverages.push(currentEma);
208
+ }
209
+ return {
210
+ emaValues: exponentialMovingAverages,
211
+ avgTime: exponentialMovingAverages.length > 0 ? exponentialMovingAverages[exponentialMovingAverages.length - 1] : 0
212
+ };
213
+ };
214
+ exports.calculateEstimatedTimeRemainingUsingEMA = calculateEstimatedTimeRemainingUsingEMA;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dream-encode/wp-js-plugin-utils",
3
- "version": "0.3.0",
3
+ "version": "0.6.0",
4
4
  "description": "Common JS functionality used by custom WP plugins.",
5
5
  "keywords": [
6
6
  "wordpress",
@@ -25,9 +25,12 @@
25
25
  "./postcss": "./dist/webpack/postcss.config.js",
26
26
  "./settings": "./dist/settings/index.js",
27
27
  "./settings/styles": "./dist/settings/styles/_settings-page.scss",
28
+ "./settings/styles/rail": "./dist/settings/styles/_settings-rail.scss",
28
29
  "./data-migrations": "./dist/data-migrations/index.js",
29
30
  "./components": "./dist/components/index.js",
30
31
  "./components/notifications-drawer/styles": "./dist/components/NotificationsDrawer/styles/_notifications-drawer.scss",
32
+ "./components/process/styles": "./dist/components/Process/styles/_process.scss",
33
+ "./components/progress/styles": "./dist/components/Progress/styles/_progress.scss",
31
34
  "./hooks": "./dist/hooks/index.js",
32
35
  "./api": "./dist/api/index.js",
33
36
  "./utils": "./dist/utils/index.js",