@elice/material-shared-utils 1.251120.1 → 1.260128.0-rc.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 (102) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +177 -376
  2. package/cjs/_virtual/index.js +5 -0
  3. package/cjs/_virtual/use-sync-external-store-shim.production.js +5 -0
  4. package/cjs/hooks/useHelpyLogo.js +3 -7
  5. package/cjs/index.js +4 -4
  6. package/cjs/material-config/MaterialConfigContext.d.ts +0 -1
  7. package/cjs/material-config/MaterialConfigContext.js +2 -2
  8. package/cjs/material-fetch/useMaterialFetch.d.ts +2 -47
  9. package/cjs/material-fetch/useMaterialFetch.js +1 -4
  10. package/cjs/material-fetch/useMaterialFetchRaw.d.ts +1 -1
  11. package/cjs/material-fetch/useMaterialFetchRaw.js +12 -19
  12. package/cjs/material-hoc/withMaterial.d.ts +1 -1
  13. package/cjs/material-hoc/withMaterial.js +0 -1
  14. package/cjs/node_modules/@tanstack/query-core/build/lib/focusManager.js +93 -0
  15. package/cjs/node_modules/@tanstack/query-core/build/lib/notifyManager.js +101 -0
  16. package/cjs/node_modules/@tanstack/query-core/build/lib/onlineManager.js +95 -0
  17. package/cjs/node_modules/@tanstack/query-core/build/lib/queryObserver.js +571 -0
  18. package/cjs/node_modules/@tanstack/query-core/build/lib/retryer.js +21 -0
  19. package/cjs/node_modules/@tanstack/query-core/build/lib/subscribable.js +33 -0
  20. package/cjs/node_modules/@tanstack/query-core/build/lib/utils.js +154 -0
  21. package/cjs/node_modules/@tanstack/react-query/build/lib/QueryClientProvider.js +65 -0
  22. package/cjs/node_modules/@tanstack/react-query/build/lib/QueryErrorResetBoundary.js +46 -0
  23. package/cjs/node_modules/@tanstack/react-query/build/lib/errorBoundaryUtils.js +52 -0
  24. package/cjs/node_modules/@tanstack/react-query/build/lib/isRestoring.js +31 -0
  25. package/cjs/node_modules/@tanstack/react-query/build/lib/suspense.js +39 -0
  26. package/cjs/node_modules/@tanstack/react-query/build/lib/useBaseQuery.js +94 -0
  27. package/cjs/node_modules/@tanstack/react-query/build/lib/useQuery.js +14 -0
  28. package/cjs/node_modules/@tanstack/react-query/build/lib/useSyncExternalStore.js +9 -0
  29. package/cjs/node_modules/@tanstack/react-query/build/lib/utils.js +12 -0
  30. package/cjs/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js +39 -0
  31. package/cjs/node_modules/rxjs/dist/esm5/internal/Observable.js +105 -0
  32. package/cjs/node_modules/rxjs/dist/esm5/internal/Subject.js +165 -0
  33. package/cjs/node_modules/rxjs/dist/esm5/internal/Subscriber.js +157 -0
  34. package/cjs/node_modules/rxjs/dist/esm5/internal/Subscription.js +148 -0
  35. package/cjs/node_modules/rxjs/dist/esm5/internal/config.js +6 -0
  36. package/cjs/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +19 -0
  37. package/cjs/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +5 -0
  38. package/cjs/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js +13 -0
  39. package/cjs/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +16 -0
  40. package/cjs/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +10 -0
  41. package/cjs/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +14 -0
  42. package/cjs/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +9 -0
  43. package/cjs/node_modules/rxjs/dist/esm5/internal/util/identity.js +7 -0
  44. package/cjs/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +7 -0
  45. package/cjs/node_modules/rxjs/dist/esm5/internal/util/noop.js +5 -0
  46. package/cjs/node_modules/rxjs/dist/esm5/internal/util/pipe.js +17 -0
  47. package/cjs/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +13 -0
  48. package/cjs/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +77 -0
  49. package/cjs/node_modules/use-sync-external-store/shim/index.js +13 -0
  50. package/es/_virtual/_rollupPluginBabelHelpers.js +176 -376
  51. package/es/_virtual/index.js +3 -0
  52. package/es/_virtual/use-sync-external-store-shim.production.js +3 -0
  53. package/es/hooks/useCallbackProp.js +3 -3
  54. package/es/hooks/useDeepClonedCompareEffect.js +2 -2
  55. package/es/hooks/useHelpyLogo.js +2 -6
  56. package/es/index.js +2 -2
  57. package/es/material-config/MaterialConfigContext.d.ts +0 -1
  58. package/es/material-config/MaterialConfigContext.js +1 -1
  59. package/es/material-config/MaterialConfigProvider.js +5 -5
  60. package/es/material-fetch/useMaterialFetch.d.ts +2 -47
  61. package/es/material-fetch/useMaterialFetch.js +1 -4
  62. package/es/material-fetch/useMaterialFetchRaw.d.ts +1 -1
  63. package/es/material-fetch/useMaterialFetchRaw.js +13 -20
  64. package/es/material-hoc/withMaterial.d.ts +1 -1
  65. package/es/material-hoc/withMaterial.js +0 -1
  66. package/es/node_modules/@tanstack/query-core/build/lib/focusManager.js +90 -0
  67. package/es/node_modules/@tanstack/query-core/build/lib/notifyManager.js +98 -0
  68. package/es/node_modules/@tanstack/query-core/build/lib/onlineManager.js +92 -0
  69. package/es/node_modules/@tanstack/query-core/build/lib/queryObserver.js +569 -0
  70. package/es/node_modules/@tanstack/query-core/build/lib/retryer.js +17 -0
  71. package/es/node_modules/@tanstack/query-core/build/lib/subscribable.js +31 -0
  72. package/es/node_modules/@tanstack/query-core/build/lib/utils.js +140 -0
  73. package/es/node_modules/@tanstack/react-query/build/lib/QueryClientProvider.js +42 -0
  74. package/es/node_modules/@tanstack/react-query/build/lib/QueryErrorResetBoundary.js +24 -0
  75. package/es/node_modules/@tanstack/react-query/build/lib/errorBoundaryUtils.js +28 -0
  76. package/es/node_modules/@tanstack/react-query/build/lib/isRestoring.js +9 -0
  77. package/es/node_modules/@tanstack/react-query/build/lib/suspense.js +34 -0
  78. package/es/node_modules/@tanstack/react-query/build/lib/useBaseQuery.js +72 -0
  79. package/es/node_modules/@tanstack/react-query/build/lib/useQuery.js +12 -0
  80. package/es/node_modules/@tanstack/react-query/build/lib/useSyncExternalStore.js +7 -0
  81. package/es/node_modules/@tanstack/react-query/build/lib/utils.js +10 -0
  82. package/es/node_modules/rxjs/dist/esm5/internal/BehaviorSubject.js +37 -0
  83. package/es/node_modules/rxjs/dist/esm5/internal/Observable.js +103 -0
  84. package/es/node_modules/rxjs/dist/esm5/internal/Subject.js +162 -0
  85. package/es/node_modules/rxjs/dist/esm5/internal/Subscriber.js +153 -0
  86. package/es/node_modules/rxjs/dist/esm5/internal/Subscription.js +144 -0
  87. package/es/node_modules/rxjs/dist/esm5/internal/config.js +4 -0
  88. package/es/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +17 -0
  89. package/es/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +3 -0
  90. package/es/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js +11 -0
  91. package/es/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +14 -0
  92. package/es/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +8 -0
  93. package/es/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +12 -0
  94. package/es/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +7 -0
  95. package/es/node_modules/rxjs/dist/esm5/internal/util/identity.js +5 -0
  96. package/es/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +5 -0
  97. package/es/node_modules/rxjs/dist/esm5/internal/util/noop.js +3 -0
  98. package/es/node_modules/rxjs/dist/esm5/internal/util/pipe.js +15 -0
  99. package/es/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +11 -0
  100. package/es/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +69 -0
  101. package/es/node_modules/use-sync-external-store/shim/index.js +11 -0
  102. package/package.json +6 -4
