@foldkit/ui 0.162.0-canary.bb557bf1e36e → 0.162.0-canary.f9dc459707be
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/anchor/anchor.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,MAAM,EAAgB,MAAM,QAAQ,CAAA;AAatE;mFACmF;AACnF,eAAO,MAAM,SAAS,0KAapB,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C;+DAC+D;AAC/D,eAAO,MAAM,OAAO;;;;;IAQlB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAEzC,oGAAoG;AACpG,eAAO,MAAM,YAAY;;;;;;;;;;;;EAOvB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAA;AAkCnD;;;;;;0DAM0D;AAC1D,eAAO,MAAM,sBAAsB,YAAa,OAAO,KAAG,CAAC,MAAM,IAAI,CAWpE,CAAA;AAUD;;;;;;;;;;;;;;;;;;;;;0BAqB0B;AAC1B,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,YAAY,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC,CAAA;AAsBF;;;;;;;;;;;;;;;;;;;;;;;gFAuBgF;AAChF,eAAO,MAAM,WAAW,YACb,OAAO,UACR,WAAW,KAClB,CAAC,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"anchor.d.ts","sourceRoot":"","sources":["../../src/anchor/anchor.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,MAAM,EAAgB,MAAM,QAAQ,CAAA;AAatE;mFACmF;AACnF,eAAO,MAAM,SAAS,0KAapB,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C;+DAC+D;AAC/D,eAAO,MAAM,OAAO;;;;;IAQlB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAEzC,oGAAoG;AACpG,eAAO,MAAM,YAAY;;;;;;;;;;;;EAOvB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAA;AAkCnD;;;;;;0DAM0D;AAC1D,eAAO,MAAM,sBAAsB,YAAa,OAAO,KAAG,CAAC,MAAM,IAAI,CAWpE,CAAA;AAUD;;;;;;;;;;;;;;;;;;;;;0BAqB0B;AAC1B,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,YAAY,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC,CAAA;AAsBF;;;;;;;;;;;;;;;;;;;;;;;gFAuBgF;AAChF,eAAO,MAAM,WAAW,YACb,OAAO,UACR,WAAW,KAClB,CAAC,MAAM,IAAI,CAkQb,CAAA"}
|
package/dist/anchor/anchor.js
CHANGED
|
@@ -136,8 +136,17 @@ export const anchorSetup = (element, config) => {
|
|
|
136
136
|
const root = element.getRootNode();
|
|
137
137
|
const inShadow = root instanceof ShadowRoot;
|
|
138
138
|
const owner = inShadow ? root : document;
|
|
139
|
+
if (!(element instanceof HTMLElement)) {
|
|
140
|
+
console.error('[@foldkit/ui] anchorSetup requires an HTML panel. The panel will not be positioned.');
|
|
141
|
+
return __foldkitBrandViewResult((Function.constVoid), "@foldkit/ui/anchor/anchor.js#anchorSetup");
|
|
142
|
+
}
|
|
139
143
|
const button = owner.getElementById(config.buttonId);
|
|
140
|
-
if (
|
|
144
|
+
if (button === null) {
|
|
145
|
+
console.error(`[@foldkit/ui] anchorSetup could not find a trigger with id "${config.buttonId}". The panel will not be positioned.`);
|
|
146
|
+
return __foldkitBrandViewResult((Function.constVoid), "@foldkit/ui/anchor/anchor.js#anchorSetup");
|
|
147
|
+
}
|
|
148
|
+
if (!(button instanceof HTMLElement)) {
|
|
149
|
+
console.error(`[@foldkit/ui] anchorSetup requires an HTML trigger with id "${config.buttonId}". The panel will not be positioned.`);
|
|
141
150
|
return __foldkitBrandViewResult((Function.constVoid), "@foldkit/ui/anchor/anchor.js#anchorSetup");
|
|
142
151
|
}
|
|
143
152
|
const isPortal = config.anchor.portal ?? true;
|
|
@@ -30,7 +30,7 @@ export type DisclosureAttributes<Message> = Readonly<{
|
|
|
30
30
|
* disclosure opens. */
|
|
31
31
|
animatePanel: (content: Html, options?: AnimatePanelOptions) => Html;
|
|
32
32
|
}>;
|
|
33
|
-
/** Options for
|
|
33
|
+
/** Options for `DisclosureAttributes.animatePanel`.
|
|
34
34
|
*
|
|
35
35
|
* - `peek`: a CSS height the collapsed panel keeps, such as `'7.5em'` for
|
|
36
36
|
* five lines at a 1.5 leading. The visible content is an inert preview;
|
|
@@ -393,18 +393,18 @@ export const subscriptions = Subscription.make()(entry => (__foldkitBrandViewRes
|
|
|
393
393
|
dependenciesToStream: ({ dragActivity }) => __foldkitBrandViewResult((Stream.when(Subscription.fromEventFilterMapPreventDefault({
|
|
394
394
|
target: document,
|
|
395
395
|
type: 'keydown',
|
|
396
|
-
|
|
396
|
+
filterMapEvent: event => {
|
|
397
397
|
// NOTE: the draggable's OnKeyDownPreventDefault calls preventDefault on
|
|
398
398
|
// the Space that activates keyboard drag. Skip it here so the same
|
|
399
399
|
// keypress doesn't also confirm the drop in the same tick.
|
|
400
400
|
if (event.defaultPrevented) {
|
|
401
|
-
return __foldkitBrandViewResult((Option.none()), "@foldkit/ui/dragAndDrop/index.js#
|
|
401
|
+
return __foldkitBrandViewResult((Option.none()), "@foldkit/ui/dragAndDrop/index.js#filterMapEvent");
|
|
402
402
|
}
|
|
403
403
|
return __foldkitBrandViewResult((Match.value(event.key).pipe(Match.withReturnType(), Match.when('Tab', () => __foldkitBrandViewResult((Option.some(Message.PressedArrowKey({
|
|
404
404
|
direction: event.shiftKey
|
|
405
405
|
? 'PreviousContainer'
|
|
406
406
|
: 'NextContainer',
|
|
407
|
-
}))), "@foldkit/ui/dragAndDrop/index.js#anonymous~50")), Match.whenOr(' ', 'Enter', () => __foldkitBrandViewResult((Option.some(Message.ConfirmedKeyboardDrop())), "@foldkit/ui/dragAndDrop/index.js#anonymous~51")), Match.orElse(key => __foldkitBrandViewResult((Option.map(arrowKeyToDirection(key), direction => __foldkitBrandViewResult((Message.PressedArrowKey({ direction })), "@foldkit/ui/dragAndDrop/index.js#anonymous~53"))), "@foldkit/ui/dragAndDrop/index.js#anonymous~52")))), "@foldkit/ui/dragAndDrop/index.js#
|
|
407
|
+
}))), "@foldkit/ui/dragAndDrop/index.js#anonymous~50")), Match.whenOr(' ', 'Enter', () => __foldkitBrandViewResult((Option.some(Message.ConfirmedKeyboardDrop())), "@foldkit/ui/dragAndDrop/index.js#anonymous~51")), Match.orElse(key => __foldkitBrandViewResult((Option.map(arrowKeyToDirection(key), direction => __foldkitBrandViewResult((Message.PressedArrowKey({ direction })), "@foldkit/ui/dragAndDrop/index.js#anonymous~53"))), "@foldkit/ui/dragAndDrop/index.js#anonymous~52")))), "@foldkit/ui/dragAndDrop/index.js#filterMapEvent");
|
|
408
408
|
},
|
|
409
409
|
}), Effect.sync(() => __foldkitBrandViewResult((dragActivity === 'Active'), "@foldkit/ui/dragAndDrop/index.js#anonymous~54")))), "@foldkit/ui/dragAndDrop/index.js#dependenciesToStream~3"),
|
|
410
410
|
}),
|
package/dist/toast/test.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type DrainEntryInput = Readonly<{
|
|
|
7
7
|
entryId: string;
|
|
8
8
|
version?: number;
|
|
9
9
|
}>;
|
|
10
|
-
/** Builds a
|
|
10
|
+
/** Builds a `Story.Command.resolveAll` step that drains a single toast
|
|
11
11
|
* entry's full animation and dismiss lifecycle. Resolving these Commands in
|
|
12
12
|
* order takes a freshly shown entry from its enter animation through
|
|
13
13
|
* auto-dismiss and its exit animation, ending with the entry removed from the
|
package/dist/toast/test.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as Animation from '../animation/index.js';
|
|
|
4
4
|
import { Message } from './schema.js';
|
|
5
5
|
import { WaitBeforeDismissal } from './update.js';
|
|
6
6
|
const DEFAULT_VERSION = 0;
|
|
7
|
-
/** Builds a
|
|
7
|
+
/** Builds a `Story.Command.resolveAll` step that drains a single toast
|
|
8
8
|
* entry's full animation and dismiss lifecycle. Resolving these Commands in
|
|
9
9
|
* order takes a freshly shown entry from its enter animation through
|
|
10
10
|
* auto-dismiss and its exit animation, ending with the entry removed from the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foldkit/ui",
|
|
3
|
-
"version": "0.162.0-canary.
|
|
3
|
+
"version": "0.162.0-canary.f9dc459707be",
|
|
4
4
|
"description": "Headless, accessible UI components for Foldkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -121,21 +121,21 @@
|
|
|
121
121
|
"dist"
|
|
122
122
|
],
|
|
123
123
|
"peerDependencies": {
|
|
124
|
-
"effect": "4.0.0-rc.
|
|
125
|
-
"foldkit": "0.162.0-canary.
|
|
124
|
+
"effect": "4.0.0-rc.116",
|
|
125
|
+
"foldkit": "0.162.0-canary.f9dc459707be"
|
|
126
126
|
},
|
|
127
127
|
"dependencies": {
|
|
128
128
|
"@floating-ui/dom": "^1.8.0"
|
|
129
129
|
},
|
|
130
130
|
"devDependencies": {
|
|
131
|
-
"@effect/vitest": "4.0.0-rc.
|
|
132
|
-
"effect": "4.0.0-rc.
|
|
131
|
+
"@effect/vitest": "4.0.0-rc.116",
|
|
132
|
+
"effect": "4.0.0-rc.116",
|
|
133
133
|
"happy-dom": "^20.11.13",
|
|
134
134
|
"rimraf": "^6.1.3",
|
|
135
135
|
"typescript": "^7.0.2",
|
|
136
136
|
"vitest": "^5.0.0",
|
|
137
|
-
"@foldkit/vite-plugin": "0.23.0-canary.
|
|
138
|
-
"foldkit": "0.162.0-canary.
|
|
137
|
+
"@foldkit/vite-plugin": "0.23.0-canary.f9dc459707be",
|
|
138
|
+
"foldkit": "0.162.0-canary.f9dc459707be"
|
|
139
139
|
},
|
|
140
140
|
"keywords": [
|
|
141
141
|
"foldkit",
|