@refraction-ui/react 0.9.1 → 0.9.3
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/form.cjs +1 -0
- package/dist/form.js +1 -0
- package/dist/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/analytics/index.d.cts +11 -1
- package/dist/internal/analytics/index.d.ts +11 -1
- package/dist/internal/react-analytics/index.d.cts +4 -1
- package/dist/internal/react-analytics/index.d.ts +4 -1
- package/dist/theme.cjs +1 -0
- package/dist/theme.js +1 -0
- package/package.json +2 -2
package/dist/form.cjs
CHANGED
package/dist/form.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
'use strict';
|
|
2
3
|
|
|
3
4
|
var React11 = require('react');
|
|
@@ -45403,6 +45404,10 @@ async function startSessionReplay(options) {
|
|
|
45403
45404
|
|
|
45404
45405
|
// ../react-analytics/dist/index.js
|
|
45405
45406
|
var AnalyticsContext = React11__namespace.createContext(null);
|
|
45407
|
+
var noopAnalytics = null;
|
|
45408
|
+
function getNoopAnalytics() {
|
|
45409
|
+
return noopAnalytics ??= createNoopAnalytics();
|
|
45410
|
+
}
|
|
45406
45411
|
function AnalyticsProvider({ children, value }) {
|
|
45407
45412
|
const analyticsRef = React11__namespace.useRef(null);
|
|
45408
45413
|
if (!analyticsRef.current) {
|
|
@@ -45416,17 +45421,18 @@ function AnalyticsProvider({ children, value }) {
|
|
|
45416
45421
|
}
|
|
45417
45422
|
function useAnalytics(options) {
|
|
45418
45423
|
const ctx = React11__namespace.useContext(AnalyticsContext);
|
|
45419
|
-
|
|
45424
|
+
let base = ctx;
|
|
45425
|
+
if (!base) {
|
|
45420
45426
|
devWarn(
|
|
45421
45427
|
"react-analytics/use-analytics-outside-provider",
|
|
45422
|
-
"useAnalytics() was called outside an <AnalyticsProvider>.
|
|
45428
|
+
"useAnalytics() (or useTrackEvent()) was called outside an <AnalyticsProvider>. Analytics is a no-op here; wrap your app (or the consuming subtree) in <AnalyticsProvider> to enable it."
|
|
45423
45429
|
);
|
|
45424
|
-
|
|
45430
|
+
base = getNoopAnalytics();
|
|
45425
45431
|
}
|
|
45426
45432
|
const scope = options?.scope;
|
|
45427
45433
|
return React11__namespace.useMemo(
|
|
45428
|
-
() => scope ?
|
|
45429
|
-
[
|
|
45434
|
+
() => scope ? base.with(scope) : base,
|
|
45435
|
+
[base, scope]
|
|
45430
45436
|
);
|
|
45431
45437
|
}
|
|
45432
45438
|
function useTrackEvent(options) {
|