@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/capsule.cjs CHANGED
@@ -182,9 +182,9 @@ function _unsupportedIterableToArray(r, a) {
182
182
  }
183
183
  }
184
184
 
185
- /**
186
- * Tiny event emitter. Accepts any event name so the API stays open for
187
- * future events (hover, click, custom) without breaking changes.
185
+ /**
186
+ * Tiny event emitter. Accepts any event name so the API stays open for
187
+ * future events (hover, click, custom) without breaking changes.
188
188
  */
189
189
  function createEmitter() {
190
190
  // Plain object storage (no Map/Set) so the legacy build has no API
@@ -234,9 +234,9 @@ function createEmitter() {
234
234
 
235
235
  var UNIT_PATTERN = /^[\d.]+(?:px|%|vw|vh|vmin|vmax|em|rem)$/;
236
236
 
237
- /**
238
- * Normalize a size option to a CSS length string.
239
- * Accepts numbers (treated as px) or strings with px/%, vw/vh/vmin/vmax, em/rem.
237
+ /**
238
+ * Normalize a size option to a CSS length string.
239
+ * Accepts numbers (treated as px) or strings with px/%, vw/vh/vmin/vmax, em/rem.
240
240
  */
241
241
  function parseSize(value) {
242
242
  if (typeof value === 'number') {
@@ -282,10 +282,10 @@ function effectiveDprCap(quality) {
282
282
  return Math.max(0.5, dprCapFor(quality) * normalizedScale);
283
283
  }
284
284
 
285
- /**
286
- * Merge defaults < preset < user. Unknown user keys are preserved so the
287
- * component API can grow (new props, cssVars, callbacks) without a breaking
288
- * change.
285
+ /**
286
+ * Merge defaults < preset < user. Unknown user keys are preserved so the
287
+ * component API can grow (new props, cssVars, callbacks) without a breaking
288
+ * change.
289
289
  */
290
290
  function normalizeOptions(defaults, preset, user) {
291
291
  // undefined means "not provided" (e.g. Vue $props with unset props):
@@ -303,9 +303,9 @@ function normalizeOptions(defaults, preset, user) {
303
303
  return _objectSpread2(_objectSpread2(_objectSpread2({}, defaults), presetOptions), userOptions);
304
304
  }
305
305
 
306
- /**
307
- * 公共色板:NC-01~NC-06 的四色组(底色 / 主色 / 辅色 / 高光色)。
308
- * Capsule 预置与 dlc-color 等组件共用,新增色板只改这里。
306
+ /**
307
+ * 公共色板:NC-01~NC-06 的四色组(底色 / 主色 / 辅色 / 高光色)。
308
+ * Capsule 预置与 dlc-color 等组件共用,新增色板只改这里。
309
309
  */
310
310
  var PALETTES = {
311
311
  original: ['#FFF3EA', '#F5B27A', '#F67BC6', '#A978E8'],
@@ -316,9 +316,9 @@ var PALETTES = {
316
316
  plus: ['#FFF0E6', '#F6C26B', '#F98A64', '#E86D74']
317
317
  };
318
318
 
319
- /**
320
- * Capsule 预置:仅星云材质 NC-01~NC-06(NC-07~09 aurora 已移除)。
321
- * 颜色引用公共色板,seed/speed 决定形态与流速。
319
+ /**
320
+ * Capsule 预置:仅星云材质 NC-01~NC-06(NC-07~09 aurora 已移除)。
321
+ * 颜色引用公共色板,seed/speed 决定形态与流速。
322
322
  */
323
323
  var CAPSULE_PRESETS = [{
324
324
  id: 'original',
@@ -999,10 +999,10 @@ var FallbackRenderer = /*#__PURE__*/function () {
999
999
  }]);
1000
1000
  }();
1001
1001
 
1002
- /**
1003
- * Document-level shared rAF scheduler. Every component instance subscribes
1004
- * its own frame callback; the whole page runs ONE animation loop (like the
1005
- * original demo), which avoids jank from many competing rAF loops.
1002
+ /**
1003
+ * Document-level shared rAF scheduler. Every component instance subscribes
1004
+ * its own frame callback; the whole page runs ONE animation loop (like the
1005
+ * original demo), which avoids jank from many competing rAF loops.
1006
1006
  */
1007
1007
  var subscribers = [];
1008
1008
  var running = false;
@@ -1079,9 +1079,9 @@ function subscribeScheduler(onFrame, isPaused) {
1079
1079
  };
1080
1080
  }
1081
1081
 
1082
- /**
1083
- * Gates drawing on "element intersects viewport AND the page tab is visible".
1084
- * Falls back to always-visible when IntersectionObserver is unavailable.
1082
+ /**
1083
+ * Gates drawing on "element intersects viewport AND the page tab is visible".
1084
+ * Falls back to always-visible when IntersectionObserver is unavailable.
1085
1085
  */
1086
1086
  function createVisibilityGuard(element) {
1087
1087
  var onChange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
@@ -1192,15 +1192,15 @@ function toFiniteNumber(value) {
1192
1192
  return Number.isFinite(number) ? number : null;
1193
1193
  }
1194
1194
 
1195
- /**
1196
- * Mount a cosmic (nebula) capsule into `container`.
1197
- *
1198
- * Options: preset (literary name), width, height (number=px or string with
1199
- * px/%/vw/vh/em/rem), colors, seed, speed, textRatio (0-100, text region
1200
- * width in percent), text (HTML string or DOM nodes for the text slot),
1201
- * colorContent (HTML string or DOM nodes for the color slot), quality,
1202
- * renderer, quality, renderScale, powerPreference, fps, paused/static,
1203
- * respectReducedMotion, mouseColor, cssVars.
1195
+ /**
1196
+ * Mount a cosmic (nebula) capsule into `container`.
1197
+ *
1198
+ * Options: preset (literary name), width, height (number=px or string with
1199
+ * px/%/vw/vh/em/rem), colors, seed, speed, textRatio (0-100, text region
1200
+ * width in percent), text (HTML string or DOM nodes for the text slot),
1201
+ * colorContent (HTML string or DOM nodes for the color slot), quality,
1202
+ * renderer, quality, renderScale, powerPreference, fps, paused/static,
1203
+ * respectReducedMotion, mouseColor, cssVars.
1204
1204
  */
1205
1205
  function createCapsule(container) {
1206
1206
  var _options$preset;