@5even7/dlc-ui 0.2.14 → 0.2.16

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/dist/progress.cjs CHANGED
@@ -175,9 +175,9 @@ function _unsupportedIterableToArray(r, a) {
175
175
  }
176
176
  }
177
177
 
178
- /**
179
- * Tiny event emitter. Accepts any event name so the API stays open for
180
- * future events (hover, click, custom) without breaking changes.
178
+ /**
179
+ * Tiny event emitter. Accepts any event name so the API stays open for
180
+ * future events (hover, click, custom) without breaking changes.
181
181
  */
182
182
  function createEmitter() {
183
183
  // Plain object storage (no Map/Set) so the legacy build has no API
@@ -227,9 +227,9 @@ function createEmitter() {
227
227
 
228
228
  var UNIT_PATTERN = /^[\d.]+(?:px|%|vw|vh|vmin|vmax|em|rem)$/;
229
229
 
230
- /**
231
- * Normalize a size option to a CSS length string.
232
- * Accepts numbers (treated as px) or strings with px/%, vw/vh/vmin/vmax, em/rem.
230
+ /**
231
+ * Normalize a size option to a CSS length string.
232
+ * Accepts numbers (treated as px) or strings with px/%, vw/vh/vmin/vmax, em/rem.
233
233
  */
234
234
  function parseSize(value) {
235
235
  if (typeof value === 'number') {
@@ -275,10 +275,10 @@ function effectiveDprCap(quality) {
275
275
  return Math.max(0.5, dprCapFor(quality) * normalizedScale);
276
276
  }
277
277
 
278
- /**
279
- * Merge defaults < preset < user. Unknown user keys are preserved so the
280
- * component API can grow (new props, cssVars, callbacks) without a breaking
281
- * change.
278
+ /**
279
+ * Merge defaults < preset < user. Unknown user keys are preserved so the
280
+ * component API can grow (new props, cssVars, callbacks) without a breaking
281
+ * change.
282
282
  */
283
283
  function normalizeOptions(defaults, preset, user) {
284
284
  // undefined means "not provided" (e.g. Vue $props with unset props):
@@ -296,9 +296,9 @@ function normalizeOptions(defaults, preset, user) {
296
296
  return _objectSpread2(_objectSpread2(_objectSpread2({}, defaults), presetOptions), userOptions);
297
297
  }
298
298
 
299
- /**
300
- * 公共色板:NC-01~NC-06 的四色组(底色 / 主色 / 辅色 / 高光色)。
301
- * Capsule 预置与 dlc-color 等组件共用,新增色板只改这里。
299
+ /**
300
+ * 公共色板:NC-01~NC-06 的四色组(底色 / 主色 / 辅色 / 高光色)。
301
+ * Capsule 预置与 dlc-color 等组件共用,新增色板只改这里。
302
302
  */
303
303
  var PALETTES$1 = {
304
304
  original: ['#FFF3EA', '#F5B27A', '#F67BC6', '#A978E8'],
@@ -309,9 +309,9 @@ var PALETTES$1 = {
309
309
  plus: ['#FFF0E6', '#F6C26B', '#F98A64', '#E86D74']
310
310
  };
311
311
 
312
- /**
313
- * Capsule 预置:仅星云材质 NC-01~NC-06(NC-07~09 aurora 已移除)。
314
- * 颜色引用公共色板,seed/speed 决定形态与流速。
312
+ /**
313
+ * Capsule 预置:仅星云材质 NC-01~NC-06(NC-07~09 aurora 已移除)。
314
+ * 颜色引用公共色板,seed/speed 决定形态与流速。
315
315
  */
316
316
  var CAPSULE_PRESETS = [{
317
317
  id: 'original',
@@ -686,10 +686,10 @@ function hexToRgba(color) {
686
686
  return "rgba(".concat(red, ", ").concat(green, ", ").concat(blue, ", ").concat(alpha, ")");
687
687
  }
688
688
 
689
- /**
690
- * Document-level shared rAF scheduler. Every component instance subscribes
691
- * its own frame callback; the whole page runs ONE animation loop (like the
692
- * original demo), which avoids jank from many competing rAF loops.
689
+ /**
690
+ * Document-level shared rAF scheduler. Every component instance subscribes
691
+ * its own frame callback; the whole page runs ONE animation loop (like the
692
+ * original demo), which avoids jank from many competing rAF loops.
693
693
  */
694
694
  var subscribers = [];
695
695
  var running = false;
@@ -766,9 +766,9 @@ function subscribeScheduler(onFrame, isPaused) {
766
766
  };
767
767
  }
768
768
 
769
- /**
770
- * Gates drawing on "element intersects viewport AND the page tab is visible".
771
- * Falls back to always-visible when IntersectionObserver is unavailable.
769
+ /**
770
+ * Gates drawing on "element intersects viewport AND the page tab is visible".
771
+ * Falls back to always-visible when IntersectionObserver is unavailable.
772
772
  */
773
773
  function createVisibilityGuard(element) {
774
774
  var onChange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
@@ -1195,15 +1195,15 @@ function getProgressReferenceAtlas(id) {
1195
1195
  return CACHE[id];
1196
1196
  }
1197
1197
 
1198
- /**
1199
- * Attach a WebGL2 fluid overlay to a progress capsule root.
1200
- *
1201
- * @param {object} params
1202
- * @param {HTMLElement} params.root progress capsule root element
1203
- * @param {HTMLCanvasElement} params.canvas 2D fallback canvas (kept beneath)
1204
- * @param {object} params.preset progress preset
1205
- * @param {() => number} params.getProgress reads the current progress value
1206
- * @returns {{ update(flowTime: number): void, setDprCap(cap: number): void, dispose(): void } | null}
1198
+ /**
1199
+ * Attach a WebGL2 fluid overlay to a progress capsule root.
1200
+ *
1201
+ * @param {object} params
1202
+ * @param {HTMLElement} params.root progress capsule root element
1203
+ * @param {HTMLCanvasElement} params.canvas 2D fallback canvas (kept beneath)
1204
+ * @param {object} params.preset progress preset
1205
+ * @param {() => number} params.getProgress reads the current progress value
1206
+ * @returns {{ update(flowTime: number): void, setDprCap(cap: number): void, dispose(): void } | null}
1207
1207
  */
1208
1208
  function attachProgressFlowOverlay(_ref) {
1209
1209
  var root = _ref.root,
@@ -2083,16 +2083,16 @@ var ProgressCapsuleController = /*#__PURE__*/function () {
2083
2083
  }]);
2084
2084
  }();
2085
2085
 
2086
- /**
2087
- * Mount a fluid progress capsule into `container`.
2088
- *
2089
- * Options: preset (literary name), width, height, value/modelValue, min, max,
2090
- * step, draggable, keyboard, direction, precision/formatValue, colors,
2091
- * edgeStyle, textRatio (0-100, text region
2092
- * width in percent), text (HTML string or DOM nodes for the text slot),
2093
- * colorContent (HTML string or DOM nodes for the color slot),
2094
- * showValue (show/hide the right-side percentage), quality, renderScale,
2095
- * powerPreference, fps, paused/static, respectReducedMotion, cssVars.
2086
+ /**
2087
+ * Mount a fluid progress capsule into `container`.
2088
+ *
2089
+ * Options: preset (literary name), width, height, value/modelValue, min, max,
2090
+ * step, draggable, keyboard, direction, precision/formatValue, colors,
2091
+ * edgeStyle, textRatio (0-100, text region
2092
+ * width in percent), text (HTML string or DOM nodes for the text slot),
2093
+ * colorContent (HTML string or DOM nodes for the color slot),
2094
+ * showValue (show/hide the right-side percentage), quality, renderScale,
2095
+ * powerPreference, fps, paused/static, respectReducedMotion, cssVars.
2096
2096
  */
2097
2097
  function createProgressCapsule(container) {
2098
2098
  var _options$preset, _merged$min, _merged$max;