Files
headroom/frontend/node_modules/effect/dist/esm/internal/channel/mergeState.js
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

69 lines
1.7 KiB
JavaScript

import { dual } from "../../Function.js";
import { hasProperty } from "../../Predicate.js";
import * as OpCodes from "../opCodes/channelMergeState.js";
/** @internal */
const MergeStateSymbolKey = "effect/ChannelMergeState";
/** @internal */
export const MergeStateTypeId = /*#__PURE__*/Symbol.for(MergeStateSymbolKey);
/** @internal */
const proto = {
[MergeStateTypeId]: MergeStateTypeId
};
/** @internal */
export const BothRunning = (left, right) => {
const op = Object.create(proto);
op._tag = OpCodes.OP_BOTH_RUNNING;
op.left = left;
op.right = right;
return op;
};
/** @internal */
export const LeftDone = f => {
const op = Object.create(proto);
op._tag = OpCodes.OP_LEFT_DONE;
op.f = f;
return op;
};
/** @internal */
export const RightDone = f => {
const op = Object.create(proto);
op._tag = OpCodes.OP_RIGHT_DONE;
op.f = f;
return op;
};
/** @internal */
export const isMergeState = u => hasProperty(u, MergeStateTypeId);
/** @internal */
export const isBothRunning = self => {
return self._tag === OpCodes.OP_BOTH_RUNNING;
};
/** @internal */
export const isLeftDone = self => {
return self._tag === OpCodes.OP_LEFT_DONE;
};
/** @internal */
export const isRightDone = self => {
return self._tag === OpCodes.OP_RIGHT_DONE;
};
/** @internal */
export const match = /*#__PURE__*/dual(2, (self, {
onBothRunning,
onLeftDone,
onRightDone
}) => {
switch (self._tag) {
case OpCodes.OP_BOTH_RUNNING:
{
return onBothRunning(self.left, self.right);
}
case OpCodes.OP_LEFT_DONE:
{
return onLeftDone(self.f);
}
case OpCodes.OP_RIGHT_DONE:
{
return onRightDone(self.f);
}
}
});
//# sourceMappingURL=mergeState.js.map