@flamingo-stack/openframe-frontend-core 0.0.227 → 0.0.228
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/{chunk-E3DB4D43.cjs → chunk-6PWR6K2K.cjs} +9 -9
- package/dist/{chunk-E3DB4D43.cjs.map → chunk-6PWR6K2K.cjs.map} +1 -1
- package/dist/{chunk-K252FYE5.js → chunk-G6EKFWIC.js} +2213 -2192
- package/dist/chunk-G6EKFWIC.js.map +1 -0
- package/dist/{chunk-JUWPBMQM.cjs → chunk-GYRRSOTR.cjs} +50 -2
- package/dist/chunk-GYRRSOTR.cjs.map +1 -0
- package/dist/{chunk-LEM4FLCU.cjs → chunk-HLKC2OBT.cjs} +12 -12
- package/dist/{chunk-LEM4FLCU.cjs.map → chunk-HLKC2OBT.cjs.map} +1 -1
- package/dist/{chunk-QFC725WU.cjs → chunk-L65QBRV5.cjs} +59 -38
- package/dist/chunk-L65QBRV5.cjs.map +1 -0
- package/dist/{chunk-53EA4QPZ.js → chunk-LLTUSEHF.js} +50 -2
- package/dist/chunk-LLTUSEHF.js.map +1 -0
- package/dist/{chunk-CUBRHI6D.js → chunk-LWJJP64X.js} +3 -3
- package/dist/{chunk-X3KKG6IU.js → chunk-MT5GO55P.js} +2 -2
- package/dist/{chunk-EURLSRHW.js → chunk-QLOU4BDD.js} +10 -5
- package/dist/chunk-QLOU4BDD.js.map +1 -0
- package/dist/{chunk-HO2VEMEX.cjs → chunk-TAWNR7IW.cjs} +32 -27
- package/dist/chunk-TAWNR7IW.cjs.map +1 -0
- package/dist/{chunk-E3WJQQGW.cjs → chunk-VXYYZFVV.cjs} +7 -7
- package/dist/{chunk-E3WJQQGW.cjs.map → chunk-VXYYZFVV.cjs.map} +1 -1
- package/dist/{chunk-YE62NF6I.js → chunk-WLCBY6ZO.js} +2 -2
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/contact-form.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/features/waitlist-form.d.ts +6 -3
- package/dist/components/features/waitlist-form.d.ts.map +1 -1
- package/dist/components/index.cjs +81 -79
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +7 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/onboarding-guides/index.cjs +26 -26
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/tickets/index.cjs +67 -67
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/honeypot-field.d.ts +18 -0
- package/dist/components/ui/honeypot-field.d.ts.map +1 -0
- package/dist/components/ui/index.cjs +5 -3
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +4 -2
- package/dist/hooks/index.cjs +4 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -1
- package/dist/hooks/use-humanity-signals.d.ts +26 -0
- package/dist/hooks/use-humanity-signals.d.ts.map +1 -0
- package/dist/index.cjs +19 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +18 -2
- package/dist/utils/humanity-signals.cjs +30 -0
- package/dist/utils/humanity-signals.cjs.map +1 -0
- package/dist/utils/humanity-signals.d.ts +45 -0
- package/dist/utils/humanity-signals.d.ts.map +1 -0
- package/dist/utils/humanity-signals.js +23 -0
- package/dist/utils/humanity-signals.js.map +1 -0
- package/dist/utils/index.cjs +26 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +21 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +7 -1
- package/src/components/contact/contact-form.tsx +11 -1
- package/src/components/features/waitlist-form.tsx +14 -4
- package/src/components/ui/honeypot-field.tsx +30 -0
- package/src/components/ui/index.ts +1 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/use-humanity-signals.ts +47 -0
- package/src/utils/humanity-signals.ts +57 -0
- package/src/utils/index.ts +6 -0
- package/dist/chunk-53EA4QPZ.js.map +0 -1
- package/dist/chunk-EURLSRHW.js.map +0 -1
- package/dist/chunk-HO2VEMEX.cjs.map +0 -1
- package/dist/chunk-JUWPBMQM.cjs.map +0 -1
- package/dist/chunk-K252FYE5.js.map +0 -1
- package/dist/chunk-QFC725WU.cjs.map +0 -1
- /package/dist/{chunk-CUBRHI6D.js.map → chunk-LWJJP64X.js.map} +0 -0
- /package/dist/{chunk-X3KKG6IU.js.map → chunk-MT5GO55P.js.map} +0 -0
- /package/dist/{chunk-YE62NF6I.js.map → chunk-WLCBY6ZO.js.map} +0 -0
|
@@ -2967,6 +2967,54 @@ function useOgPlaceholder(buildUrl, title, siteName = "", enabled = true, aspect
|
|
|
2967
2967
|
}, [buildUrl, title, siteName, enabled, aspect]);
|
|
2968
2968
|
}
|
|
2969
2969
|
|
|
2970
|
+
// src/hooks/use-humanity-signals.ts
|
|
2971
|
+
|
|
2972
|
+
|
|
2973
|
+
// src/utils/humanity-signals.ts
|
|
2974
|
+
var HONEYPOT_FIELD = "contact_url_confirm";
|
|
2975
|
+
var ELAPSED_MS_FIELD = "form_elapsed_ms";
|
|
2976
|
+
var DEFAULT_MIN_FILL_MS = 700;
|
|
2977
|
+
function extractHumanitySignals(body) {
|
|
2978
|
+
const b = _nullishCoalesce(body, () => ( {}));
|
|
2979
|
+
const rawHp = b[HONEYPOT_FIELD];
|
|
2980
|
+
const honeypot = rawHp == null ? "" : String(rawHp);
|
|
2981
|
+
const rawMs = b[ELAPSED_MS_FIELD];
|
|
2982
|
+
const elapsedMs = typeof rawMs === "number" && Number.isFinite(rawMs) ? rawMs : null;
|
|
2983
|
+
return { honeypot, elapsedMs };
|
|
2984
|
+
}
|
|
2985
|
+
function evaluateHumanitySignals(body, opts) {
|
|
2986
|
+
const { honeypot, elapsedMs } = extractHumanitySignals(body);
|
|
2987
|
+
if (honeypot.trim() !== "") return { ok: false, reason: "honeypot" };
|
|
2988
|
+
if (elapsedMs !== null && elapsedMs < opts.minFillMs) return { ok: false, reason: "too_fast" };
|
|
2989
|
+
return { ok: true };
|
|
2990
|
+
}
|
|
2991
|
+
var splitCsvEnv = (s) => _nullishCoalesce(_optionalChain([s, 'optionalAccess', _19 => _19.split, 'call', _20 => _20(","), 'access', _21 => _21.map, 'call', _22 => _22((t) => t.trim()), 'access', _23 => _23.filter, 'call', _24 => _24(Boolean)]), () => ( []));
|
|
2992
|
+
|
|
2993
|
+
// src/hooks/use-humanity-signals.ts
|
|
2994
|
+
function useHumanitySignals() {
|
|
2995
|
+
const ref = _react.useRef.call(void 0, null);
|
|
2996
|
+
const mountedAt = _react.useRef.call(void 0, typeof performance !== "undefined" ? performance.now() : 0);
|
|
2997
|
+
const getSignals = _react.useCallback.call(void 0,
|
|
2998
|
+
() => ({
|
|
2999
|
+
[HONEYPOT_FIELD]: _nullishCoalesce(_optionalChain([ref, 'access', _25 => _25.current, 'optionalAccess', _26 => _26.value]), () => ( "")),
|
|
3000
|
+
[ELAPSED_MS_FIELD]: typeof performance !== "undefined" ? Math.round(performance.now() - mountedAt.current) : 0
|
|
3001
|
+
}),
|
|
3002
|
+
[]
|
|
3003
|
+
);
|
|
3004
|
+
const resetSignals = _react.useCallback.call(void 0, () => {
|
|
3005
|
+
if (ref.current) ref.current.value = "";
|
|
3006
|
+
if (typeof performance !== "undefined") mountedAt.current = performance.now();
|
|
3007
|
+
}, []);
|
|
3008
|
+
return { honeypotInputProps: { ref, name: HONEYPOT_FIELD }, getSignals, resetSignals };
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
|
|
3012
|
+
|
|
3013
|
+
|
|
3014
|
+
|
|
3015
|
+
|
|
3016
|
+
|
|
3017
|
+
|
|
2970
3018
|
|
|
2971
3019
|
|
|
2972
3020
|
|
|
@@ -3054,5 +3102,5 @@ function useOgPlaceholder(buildUrl, title, siteName = "", enabled = true, aspect
|
|
|
3054
3102
|
|
|
3055
3103
|
|
|
3056
3104
|
|
|
3057
|
-
exports.useAutoLimitTags = useAutoLimitTags; exports.useDebounce = useDebounce; exports.useLocalStorage = useLocalStorage; exports.useMediaQuery = useMediaQuery; exports.breakpoints = breakpoints; exports.useSmUp = useSmUp; exports.useMdUp = useMdUp; exports.useLgUp = useLgUp; exports.useMemoizedCallback = useMemoizedCallback; exports.useOnboardingState = useOnboardingState; exports.useTablePagination = useTablePagination; exports.useThrottle = useThrottle; exports.useWindowSize = useWindowSize; exports.useHorizontalScrollbar = useHorizontalScrollbar; exports.useImageEdgeColor = useImageEdgeColor; exports.useSearch = useSearch; exports.platformIcons = platformIcons; exports.platformColors = platformColors; exports.platformDisplayNames = platformDisplayNames; exports.platformDescriptions = platformDescriptions; exports.platformSlogans = platformSlogans; exports.platformHexColors = platformHexColors; exports.platformIconNames = platformIconNames; exports.getDefaultColorForPlatform = getDefaultColorForPlatform; exports.getDefaultIconForPlatform = getDefaultIconForPlatform; exports.transformPlatformConfigsToOptions = transformPlatformConfigsToOptions; exports.getPlatformIcon = getPlatformIcon; exports.getPlatformColor = getPlatformColor; exports.getPlatformDisplayName = getPlatformDisplayName; exports.getPlatformDescription = getPlatformDescription; exports.getPlatformSlogan = getPlatformSlogan; exports.getSmallPlatformIcon = getSmallPlatformIcon; exports.getPlatformIconComponent = getPlatformIconComponent; exports.usePlatformConfig = usePlatformConfig; exports.usePlatformByValue = usePlatformByValue; exports.useValidatePlatform = useValidatePlatform; exports.ToolTypeValues = ToolTypeValues; exports.toolLabels = toolLabels; exports.ToolIcon = ToolIcon; exports.dotColorByVariant = dotColorByVariant; exports.progressColorByVariant = progressColorByVariant; exports.ToastCard = ToastCard; exports.CommandApprovalToast = CommandApprovalToast; exports.Toaster = Toaster; exports.showToast = showToast; exports.showCommandApprovalToast = showCommandApprovalToast; exports.toast = toast; exports.useToast = useToast; exports.useContactSubmission = useContactSubmission; exports.useQuickActionHint = useQuickActionHint; exports.useCopyToClipboard = useCopyToClipboard; exports.configureBatchImageFetch = configureBatchImageFetch; exports.batchFetchAuthenticatedImages = batchFetchAuthenticatedImages; exports.useBatchImages = useBatchImages; exports.configureAuthenticatedImage = configureAuthenticatedImage; exports.useAuthenticatedImage = useAuthenticatedImage; exports.extractVariablesFromQuery = extractVariablesFromQuery; exports.isScalarType = isScalarType; exports.isInputObjectType = isInputObjectType; exports.flattenQueryVariables = flattenQueryVariables; exports.mergeDefaults = mergeDefaults; exports.validateSchema = validateSchema; exports.getArrayParams = getArrayParams; exports.getRequiredParams = getRequiredParams; exports.shouldIncludeInUrl = shouldIncludeInUrl; exports.urlParamsToVariables = urlParamsToVariables; exports.variablesToUrlParams = variablesToUrlParams; exports.coerceValue = coerceValue; exports.setNestedValue = setNestedValue; exports.getNestedValue = getNestedValue; exports.mergeVariables = mergeVariables; exports.clearParams = clearParams; exports.validateVariables = validateVariables; exports.GraphQLIntrospector = GraphQLIntrospector; exports.introspector = introspector; exports.useQueryParams = useQueryParams; exports.useApiParams = useApiParams; exports.createSearchParams = createSearchParams; exports.useCursorPaginationState = useCursorPaginationState; exports.useNatsClient = useNatsClient; exports.useNearViewport = useNearViewport; exports.validateAccessCode = validateAccessCode; exports.consumeAccessCode = consumeAccessCode; exports.validateAndConsumeAccessCode = validateAndConsumeAccessCode; exports.useAccessCodeIntegration = useAccessCodeIntegration; exports.useOgPlaceholder = useOgPlaceholder;
|
|
3058
|
-
//# sourceMappingURL=chunk-
|
|
3105
|
+
exports.useAutoLimitTags = useAutoLimitTags; exports.useDebounce = useDebounce; exports.useLocalStorage = useLocalStorage; exports.useMediaQuery = useMediaQuery; exports.breakpoints = breakpoints; exports.useSmUp = useSmUp; exports.useMdUp = useMdUp; exports.useLgUp = useLgUp; exports.useMemoizedCallback = useMemoizedCallback; exports.useOnboardingState = useOnboardingState; exports.useTablePagination = useTablePagination; exports.useThrottle = useThrottle; exports.useWindowSize = useWindowSize; exports.useHorizontalScrollbar = useHorizontalScrollbar; exports.useImageEdgeColor = useImageEdgeColor; exports.useSearch = useSearch; exports.platformIcons = platformIcons; exports.platformColors = platformColors; exports.platformDisplayNames = platformDisplayNames; exports.platformDescriptions = platformDescriptions; exports.platformSlogans = platformSlogans; exports.platformHexColors = platformHexColors; exports.platformIconNames = platformIconNames; exports.getDefaultColorForPlatform = getDefaultColorForPlatform; exports.getDefaultIconForPlatform = getDefaultIconForPlatform; exports.transformPlatformConfigsToOptions = transformPlatformConfigsToOptions; exports.getPlatformIcon = getPlatformIcon; exports.getPlatformColor = getPlatformColor; exports.getPlatformDisplayName = getPlatformDisplayName; exports.getPlatformDescription = getPlatformDescription; exports.getPlatformSlogan = getPlatformSlogan; exports.getSmallPlatformIcon = getSmallPlatformIcon; exports.getPlatformIconComponent = getPlatformIconComponent; exports.usePlatformConfig = usePlatformConfig; exports.usePlatformByValue = usePlatformByValue; exports.useValidatePlatform = useValidatePlatform; exports.ToolTypeValues = ToolTypeValues; exports.toolLabels = toolLabels; exports.ToolIcon = ToolIcon; exports.dotColorByVariant = dotColorByVariant; exports.progressColorByVariant = progressColorByVariant; exports.ToastCard = ToastCard; exports.CommandApprovalToast = CommandApprovalToast; exports.Toaster = Toaster; exports.showToast = showToast; exports.showCommandApprovalToast = showCommandApprovalToast; exports.toast = toast; exports.useToast = useToast; exports.useContactSubmission = useContactSubmission; exports.useQuickActionHint = useQuickActionHint; exports.useCopyToClipboard = useCopyToClipboard; exports.configureBatchImageFetch = configureBatchImageFetch; exports.batchFetchAuthenticatedImages = batchFetchAuthenticatedImages; exports.useBatchImages = useBatchImages; exports.configureAuthenticatedImage = configureAuthenticatedImage; exports.useAuthenticatedImage = useAuthenticatedImage; exports.extractVariablesFromQuery = extractVariablesFromQuery; exports.isScalarType = isScalarType; exports.isInputObjectType = isInputObjectType; exports.flattenQueryVariables = flattenQueryVariables; exports.mergeDefaults = mergeDefaults; exports.validateSchema = validateSchema; exports.getArrayParams = getArrayParams; exports.getRequiredParams = getRequiredParams; exports.shouldIncludeInUrl = shouldIncludeInUrl; exports.urlParamsToVariables = urlParamsToVariables; exports.variablesToUrlParams = variablesToUrlParams; exports.coerceValue = coerceValue; exports.setNestedValue = setNestedValue; exports.getNestedValue = getNestedValue; exports.mergeVariables = mergeVariables; exports.clearParams = clearParams; exports.validateVariables = validateVariables; exports.GraphQLIntrospector = GraphQLIntrospector; exports.introspector = introspector; exports.useQueryParams = useQueryParams; exports.useApiParams = useApiParams; exports.createSearchParams = createSearchParams; exports.useCursorPaginationState = useCursorPaginationState; exports.useNatsClient = useNatsClient; exports.useNearViewport = useNearViewport; exports.validateAccessCode = validateAccessCode; exports.consumeAccessCode = consumeAccessCode; exports.validateAndConsumeAccessCode = validateAndConsumeAccessCode; exports.useAccessCodeIntegration = useAccessCodeIntegration; exports.useOgPlaceholder = useOgPlaceholder; exports.HONEYPOT_FIELD = HONEYPOT_FIELD; exports.ELAPSED_MS_FIELD = ELAPSED_MS_FIELD; exports.DEFAULT_MIN_FILL_MS = DEFAULT_MIN_FILL_MS; exports.extractHumanitySignals = extractHumanitySignals; exports.evaluateHumanitySignals = evaluateHumanitySignals; exports.splitCsvEnv = splitCsvEnv; exports.useHumanitySignals = useHumanitySignals;
|
|
3106
|
+
//# sourceMappingURL=chunk-GYRRSOTR.cjs.map
|