@@ -0,0 +1,153 @@
1
+ import { __extends } from 'tslib';
2
+ import { isFunction } from './util/isFunction.js';
3
+ import { isSubscription, Subscription } from './Subscription.js';
4
+ import { reportUnhandledError } from './util/reportUnhandledError.js';
5
+ import { noop } from './util/noop.js';
6
+
7
+ var Subscriber = (function (_super) {
8
+ __extends(Subscriber, _super);
9
+ function Subscriber(destination) {
10
+ var _this = _super.call(this) || this;
11
+ _this.isStopped = false;
12
+ if (destination) {
13
+ _this.destination = destination;
14
+ if (isSubscription(destination)) {
15
+ destination.add(_this);
16
+ }
17
+ }
18
+ else {
19
+ _this.destination = EMPTY_OBSERVER;
20
+ }
21
+ return _this;
22
+ }
23
+ Subscriber.create = function (next, error, complete) {
24
+ return new SafeSubscriber(next, error, complete);
25
+ };
26
+ Subscriber.prototype.next = function (value) {
27
+ if (this.isStopped) ;
28
+ else {
29
+ this._next(value);
30
+ }
31
+ };
32
+ Subscriber.prototype.error = function (err) {
33
+ if (this.isStopped) ;
34
+ else {
35
+ this.isStopped = true;
36
+ this._error(err);
37
+ }
38
+ };
39
+ Subscriber.prototype.complete = function () {
40
+ if (this.isStopped) ;
41
+ else {
42
+ this.isStopped = true;
43
+ this._complete();
44
+ }
45
+ };
46
+ Subscriber.prototype.unsubscribe = function () {
47
+ if (!this.closed) {
48
+ this.isStopped = true;
49
+ _super.prototype.unsubscribe.call(this);
50
+ this.destination = null;
51
+ }
52
+ };
53
+ Subscriber.prototype._next = function (value) {
54
+ this.destination.next(value);
55
+ };
56
+ Subscriber.prototype._error = function (err) {
57
+ try {
58
+ this.destination.error(err);
59
+ }
60
+ finally {
61
+ this.unsubscribe();
62
+ }
63
+ };
64
+ Subscriber.prototype._complete = function () {
65
+ try {
66
+ this.destination.complete();
67
+ }
68
+ finally {
69
+ this.unsubscribe();
70
+ }
71
+ };
72
+ return Subscriber;
73
+ }(Subscription));
74
+ var ConsumerObserver = (function () {
75
+ function ConsumerObserver(partialObserver) {
76
+ this.partialObserver = partialObserver;
77
+ }
78
+ ConsumerObserver.prototype.next = function (value) {
79
+ var partialObserver = this.partialObserver;
80
+ if (partialObserver.next) {
81
+ try {
82
+ partialObserver.next(value);
83
+ }
84
+ catch (error) {
85
+ handleUnhandledError(error);
86
+ }
87
+ }
88
+ };
89
+ ConsumerObserver.prototype.error = function (err) {
90
+ var partialObserver = this.partialObserver;
91
+ if (partialObserver.error) {
92
+ try {
93
+ partialObserver.error(err);
94
+ }
95
+ catch (error) {
96
+ handleUnhandledError(error);
97
+ }
98
+ }
99
+ else {
100
+ handleUnhandledError(err);
101
+ }
102
+ };
103
+ ConsumerObserver.prototype.complete = function () {
104
+ var partialObserver = this.partialObserver;
105
+ if (partialObserver.complete) {
106
+ try {
107
+ partialObserver.complete();
108
+ }
109
+ catch (error) {
110
+ handleUnhandledError(error);
111
+ }
112
+ }
113
+ };
114
+ return ConsumerObserver;
115
+ }());
116
+ var SafeSubscriber = (function (_super) {
117
+ __extends(SafeSubscriber, _super);
118
+ function SafeSubscriber(observerOrNext, error, complete) {
119
+ var _this = _super.call(this) || this;
120
+ var partialObserver;
121
+ if (isFunction(observerOrNext) || !observerOrNext) {
122
+ partialObserver = {
123
+ next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),
124
+ error: error !== null && error !== void 0 ? error : undefined,
125
+ complete: complete !== null && complete !== void 0 ? complete : undefined,
126
+ };
127
+ }
128
+ else {
129
+ {
130
+ partialObserver = observerOrNext;
131
+ }
132
+ }
133
+ _this.destination = new ConsumerObserver(partialObserver);
134
+ return _this;
135
+ }
136
+ return SafeSubscriber;
137
+ }(Subscriber));
138
+ function handleUnhandledError(error) {
139
+ {
140
+ reportUnhandledError(error);
141
+ }
142
+ }
143
+ function defaultErrorHandler(err) {
144
+ throw err;
145
+ }
146
+ var EMPTY_OBSERVER = {
147
+ closed: true,
148
+ next: noop,
149
+ error: defaultErrorHandler,
150
+ complete: noop,
151
+ };
152
+
153
+ export { EMPTY_OBSERVER, SafeSubscriber, Subscriber };
@@ -0,0 +1,144 @@
1
+ import { __values, __spreadArray, __read } from 'tslib';
2
+ import { isFunction } from './util/isFunction.js';
3
+ import { UnsubscriptionError } from './util/UnsubscriptionError.js';
4
+ import { arrRemove } from './util/arrRemove.js';
5
+
6
+ var Subscription = (function () {
7
+ function Subscription(initialTeardown) {
8
+ this.initialTeardown = initialTeardown;
9
+ this.closed = false;
10
+ this._parentage = null;
11
+ this._finalizers = null;
12
+ }
13
+ Subscription.prototype.unsubscribe = function () {
14
+ var e_1, _a, e_2, _b;
15
+ var errors;
16
+ if (!this.closed) {
17
+ this.closed = true;
18
+ var _parentage = this._parentage;
19
+ if (_parentage) {
20
+ this._parentage = null;
21
+ if (Array.isArray(_parentage)) {
22
+ try {
23
+ for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
24
+ var parent_1 = _parentage_1_1.value;
25
+ parent_1.remove(this);
26
+ }
27
+ }
28
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
29
+ finally {
30
+ try {
31
+ if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
32
+ }
33
+ finally { if (e_1) throw e_1.error; }
34
+ }
35
+ }
36
+ else {
37
+ _parentage.remove(this);
38
+ }
39
+ }
40
+ var initialFinalizer = this.initialTeardown;
41
+ if (isFunction(initialFinalizer)) {
42
+ try {
43
+ initialFinalizer();
44
+ }
45
+ catch (e) {
46
+ errors = e instanceof UnsubscriptionError ? e.errors : [e];
47
+ }
48
+ }
49
+ var _finalizers = this._finalizers;
50
+ if (_finalizers) {
51
+ this._finalizers = null;
52
+ try {
53
+ for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {
54
+ var finalizer = _finalizers_1_1.value;
55
+ try {
56
+ execFinalizer(finalizer);
57
+ }
58
+ catch (err) {
59
+ errors = errors !== null && errors !== void 0 ? errors : [];
60
+ if (err instanceof UnsubscriptionError) {
61
+ errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
62
+ }
63
+ else {
64
+ errors.push(err);
65
+ }
66
+ }
67
+ }
68
+ }
69
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
70
+ finally {
71
+ try {
72
+ if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);
73
+ }
74
+ finally { if (e_2) throw e_2.error; }
75
+ }
76
+ }
77
+ if (errors) {
78
+ throw new UnsubscriptionError(errors);
79
+ }
80
+ }
81
+ };
82
+ Subscription.prototype.add = function (teardown) {
83
+ var _a;
84
+ if (teardown && teardown !== this) {
85
+ if (this.closed) {
86
+ execFinalizer(teardown);
87
+ }
88
+ else {
89
+ if (teardown instanceof Subscription) {
90
+ if (teardown.closed || teardown._hasParent(this)) {
91
+ return;
92
+ }
93
+ teardown._addParent(this);
94
+ }
95
+ (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);
96
+ }
97
+ }
98
+ };
99
+ Subscription.prototype._hasParent = function (parent) {
100
+ var _parentage = this._parentage;
101
+ return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
102
+ };
103
+ Subscription.prototype._addParent = function (parent) {
104
+ var _parentage = this._parentage;
105
+ this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
106
+ };
107
+ Subscription.prototype._removeParent = function (parent) {
108
+ var _parentage = this._parentage;
109
+ if (_parentage === parent) {
110
+ this._parentage = null;
111
+ }
112
+ else if (Array.isArray(_parentage)) {
113
+ arrRemove(_parentage, parent);
114
+ }
115
+ };
116
+ Subscription.prototype.remove = function (teardown) {
117
+ var _finalizers = this._finalizers;
118
+ _finalizers && arrRemove(_finalizers, teardown);
119
+ if (teardown instanceof Subscription) {
120
+ teardown._removeParent(this);
121
+ }
122
+ };
123
+ Subscription.EMPTY = (function () {
124
+ var empty = new Subscription();
125
+ empty.closed = true;
126
+ return empty;
127
+ })();
128
+ return Subscription;
129
+ }());
130
+ var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
131
+ function isSubscription(value) {
132
+ return (value instanceof Subscription ||
133
+ (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));
134
+ }
135
+ function execFinalizer(finalizer) {
136
+ if (isFunction(finalizer)) {
137
+ finalizer();
138
+ }
139
+ else {
140
+ finalizer.unsubscribe();
141
+ }
142
+ }
143
+
144
+ export { EMPTY_SUBSCRIPTION, Subscription, isSubscription };
@@ -0,0 +1,4 @@
1
+ var config = {
2
+ Promise: undefined};
3
+
4
+ export { config };
@@ -0,0 +1,17 @@
1
+ import { __spreadArray, __read } from 'tslib';
2
+
3
+ var timeoutProvider = {
4
+ setTimeout: function (handler, timeout) {
5
+ var args = [];
6
+ for (var _i = 2; _i < arguments.length; _i++) {
7
+ args[_i - 2] = arguments[_i];
8
+ }
9
+ return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));
10
+ },
11
+ clearTimeout: function (handle) {
12
+ return (clearTimeout)(handle);
13
+ },
14
+ delegate: undefined,
15
+ };
16
+
17
+ export { timeoutProvider };
@@ -0,0 +1,3 @@
1
+ var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();
2
+
3
+ export { observable };
@@ -0,0 +1,11 @@
1
+ import { createErrorClass } from './createErrorClass.js';
2
+
3
+ var ObjectUnsubscribedError = createErrorClass(function (_super) {
4
+ return function ObjectUnsubscribedErrorImpl() {
5
+ _super(this);
6
+ this.name = 'ObjectUnsubscribedError';
7
+ this.message = 'object unsubscribed';
8
+ };
9
+ });
10
+
11
+ export { ObjectUnsubscribedError };
@@ -0,0 +1,14 @@
1
+ import { createErrorClass } from './createErrorClass.js';
2
+
3
+ var UnsubscriptionError = createErrorClass(function (_super) {
4
+ return function UnsubscriptionErrorImpl(errors) {
5
+ _super(this);
6
+ this.message = errors
7
+ ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ')
8
+ : '';
9
+ this.name = 'UnsubscriptionError';
10
+ this.errors = errors;
11
+ };
12
+ });
13
+
14
+ export { UnsubscriptionError };
@@ -0,0 +1,8 @@
1
+ function arrRemove(arr, item) {
2
+ if (arr) {
3
+ var index = arr.indexOf(item);
4
+ 0 <= index && arr.splice(index, 1);
5
+ }
6
+ }
7
+
8
+ export { arrRemove };
@@ -0,0 +1,12 @@
1
+ function createErrorClass(createImpl) {
2
+ var _super = function (instance) {
3
+ Error.call(instance);
4
+ instance.stack = new Error().stack;
5
+ };
6
+ var ctorFunc = createImpl(_super);
7
+ ctorFunc.prototype = Object.create(Error.prototype);
8
+ ctorFunc.prototype.constructor = ctorFunc;
9
+ return ctorFunc;
10
+ }
11
+
12
+ export { createErrorClass };
@@ -0,0 +1,7 @@
1
+ function errorContext(cb) {
2
+ {
3
+ cb();
4
+ }
5
+ }
6
+
7
+ export { errorContext };
@@ -0,0 +1,5 @@
1
+ function identity(x) {
2
+ return x;
3
+ }
4
+
5
+ export { identity };
@@ -0,0 +1,5 @@
1
+ function isFunction(value) {
2
+ return typeof value === 'function';
3
+ }
4
+
5
+ export { isFunction };
@@ -0,0 +1,3 @@
1
+ function noop() { }
2
+
3
+ export { noop };
@@ -0,0 +1,15 @@
1
+ import { identity } from './identity.js';
2
+
3
+ function pipeFromArray(fns) {
4
+ if (fns.length === 0) {
5
+ return identity;
6
+ }
7
+ if (fns.length === 1) {
8
+ return fns[0];
9
+ }
10
+ return function piped(input) {
11
+ return fns.reduce(function (prev, fn) { return fn(prev); }, input);
12
+ };
13
+ }
14
+
15
+ export { pipeFromArray };
@@ -0,0 +1,11 @@
1
+ import { timeoutProvider } from '../scheduler/timeoutProvider.js';
2
+
3
+ function reportUnhandledError(err) {
4
+ timeoutProvider.setTimeout(function () {
5
+ {
6
+ throw err;
7
+ }
8
+ });
9
+ }
10
+
11
+ export { reportUnhandledError };
@@ -0,0 +1,69 @@
1
+ import { __exports as useSyncExternalStoreShim_production } from '../../../_virtual/use-sync-external-store-shim.production.js';
2
+ import React__default from 'react';
3
+
4
+ /**
5
+ * @license React
6
+ * use-sync-external-store-shim.production.js
7
+ *
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+ var React = React__default;
14
+ function is(x, y) {
15
+ return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
16
+ }
17
+ var objectIs = "function" === typeof Object.is ? Object.is : is,
18
+ useState = React.useState,
19
+ useEffect = React.useEffect,
20
+ useLayoutEffect = React.useLayoutEffect,
21
+ useDebugValue = React.useDebugValue;
22
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
23
+ var value = getSnapshot(),
24
+ _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),
25
+ inst = _useState[0].inst,
26
+ forceUpdate = _useState[1];
27
+ useLayoutEffect(
28
+ function () {
29
+ inst.value = value;
30
+ inst.getSnapshot = getSnapshot;
31
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
32
+ },
33
+ [subscribe, value, getSnapshot]
34
+ );
35
+ useEffect(
36
+ function () {
37
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
38
+ return subscribe(function () {
39
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });
40
+ });
41
+ },
42
+ [subscribe]
43
+ );
44
+ useDebugValue(value);
45
+ return value;
46
+ }
47
+ function checkIfSnapshotChanged(inst) {
48
+ var latestGetSnapshot = inst.getSnapshot;
49
+ inst = inst.value;
50
+ try {
51
+ var nextValue = latestGetSnapshot();
52
+ return !objectIs(inst, nextValue);
53
+ } catch (error) {
54
+ return true;
55
+ }
56
+ }
57
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
58
+ return getSnapshot();
59
+ }
60
+ var shim =
61
+ "undefined" === typeof window ||
62
+ "undefined" === typeof window.document ||
63
+ "undefined" === typeof window.document.createElement
64
+ ? useSyncExternalStore$1
65
+ : useSyncExternalStore$2;
66
+ useSyncExternalStoreShim_production.useSyncExternalStore =
67
+ void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
68
+
69
+ export { useSyncExternalStoreShim_production as default };
@@ -0,0 +1,11 @@
1
+ import { __module as shim } from '../../../_virtual/index.js';
2
+ import '../cjs/use-sync-external-store-shim.production.js';
3
+ import { __exports as useSyncExternalStoreShim_production } from '../../../_virtual/use-sync-external-store-shim.production.js';
4
+
5
+ {
6
+ shim.exports = useSyncExternalStoreShim_production;
7
+ }
8
+
9
+ var shimExports = shim.exports;
10
+
11
+ export { shimExports as s };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-shared-utils",
3
- "version": "1.251120.1",
3
+ "version": "1.260128.0-rc.0",
4
4
  "description": "Shared typings for elice material projects",
5
5
  "repository": "https://git.elicer.io/elice/frontend/library/elice-material",
6
6
  "license": "UNLICENSED",
@@ -24,7 +24,8 @@
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@elice/api-client": "^1",
27
- "@elice/material-shared-types": "*",
27
+ "@elice/blocks": "^1",
28
+ "@elice/material-shared-types": "1.260128.0-rc.0",
28
29
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
29
30
  "react-use": "^17.0.0",
30
31
  "recoil": "^0"
@@ -35,8 +36,9 @@
35
36
  },
36
37
  "devDependencies": {
37
38
  "@elice/api-client": "^1.250702.0",
38
- "@elice/material-shared-types": "1.251120.1",
39
- "@elice/types": "^1.250612.0-teamleaderboard.1",
39
+ "@elice/blocks": "1.241007.0",
40
+ "@elice/material-shared-types": "1.260128.0-rc.0",
41
+ "@elice/types": "^1.251229.0",
40
42
  "@types/lodash-es": "^4.17.6",
41
43
  "@types/react": "~17.0.9",
42
44
  "react-use": "^17.2.4",