@crockery/fellowship-components 1.1.0 → 2.1.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.
- package/dist/chunks/{gear-planner-uQOpm4QI.js → gear-planner-BPj_U2jR.js} +1176 -310
- package/dist/gear-planner/equipment-selector.d.ts +48 -0
- package/dist/gear-planner/equipment-selector.styles.d.ts +1 -0
- package/dist/gear-planner/gear-planner.d.ts +6 -0
- package/dist/gear-planner/gear-position.d.ts +1 -1
- package/dist/gear-planner/item-workbench.d.ts +1 -3
- package/dist/gear-planner/rarity-thumbnail.styles.d.ts +1 -0
- package/dist/gear-planner/types.d.ts +1 -1
- package/dist/gear-planner.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/gear-planner.js +1 -1
- package/package.json +2 -2
- package/src/gear-planner/README.md +12 -5
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { GearPlannerBuild, GearPlannerData, GearPlannerItem, GearPlannerItemBuild, GearPlannerPositionId, GearPlannerRarity, ImageAssetUrlResolver } from "@crockery/fellowship-data";
|
|
2
|
+
import { LitElement, type PropertyValues, type TemplateResult } from "lit";
|
|
3
|
+
interface CandidateFeature {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface EquipmentSelectorCandidate {
|
|
8
|
+
readonly item: GearPlannerItem;
|
|
9
|
+
readonly itemBuild: GearPlannerItemBuild;
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly rarity: GearPlannerRarity;
|
|
12
|
+
readonly features: readonly CandidateFeature[];
|
|
13
|
+
readonly tags: readonly string[];
|
|
14
|
+
readonly powerDelta: number;
|
|
15
|
+
readonly statDeltas: readonly string[];
|
|
16
|
+
readonly partial: boolean;
|
|
17
|
+
readonly equipped: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface EquipmentSelectorSelectDetail {
|
|
20
|
+
readonly item: GearPlannerItemBuild;
|
|
21
|
+
readonly name: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class FellowshipEquipmentSelectorElement extends LitElement {
|
|
24
|
+
#private;
|
|
25
|
+
static styles: import("lit").CSSResult[];
|
|
26
|
+
data: GearPlannerData | null;
|
|
27
|
+
build: GearPlannerBuild | null;
|
|
28
|
+
positionId: GearPlannerPositionId | null;
|
|
29
|
+
resolveAssetUrl: ImageAssetUrlResolver | null;
|
|
30
|
+
compact: boolean;
|
|
31
|
+
expanded: boolean;
|
|
32
|
+
private _query;
|
|
33
|
+
private _filterId;
|
|
34
|
+
private _candidates;
|
|
35
|
+
private _filters;
|
|
36
|
+
private _visibleCandidates;
|
|
37
|
+
private _searchInput?;
|
|
38
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
39
|
+
focusInitial(): void;
|
|
40
|
+
render(): TemplateResult;
|
|
41
|
+
}
|
|
42
|
+
export declare const defineFellowshipEquipmentSelector: () => void;
|
|
43
|
+
declare global {
|
|
44
|
+
interface HTMLElementTagNameMap {
|
|
45
|
+
"fellowship-equipment-selector": FellowshipEquipmentSelectorElement;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const equipmentSelectorStyles: import("lit").CSSResult;
|
|
@@ -16,12 +16,18 @@ export declare class FellowshipGearPlannerElement extends LitElement {
|
|
|
16
16
|
error: GearPlannerPresentationError | null;
|
|
17
17
|
resolveAssetUrl: ImageAssetUrlResolver | null;
|
|
18
18
|
private _selectedPositionId;
|
|
19
|
+
private _selectorOpen;
|
|
20
|
+
private _selectorPosition;
|
|
19
21
|
private _tab;
|
|
20
22
|
private _sheetOpen;
|
|
21
23
|
private _compact;
|
|
22
24
|
private _announcement;
|
|
23
25
|
private _calculation;
|
|
26
|
+
private _leftPositionIds;
|
|
27
|
+
private _rightPositionIds;
|
|
28
|
+
private _mobilePositionIds;
|
|
24
29
|
private _workbenchPanel?;
|
|
30
|
+
private _equipmentSelector?;
|
|
25
31
|
connectedCallback(): void;
|
|
26
32
|
disconnectedCallback(): void;
|
|
27
33
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
@@ -2,7 +2,7 @@ import type { GearPlannerItem, GearPlannerItemBuild, GearPlannerPosition } from
|
|
|
2
2
|
import { LitElement, type TemplateResult } from "lit";
|
|
3
3
|
export declare class FellowshipGearPositionElement extends LitElement {
|
|
4
4
|
#private;
|
|
5
|
-
static styles: import("lit").CSSResult;
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
6
|
position: GearPlannerPosition | null;
|
|
7
7
|
item: GearPlannerItem | null;
|
|
8
8
|
itemBuild: GearPlannerItemBuild | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GearPlannerBuild, GearPlannerData, GearPlannerPositionId
|
|
1
|
+
import type { GearPlannerBuild, GearPlannerData, GearPlannerPositionId } from "@crockery/fellowship-data";
|
|
2
2
|
import { LitElement, type TemplateResult } from "lit";
|
|
3
3
|
export declare class FellowshipItemWorkbenchElement extends LitElement {
|
|
4
4
|
#private;
|
|
@@ -6,8 +6,6 @@ export declare class FellowshipItemWorkbenchElement extends LitElement {
|
|
|
6
6
|
data: GearPlannerData | null;
|
|
7
7
|
build: GearPlannerBuild | null;
|
|
8
8
|
positionId: GearPlannerPositionId | null;
|
|
9
|
-
resolveAssetUrl: ImageAssetUrlResolver | null;
|
|
10
|
-
private _query;
|
|
11
9
|
render(): TemplateResult;
|
|
12
10
|
}
|
|
13
11
|
export declare const defineFellowshipItemWorkbench: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const rarityThumbnailStyles: import("lit").CSSResult;
|
|
@@ -4,7 +4,7 @@ export interface GearPlannerPresentationError {
|
|
|
4
4
|
readonly message: string;
|
|
5
5
|
readonly recoverable?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export type GearPlannerChangeSource = "item" | "item-level" | "rarity" | "modifier" | "gem" | "trait" | "blessing" | "conditional";
|
|
7
|
+
export type GearPlannerChangeSource = "item" | "item-level" | "rarity" | "tempers" | "talent-points" | "modifier" | "gem" | "trait" | "blessing" | "conditional";
|
|
8
8
|
export interface GearPlannerBuildChangeDetail {
|
|
9
9
|
readonly build: GearPlannerBuild;
|
|
10
10
|
readonly source: GearPlannerChangeSource;
|
package/dist/gear-planner.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import "./dungeon-cast-browser.js";
|
|
|
7
7
|
import { n as C, o as w, r as T, s as E, t as D } from "./chunks/tooltip-C3SSJw-t.js";
|
|
8
8
|
import "./talent-calculator.js";
|
|
9
9
|
import "./tooltip.js";
|
|
10
|
-
import { n as O, t as k } from "./chunks/gear-planner-
|
|
10
|
+
import { n as O, t as k } from "./chunks/gear-planner-BPj_U2jR.js";
|
|
11
11
|
import "./gear-planner.js";
|
|
12
12
|
import { createPackageFellowshipDataClient as A } from "@crockery/fellowship-data/client";
|
|
13
13
|
export { e as FellowshipDataError, d as FellowshipDungeonCastBrowserElement, o as FellowshipDungeonMapElement, k as FellowshipGearPlannerElement, x as FellowshipTalentCalculatorElement, D as FellowshipTooltipElement, h as MAX_TALENT_POINTS, a as ViewportController, T as calculateTooltipPosition, f as canSelectTalent, u as castIdentityKey, c as createDungeonCastBrowserModel, n as createDungeonMapRenderModel, s as createPackageFellowshipCastDataSource, A as createPackageFellowshipDataClient, i as createPackageFellowshipDataSource, m as createPackageFellowshipTalentDataSource, g as createTalentCalculatorRenderModel, v as createTalentCalculatorSelectionState, l as defineFellowshipDungeonCastBrowser, r as defineFellowshipDungeonMap, O as defineFellowshipGearPlanner, _ as defineFellowshipTalentCalculator, C as defineFellowshipTooltip, t as humanizeMapLabel, b as normalizeSelectedTalentIds, p as normalizeTalentPoints, w as resolveFellowshipRichText, E as stripFellowshipRichText, S as talentRowLabel, y as talentSlotName };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/gear-planner-
|
|
1
|
+
import { n as e, t } from "../chunks/gear-planner-BPj_U2jR.js";
|
|
2
2
|
import { createComponent as n } from "@lit/react";
|
|
3
3
|
import r, { forwardRef as i } from "react";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crockery/fellowship-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Lit web components for rendering Fellowship game data.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"dependencies": {
|
|
113
113
|
"@lit/react": "^1.0.8",
|
|
114
114
|
"lit": "^3.3.3",
|
|
115
|
-
"@crockery/fellowship-data": "^
|
|
115
|
+
"@crockery/fellowship-data": "^4.0.0"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"react": ">=18 <20",
|
|
@@ -33,11 +33,18 @@ The React wrapper is exported from
|
|
|
33
33
|
`@crockery/fellowship-components/react/gear-planner` as `GearPlanner`, with
|
|
34
34
|
`onBuildChange` and `onPlannerError` event props.
|
|
35
35
|
|
|
36
|
-
At 1200px and above,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
At 1200px and above, selecting a slot opens a boundary-aware equipment flyout
|
|
37
|
+
beside that slot while the persistent workbench remains dedicated to item
|
|
38
|
+
configuration. Below 1200px, the same equipment choices appear in an expandable
|
|
39
|
+
bottom sheet; **Configure current** then transitions to the full-height,
|
|
40
|
+
focus-contained editor. Equipment is searchable, alphabetized, and filtered by
|
|
41
|
+
the Data package. Candidate rows compare maximum valid default item level and
|
|
42
|
+
rarity against the current build, with unsupported mechanics labeled as partial
|
|
43
|
+
estimates.
|
|
44
|
+
|
|
45
|
+
Selecting or unequipping an item proposes the change immediately, closes the
|
|
46
|
+
selector, and restores focus to its slot. Both actions continue to use the
|
|
47
|
+
existing `source: "item"` change detail.
|
|
41
48
|
|
|
42
49
|
The planner uses the public `--fellowship-poster-*` Dungeon Poster tokens and
|
|
43
50
|
bundled Syne/DM Mono faces. It maintains 44px controls, visible focus, reduced
|