foldkit 0.31.0 → 0.33.0

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.
@@ -31,6 +31,7 @@ export declare const init: (config: InitConfig) => Model;
31
31
  /** Processes a listbox message and returns the next model and commands. Closes the listbox on selection (single-select behavior). */
32
32
  export declare const update: (model: {
33
33
  readonly id: string;
34
+ readonly orientation: "Horizontal" | "Vertical";
34
35
  readonly isOpen: boolean;
35
36
  readonly isAnimated: boolean;
36
37
  readonly isModal: boolean;
@@ -41,7 +42,6 @@ export declare const update: (model: {
41
42
  readonly screenX: number;
42
43
  readonly screenY: number;
43
44
  }>;
44
- readonly orientation: "Vertical" | "Horizontal";
45
45
  readonly searchQuery: string;
46
46
  readonly searchVersion: number;
47
47
  readonly maybeLastButtonPointerType: Option.Option<string>;
@@ -49,6 +49,7 @@ export declare const update: (model: {
49
49
  readonly maybeSelectedItem: Option.Option<string>;
50
50
  }, message: import("./shared").Message) => [{
51
51
  readonly id: string;
52
+ readonly orientation: "Horizontal" | "Vertical";
52
53
  readonly isOpen: boolean;
53
54
  readonly isAnimated: boolean;
54
55
  readonly isModal: boolean;
@@ -59,7 +60,6 @@ export declare const update: (model: {
59
60
  readonly screenX: number;
60
61
  readonly screenY: number;
61
62
  }>;
62
- readonly orientation: "Vertical" | "Horizontal";
63
63
  readonly searchQuery: string;
64
64
  readonly searchVersion: number;
65
65
  readonly maybeLastButtonPointerType: Option.Option<string>;
@@ -82,16 +82,16 @@ export declare const update: (model: {
82
82
  readonly maybeActiveItemIndex: Option.Option<number>;
83
83
  } | {
84
84
  readonly _tag: "ActivatedItem";
85
- readonly activationTrigger: "Pointer" | "Keyboard";
86
85
  readonly index: number;
86
+ readonly activationTrigger: "Pointer" | "Keyboard";
87
87
  } | {
88
88
  readonly _tag: "SelectedItem";
89
89
  readonly item: string;
90
90
  } | {
91
91
  readonly _tag: "MovedPointerOverItem";
92
+ readonly index: number;
92
93
  readonly screenX: number;
93
94
  readonly screenY: number;
94
- readonly index: number;
95
95
  } | {
96
96
  readonly _tag: "RequestedItemClick";
97
97
  readonly index: number;
@@ -115,6 +115,7 @@ export type ViewConfig<Message, Item> = BaseViewConfig<Message, Item, Model>;
115
115
  export declare const view: <Message, Item>(config: Readonly<{
116
116
  model: {
117
117
  readonly id: string;
118
+ readonly orientation: "Horizontal" | "Vertical";
118
119
  readonly isOpen: boolean;
119
120
  readonly isAnimated: boolean;
120
121
  readonly isModal: boolean;
@@ -125,7 +126,6 @@ export declare const view: <Message, Item>(config: Readonly<{
125
126
  readonly screenX: number;
126
127
  readonly screenY: number;
127
128
  }>;
128
- readonly orientation: "Vertical" | "Horizontal";
129
129
  readonly searchQuery: string;
130
130
  readonly searchVersion: number;
131
131
  readonly maybeLastButtonPointerType: Option.Option<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foldkit",
3
- "version": "0.31.0",
3
+ "version": "0.33.0",
4
4
  "description": "Elm-inspired UI framework powered by Effect",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -159,6 +159,7 @@
159
159
  },
160
160
  "dependencies": {
161
161
  "@floating-ui/dom": "^1.7.5",
162
+ "clsx": "^2.1.1",
162
163
  "snabbdom": "^3.6.3"
163
164
  },
164
165
  "publishConfig": {
@@ -169,10 +170,10 @@
169
170
  },
170
171
  "scripts": {
171
172
  "clean": "rimraf dist *.tsbuildinfo",
172
- "build": "pnpm run clean && tsc -b",
173
- "watch": "tsc -b --watch",
173
+ "build": "pnpm run clean && node scripts/inline-css.js && tsc -b",
174
+ "watch": "node scripts/inline-css.js && tsc -b --watch",
174
175
  "lint": "eslint src --ignore-pattern '**/*.test.ts'",
175
- "typecheck": "tsc -b --noEmit",
176
+ "typecheck": "node scripts/inline-css.js && tsc -b --noEmit",
176
177
  "test": "vitest run",
177
178
  "docs": "typedoc"
178
179
  }