@foldkit/ui 0.162.0-canary.01d0205a4e2b → 0.162.0-canary.57141c1c62d0

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,CAgPb,CAAA"}
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"}
@@ -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 (!(button instanceof HTMLElement) || !(element instanceof HTMLElement)) {
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 {@link DisclosureAttributes.animatePanel}.
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;
@@ -7,7 +7,7 @@ export type DrainEntryInput = Readonly<{
7
7
  entryId: string;
8
8
  version?: number;
9
9
  }>;
10
- /** Builds a {@link Story.Command.resolveAll} step that drains a single toast
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
@@ -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 {@link Story.Command.resolveAll} step that drains a single toast
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.01d0205a4e2b",
3
+ "version": "0.162.0-canary.57141c1c62d0",
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.115",
125
- "foldkit": "0.162.0-canary.01d0205a4e2b"
124
+ "effect": "4.0.0-rc.116",
125
+ "foldkit": "0.162.0-canary.57141c1c62d0"
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.115",
132
- "effect": "4.0.0-rc.115",
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.01d0205a4e2b",
138
- "foldkit": "0.162.0-canary.01d0205a4e2b"
137
+ "@foldkit/vite-plugin": "0.23.0-canary.57141c1c62d0",
138
+ "foldkit": "0.162.0-canary.57141c1c62d0"
139
139
  },
140
140
  "keywords": [
141
141
  "foldkit",