foldkit 0.42.0 → 0.43.1
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.
- package/README.md +1 -0
- package/dist/devtools/overlay.d.ts.map +1 -1
- package/dist/devtools/overlay.js +7 -4
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +12 -2
- package/dist/runtime/subscription.d.ts +6 -8
- package/dist/runtime/subscription.d.ts.map +1 -1
- package/dist/runtime/subscription.js +5 -1
- package/dist/ui/anchor.d.ts +2 -1
- package/dist/ui/anchor.d.ts.map +1 -1
- package/dist/ui/anchor.js +4 -1
- package/dist/ui/dragAndDrop/index.d.ts +285 -0
- package/dist/ui/dragAndDrop/index.d.ts.map +1 -0
- package/dist/ui/dragAndDrop/index.js +511 -0
- package/dist/ui/dragAndDrop/public.d.ts +3 -0
- package/dist/ui/dragAndDrop/public.d.ts.map +1 -0
- package/dist/ui/dragAndDrop/public.js +1 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +1 -0
- package/dist/ui/listbox/shared.d.ts.map +1 -1
- package/dist/ui/listbox/shared.js +21 -8
- package/dist/ui/menu/index.d.ts.map +1 -1
- package/dist/ui/menu/index.js +21 -8
- package/dist/ui/popover/index.d.ts.map +1 -1
- package/dist/ui/popover/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -167,6 +167,7 @@ This is what makes Foldkit unusually AI-friendly. The same property that makes t
|
|
|
167
167
|
- **[Auth](https://foldkit.dev/example-apps/auth)** — Authentication flow with Submodels and OutMessage
|
|
168
168
|
- **[Shopping Cart](https://foldkit.dev/example-apps/shopping-cart)** — Nested models and complex state
|
|
169
169
|
- **[WebSocket Chat](https://foldkit.dev/example-apps/websocket-chat)** — Managed Resources with WebSocket integration
|
|
170
|
+
- **[Kanban](https://foldkit.dev/example-apps/kanban)** — Drag-and-drop kanban board with cross-column reordering and keyboard navigation
|
|
170
171
|
- **[UI Showcase](https://foldkit.dev/example-apps/ui-showcase)** — Interactive showcase of every Foldkit UI component
|
|
171
172
|
- **[Typing Game](https://github.com/foldkit/foldkit/tree/main/packages/typing-game)** — Multiplayer typing game with Effect RPC backend ([play it live](https://typingterminal.com))
|
|
172
173
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/devtools/overlay.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,MAAM,EACN,OAAO,EAGP,MAAM,EAQP,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AAKrC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAMxE,OAAO,EAAE,KAAK,aAAa,EAA+B,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../src/devtools/overlay.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,MAAM,EACN,OAAO,EAGP,MAAM,EAQP,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,YAAY,CAAA;AAKrC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAMxE,OAAO,EAAE,KAAK,aAAa,EAA+B,MAAM,SAAS,CAAA;AAwQzE,eAAO,MAAM,MAAM;;EAA0C,CAAA;AAC7D,eAAO,MAAM,YAAY;;;;;;EAGxB,CAAA;AACD,eAAO,MAAM,aAAa;;;;;;EAGzB,CAAA;AACD,eAAO,MAAM,MAAM;;EAA4C,CAAA;AAC/D,eAAO,MAAM,KAAK;;EAA0C,CAAA;AAC5D,eAAO,MAAM,UAAU;;EAA6C,CAAA;AACpE,eAAO,MAAM,YAAY;;EAAiD,CAAA;AAC1E,eAAO,MAAM,WAAW;;EAA+C,CAAA;AAymCvE,eAAO,MAAM,aAAa,GACxB,OAAO,aAAa,EACpB,UAAU,gBAAgB,EAC1B,MAAM,YAAY,EAClB,aAAa,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,sCA4ChC,CAAA"}
|
package/dist/devtools/overlay.js
CHANGED
|
@@ -154,11 +154,12 @@ const computeDiff = (previous, current) => {
|
|
|
154
154
|
}));
|
|
155
155
|
};
|
|
156
156
|
const walkArray = (prev, curr, path) => {
|
|
157
|
-
const prevRefToIndex = new Map(prev.map((item, index) => [item, index]));
|
|
158
157
|
curr.forEach((item, index) => {
|
|
159
158
|
const childPath = `${path}.${index}`;
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
if (index < prev.length) {
|
|
160
|
+
walk(prev[index], item, childPath);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
162
163
|
changed.add(childPath);
|
|
163
164
|
}
|
|
164
165
|
});
|
|
@@ -365,7 +366,7 @@ const PANEL_POSITION_CLASS = {
|
|
|
365
366
|
TopLeft: 'dt-panel-tl',
|
|
366
367
|
};
|
|
367
368
|
const makeView = (position, mode, maybeBanner) => {
|
|
368
|
-
const { div, header, span, ul, button, svg, path, keyed, Class, Style, OnClick, AriaHidden, Xmlns, Fill, ViewBox, StrokeWidth, Stroke, StrokeLinecap, StrokeLinejoin, D, } = html();
|
|
369
|
+
const { div, header, span, ul, button, svg, path, keyed, Key, Class, Style, OnClick, AriaHidden, Xmlns, Fill, ViewBox, StrokeWidth, Stroke, StrokeLinecap, StrokeLinejoin, D, } = html();
|
|
369
370
|
const lazyTreeNode = createKeyedLazy();
|
|
370
371
|
const lazyMessageRow = createKeyedLazy();
|
|
371
372
|
// JSON TREE
|
|
@@ -436,6 +437,7 @@ const makeView = (position, mode, maybeBanner) => {
|
|
|
436
437
|
const hasDiffDot = isChanged || isAffected;
|
|
437
438
|
if (!nodeIsExpandable) {
|
|
438
439
|
return div([
|
|
440
|
+
Key(treePath),
|
|
439
441
|
Class(clsx('tree-row flex items-center gap-px font-mono text-2xs', {
|
|
440
442
|
'diff-changed': isChanged,
|
|
441
443
|
})),
|
|
@@ -453,6 +455,7 @@ const makeView = (position, mode, maybeBanner) => {
|
|
|
453
455
|
: ''
|
|
454
456
|
: collapsedPreview(value);
|
|
455
457
|
return div([
|
|
458
|
+
Key(treePath),
|
|
456
459
|
Class(clsx('tree-row flex items-center gap-px font-mono text-2xs', {
|
|
457
460
|
'tree-row-expandable cursor-pointer': !isRoot,
|
|
458
461
|
'diff-changed': isChanged,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,OAAO,EACP,MAAM,EAGN,KAAK,EAEL,MAAM,EAMN,MAAM,EAKP,MAAM,QAAQ,CAAA;AAGf,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAGzC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,GAAG,EAA+B,MAAM,QAAQ,CAAA;AAOzD,OAAO,KAAK,EAAyB,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAOzC,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,YAAY,GACZ,UAAU,GACV,SAAS,CAAA;AAEb,wCAAwC;AACxC,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAA;AAEjD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,YAAY,CAAA;AAEnD;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,QAAQ,CAAC;IACP,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAC3B,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM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,EACL,SAAS,GAAG,KAAK,EACjB,uBAAuB,GAAG,KAAK,EAE/B,MAAM,EAAE,sBAAsB,CAC5B,KAAK,EACL,OAAO,EACP,aAAa,EACb,KAAK,EACL,SAAS,EACT,uBAAuB,CACxB,GACA,iBAAiB,CAAA;AAEpB,wBAAgB,WAAW,CACzB,KAAK,EACL,OAAO,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAChC,aAAa,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EACzD,SAAS,GAAG,KAAK,EACjB,uBAAuB,GAAG,KAAK,EAE/B,MAAM,EAAE,aAAa,CACnB,KAAK,EACL,OAAO,EACP,aAAa,EACb,SAAS,EACT,uBAAuB,CACxB,GACA,iBAAiB,CAAA;AAiLpB,kEAAkE;AAClE,eAAO,MAAM,GAAG,GAAI,gBAAgB,iBAAiB,KAAG,IA+BvD,CAAA"}
|
package/dist/runtime/runtime.js
CHANGED
|
@@ -198,9 +198,19 @@ const makeRuntime = ({ Model, flags: resolveFlags, init, update, view, subscript
|
|
|
198
198
|
yield* render(initModel, Option.none());
|
|
199
199
|
addBfcacheRestoreListener();
|
|
200
200
|
if (subscriptions) {
|
|
201
|
-
yield* pipe(subscriptions, Record.toEntries, Effect.forEach(([_key, { schema, modelToDependencies, dependenciesToStream },]) => {
|
|
201
|
+
yield* pipe(subscriptions, Record.toEntries, Effect.forEach(([_key, { schema, modelToDependencies, equivalence: customEquivalence, dependenciesToStream, },]) => {
|
|
202
|
+
let latestDependencies = modelToDependencies(initModel);
|
|
203
|
+
const equivalence = customEquivalence ?? Schema.equivalence(schema);
|
|
202
204
|
const modelStream = Stream.concat(Stream.make(initModel), modelSubscriptionRef.changes);
|
|
203
|
-
return Effect.forkDaemon(modelStream.pipe(
|
|
205
|
+
return Effect.forkDaemon(modelStream.pipe(
|
|
206
|
+
// NOTE: updates latestDependencies on every model change so
|
|
207
|
+
// readDependencies() returns current values even when the
|
|
208
|
+
// stream hasn't restarted (when equivalence filters the change).
|
|
209
|
+
Stream.map(model => {
|
|
210
|
+
const dependencies = modelToDependencies(model);
|
|
211
|
+
latestDependencies = dependencies;
|
|
212
|
+
return dependencies;
|
|
213
|
+
}), Stream.changesWith(equivalence), Stream.flatMap(dependencies => dependenciesToStream(dependencies, () => latestDependencies), { switch: true }), Stream.runForEach(enqueueMessage), provideAllResources));
|
|
204
214
|
}, {
|
|
205
215
|
concurrency: 'unbounded',
|
|
206
216
|
discard: true,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { type Schema, type Stream } from 'effect';
|
|
1
|
+
import { type Equivalence, type Schema, type Stream } from 'effect';
|
|
2
2
|
type ResolveMessage<T> = [T] extends [Schema.Schema.Any] ? Schema.Schema.Type<T> : T;
|
|
3
3
|
/** A reactive binding between Model state and a long-running stream of Messages. */
|
|
4
4
|
export type Subscription<Model, Message, StreamDeps, Resources = never> = {
|
|
5
5
|
readonly modelToDependencies: (model: Model) => StreamDeps;
|
|
6
|
-
readonly
|
|
6
|
+
readonly equivalence?: Equivalence.Equivalence<StreamDeps>;
|
|
7
|
+
readonly dependenciesToStream: (deps: StreamDeps, readDependencies: () => StreamDeps) => Stream.Stream<ResolveMessage<Message>, never, Resources>;
|
|
7
8
|
};
|
|
8
9
|
type SubscriptionConfig<Model, Message, StreamDeps, Resources = never> = {
|
|
9
10
|
readonly schema: Schema.Schema<StreamDeps>;
|
|
@@ -15,11 +16,8 @@ export type Subscriptions<Model, Message, SubscriptionDeps extends Schema.Struct
|
|
|
15
16
|
/** Creates type-safe subscription configurations from a dependency schema. */
|
|
16
17
|
export declare const makeSubscriptions: <SubscriptionDeps extends Schema.Struct<any>>(SubscriptionDeps: SubscriptionDeps) => <Model, Message, Resources = never>(configs: { [K in keyof Schema.Schema.Type<SubscriptionDeps>]: {
|
|
17
18
|
modelToDependencies: (model: Model) => Schema.Schema.Type<SubscriptionDeps>[K];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
modelToDependencies: (model: Model) => Schema.Schema.Type<SubscriptionDeps>[K];
|
|
22
|
-
dependenciesToStream: (deps: Schema.Schema.Type<SubscriptionDeps>[K]) => Stream.Stream<ResolveMessage<Message>, never, Resources>;
|
|
23
|
-
}>;
|
|
19
|
+
equivalence?: Equivalence.Equivalence<Schema.Schema.Type<SubscriptionDeps>[K]>;
|
|
20
|
+
dependenciesToStream: (deps: Schema.Schema.Type<SubscriptionDeps>[K], readDependencies: () => Schema.Schema.Type<SubscriptionDeps>[K]) => Stream.Stream<ResolveMessage<Message>, never, Resources>;
|
|
21
|
+
}; }) => Subscriptions<Model, Message, SubscriptionDeps, Resources>;
|
|
24
22
|
export {};
|
|
25
23
|
//# sourceMappingURL=subscription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/runtime/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/runtime/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAU,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE3E,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GACpD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GACrB,CAAC,CAAA;AAEL,oFAAoF;AACpF,MAAM,MAAM,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,GAAG,KAAK,IAAI;IACxE,QAAQ,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,UAAU,CAAA;IAC1D,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CA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;IAC5C,WAAW,CAAC,EAAE,WAAW,CAAC,WAAW,CACnC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CACxC,CAAA;IACD,oBAAoB,EAAE,CACpB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAC7C,gBAAgB,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAC5D,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAA;CAC9D,GACF,KAAG,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,CAUe,CAAA"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Record } from 'effect';
|
|
2
2
|
/** Creates type-safe subscription configurations from a dependency schema. */
|
|
3
|
-
export const makeSubscriptions = (SubscriptionDeps) => (configs) =>
|
|
3
|
+
export const makeSubscriptions = (SubscriptionDeps) => (configs) =>
|
|
4
|
+
/* eslint-disable @typescript-eslint/consistent-type-assertions */
|
|
5
|
+
Record.map(configs, ({ modelToDependencies, equivalence, dependenciesToStream }, key) => ({
|
|
4
6
|
schema: SubscriptionDeps.fields[key],
|
|
5
7
|
modelToDependencies,
|
|
8
|
+
equivalence,
|
|
6
9
|
dependenciesToStream,
|
|
7
10
|
}));
|
|
11
|
+
/* eslint-enable @typescript-eslint/consistent-type-assertions */
|
package/dist/ui/anchor.d.ts
CHANGED
|
@@ -7,11 +7,12 @@ export type AnchorConfig = Readonly<{
|
|
|
7
7
|
padding?: number;
|
|
8
8
|
portal?: boolean;
|
|
9
9
|
}>;
|
|
10
|
-
/** Returns insert/destroy hook callbacks that position a floating element relative to its button using Floating UI. When `interceptTab` is true (default), Tab key in portal mode refocuses the button — set to false for components like Popover where Tab should navigate naturally within the panel. */
|
|
10
|
+
/** Returns insert/destroy hook callbacks that position a floating element relative to its button using Floating UI. When `interceptTab` is true (default), Tab key in portal mode refocuses the button — set to false for components like Popover where Tab should navigate naturally within the panel. When `focusAfterPosition` is true, the element is focused after the first position computation clears visibility — necessary because `visibility: hidden` elements cannot receive focus synchronously. */
|
|
11
11
|
export declare const anchorHooks: (config: {
|
|
12
12
|
buttonId: string;
|
|
13
13
|
anchor: AnchorConfig;
|
|
14
14
|
interceptTab?: boolean;
|
|
15
|
+
focusAfterPosition?: boolean;
|
|
15
16
|
}) => Readonly<{
|
|
16
17
|
onInsert: (items: Element) => void;
|
|
17
18
|
onDestroy: (items: Element) => void;
|
package/dist/ui/anchor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/ui/anchor.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,oGAAoG;AACpG,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC,CAAA;AAmBF,
|
|
1
|
+
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/ui/anchor.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,oGAAoG;AACpG,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC,CAAA;AAmBF,kfAAkf;AAClf,eAAO,MAAM,WAAW,GAAI,QAAQ;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,YAAY,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,KAAG,QAAQ,CAAC;IACX,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IAClC,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACpC,CA+EC,CAAA"}
|
package/dist/ui/anchor.js
CHANGED
|
@@ -10,7 +10,7 @@ const getOrCreatePortalRoot = () => {
|
|
|
10
10
|
return document.body.appendChild(root);
|
|
11
11
|
};
|
|
12
12
|
const anchorCleanups = new WeakMap();
|
|
13
|
-
/** Returns insert/destroy hook callbacks that position a floating element relative to its button using Floating UI. When `interceptTab` is true (default), Tab key in portal mode refocuses the button — set to false for components like Popover where Tab should navigate naturally within the panel. */
|
|
13
|
+
/** Returns insert/destroy hook callbacks that position a floating element relative to its button using Floating UI. When `interceptTab` is true (default), Tab key in portal mode refocuses the button — set to false for components like Popover where Tab should navigate naturally within the panel. When `focusAfterPosition` is true, the element is focused after the first position computation clears visibility — necessary because `visibility: hidden` elements cannot receive focus synchronously. */
|
|
14
14
|
export const anchorHooks = (config) => ({
|
|
15
15
|
onInsert: (items) => {
|
|
16
16
|
const button = document.getElementById(config.buttonId);
|
|
@@ -51,6 +51,9 @@ export const anchorHooks = (config) => ({
|
|
|
51
51
|
if (isFirstUpdate) {
|
|
52
52
|
isFirstUpdate = false;
|
|
53
53
|
items.style.visibility = '';
|
|
54
|
+
if (config.focusAfterPosition ?? false) {
|
|
55
|
+
items.focus();
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
58
|
});
|
|
56
59
|
});
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { Option, Schema as S } from 'effect';
|
|
2
|
+
import * as Command from '../../command';
|
|
3
|
+
import { type Attribute } from '../../html';
|
|
4
|
+
declare const DropTarget: S.Struct<{
|
|
5
|
+
containerId: typeof S.String;
|
|
6
|
+
index: typeof S.Number;
|
|
7
|
+
}>;
|
|
8
|
+
/** Schema for the drag-and-drop component's state, tracking its unique ID, orientation, and current drag phase. */
|
|
9
|
+
export declare const Model: S.Struct<{
|
|
10
|
+
id: typeof S.String;
|
|
11
|
+
orientation: S.Literal<["Horizontal", "Vertical"]>;
|
|
12
|
+
activationThreshold: typeof S.Number;
|
|
13
|
+
dragState: S.Union<[import("../../schema").CallableTaggedStruct<"Idle", {}>, import("../../schema").CallableTaggedStruct<"Pending", {
|
|
14
|
+
itemId: typeof S.String;
|
|
15
|
+
containerId: typeof S.String;
|
|
16
|
+
index: typeof S.Number;
|
|
17
|
+
origin: S.Struct<{
|
|
18
|
+
screenX: typeof S.Number;
|
|
19
|
+
screenY: typeof S.Number;
|
|
20
|
+
}>;
|
|
21
|
+
}>, import("../../schema").CallableTaggedStruct<"Dragging", {
|
|
22
|
+
itemId: typeof S.String;
|
|
23
|
+
sourceContainerId: typeof S.String;
|
|
24
|
+
sourceIndex: typeof S.Number;
|
|
25
|
+
origin: S.Struct<{
|
|
26
|
+
screenX: typeof S.Number;
|
|
27
|
+
screenY: typeof S.Number;
|
|
28
|
+
}>;
|
|
29
|
+
current: S.Struct<{
|
|
30
|
+
clientX: typeof S.Number;
|
|
31
|
+
clientY: typeof S.Number;
|
|
32
|
+
}>;
|
|
33
|
+
maybeDropTarget: S.OptionFromSelf<S.Struct<{
|
|
34
|
+
containerId: typeof S.String;
|
|
35
|
+
index: typeof S.Number;
|
|
36
|
+
}>>;
|
|
37
|
+
}>, import("../../schema").CallableTaggedStruct<"KeyboardDragging", {
|
|
38
|
+
itemId: typeof S.String;
|
|
39
|
+
sourceContainerId: typeof S.String;
|
|
40
|
+
sourceIndex: typeof S.Number;
|
|
41
|
+
targetContainerId: typeof S.String;
|
|
42
|
+
targetIndex: typeof S.Number;
|
|
43
|
+
}>]>;
|
|
44
|
+
}>;
|
|
45
|
+
export type Model = typeof Model.Type;
|
|
46
|
+
/** The user pressed a pointer on a draggable item. */
|
|
47
|
+
export declare const PressedDraggable: import("../../schema").CallableTaggedStruct<"PressedDraggable", {
|
|
48
|
+
itemId: typeof S.String;
|
|
49
|
+
containerId: typeof S.String;
|
|
50
|
+
index: typeof S.Number;
|
|
51
|
+
screenX: typeof S.Number;
|
|
52
|
+
screenY: typeof S.Number;
|
|
53
|
+
}>;
|
|
54
|
+
/** The pointer moved during a drag, with collision detection results. */
|
|
55
|
+
export declare const MovedPointer: import("../../schema").CallableTaggedStruct<"MovedPointer", {
|
|
56
|
+
screenX: typeof S.Number;
|
|
57
|
+
screenY: typeof S.Number;
|
|
58
|
+
clientX: typeof S.Number;
|
|
59
|
+
clientY: typeof S.Number;
|
|
60
|
+
maybeDropTarget: S.OptionFromSelf<S.Struct<{
|
|
61
|
+
containerId: typeof S.String;
|
|
62
|
+
index: typeof S.Number;
|
|
63
|
+
}>>;
|
|
64
|
+
}>;
|
|
65
|
+
/** The pointer was released. */
|
|
66
|
+
export declare const ReleasedPointer: import("../../schema").CallableTaggedStruct<"ReleasedPointer", {}>;
|
|
67
|
+
/** Escape was pressed during a drag. */
|
|
68
|
+
export declare const CancelledDrag: import("../../schema").CallableTaggedStruct<"CancelledDrag", {}>;
|
|
69
|
+
/** The user activated keyboard drag with Space or Enter on a focused draggable. */
|
|
70
|
+
export declare const ActivatedKeyboardDrag: import("../../schema").CallableTaggedStruct<"ActivatedKeyboardDrag", {
|
|
71
|
+
itemId: typeof S.String;
|
|
72
|
+
containerId: typeof S.String;
|
|
73
|
+
index: typeof S.Number;
|
|
74
|
+
}>;
|
|
75
|
+
/** The ResolveKeyboardMove Command resolved the next keyboard drag position. */
|
|
76
|
+
export declare const ResolvedKeyboardMove: import("../../schema").CallableTaggedStruct<"ResolvedKeyboardMove", {
|
|
77
|
+
targetContainerId: typeof S.String;
|
|
78
|
+
targetIndex: typeof S.Number;
|
|
79
|
+
}>;
|
|
80
|
+
/** The user confirmed a keyboard drop with Space or Enter. */
|
|
81
|
+
export declare const ConfirmedKeyboardDrop: import("../../schema").CallableTaggedStruct<"ConfirmedKeyboardDrop", {}>;
|
|
82
|
+
/** The user pressed an arrow key during keyboard drag. */
|
|
83
|
+
export declare const PressedArrowKey: import("../../schema").CallableTaggedStruct<"PressedArrowKey", {
|
|
84
|
+
direction: S.Literal<["Up", "Down", "Left", "Right", "NextContainer", "PreviousContainer"]>;
|
|
85
|
+
}>;
|
|
86
|
+
/** An animation frame fired during auto-scroll. */
|
|
87
|
+
export declare const CompletedAutoScroll: import("../../schema").CallableTaggedStruct<"CompletedAutoScroll", {}>;
|
|
88
|
+
/** The FocusItem Command completed. */
|
|
89
|
+
export declare const CompletedFocusItem: import("../../schema").CallableTaggedStruct<"CompletedFocusItem", {}>;
|
|
90
|
+
/** Union of all messages the drag-and-drop component can produce. */
|
|
91
|
+
export declare const Message: S.Union<[
|
|
92
|
+
typeof PressedDraggable,
|
|
93
|
+
typeof MovedPointer,
|
|
94
|
+
typeof ReleasedPointer,
|
|
95
|
+
typeof CancelledDrag,
|
|
96
|
+
typeof ActivatedKeyboardDrag,
|
|
97
|
+
typeof ResolvedKeyboardMove,
|
|
98
|
+
typeof ConfirmedKeyboardDrop,
|
|
99
|
+
typeof PressedArrowKey,
|
|
100
|
+
typeof CompletedAutoScroll,
|
|
101
|
+
typeof CompletedFocusItem
|
|
102
|
+
]>;
|
|
103
|
+
export type Message = typeof Message.Type;
|
|
104
|
+
/** Emitted when a drag completes with a valid drop target. The parent uses this to commit the reorder. */
|
|
105
|
+
export declare const Reordered: import("../../schema").CallableTaggedStruct<"Reordered", {
|
|
106
|
+
itemId: typeof S.String;
|
|
107
|
+
fromContainerId: typeof S.String;
|
|
108
|
+
fromIndex: typeof S.Number;
|
|
109
|
+
toContainerId: typeof S.String;
|
|
110
|
+
toIndex: typeof S.Number;
|
|
111
|
+
}>;
|
|
112
|
+
/** Emitted when a drag is cancelled via Escape or pointer release without a drop target. */
|
|
113
|
+
export declare const Cancelled: import("../../schema").CallableTaggedStruct<"Cancelled", {}>;
|
|
114
|
+
/** Union of all out-messages the drag-and-drop component can emit to its parent. */
|
|
115
|
+
export declare const OutMessage: S.Union<[import("../../schema").CallableTaggedStruct<"Reordered", {
|
|
116
|
+
itemId: typeof S.String;
|
|
117
|
+
fromContainerId: typeof S.String;
|
|
118
|
+
fromIndex: typeof S.Number;
|
|
119
|
+
toContainerId: typeof S.String;
|
|
120
|
+
toIndex: typeof S.Number;
|
|
121
|
+
}>, import("../../schema").CallableTaggedStruct<"Cancelled", {}>]>;
|
|
122
|
+
export type OutMessage = typeof OutMessage.Type;
|
|
123
|
+
export type InitConfig = Readonly<{
|
|
124
|
+
id: string;
|
|
125
|
+
orientation?: 'Horizontal' | 'Vertical';
|
|
126
|
+
activationThreshold?: number;
|
|
127
|
+
}>;
|
|
128
|
+
/** Creates an initial drag-and-drop model. Starts in the Idle state with Vertical orientation and 5px activation threshold by default. */
|
|
129
|
+
export declare const init: (config: InitConfig) => Model;
|
|
130
|
+
/** Resolves the next keyboard drag position by querying the DOM for adjacent sortable items and containers. */
|
|
131
|
+
export declare const ResolveKeyboardMove: Command.CommandDefinition<"ResolveKeyboardMove", {
|
|
132
|
+
readonly _tag: "ResolvedKeyboardMove";
|
|
133
|
+
readonly targetContainerId: string;
|
|
134
|
+
readonly targetIndex: number;
|
|
135
|
+
}>;
|
|
136
|
+
/** Focuses a draggable item by ID after keyboard drop or cancel. */
|
|
137
|
+
export declare const FocusItem: Command.CommandDefinition<"FocusItem", {
|
|
138
|
+
readonly _tag: "CompletedFocusItem";
|
|
139
|
+
}>;
|
|
140
|
+
type UpdateReturn = readonly [
|
|
141
|
+
Model,
|
|
142
|
+
ReadonlyArray<Command.Command<Message>>,
|
|
143
|
+
Option.Option<OutMessage>
|
|
144
|
+
];
|
|
145
|
+
/** Processes a drag-and-drop message and returns the next model, commands, and an optional out-message for the parent. */
|
|
146
|
+
export declare const update: (model: Model, message: Message) => UpdateReturn;
|
|
147
|
+
/** Schema describing the subscription dependencies for document-level drag tracking. */
|
|
148
|
+
export declare const SubscriptionDeps: S.Struct<{
|
|
149
|
+
documentPointer: S.Struct<{
|
|
150
|
+
dragActivity: S.Literal<["Idle", "Active"]>;
|
|
151
|
+
orientation: S.Literal<["Horizontal", "Vertical"]>;
|
|
152
|
+
}>;
|
|
153
|
+
documentEscape: S.Struct<{
|
|
154
|
+
dragActivity: S.Literal<["Idle", "Active"]>;
|
|
155
|
+
}>;
|
|
156
|
+
documentKeyboard: S.Struct<{
|
|
157
|
+
dragActivity: S.Literal<["Idle", "Active"]>;
|
|
158
|
+
}>;
|
|
159
|
+
autoScroll: S.Struct<{
|
|
160
|
+
isDragging: typeof S.Boolean;
|
|
161
|
+
clientY: typeof S.Number;
|
|
162
|
+
}>;
|
|
163
|
+
}>;
|
|
164
|
+
/** Document-level subscriptions for pointer and keyboard events during drag operations. */
|
|
165
|
+
export declare const subscriptions: import("../../runtime/subscription").Subscriptions<{
|
|
166
|
+
readonly id: string;
|
|
167
|
+
readonly orientation: "Horizontal" | "Vertical";
|
|
168
|
+
readonly activationThreshold: number;
|
|
169
|
+
readonly dragState: {
|
|
170
|
+
readonly _tag: "Idle";
|
|
171
|
+
} | {
|
|
172
|
+
readonly _tag: "Pending";
|
|
173
|
+
readonly index: number;
|
|
174
|
+
readonly containerId: string;
|
|
175
|
+
readonly itemId: string;
|
|
176
|
+
readonly origin: {
|
|
177
|
+
readonly screenX: number;
|
|
178
|
+
readonly screenY: number;
|
|
179
|
+
};
|
|
180
|
+
} | {
|
|
181
|
+
readonly _tag: "Dragging";
|
|
182
|
+
readonly itemId: string;
|
|
183
|
+
readonly origin: {
|
|
184
|
+
readonly screenX: number;
|
|
185
|
+
readonly screenY: number;
|
|
186
|
+
};
|
|
187
|
+
readonly sourceContainerId: string;
|
|
188
|
+
readonly sourceIndex: number;
|
|
189
|
+
readonly current: {
|
|
190
|
+
readonly clientX: number;
|
|
191
|
+
readonly clientY: number;
|
|
192
|
+
};
|
|
193
|
+
readonly maybeDropTarget: Option.Option<{
|
|
194
|
+
readonly index: number;
|
|
195
|
+
readonly containerId: string;
|
|
196
|
+
}>;
|
|
197
|
+
} | {
|
|
198
|
+
readonly _tag: "KeyboardDragging";
|
|
199
|
+
readonly itemId: string;
|
|
200
|
+
readonly sourceContainerId: string;
|
|
201
|
+
readonly sourceIndex: number;
|
|
202
|
+
readonly targetContainerId: string;
|
|
203
|
+
readonly targetIndex: number;
|
|
204
|
+
};
|
|
205
|
+
}, {
|
|
206
|
+
readonly _tag: "PressedDraggable";
|
|
207
|
+
readonly index: number;
|
|
208
|
+
readonly screenX: number;
|
|
209
|
+
readonly screenY: number;
|
|
210
|
+
readonly containerId: string;
|
|
211
|
+
readonly itemId: string;
|
|
212
|
+
} | {
|
|
213
|
+
readonly _tag: "MovedPointer";
|
|
214
|
+
readonly screenX: number;
|
|
215
|
+
readonly screenY: number;
|
|
216
|
+
readonly clientX: number;
|
|
217
|
+
readonly clientY: number;
|
|
218
|
+
readonly maybeDropTarget: Option.Option<{
|
|
219
|
+
readonly index: number;
|
|
220
|
+
readonly containerId: string;
|
|
221
|
+
}>;
|
|
222
|
+
} | {
|
|
223
|
+
readonly _tag: "ReleasedPointer";
|
|
224
|
+
} | {
|
|
225
|
+
readonly _tag: "CancelledDrag";
|
|
226
|
+
} | {
|
|
227
|
+
readonly _tag: "ActivatedKeyboardDrag";
|
|
228
|
+
readonly index: number;
|
|
229
|
+
readonly containerId: string;
|
|
230
|
+
readonly itemId: string;
|
|
231
|
+
} | {
|
|
232
|
+
readonly _tag: "ResolvedKeyboardMove";
|
|
233
|
+
readonly targetContainerId: string;
|
|
234
|
+
readonly targetIndex: number;
|
|
235
|
+
} | {
|
|
236
|
+
readonly _tag: "ConfirmedKeyboardDrop";
|
|
237
|
+
} | {
|
|
238
|
+
readonly _tag: "PressedArrowKey";
|
|
239
|
+
readonly direction: "Left" | "Right" | "Up" | "Down" | "NextContainer" | "PreviousContainer";
|
|
240
|
+
} | {
|
|
241
|
+
readonly _tag: "CompletedAutoScroll";
|
|
242
|
+
} | {
|
|
243
|
+
readonly _tag: "CompletedFocusItem";
|
|
244
|
+
}, S.Struct<{
|
|
245
|
+
documentPointer: S.Struct<{
|
|
246
|
+
dragActivity: S.Literal<["Idle", "Active"]>;
|
|
247
|
+
orientation: S.Literal<["Horizontal", "Vertical"]>;
|
|
248
|
+
}>;
|
|
249
|
+
documentEscape: S.Struct<{
|
|
250
|
+
dragActivity: S.Literal<["Idle", "Active"]>;
|
|
251
|
+
}>;
|
|
252
|
+
documentKeyboard: S.Struct<{
|
|
253
|
+
dragActivity: S.Literal<["Idle", "Active"]>;
|
|
254
|
+
}>;
|
|
255
|
+
autoScroll: S.Struct<{
|
|
256
|
+
isDragging: typeof S.Boolean;
|
|
257
|
+
clientY: typeof S.Number;
|
|
258
|
+
}>;
|
|
259
|
+
}>, never>;
|
|
260
|
+
/** Messages the draggable view helper can dispatch. */
|
|
261
|
+
export type DraggableMessage = typeof PressedDraggable.Type | typeof ActivatedKeyboardDrag.Type;
|
|
262
|
+
/** Configuration for creating draggable attributes with `draggable`. */
|
|
263
|
+
export type DraggableConfig<Message> = Readonly<{
|
|
264
|
+
model: Model;
|
|
265
|
+
toParentMessage: (message: DraggableMessage) => Message;
|
|
266
|
+
itemId: string;
|
|
267
|
+
containerId: string;
|
|
268
|
+
index: number;
|
|
269
|
+
}>;
|
|
270
|
+
/** Returns attributes the parent attaches to a draggable element. Handles pointer-down, keyboard activation, and ARIA. */
|
|
271
|
+
export declare const draggable: <Message>(config: DraggableConfig<Message>) => ReadonlyArray<Attribute<Message>>;
|
|
272
|
+
/** Returns attributes the parent attaches to a droppable container element. */
|
|
273
|
+
export declare const droppable: <Message>(containerId: string, label?: string) => ReadonlyArray<Attribute<Message>>;
|
|
274
|
+
/** Returns attributes the parent attaches to a sortable item element. Typically combined with `draggable`. */
|
|
275
|
+
export declare const sortable: <Message>(itemId: string) => ReadonlyArray<Attribute<Message>>;
|
|
276
|
+
/** Returns positioning styles for the ghost element, or None when not dragging with a pointer. */
|
|
277
|
+
export declare const ghostStyle: (model: Model) => Option.Option<Record<string, string>>;
|
|
278
|
+
/** Returns true when the component is actively dragging (pointer or keyboard). */
|
|
279
|
+
export declare const isDragging: ({ dragState: { _tag } }: Model) => boolean;
|
|
280
|
+
/** Returns the ID of the item currently being dragged or pending, if any. */
|
|
281
|
+
export declare const maybeDraggedItemId: (model: Model) => Option.Option<string>;
|
|
282
|
+
/** Returns the current drop target, if any. Populated during pointer drag (from collision detection) and keyboard drag (from resolved position). */
|
|
283
|
+
export declare const maybeDropTarget: (model: Model) => Option.Option<typeof DropTarget.Type>;
|
|
284
|
+
export {};
|
|
285
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/dragAndDrop/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,MAAM,EACN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,YAAY,CAAA;AAqBjD,QAAA,MAAM,UAAU;;;EAGd,CAAA;AA8BF,mHAAmH;AACnH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKhB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAIrC,sDAAsD;AACtD,eAAO,MAAM,gBAAgB;;;;;;EAM3B,CAAA;AACF,yEAAyE;AACzE,eAAO,MAAM,YAAY;;;;;;;;;EAMvB,CAAA;AACF,gCAAgC;AAChC,eAAO,MAAM,eAAe,oEAAuB,CAAA;AACnD,wCAAwC;AACxC,eAAO,MAA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