shineout 3.1.12 → 3.1.13

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/cjs/index.js CHANGED
@@ -476,5 +476,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
476
476
  // 此文件由脚本自动生成,请勿直接修改。
477
477
  // This file was generated automatically by a script. Please do not modify it directly.
478
478
  var _default = exports.default = {
479
- version: '3.1.12'
479
+ version: '3.1.13'
480
480
  };
package/dist/shineout.js CHANGED
@@ -2954,7 +2954,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;var _typeof =
2954
2954
 
2955
2955
  /***/ }),
2956
2956
 
2957
- /***/ 158:
2957
+ /***/ 3644:
2958
2958
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2959
2959
 
2960
2960
  "use strict";
@@ -3026,7 +3026,7 @@ exports.useSyncExternalStore = void 0 !== e.useSyncExternalStore ? e.useSyncExte
3026
3026
 
3027
3027
  /***/ }),
3028
3028
 
3029
- /***/ 4709:
3029
+ /***/ 2518:
3030
3030
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3031
3031
 
3032
3032
  "use strict";
@@ -3042,7 +3042,7 @@ exports.useSyncExternalStore = void 0 !== e.useSyncExternalStore ? e.useSyncExte
3042
3042
 
3043
3043
 
3044
3044
  var h = __webpack_require__(9787),
3045
- n = __webpack_require__(6097);
3045
+ n = __webpack_require__(9625);
3046
3046
  function p(a, b) {
3047
3047
  return a === b && (0 !== a || 1 / a === 1 / b) || a !== a && b !== b;
3048
3048
  }
@@ -3101,26 +3101,26 @@ exports.useSyncExternalStoreWithSelector = function (a, b, e, l, g) {
3101
3101
 
3102
3102
  /***/ }),
3103
3103
 
3104
- /***/ 6097:
3104
+ /***/ 9625:
3105
3105
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3106
3106
 
3107
3107
  "use strict";
3108
3108
 
3109
3109
 
3110
3110
  if (true) {
3111
- module.exports = __webpack_require__(158);
3111
+ module.exports = __webpack_require__(3644);
3112
3112
  } else {}
3113
3113
 
3114
3114
  /***/ }),
3115
3115
 
3116
- /***/ 314:
3116
+ /***/ 6523:
3117
3117
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3118
3118
 
3119
3119
  "use strict";
3120
3120
 
3121
3121
 
3122
3122
  if (true) {
3123
- module.exports = __webpack_require__(4709);
3123
+ module.exports = __webpack_require__(2518);
3124
3124
  } else {}
3125
3125
 
3126
3126
  /***/ }),
@@ -11949,7 +11949,7 @@ var handleStyle = function handleStyle(style) {
11949
11949
  };
11950
11950
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11951
11951
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11952
- /* harmony default export */ var version = ('3.1.12');
11952
+ /* harmony default export */ var version = ('3.1.13');
11953
11953
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11954
11954
 
11955
11955
 
