Files
headroom/frontend/node_modules/@ark/schema/out/refinements/min.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

40 lines
1.2 KiB
JavaScript

import { implementNode } from "../shared/implement.js";
import { $ark } from "../shared/registry.js";
import { BaseRange, parseExclusiveKey } from "./range.js";
const implementation = implementNode({
kind: "min",
collapsibleKey: "rule",
hasAssociatedError: true,
keys: {
rule: {},
exclusive: parseExclusiveKey
},
normalize: schema => typeof schema === "number" ? { rule: schema } : schema,
defaults: {
description: node => {
if (node.rule === 0)
return node.exclusive ? "positive" : "non-negative";
return `${node.exclusive ? "more than" : "at least"} ${node.rule}`;
}
},
intersections: {
min: (l, r) => (l.isStricterThan(r) ? l : r)
},
obviatesBasisDescription: true
});
export class MinNode extends BaseRange {
impliedBasis = $ark.intrinsic.number.internal;
traverseAllows = this.exclusive ? data => data > this.rule : data => data >= this.rule;
reduceJsonSchema(schema) {
if (this.exclusive)
schema.exclusiveMinimum = this.rule;
else
schema.minimum = this.rule;
return schema;
}
}
export const Min = {
implementation,
Node: MinNode
};