@fusion.dev/helix-core 0.60.0 → 0.61.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.
@@ -1192,14 +1192,6 @@
1192
1192
  }
1193
1193
  ],
1194
1194
  "exports": [
1195
- {
1196
- "kind": "js",
1197
- "name": "Placement",
1198
- "declaration": {
1199
- "name": "Placement",
1200
- "module": "src/controllers/floating-controller/floating-controller.ts"
1201
- }
1202
- },
1203
1195
  {
1204
1196
  "kind": "js",
1205
1197
  "name": "Side",
@@ -1,6 +1,27 @@
1
- import { type Placement, type Side } from '@floating-ui/dom';
1
+ import { type Side } from '@floating-ui/dom';
2
2
  import type { ReactiveController, ReactiveControllerHost } from 'lit';
3
- export type { Placement, Side };
3
+ export type { Side };
4
+ /**
5
+ * Where a panel lands against its anchor: a side, optionally aligned to an end
6
+ * of it.
7
+ *
8
+ * **Ours, written out, rather than Floating UI's under a re-export.** Theirs is
9
+ * `Prettify<Side | AlignedPlacement>` where `AlignedPlacement` is the template
10
+ * literal `` `${Side}-${Alignment}` ``, and a template literal is not something a
11
+ * reader of this source can expand: the manifest records a property's type as
12
+ * the text somebody wrote, so five families published `placement` as the bare
13
+ * word `Placement` and their reference pages listed no values at all. Written
14
+ * here the twelve are in the text, which every reader of these sources resolves
15
+ * without a type system.
16
+ *
17
+ * **And a public attribute should not be defined by a dependency.** Floating UI
18
+ * adding a placement would widen five components' published API with nobody
19
+ * deciding to, which is the same argument that keeps a `variant` union out of a
20
+ * shared type. The two are held equal in this controller's spec, where a type
21
+ * assertion is a test and is typechecked like one, so the day theirs widens is
22
+ * a failed build rather than a quiet change out there.
23
+ */
24
+ export type Placement = 'bottom' | 'bottom-end' | 'bottom-start' | 'left' | 'left-end' | 'left-start' | 'right' | 'right-end' | 'right-start' | 'top' | 'top-end' | 'top-start';
4
25
  export interface FloatingOptions {
5
26
  /** The element being pointed at. */
6
27
  anchor: () => HTMLElement | null | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-core",
3
3
  "description": "Helix element primitives: base classes, mixins, decorators, utilities.",
4
- "version": "0.60.0",
4
+ "version": "0.61.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -34,12 +34,12 @@
34
34
  "bugs": "https://github.com/project-fusion/fusion/issues",
35
35
  "dependencies": {
36
36
  "@floating-ui/dom": "^1.8.0",
37
- "@fusion.dev/helix-icons": "0.60.0"
37
+ "@fusion.dev/helix-icons": "0.61.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@custom-elements-manifest/analyzer": "^0.11.0",
41
- "@fusion.dev/helix-cem": "0.60.0",
42
- "@fusion.dev/helix-testing": "0.60.0",
41
+ "@fusion.dev/helix-cem": "0.61.0",
42
+ "@fusion.dev/helix-testing": "0.61.0",
43
43
  "@lit-labs/ssr": "^4.1.0",
44
44
  "lit": "^3.2.1"
45
45
  },