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.
141 lines
5.6 KiB
TypeScript
141 lines
5.6 KiB
TypeScript
import { type ReadableBox, type ReadableBoxedValues, type WritableBoxedValues } from "svelte-toolbelt";
|
|
import type { InteractOutsideBehaviorType } from "../utilities/dismissible-layer/types.js";
|
|
import type { Direction } from "../../shared/index.js";
|
|
import type { OnChangeFn, RefAttachment, WithRefOpts } from "../../internal/types.js";
|
|
import type { FocusEventHandler, KeyboardEventHandler, PointerEventHandler } from "svelte/elements";
|
|
import { RovingFocusGroup } from "../../internal/roving-focus-group.js";
|
|
interface MenubarRootStateOpts extends WithRefOpts, ReadableBoxedValues<{
|
|
dir: Direction;
|
|
loop: boolean;
|
|
}>, WritableBoxedValues<{
|
|
value: string;
|
|
}> {
|
|
}
|
|
export declare class MenubarRootState {
|
|
static create(opts: MenubarRootStateOpts): MenubarRootState;
|
|
readonly opts: MenubarRootStateOpts;
|
|
readonly rovingFocusGroup: RovingFocusGroup;
|
|
readonly attachment: RefAttachment;
|
|
wasOpenedByKeyboard: boolean;
|
|
triggerIds: string[];
|
|
/** Outgoing menu id when swapping to another top-level menu... skip exit animation wait only then */
|
|
skipExitAnimationForMenuValue: string | null;
|
|
valueToChangeHandler: Map<string, ReadableBox<OnChangeFn<boolean>>>;
|
|
constructor(opts: MenubarRootStateOpts);
|
|
/**
|
|
* @param id - the id of the trigger to register
|
|
* @returns - a function to de-register the trigger
|
|
*/
|
|
registerTrigger: (id: string) => () => void;
|
|
/**
|
|
* @param value - the value of the menu to register
|
|
* @param contentId - the content id to associate with the value
|
|
* @returns - a function to de-register the menu
|
|
*/
|
|
registerMenu: (value: string, onOpenChange: ReadableBox<OnChangeFn<boolean>>) => () => void;
|
|
updateValue: (value: string) => void;
|
|
getTriggers: () => HTMLButtonElement[];
|
|
onMenuOpen: (id: string, triggerId: string) => void;
|
|
onMenuClose: () => void;
|
|
onMenuToggle: (id: string) => void;
|
|
readonly props: {
|
|
readonly id: string;
|
|
readonly role: "menubar";
|
|
};
|
|
}
|
|
interface MenubarMenuStateOpts extends ReadableBoxedValues<{
|
|
value: string;
|
|
onOpenChange: OnChangeFn<boolean>;
|
|
}> {
|
|
}
|
|
export declare class MenubarMenuState {
|
|
static create(opts: MenubarMenuStateOpts): MenubarMenuState;
|
|
readonly opts: MenubarMenuStateOpts;
|
|
readonly root: MenubarRootState;
|
|
open: boolean;
|
|
wasOpenedByKeyboard: boolean;
|
|
triggerNode: HTMLElement | null;
|
|
triggerId: string | undefined;
|
|
contentId: string | undefined;
|
|
contentNode: HTMLElement | null;
|
|
constructor(opts: MenubarMenuStateOpts, root: MenubarRootState);
|
|
getTriggerNode(): HTMLElement | null;
|
|
toggleMenu(): void;
|
|
openMenu(): void;
|
|
}
|
|
interface MenubarTriggerStateOpts extends WithRefOpts, ReadableBoxedValues<{
|
|
disabled: boolean;
|
|
}> {
|
|
}
|
|
export declare class MenubarTriggerState {
|
|
#private;
|
|
static create(opts: MenubarTriggerStateOpts): MenubarTriggerState;
|
|
readonly opts: MenubarTriggerStateOpts;
|
|
readonly menu: MenubarMenuState;
|
|
readonly root: MenubarRootState;
|
|
readonly attachment: RefAttachment;
|
|
isFocused: boolean;
|
|
constructor(opts: MenubarTriggerStateOpts, menu: MenubarMenuState);
|
|
onpointerdown: PointerEventHandler<HTMLElement>;
|
|
onpointerenter: PointerEventHandler<HTMLElement>;
|
|
onkeydown: KeyboardEventHandler<HTMLElement>;
|
|
onfocus: FocusEventHandler<HTMLElement>;
|
|
onblur: FocusEventHandler<HTMLElement>;
|
|
readonly props: {
|
|
readonly type: "button";
|
|
readonly role: "menuitem";
|
|
readonly id: string;
|
|
readonly "aria-haspopup": "menu";
|
|
readonly "aria-expanded": "true" | "false";
|
|
readonly "aria-controls": string | undefined;
|
|
readonly "data-highlighted": "" | undefined;
|
|
readonly "data-state": "open" | "closed";
|
|
readonly "data-disabled": "" | undefined;
|
|
readonly "data-menu-value": string;
|
|
readonly disabled: true | undefined;
|
|
readonly tabindex: number;
|
|
readonly onpointerdown: PointerEventHandler<HTMLElement>;
|
|
readonly onpointerenter: PointerEventHandler<HTMLElement>;
|
|
readonly onkeydown: KeyboardEventHandler<HTMLElement>;
|
|
readonly onfocus: FocusEventHandler<HTMLElement>;
|
|
readonly onblur: FocusEventHandler<HTMLElement>;
|
|
};
|
|
}
|
|
interface MenubarContentStateOpts extends WithRefOpts, ReadableBoxedValues<{
|
|
interactOutsideBehavior: InteractOutsideBehaviorType;
|
|
onOpenAutoFocus: (e: Event) => void;
|
|
onCloseAutoFocus: (e: Event) => void;
|
|
onFocusOutside: (e: FocusEvent) => void;
|
|
onInteractOutside: (e: PointerEvent) => void;
|
|
}> {
|
|
}
|
|
export declare class MenubarContentState {
|
|
static create(opts: MenubarContentStateOpts): MenubarContentState;
|
|
readonly opts: MenubarContentStateOpts;
|
|
readonly menu: MenubarMenuState;
|
|
readonly root: MenubarRootState;
|
|
readonly attachment: RefAttachment;
|
|
constructor(opts: MenubarContentStateOpts, menu: MenubarMenuState);
|
|
onCloseAutoFocus: (e: Event) => void;
|
|
onFocusOutside: (e: FocusEvent) => void;
|
|
onInteractOutside: (e: PointerEvent) => void;
|
|
onOpenAutoFocus: (e: Event) => void;
|
|
onkeydown: KeyboardEventHandler<HTMLElement>;
|
|
props: {
|
|
readonly id: string;
|
|
readonly "aria-labelledby": string | undefined;
|
|
readonly style: {
|
|
[x: string]: string;
|
|
};
|
|
readonly onkeydown: KeyboardEventHandler<HTMLElement>;
|
|
readonly "data-menu-content": "";
|
|
};
|
|
popperProps: {
|
|
onCloseAutoFocus: (e: Event) => void;
|
|
onFocusOutside: (e: FocusEvent) => void;
|
|
onInteractOutside: (e: PointerEvent) => void;
|
|
onOpenAutoFocus: (e: Event) => void;
|
|
};
|
|
}
|
|
export {};
|