@@ -20229,6 +20229,7 @@ var setToken = function setToken(options) {
20229
20229
  customExtraToken = _ref.extraToken;
20230
20230
  var _getConfig = getConfig(),
20231
20231
  prefix = _getConfig.prefix;
20232
+ if (typeof window === 'undefined') return;
20232
20233
  var id = "__shineoutThemeStyleContainer__".concat(createHash(selector));
20233
20234
  var cacheTag = document.querySelector("[data-token-id=\"".concat(id, "\"]"));
20234
20235
  var tag = cacheTag || document.createElement(tagName);
@@ -27547,7 +27548,7 @@ var usePositionStyle = function usePositionStyle(config) {
27547
27548
  // EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"}
27548
27549
  var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_ = __webpack_require__(5156);
27549
27550
  var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_);
27550
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@shined+reactive@0.1.2_react@18.2.0/node_modules/@shined/reactive/dist/chunk-LM54EYM4.js
27551
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@shined+reactive@0.1.3-alpha.0_react@18.2.0/node_modules/@shined/reactive/dist/chunk-IP2WBRUX.js
27551
27552
 
27552
27553
  // src/vanilla/ref.ts
27553
27554
  function _array_like_to_array(arr, len) {
@@ -27627,16 +27628,16 @@ function hasRef(k) {
27627
27628
  var SNAPSHOT = Symbol("SNAPSHOT");
27628
27629
  var LISTENERS = Symbol("LISTENERS");
27629
27630
  var REACTIVE = Symbol("REACTIVE");
27630
- var chunk_LM54EYM4_isProduction = (/* unused pure expression or super */ null && ("production" === "production"));
27631
+ var chunk_IP2WBRUX_isProduction = (/* unused pure expression or super */ null && ("production" === "production"));
27631
27632
  var hasOwn = Object.prototype.hasOwnProperty;
27632
- var chunk_LM54EYM4_isObject = function isObject(x) {
27633
+ var chunk_IP2WBRUX_isObject = function isObject(x) {
27633
27634
  return helpers_typeof(x) === "object" && x !== null;
27634
27635
  };
27635
27636
  var createObjectFromPrototype = function createObjectFromPrototype(target) {
27636
27637
  return Array.isArray(target) ? [] : Object.create(Object.getPrototypeOf(target));
27637
27638
  };
27638
27639
  var canProxy = function canProxy(x) {
27639
- return chunk_LM54EYM4_isObject(x) && !hasRef(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !_instanceof(x, WeakMap) && !_instanceof(x, WeakSet) && !_instanceof(x, Error) && !_instanceof(x, Number) && !_instanceof(x, Date) && !_instanceof(x, String) && !_instanceof(x, RegExp) && !_instanceof(x, ArrayBuffer);
27640
+ return chunk_IP2WBRUX_isObject(x) && !hasRef(x) && (Array.isArray(x) || !(Symbol.iterator in x)) && !_instanceof(x, WeakMap) && !_instanceof(x, WeakSet) && !_instanceof(x, Error) && !_instanceof(x, Number) && !_instanceof(x, Date) && !_instanceof(x, String) && !_instanceof(x, RegExp) && !_instanceof(x, ArrayBuffer);
27640
27641
  };
27641
27642
  var numberReg = /^\d+$/;
27642
27643
  var propertyKeysToPath = function propertyKeysToPath(keys) {
@@ -27680,7 +27681,7 @@ var get = function get(object, path) {
27680
27681
  }
27681
27682
  return object;
27682
27683
  };
27683
- var chunk_LM54EYM4_shallowEqual = function shallowEqual(objA, objB) {
27684
+ var chunk_IP2WBRUX_shallowEqual = function shallowEqual(objA, objB) {
27684
27685
  if (Object.is(objA, objB)) {
27685
27686
  return true;
27686
27687
  }
@@ -27828,7 +27829,7 @@ function proxy(initState) {
27828
27829
  var preValue = Reflect.get(target, prop, receiver);
27829
27830
  var childListeners = preValue === null || preValue === void 0 ? void 0 : preValue[LISTENERS];
27830
27831
  childListeners && childListeners.delete(popPropListener(prop));
27831
- if (!chunk_LM54EYM4_isObject(value) && Object.is(preValue, value)) {
27832
+ if (!chunk_IP2WBRUX_isObject(value) && Object.is(preValue, value)) {
27832
27833
  return true;
27833
27834
  }
27834
27835
  var nextValue = value;
@@ -27901,7 +27902,7 @@ function subscribe(proxyState, callback, notifyInSync) {
27901
27902
  };
27902
27903
  }
27903
27904
  // src/vanilla/create.ts
27904
- function chunk_LM54EYM4_create(initState, options) {
27905
+ function chunk_IP2WBRUX_create(initState, options) {
27905
27906
  options !== null && options !== void 0 ? options : options = {};
27906
27907
  var proxyState = proxy(initState);
27907
27908
  var restore = function restore() {
@@ -27998,14 +27999,14 @@ function produce(obj, draftHandler) {
27998
27999
  return snapshot;
27999
28000
  }
28000
28001
 
28001
- // EXTERNAL MODULE: ../../node_modules/.pnpm/use-sync-external-store@1.2.0_react@18.2.0/node_modules/use-sync-external-store/shim/with-selector.js
28002
- var with_selector = __webpack_require__(314);
28003
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@shined+reactive@0.1.2_react@18.2.0/node_modules/@shined/reactive/dist/index.js
28002
+ // EXTERNAL MODULE: ../../node_modules/.pnpm/use-sync-external-store@1.2.2_react@18.2.0/node_modules/use-sync-external-store/shim/with-selector.js
28003
+ var with_selector = __webpack_require__(6523);
28004
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/@shined+reactive@0.1.3-alpha.0_react@18.2.0/node_modules/@shined/reactive/dist/index.js
28004
28005
 
28005
28006
  // src/react/use-snapshot.ts
28006
28007
 
28007
28008
 
28008
- var useSnapshot = function useSnapshot(proxyState, selectorOrOption, maybeOptions) {
28009
+ function useSnapshot(proxyState, selectorOrOption, maybeOptions) {
28009
28010
  if (selectorOrOption && typeof selectorOrOption !== "function") {
28010
28011
  maybeOptions = selectorOrOption;
28011
28012
  selectorOrOption = void 0;
@@ -28014,7 +28015,7 @@ var useSnapshot = function useSnapshot(proxyState, selectorOrOption, maybeOption
28014
28015
  tmp = _ref.sync,
28015
28016
  updateInSync = tmp === void 0 ? false : tmp,
28016
28017
  _ref_isEqual = _ref.isEqual,
28017
- isEqual = _ref_isEqual === void 0 ? chunk_LM54EYM4_shallowEqual : _ref_isEqual;
28018
+ isEqual = _ref_isEqual === void 0 ? chunk_IP2WBRUX_shallowEqual : _ref_isEqual;
28018
28019
  var _subscribe = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function (callback) {
28019
28020
  return subscribe(proxyState, callback, updateInSync);
28020
28021
  }, [proxyState, updateInSync]);
@@ -28026,10 +28027,10 @@ var useSnapshot = function useSnapshot(proxyState, selectorOrOption, maybeOption
28026
28027
  };
28027
28028
  var snapshot = (0,with_selector.useSyncExternalStoreWithSelector)(_subscribe, _getSnapshot, _getSnapshot, selector, isEqual);
28028
28029
  return snapshot;
28029
- };
28030
+ }
28030
28031
  // src/react/create-with-hooks.ts
28031
- var createWithHooks = function createWithHooks(initState, options) {
28032
- var store = chunk_LM54EYM4_create(initState, options);
28032
+ function createWithHooks(initState, options) {
28033
+ var store = chunk_IP2WBRUX_create(initState, options);
28033
28034
  var _useSnapshot = function _useSnapshot(selectorOrOption, maybeOptions) {
28034
28035
  if (selectorOrOption && typeof selectorOrOption !== "function") {
28035
28036
  maybeOptions = selectorOrOption;
@@ -28041,7 +28042,7 @@ var createWithHooks = function createWithHooks(initState, options) {
28041
28042
  useSnapshot: _useSnapshot
28042
28043
  });
28043
28044
  return store;
28044
- };
28045
+ }
28045
28046
 
28046
28047
  ;// CONCATENATED MODULE: ../base/src/config/index.ts
28047
28048
  /* provided dependency */ var process = __webpack_require__(147);
@@ -29690,6 +29691,58 @@ var ButtonGroup = function ButtonGroup(props) {
29690
29691
  src_button_button_0.displayName = 'ShineoutButton';
29691
29692
  src_button_button_0.Group = src_button_group;
29692
29693
  /* harmony default export */ var src_button_0 = (src_button_button_0);
29694
+ ;// CONCATENATED MODULE: ../hooks/src/common/use-unmounted-ref/index.ts
29695
+
29696
+ function useUnmountedRef() {
29697
+ var unmountedRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
29698
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
29699
+ unmountedRef.current = false;
29700
+ return function () {
29701
+ unmountedRef.current = true;
29702
+ };
29703
+ }, []);
29704
+ return unmountedRef;
29705
+ }
29706
+ /* harmony default export */ var use_unmounted_ref = ((/* unused pure expression or super */ null && (useUnmountedRef)));
29707
+ ;// CONCATENATED MODULE: ../hooks/src/common/use-safe-state/index.ts
29708
+
29709
+
29710
+
29711
+
29712
+ function useSafeState(initialState) {
29713
+ var unmountedRef = useUnmountedRef();
29714
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(initialState),
29715
+ _useState2 = slicedToArray_default()(_useState, 2),
29716
+ state = _useState2[0],
29717
+ setState = _useState2[1];
29718
+ var setCurrentState = usePersistFn(function (currentState) {
29719
+ if (!unmountedRef.current) {
29720
+ setState(currentState);
29721
+ }
29722
+ });
29723
+ return [state, setCurrentState];
29724
+ }
29725
+ /* harmony default export */ var use_safe_state = ((/* unused pure expression or super */ null && (useSafeState)));
29726
+ ;// CONCATENATED MODULE: ../hooks/src/common/use-render/index.ts
29727
+
29728
+
29729
+
29730
+
29731
+ function useRender(callback) {
29732
+ var _useSafeState = useSafeState(undefined),
29733
+ _useSafeState2 = slicedToArray_default()(_useSafeState, 2),
29734
+ count = _useSafeState2[0],
29735
+ setCount = _useSafeState2[1];
29736
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
29737
+ if (callback && count !== undefined) callback();
29738
+ }, [count]);
29739
+ return usePersistFn(function () {
29740
+ return setCount(function (count) {
29741
+ return ((count || 0) + 1) % 1000000;
29742
+ });
29743
+ });
29744
+ }
29745
+ /* harmony default export */ var use_render = (useRender);
29693
29746
  ;// CONCATENATED MODULE: ../hooks/src/common/use-drag-mock/use-drag-mock.ts
29694
29747
 
29695
29748
 
@@ -29970,6 +30023,7 @@ var Card = function Card(props) {
29970
30023
  style = _props$style === void 0 ? {} : _props$style;
29971
30024
  var cardClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$card = _props$jssStyle.card) === null || _props$jssStyle$card === void 0 ? void 0 : _props$jssStyle$card.call(_props$jssStyle);
29972
30025
  var panelRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
30026
+ var forceUpdate = useRender();
29973
30027
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
29974
30028
  id: undefined
29975
30029
  }),
@@ -29989,9 +30043,12 @@ var Card = function Card(props) {
29989
30043
  activeId = _useContext.activeId,
29990
30044
  getDefaultId = _useContext.getDefaultId,
29991
30045
  onActiveChange = _useContext.onActiveChange;
29992
- if (context.id === undefined) {
29993
- context.id = getDefaultId();
29994
- }
30046
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
30047
+ if (context.id === undefined) {
30048
+ context.id = getDefaultId();
30049
+ forceUpdate();
30050
+ }
30051
+ }, []);
29995
30052
  var id = (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : context.id;
29996
30053
  var collapsible = props.collapsible || inAccordion;
29997
30054
  var getCollpased = function getCollpased() {
@@ -30342,58 +30399,6 @@ CardComp.Footer = FooterComp;
30342
30399
  CardComp.Accordion = AccordionComp;
30343
30400
  CardComp.Submit = SubmitComp;
30344
30401
  /* harmony default export */ var src_card_0 = (CardComp);
30345
- ;// CONCATENATED MODULE: ../hooks/src/common/use-unmounted-ref/index.ts
30346
-
30347
- function useUnmountedRef() {
30348
- var unmountedRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
30349
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
30350
- unmountedRef.current = false;
30351
- return function () {
30352
- unmountedRef.current = true;
30353
- };
30354
- }, []);
30355
- return unmountedRef;
30356
- }
30357
- /* harmony default export */ var use_unmounted_ref = ((/* unused pure expression or super */ null && (useUnmountedRef)));
30358
- ;// CONCATENATED MODULE: ../hooks/src/common/use-safe-state/index.ts
30359
-
30360
-
30361
-
30362
-
30363
- function useSafeState(initialState) {
30364
- var unmountedRef = useUnmountedRef();
30365
- var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(initialState),
30366
- _useState2 = slicedToArray_default()(_useState, 2),
30367
- state = _useState2[0],
30368
- setState = _useState2[1];
30369
- var setCurrentState = usePersistFn(function (currentState) {
30370
- if (!unmountedRef.current) {
30371
- setState(currentState);
30372
- }
30373
- });
30374
- return [state, setCurrentState];
30375
- }
30376
- /* harmony default export */ var use_safe_state = ((/* unused pure expression or super */ null && (useSafeState)));
30377
- ;// CONCATENATED MODULE: ../hooks/src/common/use-render/index.ts
30378
-
30379
-
30380
-
30381
-
30382
- function useRender(callback) {
30383
- var _useSafeState = useSafeState(undefined),
30384
- _useSafeState2 = slicedToArray_default()(_useSafeState, 2),
30385
- count = _useSafeState2[0],
30386
- setCount = _useSafeState2[1];
30387
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
30388
- if (callback && count !== undefined) callback();
30389
- }, [count]);
30390
- return usePersistFn(function () {
30391
- return setCount(function (count) {
30392
- return ((count || 0) + 1) % 1000000;
30393
- });
30394
- });
30395
- }
30396
- /* harmony default export */ var use_render = (useRender);
30397
30402
  ;// CONCATENATED MODULE: ../base/src/card-group/card-group-context.ts
30398
30403
  "use client";
30399
30404
 
@@ -35978,9 +35983,9 @@ var result_Result = function Result(props) {
35978
35983
  mounted.current = true;
35979
35984
  }, [focus]);
35980
35985
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
35981
- handleResetMore();
35986
+ setTimeout(handleResetMore);
35982
35987
  }, [valueProp, data]);
35983
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
35988
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
35984
35989
  if (shouldResetMore && more === -1 && compressed && resultRef.current && (props.value || [].length)) {
35985
35990
  var tagClassName = ".".concat(styles.tag.split(' ')[0]);
35986
35991
  if (shouldResetMore && result_isArray(value) && (value || []).length) {
@@ -48098,6 +48103,10 @@ var Tree = function Tree(props) {
48098
48103
  onDragStart = props.onDragStart,
48099
48104
  propsDatum = props.datum,
48100
48105
  rest = objectWithoutProperties_default()(props, tree_excluded);
48106
+ var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
48107
+ mounted: false
48108
+ }),
48109
+ context = _useRef.current;
48101
48110
  var _useTree = use_tree({
48102
48111
  mode: mode,
48103
48112
  value: value,
@@ -48213,6 +48222,11 @@ var Tree = function Tree(props) {
48213
48222
  }
48214
48223
  };
48215
48224
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
48225
+ // 首次渲染不更新
48226
+ if (!context.mounted) {
48227
+ return;
48228
+ }
48229
+ if (!props.expanded) return;
48216
48230
  handleUpdateExpanded(expanded);
48217
48231
  }, [expanded]);
48218
48232
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
@@ -48221,6 +48235,7 @@ var Tree = function Tree(props) {
48221
48235
  }, [active]);
48222
48236
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
48223
48237
  if (getDatum) getDatum(datum);
48238
+ context.mounted = true;
48224
48239
  }, []);
48225
48240
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
48226
48241
  className: rootClass
@@ -62166,7 +62181,7 @@ var upload_interface = __webpack_require__(4412);
62166
62181
 
62167
62182
 
62168
62183
  /* harmony default export */ var src_0 = ({
62169
- version: '3.1.12'
62184
+ version: '3.1.13'
62170
62185
  });
62171
62186
  }();
62172
62187
  /******/ return __webpack_exports__;