Problem: the hexagonal refactor churns the backend tree for nine more phases; the UI delivery stack (web/ SPA, cmd/desktop Wails wrapper, compose/web image) must move to its own repo first so doc/layout rewrites land once on a backend-only tree. Change: - New repo git.hubris.network/dtoro/oikos-web (v0.33.0): web/, desktop/ (updateURL repointed to oikos-web releases), compose/, own CI (web + desktop jobs), own deploy script (CI-green gate, TOCTOU guard, version-tagged images, prune-to-3), own webhook receiver on :9798 + launchd unit, own compose project publishing the same 8091:80. - Cutover executed on mac-mini in order: oikos stack's web service stopped+removed, oikos-web project brought up on 8091; outer Caddy untouched (targets the published port) — serving + Authentik flow + /wails 404 quirk verified post-cutover. - Stripped from oikos: web/, cmd/desktop/, compose/web/, desktop CI workflow, ci.yml web job, Makefile ui/desktop/desktop-package/install targets, the compose web service, oikos-web from deploy.sh's fallback prune list; wails + go-keyring dropped from go.mod, vendor synced. - README / CONTRIBUTING / AGENTS.md / .agents dev+operations docs now point at the new repo; mbse + mascot design docs carry a path note. Risk: production SPA serving depends on the new pipeline now; rollback is versioned-image re-up of the old web service from a pre-split checkout (port 8091). Desktop builds installed before the split still check dtoro/oikos releases — one manual reinstall, noted in the oikos-web release notes. Verification: go vet, make test (race), make generate-check, golangci (no new findings; baseline down 400→365); post-cutover curls — localhost:8091 200, /wails/runtime.js 404, outer Caddy 302 Authentik.
106 lines
3.1 KiB
TypeScript
106 lines
3.1 KiB
TypeScript
export declare type AlignedPlacement = `${Side}-${Alignment}`;
|
|
|
|
export declare type Alignment = 'start' | 'end';
|
|
|
|
export declare const alignments: Alignment[];
|
|
|
|
export declare type Axis = 'x' | 'y';
|
|
|
|
export declare function clamp(start: number, value: number, end: number): number;
|
|
|
|
export declare type ClientRectObject = Prettify<Rect & SideObject>;
|
|
|
|
export declare type Coords = {
|
|
[key in Axis]: number;
|
|
};
|
|
|
|
export declare const createCoords: (v: number) => {
|
|
x: number;
|
|
y: number;
|
|
};
|
|
|
|
export declare type Dimensions = {
|
|
[key in Length]: number;
|
|
};
|
|
|
|
export declare interface ElementRects {
|
|
reference: Rect;
|
|
floating: Rect;
|
|
}
|
|
|
|
export declare function evaluate<T, P>(value: T | ((param: P) => T), param: P): T;
|
|
|
|
export declare function expandPaddingObject(padding: Exclude<Padding, number>): SideObject;
|
|
|
|
export declare const floor: (x: number) => number;
|
|
|
|
export declare function getAlignment(placement: Placement): Alignment | undefined;
|
|
|
|
export declare function getAlignmentAxis(placement: Placement): Axis;
|
|
|
|
export declare function getAlignmentSides(placement: Placement, rects: ElementRects, rtl?: boolean): [Side, Side];
|
|
|
|
export declare function getAxisLength(axis: Axis): Length;
|
|
|
|
export declare function getExpandedPlacements(placement: Placement): Array<Placement>;
|
|
|
|
export declare function getOppositeAlignmentPlacement<T extends string>(placement: T): T;
|
|
|
|
export declare function getOppositeAxis(axis: Axis): Axis;
|
|
|
|
export declare function getOppositeAxisPlacements(placement: Placement, flipAlignment: boolean, direction: 'none' | Alignment, rtl?: boolean): Placement[];
|
|
|
|
export declare function getOppositePlacement<T extends string>(placement: T): T;
|
|
|
|
export declare function getPaddingObject(padding: Padding): SideObject;
|
|
|
|
export declare function getSide(placement: Placement): Side;
|
|
|
|
export declare function getSideAxis(placement: Placement): Axis;
|
|
|
|
export declare type Length = 'width' | 'height';
|
|
|
|
export declare const max: (...values: number[]) => number;
|
|
|
|
export declare const min: (...values: number[]) => number;
|
|
|
|
export declare type Padding = number | Prettify<{
|
|
[K in Side]?: number | undefined;
|
|
}>;
|
|
|
|
export declare type Placement = Prettify<Side | AlignedPlacement>;
|
|
|
|
export declare const placements: Placement[];
|
|
|
|
declare type Prettify<T> = {
|
|
[K in keyof T]: T[K];
|
|
} & {};
|
|
|
|
export declare type Rect = Prettify<Coords & Dimensions>;
|
|
|
|
export declare function rectToClientRect(rect: Rect): ClientRectObject;
|
|
|
|
export declare const round: (x: number) => number;
|
|
|
|
export declare type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
|
|
export declare type SideObject = {
|
|
[key in Side]: number;
|
|
};
|
|
|
|
export declare const sides: Side[];
|
|
|
|
export declare type Strategy = 'absolute' | 'fixed';
|
|
|
|
/**
|
|
* Custom positioning reference element.
|
|
* @see https://floating-ui.com/docs/virtual-elements
|
|
*/
|
|
export declare interface VirtualElement {
|
|
getBoundingClientRect(): ClientRectObject;
|
|
getClientRects?: (() => Array<ClientRectObject>) | undefined;
|
|
contextElement?: any;
|
|
}
|
|
|
|
export { }
|