@flamingo-stack/openframe-frontend-core 0.0.195 → 0.0.197
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-4CWSZPXH.cjs.map +1 -1
- package/dist/{chunk-PJ5KFD2V.js → chunk-4ML3NA2L.js} +75 -1
- package/dist/{chunk-PJ5KFD2V.js.map → chunk-4ML3NA2L.js.map} +1 -1
- package/dist/{chunk-U6AJSRJP.js → chunk-GIQZAYY5.js} +731 -365
- package/dist/chunk-GIQZAYY5.js.map +1 -0
- package/dist/{chunk-IQM3G2I6.cjs → chunk-IMDXOVYD.cjs} +777 -411
- package/dist/chunk-IMDXOVYD.cjs.map +1 -0
- package/dist/{chunk-CVMSC7M4.cjs → chunk-OII2IERE.cjs} +77 -3
- package/dist/chunk-OII2IERE.cjs.map +1 -0
- package/dist/chunk-UC43NICZ.cjs.map +1 -1
- package/dist/chunk-V2FNIPZJ.cjs.map +1 -1
- package/dist/chunk-VJTFBYVG.cjs.map +1 -1
- package/dist/chunk-VRHGVLSL.cjs.map +1 -1
- package/dist/chunk-WZW7C7TF.cjs.map +1 -1
- package/dist/chunk-XQFFGR6U.cjs.map +1 -1
- package/dist/components/chart.d.ts +7 -14
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chat/hooks/index.d.ts +1 -0
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-jetstream-dialog-subscription.d.ts +15 -0
- package/dist/components/chat/hooks/use-jetstream-dialog-subscription.d.ts.map +1 -0
- package/dist/components/chat/types/api.types.d.ts +43 -0
- package/dist/components/chat/types/api.types.d.ts.map +1 -1
- package/dist/components/chat/types/network.types.d.ts +4 -0
- package/dist/components/chat/types/network.types.d.ts.map +1 -1
- package/dist/components/features/board/ticket-card-skeleton.d.ts.map +1 -1
- package/dist/components/features/board/ticket-card.d.ts.map +1 -1
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +2 -2
- package/dist/components/icons/index.cjs.map +1 -1
- package/dist/components/icons-v2-generated/index.cjs.map +1 -1
- package/dist/components/index.cjs +5 -3
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +4 -2
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/resizable.d.ts +1 -1
- package/dist/components/toast/index.cjs.map +1 -1
- package/dist/components/ui/file-manager/index.cjs.map +1 -1
- package/dist/components/ui/index.cjs +5 -3
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +4 -2
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/nats/index.cjs +73 -0
- package/dist/nats/index.cjs.map +1 -1
- package/dist/nats/index.js +73 -0
- package/dist/nats/index.js.map +1 -1
- package/dist/nats/nats.d.ts +22 -1
- package/dist/nats/nats.d.ts.map +1 -1
- package/dist/tailwind.config.cjs +7 -7
- package/dist/tailwind.config.cjs.map +1 -1
- package/dist/tailwind.config.js +7 -7
- package/dist/tailwind.config.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/hooks/index.ts +1 -0
- package/src/components/chat/hooks/use-jetstream-dialog-subscription.ts +474 -0
- package/src/components/chat/types/api.types.ts +45 -0
- package/src/components/chat/types/network.types.ts +4 -0
- package/src/components/features/board/ticket-card-skeleton.tsx +16 -4
- package/src/components/features/board/ticket-card.tsx +6 -4
- package/src/nats/nats.ts +117 -0
- package/dist/chunk-CVMSC7M4.cjs.map +0 -1
- package/dist/chunk-IQM3G2I6.cjs.map +0 -1
- package/dist/chunk-U6AJSRJP.js.map +0 -1
|
@@ -2992,6 +2992,79 @@ function createNatsClient(options) {
|
|
|
2992
2992
|
opts
|
|
2993
2993
|
);
|
|
2994
2994
|
}
|
|
2995
|
+
async function subscribeJetStreamOrdered(onMessage, opts) {
|
|
2996
|
+
const conn = requireConnection();
|
|
2997
|
+
if (_optionalChain([opts, 'access', _20 => _20.signal, 'optionalAccess', _21 => _21.aborted])) {
|
|
2998
|
+
return { unsubscribe() {
|
|
2999
|
+
} };
|
|
3000
|
+
}
|
|
3001
|
+
const nats = await importNats();
|
|
3002
|
+
if (_optionalChain([opts, 'access', _22 => _22.signal, 'optionalAccess', _23 => _23.aborted])) {
|
|
3003
|
+
return { unsubscribe() {
|
|
3004
|
+
} };
|
|
3005
|
+
}
|
|
3006
|
+
const inactiveThresholdNs = (_nullishCoalesce(opts.inactiveThresholdMs, () => ( 5 * 6e4))) * 1e6;
|
|
3007
|
+
const js = conn.jetstream();
|
|
3008
|
+
const consumer = await js.consumers.get(opts.streamName, {
|
|
3009
|
+
filterSubjects: opts.filterSubject,
|
|
3010
|
+
deliver_policy: nats.DeliverPolicy.StartSequence,
|
|
3011
|
+
opt_start_seq: _nullishCoalesce(opts.optStartSeq, () => ( 0)),
|
|
3012
|
+
inactive_threshold: inactiveThresholdNs
|
|
3013
|
+
});
|
|
3014
|
+
const iterRef = { current: null };
|
|
3015
|
+
let closed = false;
|
|
3016
|
+
const onAbort = () => {
|
|
3017
|
+
void teardown();
|
|
3018
|
+
};
|
|
3019
|
+
_optionalChain([opts, 'access', _24 => _24.signal, 'optionalAccess', _25 => _25.addEventListener, 'call', _26 => _26("abort", onAbort, { once: true })]);
|
|
3020
|
+
async function teardown() {
|
|
3021
|
+
if (closed) return;
|
|
3022
|
+
closed = true;
|
|
3023
|
+
_optionalChain([opts, 'access', _27 => _27.signal, 'optionalAccess', _28 => _28.removeEventListener, 'call', _29 => _29("abort", onAbort)]);
|
|
3024
|
+
const iter = iterRef.current;
|
|
3025
|
+
iterRef.current = null;
|
|
3026
|
+
if (iter) {
|
|
3027
|
+
try {
|
|
3028
|
+
await iter.close();
|
|
3029
|
+
} catch (e10) {
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
if (_optionalChain([opts, 'access', _30 => _30.signal, 'optionalAccess', _31 => _31.aborted])) {
|
|
3034
|
+
void teardown();
|
|
3035
|
+
return { unsubscribe() {
|
|
3036
|
+
} };
|
|
3037
|
+
}
|
|
3038
|
+
;
|
|
3039
|
+
(async () => {
|
|
3040
|
+
try {
|
|
3041
|
+
const iter = await consumer.consume();
|
|
3042
|
+
if (closed) {
|
|
3043
|
+
try {
|
|
3044
|
+
await iter.close();
|
|
3045
|
+
} catch (e11) {
|
|
3046
|
+
}
|
|
3047
|
+
return;
|
|
3048
|
+
}
|
|
3049
|
+
iterRef.current = iter;
|
|
3050
|
+
for await (const msg of iter) {
|
|
3051
|
+
if (closed) break;
|
|
3052
|
+
try {
|
|
3053
|
+
await onMessage(msg);
|
|
3054
|
+
} catch (e) {
|
|
3055
|
+
emitStatus({ status: "error", data: e });
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
} catch (e) {
|
|
3059
|
+
if (!closed) emitStatus({ status: "error", data: e });
|
|
3060
|
+
}
|
|
3061
|
+
})().catch((e) => emitStatus({ status: "error", data: e }));
|
|
3062
|
+
return {
|
|
3063
|
+
unsubscribe() {
|
|
3064
|
+
void teardown();
|
|
3065
|
+
}
|
|
3066
|
+
};
|
|
3067
|
+
}
|
|
2995
3068
|
function onStatus(listener) {
|
|
2996
3069
|
statusListeners.add(listener);
|
|
2997
3070
|
return () => statusListeners.delete(listener);
|
|
@@ -3009,6 +3082,7 @@ function createNatsClient(options) {
|
|
|
3009
3082
|
subscribeBytes,
|
|
3010
3083
|
subscribeString,
|
|
3011
3084
|
subscribeJson,
|
|
3085
|
+
subscribeJetStreamOrdered,
|
|
3012
3086
|
onStatus
|
|
3013
3087
|
};
|
|
3014
3088
|
}
|
|
@@ -3086,7 +3160,7 @@ function useNearViewport(rootMargin = "500px") {
|
|
|
3086
3160
|
const stillOurs = subscribers.get(prev);
|
|
3087
3161
|
if (stillOurs) {
|
|
3088
3162
|
subscribers.delete(prev);
|
|
3089
|
-
_optionalChain([observers, 'access',
|
|
3163
|
+
_optionalChain([observers, 'access', _32 => _32.get, 'call', _33 => _33(rootMargin), 'optionalAccess', _34 => _34.unobserve, 'call', _35 => _35(prev)]);
|
|
3090
3164
|
}
|
|
3091
3165
|
}
|
|
3092
3166
|
elRef.current = node;
|
|
@@ -3103,7 +3177,7 @@ function useNearViewport(rootMargin = "500px") {
|
|
|
3103
3177
|
if (!el) return;
|
|
3104
3178
|
if (subscribers.get(el)) {
|
|
3105
3179
|
subscribers.delete(el);
|
|
3106
|
-
_optionalChain([observers, 'access',
|
|
3180
|
+
_optionalChain([observers, 'access', _36 => _36.get, 'call', _37 => _37(rootMargin), 'optionalAccess', _38 => _38.unobserve, 'call', _39 => _39(el)]);
|
|
3107
3181
|
}
|
|
3108
3182
|
};
|
|
3109
3183
|
}, [rootMargin]);
|
|
@@ -3194,4 +3268,4 @@ function useNearViewport(rootMargin = "500px") {
|
|
|
3194
3268
|
|
|
3195
3269
|
|
|
3196
3270
|
exports.useAutoLimitTags = useAutoLimitTags; 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.ToolTypeValues = ToolTypeValues; exports.toolLabels = toolLabels; 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.usePlatformConfig = usePlatformConfig; exports.usePlatformByValue = usePlatformByValue; exports.useValidatePlatform = useValidatePlatform; 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.createNatsClient = createNatsClient; exports.useNatsClient = useNatsClient; exports.useNearViewport = useNearViewport;
|
|
3197
|
-
//# sourceMappingURL=chunk-
|
|
3271
|
+
//# sourceMappingURL=chunk-OII2IERE.cjs.map
|