@crockery/fellowship-components 0.4.1 → 1.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.
Files changed (64) hide show
  1. package/README.md +38 -22
  2. package/RELEASING.md +2 -2
  3. package/THIRD_PARTY_LICENSES.md +12 -0
  4. package/dist/assets/dm-mono-latin-400-normal-4GdczIuU.woff2 +0 -0
  5. package/dist/assets/dm-mono-latin-500-normal-DRMDZjhP.woff2 +0 -0
  6. package/dist/assets/syne-latin-700-normal-AF3Rs61n.woff2 +0 -0
  7. package/dist/assets/syne-latin-800-normal-EehdNYzx.woff2 +0 -0
  8. package/dist/chunks/decorate-DyMgX_Uh.js +9 -0
  9. package/dist/chunks/{dungeon-cast-browser-CSnu3gC5.js → dungeon-cast-browser-DdG8klca.js} +62 -58
  10. package/dist/chunks/{dungeon-map-CutIcCVP.js → dungeon-map-D0-DAjZ9.js} +130 -131
  11. package/dist/chunks/{decorate-B_ZTN9li.js → field-manual-fonts-DTFloVFe.js} +18 -23
  12. package/dist/chunks/gear-planner-uQOpm4QI.js +1701 -0
  13. package/dist/chunks/{talent-calculator-Dxuc2dZ8.js → talent-calculator-DbU6P1AP.js} +36 -35
  14. package/dist/chunks/tooltip-C3SSJw-t.js +482 -0
  15. package/dist/data/cast-data-source.d.ts +1 -1
  16. package/dist/data/data-source.d.ts +1 -1
  17. package/dist/data/package-cast-data-source.d.ts +1 -5
  18. package/dist/data/package-data-source.d.ts +1 -5
  19. package/dist/data/package-talent-data-source.d.ts +1 -5
  20. package/dist/data/talent-data-source.d.ts +1 -1
  21. package/dist/dungeon-cast-browser/dungeon-cast-browser.d.ts +2 -1
  22. package/dist/dungeon-cast-browser/render-model.d.ts +3 -2
  23. package/dist/dungeon-cast-browser/types.d.ts +2 -2
  24. package/dist/dungeon-cast-browser.js +1 -1
  25. package/dist/dungeon-map/dungeon-map.d.ts +2 -1
  26. package/dist/dungeon-map/render-model.d.ts +3 -3
  27. package/dist/dungeon-map/types.d.ts +2 -2
  28. package/dist/dungeon-map.js +1 -1
  29. package/dist/gear-planner/gear-planner.d.ts +36 -0
  30. package/dist/gear-planner/gear-planner.styles.d.ts +1 -0
  31. package/dist/gear-planner/gear-position.d.ts +20 -0
  32. package/dist/gear-planner/index.d.ts +2 -0
  33. package/dist/gear-planner/item-workbench.d.ts +18 -0
  34. package/dist/gear-planner/item-workbench.styles.d.ts +1 -0
  35. package/dist/gear-planner/types.d.ts +24 -0
  36. package/dist/gear-planner.js +5 -0
  37. package/dist/index.d.ts +6 -5
  38. package/dist/index.js +9 -7
  39. package/dist/react/dungeon-cast-browser.d.ts +8 -3
  40. package/dist/react/dungeon-cast-browser.js +11 -4
  41. package/dist/react/dungeon-map.d.ts +3 -1
  42. package/dist/react/dungeon-map.js +1 -1
  43. package/dist/react/gear-planner.d.ts +14 -0
  44. package/dist/react/gear-planner.js +23 -0
  45. package/dist/react/index.d.ts +2 -0
  46. package/dist/react/talent-calculator.d.ts +3 -1
  47. package/dist/react/talent-calculator.js +1 -1
  48. package/dist/react/tooltip.js +1 -1
  49. package/dist/react.js +2 -1
  50. package/dist/styles/dungeon-poster-fonts.d.ts +2 -0
  51. package/dist/styles/dungeon-poster.styles.d.ts +7 -0
  52. package/dist/talent-calculator/render-model.d.ts +3 -2
  53. package/dist/talent-calculator/talent-calculator.d.ts +2 -1
  54. package/dist/talent-calculator/types.d.ts +2 -2
  55. package/dist/talent-calculator.js +1 -1
  56. package/dist/tooltip.js +3 -3
  57. package/package.json +15 -4
  58. package/src/dungeon-cast-browser/README.md +10 -4
  59. package/src/dungeon-map/README.md +5 -6
  60. package/src/gear-planner/README.md +44 -0
  61. package/src/talent-calculator/README.md +5 -6
  62. package/src/tooltip/README.md +5 -6
  63. package/dist/chunks/data-source-XbksqUrw.js +0 -7
  64. package/dist/chunks/tooltip-DoQVSnOn.js +0 -410
@@ -1,7 +1,3 @@
1
1
  import type { FellowshipTalentDataSource } from "./talent-data-source.js";
2
- /** @deprecated Create a package Fellowship data client instead. */
3
- export interface PackageFellowshipTalentDataSourceOptions {
4
- readonly assetBaseUrl?: string;
5
- }
6
2
  /** @deprecated Use `createPackageFellowshipDataClient` from `@crockery/fellowship-data/client`. */
7
- export declare const createPackageFellowshipTalentDataSource: (options?: PackageFellowshipTalentDataSourceOptions) => FellowshipTalentDataSource;
3
+ export declare const createPackageFellowshipTalentDataSource: () => FellowshipTalentDataSource;
@@ -1,4 +1,4 @@
1
1
  export type { TalentCalculatorData } from "@crockery/fellowship-data/client";
2
2
  import type { FellowshipDataClient } from "@crockery/fellowship-data/client";
3
3
  /** @deprecated Use the corresponding `FellowshipDataClient` methods. */
4
- export type FellowshipTalentDataSource = Pick<FellowshipDataClient, "loadHeroTalents" | "resolveAssetUrl">;
4
+ export type FellowshipTalentDataSource = Pick<FellowshipDataClient, "loadHeroTalents">;
@@ -1,3 +1,4 @@
1
+ import type { ImageAssetUrlResolver } from "@crockery/fellowship-data";
1
2
  import { LitElement, type PropertyValues, type TemplateResult } from "lit";
2
3
  import type { FellowshipCastDataSource } from "../data/cast-data-source.js";
3
4
  import type { ConfiguredCastFilter, DungeonCastBrowserModel, FellowshipCastIdentity } from "./types.js";
@@ -14,7 +15,7 @@ export declare class FellowshipDungeonCastBrowserElement extends LitElement {
14
15
  configuredCasts: readonly FellowshipCastIdentity[];
15
16
  configuredFilter: ConfiguredCastFilter;
16
17
  fill: boolean;
17
- assetBaseUrl: string | null;
18
+ resolveAssetUrl: ImageAssetUrlResolver | null;
18
19
  dataSource: FellowshipCastDataSource | null;
19
20
  private _status;
20
21
  private _error;
@@ -1,4 +1,5 @@
1
- import type { DungeonCastData, FellowshipCastDataSource } from "../data/cast-data-source.js";
1
+ import type { ImageAssetUrlResolver } from "@crockery/fellowship-data";
2
+ import type { DungeonCastData } from "../data/cast-data-source.js";
2
3
  import type { DungeonCastBrowserModel, FellowshipCastIdentity } from "./types.js";
3
4
  export declare const castIdentityKey: ({ enemyId, abilityId }: FellowshipCastIdentity) => string;
4
- export declare const createDungeonCastBrowserModel: (data: DungeonCastData, source: FellowshipCastDataSource) => DungeonCastBrowserModel;
5
+ export declare const createDungeonCastBrowserModel: (data: DungeonCastData, resolveAssetUrl: ImageAssetUrlResolver) => DungeonCastBrowserModel;
@@ -1,4 +1,4 @@
1
- import type { Ability, Dungeon, Enemy } from "@crockery/fellowship-data";
1
+ import type { Ability, Dungeon, Enemy, ImageAssetUrlResolver } from "@crockery/fellowship-data";
2
2
  import type { DungeonCastData, FellowshipCastDataSource } from "../data/cast-data-source.js";
3
3
  export interface FellowshipCastIdentity {
4
4
  readonly enemyId: string;
@@ -47,7 +47,7 @@ export interface FellowshipDungeonCastBrowserProperties {
47
47
  configuredCasts: readonly FellowshipCastIdentity[];
48
48
  configuredFilter: ConfiguredCastFilter;
49
49
  fill: boolean;
50
- assetBaseUrl: string | null;
50
+ resolveAssetUrl: ImageAssetUrlResolver;
51
51
  dataSource: FellowshipCastDataSource | null;
52
52
  }
53
53
  declare global {
@@ -1,4 +1,4 @@
1
- import { i as e, n as t, r as n, t as r } from "./chunks/dungeon-cast-browser-CSnu3gC5.js";
1
+ import { i as e, n as t, r as n, t as r } from "./chunks/dungeon-cast-browser-DdG8klca.js";
2
2
  //#region src/dungeon-cast-browser/index.ts
3
3
  t();
4
4
  //#endregion
@@ -1,3 +1,4 @@
1
+ import type { ImageAssetUrlResolver } from "@crockery/fellowship-data";
1
2
  import { LitElement, type PropertyValues, type TemplateResult } from "lit";
2
3
  import { type FellowshipDataSource } from "../data/data-source.js";
3
4
  import type { DungeonMapRenderModel, LitEnemyRenderer, LitGroupRenderer, MapLabelFormatter } from "./types.js";
@@ -13,7 +14,7 @@ export declare class FellowshipDungeonMapElement extends LitElement {
13
14
  static styles: import("lit").CSSResult[];
14
15
  dungeonId: string;
15
16
  mapImageId: string | null;
16
- assetBaseUrl: string | null;
17
+ resolveAssetUrl: ImageAssetUrlResolver | null;
17
18
  dataSource: FellowshipDataSource | null;
18
19
  renderEnemy: LitEnemyRenderer | null;
19
20
  renderGroup: LitGroupRenderer | null;
@@ -1,6 +1,6 @@
1
- import type { Dungeon, ImageAssetRef, Position2D } from "@crockery/fellowship-data";
2
- import type { DungeonMapData, FellowshipDataSource } from "../data/data-source.js";
1
+ import type { Dungeon, ImageAssetRef, ImageAssetUrlResolver, Position2D } from "@crockery/fellowship-data";
2
+ import type { DungeonMapData } from "../data/data-source.js";
3
3
  import type { DungeonMapRenderModel } from "./types.js";
4
4
  export declare const isValidMapPosition: (position: Position2D | null) => position is Position2D;
5
- export declare const createDungeonMapRenderModel: (data: DungeonMapData, mapImage: ImageAssetRef, source: FellowshipDataSource) => DungeonMapRenderModel;
5
+ export declare const createDungeonMapRenderModel: (data: DungeonMapData, mapImage: ImageAssetRef, resolveAssetUrl: ImageAssetUrlResolver) => DungeonMapRenderModel;
6
6
  export declare const humanizeMapLabel: (mapImage: ImageAssetRef, dungeon: Dungeon) => string;
@@ -1,4 +1,4 @@
1
- import type { Dungeon, DungeonEnemy, Enemy, ImageAssetRef, Position2D } from "@crockery/fellowship-data";
1
+ import type { Dungeon, DungeonEnemy, Enemy, ImageAssetRef, ImageAssetUrlResolver, Position2D } from "@crockery/fellowship-data";
2
2
  import type { nothing, TemplateResult } from "lit";
3
3
  import type { DungeonMapData, FellowshipDataSource } from "../data/data-source.js";
4
4
  export interface NormalizedRect {
@@ -86,7 +86,7 @@ export type FellowshipMapViewportChangeEvent = CustomEvent<FellowshipMapViewport
86
86
  export interface FellowshipDungeonMapProperties {
87
87
  dungeonId: string;
88
88
  mapImageId: string | null;
89
- assetBaseUrl: string | null;
89
+ resolveAssetUrl: ImageAssetUrlResolver;
90
90
  dataSource: FellowshipDataSource | null;
91
91
  renderEnemy: LitEnemyRenderer | null;
92
92
  renderGroup: LitGroupRenderer | null;
@@ -1,4 +1,4 @@
1
- import { a as e, i as t, n, r, t as i } from "./chunks/dungeon-map-CutIcCVP.js";
1
+ import { a as e, i as t, n, r, t as i } from "./chunks/dungeon-map-D0-DAjZ9.js";
2
2
  //#region src/dungeon-map/index.ts
3
3
  n();
4
4
  //#endregion
@@ -0,0 +1,36 @@
1
+ import { type GearPlannerBuild, type GearPlannerData, type ImageAssetUrlResolver } from "@crockery/fellowship-data";
2
+ import { LitElement, type PropertyValues, type TemplateResult } from "lit";
3
+ import type { GearPlannerPresentationError } from "./types.js";
4
+ /**
5
+ * Controlled Fellowship loadout editor.
6
+ *
7
+ * @fires fellowship-gear-build-change - Proposes a complete serializable build.
8
+ * @fires fellowship-gear-planner-error - Reports a recoverable presentation or edit failure.
9
+ */
10
+ export declare class FellowshipGearPlannerElement extends LitElement {
11
+ #private;
12
+ static styles: import("lit").CSSResult[];
13
+ data: GearPlannerData | null;
14
+ build: GearPlannerBuild | null;
15
+ loading: boolean;
16
+ error: GearPlannerPresentationError | null;
17
+ resolveAssetUrl: ImageAssetUrlResolver | null;
18
+ private _selectedPositionId;
19
+ private _tab;
20
+ private _sheetOpen;
21
+ private _compact;
22
+ private _announcement;
23
+ private _calculation;
24
+ private _workbenchPanel?;
25
+ connectedCallback(): void;
26
+ disconnectedCallback(): void;
27
+ protected willUpdate(changed: PropertyValues<this>): void;
28
+ protected updated(changed: PropertyValues<this>): void;
29
+ render(): TemplateResult;
30
+ }
31
+ export declare const defineFellowshipGearPlanner: () => void;
32
+ declare global {
33
+ interface HTMLElementTagNameMap {
34
+ "fellowship-gear-planner": FellowshipGearPlannerElement;
35
+ }
36
+ }
@@ -0,0 +1 @@
1
+ export declare const gearPlannerStyles: import("lit").CSSResult;
@@ -0,0 +1,20 @@
1
+ import type { GearPlannerItem, GearPlannerItemBuild, GearPlannerPosition } from "@crockery/fellowship-data";
2
+ import { LitElement, type TemplateResult } from "lit";
3
+ export declare class FellowshipGearPositionElement extends LitElement {
4
+ #private;
5
+ static styles: import("lit").CSSResult;
6
+ position: GearPlannerPosition | null;
7
+ item: GearPlannerItem | null;
8
+ itemBuild: GearPlannerItemBuild | null;
9
+ itemName: string | null;
10
+ selected: boolean;
11
+ imageUrl: string | null;
12
+ tooltipDetails: readonly string[];
13
+ render(): TemplateResult;
14
+ }
15
+ export declare const defineFellowshipGearPosition: () => void;
16
+ declare global {
17
+ interface HTMLElementTagNameMap {
18
+ "fellowship-gear-position": FellowshipGearPositionElement;
19
+ }
20
+ }
@@ -0,0 +1,2 @@
1
+ export { FellowshipGearPlannerElement, defineFellowshipGearPlanner } from "./gear-planner.js";
2
+ export type { GearPlannerBuildChangeDetail, GearPlannerBuildChangeEvent, GearPlannerChangeSource, GearPlannerErrorDetail, GearPlannerErrorEvent, GearPlannerPresentationError, } from "./types.js";
@@ -0,0 +1,18 @@
1
+ import type { GearPlannerBuild, GearPlannerData, GearPlannerPositionId, ImageAssetUrlResolver } from "@crockery/fellowship-data";
2
+ import { LitElement, type TemplateResult } from "lit";
3
+ export declare class FellowshipItemWorkbenchElement extends LitElement {
4
+ #private;
5
+ static styles: import("lit").CSSResult[];
6
+ data: GearPlannerData | null;
7
+ build: GearPlannerBuild | null;
8
+ positionId: GearPlannerPositionId | null;
9
+ resolveAssetUrl: ImageAssetUrlResolver | null;
10
+ private _query;
11
+ render(): TemplateResult;
12
+ }
13
+ export declare const defineFellowshipItemWorkbench: () => void;
14
+ declare global {
15
+ interface HTMLElementTagNameMap {
16
+ "fellowship-item-workbench": FellowshipItemWorkbenchElement;
17
+ }
18
+ }
@@ -0,0 +1 @@
1
+ export declare const itemWorkbenchStyles: import("lit").CSSResult;
@@ -0,0 +1,24 @@
1
+ import type { GearPlannerBuild, GearPlannerPositionId } from "@crockery/fellowship-data";
2
+ export interface GearPlannerPresentationError {
3
+ readonly code: string;
4
+ readonly message: string;
5
+ readonly recoverable?: boolean;
6
+ }
7
+ export type GearPlannerChangeSource = "item" | "item-level" | "rarity" | "modifier" | "gem" | "trait" | "blessing" | "conditional";
8
+ export interface GearPlannerBuildChangeDetail {
9
+ readonly build: GearPlannerBuild;
10
+ readonly source: GearPlannerChangeSource;
11
+ readonly positionId: GearPlannerPositionId | null;
12
+ }
13
+ export interface GearPlannerErrorDetail {
14
+ readonly error: GearPlannerPresentationError;
15
+ readonly positionId: GearPlannerPositionId | null;
16
+ }
17
+ export type GearPlannerBuildChangeEvent = CustomEvent<GearPlannerBuildChangeDetail>;
18
+ export type GearPlannerErrorEvent = CustomEvent<GearPlannerErrorDetail>;
19
+ declare global {
20
+ interface HTMLElementEventMap {
21
+ "fellowship-gear-build-change": GearPlannerBuildChangeEvent;
22
+ "fellowship-gear-planner-error": GearPlannerErrorEvent;
23
+ }
24
+ }
@@ -0,0 +1,5 @@
1
+ import { n as e, t } from "./chunks/gear-planner-uQOpm4QI.js";
2
+ //#region src/gear-planner/index.ts
3
+ e();
4
+ //#endregion
5
+ export { t as FellowshipGearPlannerElement, e as defineFellowshipGearPlanner };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
- export type { Dungeon, Ability, CastInterruptibility, DungeonEnemy, DungeonEnemyMapPatrolPoint, DungeonId, Enemy, EnemyId, FellowshipDataManifest, Hero, HeroId, HeroRole, ImageAssetRef, Position2D, Position3D, Talent, } from "@crockery/fellowship-data";
1
+ export type { Dungeon, Ability, CastInterruptibility, DungeonEnemy, DungeonEnemyMapPatrolPoint, DungeonId, Enemy, EnemyId, FellowshipDataManifest, Hero, HeroId, HeroRole, ImageAssetRef, ImageAssetUrlResolver, Position2D, Position3D, Talent, } from "@crockery/fellowship-data";
2
2
  export { createPackageFellowshipDataClient } from "@crockery/fellowship-data/client";
3
- export type { FellowshipDataClient, PackageFellowshipDataClientOptions, } from "@crockery/fellowship-data/client";
3
+ export type { FellowshipDataClient } from "@crockery/fellowship-data/client";
4
4
  export { FellowshipDataError, type DungeonMapData, type FellowshipDataErrorCode, type FellowshipDataSource, } from "./data/data-source.js";
5
- export { createPackageFellowshipDataSource, type PackageFellowshipDataSourceOptions, } from "./data/package-data-source.js";
5
+ export { createPackageFellowshipDataSource } from "./data/package-data-source.js";
6
6
  export type { DungeonCastData, FellowshipCastDataSource } from "./data/cast-data-source.js";
7
- export { createPackageFellowshipCastDataSource, type PackageFellowshipCastDataSourceOptions, } from "./data/package-cast-data-source.js";
8
- export { createPackageFellowshipTalentDataSource, type PackageFellowshipTalentDataSourceOptions, } from "./data/package-talent-data-source.js";
7
+ export { createPackageFellowshipCastDataSource } from "./data/package-cast-data-source.js";
8
+ export { createPackageFellowshipTalentDataSource } from "./data/package-talent-data-source.js";
9
9
  export type { FellowshipTalentDataSource, TalentCalculatorData, } from "./data/talent-data-source.js";
10
10
  export * from "./dungeon-map/index.js";
11
11
  export * from "./dungeon-cast-browser/index.js";
12
12
  export * from "./talent-calculator/index.js";
13
13
  export * from "./tooltip/index.js";
14
+ export * from "./gear-planner/index.js";
package/dist/index.js CHANGED
@@ -1,11 +1,13 @@
1
- import { t as e } from "./chunks/data-source-XbksqUrw.js";
2
- import { a as t, i as n, n as r, o as i, r as a, t as o } from "./chunks/dungeon-map-CutIcCVP.js";
3
- import { a as s, i as c, n as l, r as u, t as d } from "./chunks/dungeon-cast-browser-CSnu3gC5.js";
4
- import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "./chunks/talent-calculator-Dxuc2dZ8.js";
1
+ import { r as e } from "./chunks/field-manual-fonts-DTFloVFe.js";
2
+ import { a as t, i as n, n as r, o as i, r as a, t as o } from "./chunks/dungeon-map-D0-DAjZ9.js";
3
+ import { a as s, i as c, n as l, r as u, t as d } from "./chunks/dungeon-cast-browser-DdG8klca.js";
4
+ import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "./chunks/talent-calculator-DbU6P1AP.js";
5
5
  import "./dungeon-map.js";
6
6
  import "./dungeon-cast-browser.js";
7
- import { a as C, i as w, n as T, r as E, t as D } from "./chunks/tooltip-DoQVSnOn.js";
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 { createPackageFellowshipDataClient as O } from "@crockery/fellowship-data/client";
11
- export { e as FellowshipDataError, d as FellowshipDungeonCastBrowserElement, o as FellowshipDungeonMapElement, x as FellowshipTalentCalculatorElement, D as FellowshipTooltipElement, h as MAX_TALENT_POINTS, a as ViewportController, E as calculateTooltipPosition, f as canSelectTalent, u as castIdentityKey, c as createDungeonCastBrowserModel, n as createDungeonMapRenderModel, s as createPackageFellowshipCastDataSource, O as createPackageFellowshipDataClient, i as createPackageFellowshipDataSource, m as createPackageFellowshipTalentDataSource, g as createTalentCalculatorRenderModel, v as createTalentCalculatorSelectionState, l as defineFellowshipDungeonCastBrowser, r as defineFellowshipDungeonMap, _ as defineFellowshipTalentCalculator, T as defineFellowshipTooltip, t as humanizeMapLabel, b as normalizeSelectedTalentIds, p as normalizeTalentPoints, w as resolveFellowshipRichText, C as stripFellowshipRichText, S as talentRowLabel, y as talentSlotName };
10
+ import { n as O, t as k } from "./chunks/gear-planner-uQOpm4QI.js";
11
+ import "./gear-planner.js";
12
+ import { createPackageFellowshipDataClient as A } from "@crockery/fellowship-data/client";
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,11 +1,16 @@
1
1
  import { type EventName } from "@lit/react";
2
- import { type ComponentProps } from "react";
2
+ import type { ImageAssetUrlResolver } from "@crockery/fellowship-data";
3
+ import React, { type ComponentProps } from "react";
3
4
  import { FellowshipDungeonCastBrowserElement } from "../dungeon-cast-browser/dungeon-cast-browser.js";
4
5
  import type { FellowshipCastBrowserErrorEvent, FellowshipCastBrowserReadyEvent, FellowshipCastSelectedEvent } from "../dungeon-cast-browser/types.js";
5
- export declare const DungeonCastBrowser: import("@lit/react").ReactWebComponent<FellowshipDungeonCastBrowserElement, {
6
+ declare const NativeDungeonCastBrowser: import("@lit/react").ReactWebComponent<FellowshipDungeonCastBrowserElement, {
6
7
  onReady: EventName<FellowshipCastBrowserReadyEvent>;
7
8
  onError: EventName<FellowshipCastBrowserErrorEvent>;
8
9
  onCastSelected: EventName<FellowshipCastSelectedEvent>;
9
10
  }>;
10
- export type DungeonCastBrowserProps = ComponentProps<typeof DungeonCastBrowser>;
11
+ type NativeDungeonCastBrowserProps = ComponentProps<typeof NativeDungeonCastBrowser>;
12
+ export type DungeonCastBrowserProps = Omit<NativeDungeonCastBrowserProps, "resolveAssetUrl"> & {
13
+ readonly resolveAssetUrl: ImageAssetUrlResolver;
14
+ };
15
+ export declare const DungeonCastBrowser: React.ForwardRefExoticComponent<Omit<DungeonCastBrowserProps, "ref"> & React.RefAttributes<FellowshipDungeonCastBrowserElement>>;
11
16
  export default DungeonCastBrowser;
@@ -1,9 +1,10 @@
1
- import { n as e, t } from "../chunks/dungeon-cast-browser-CSnu3gC5.js";
1
+ import { n as e, t } from "../chunks/dungeon-cast-browser-DdG8klca.js";
2
2
  import { createComponent as n } from "@lit/react";
3
- import r from "react";
3
+ import r, { forwardRef as i } from "react";
4
+ import { jsx as a } from "react/jsx-runtime";
4
5
  //#region src/react/dungeon-cast-browser.tsx
5
6
  e();
6
- var i = n({
7
+ var o = n({
7
8
  react: r,
8
9
  tagName: "fellowship-dungeon-cast-browser",
9
10
  elementClass: t,
@@ -12,6 +13,12 @@ var i = n({
12
13
  onError: "fellowship-cast-browser-error",
13
14
  onCastSelected: "fellowship-cast-selected"
14
15
  }
16
+ }), s = i(function(e, t) {
17
+ return /* @__PURE__ */ a(o, {
18
+ ...e,
19
+ ref: t
20
+ });
15
21
  });
22
+ s.displayName = "DungeonCastBrowser";
16
23
  //#endregion
17
- export { i as DungeonCastBrowser, i as default };
24
+ export { s as DungeonCastBrowser, s as default };
@@ -1,4 +1,5 @@
1
1
  import { type EventName } from "@lit/react";
2
+ import type { ImageAssetUrlResolver } from "@crockery/fellowship-data";
2
3
  import React, { type ComponentProps, type ReactNode } from "react";
3
4
  import { FellowshipDungeonMapElement } from "../dungeon-map/dungeon-map.js";
4
5
  import type { DungeonMapEnemyRenderContext, DungeonMapGroupRenderContext, FellowshipMapErrorEvent, FellowshipMapImageChangeEvent, FellowshipMapReadyEvent, FellowshipMapViewportChangeEvent, FellowshipMapWarningEvent } from "../dungeon-map/types.js";
@@ -12,7 +13,8 @@ declare const NativeDungeonMap: import("@lit/react").ReactWebComponent<Fellowshi
12
13
  type NativeDungeonMapProps = ComponentProps<typeof NativeDungeonMap>;
13
14
  export type ReactEnemyRenderer = (context: DungeonMapEnemyRenderContext) => ReactNode;
14
15
  export type ReactGroupRenderer = (context: DungeonMapGroupRenderContext<ReactNode>) => ReactNode;
15
- export interface DungeonMapViewerProps extends Omit<NativeDungeonMapProps, "children" | "externalOverlay" | "onReady" | "renderEnemy" | "renderGroup"> {
16
+ export interface DungeonMapViewerProps extends Omit<NativeDungeonMapProps, "children" | "externalOverlay" | "onReady" | "renderEnemy" | "renderGroup" | "resolveAssetUrl"> {
17
+ readonly resolveAssetUrl: ImageAssetUrlResolver;
16
18
  readonly renderEnemy?: ReactEnemyRenderer;
17
19
  readonly renderGroup?: ReactGroupRenderer;
18
20
  readonly onReady?: (event: FellowshipMapReadyEvent) => void;
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "../chunks/dungeon-map-CutIcCVP.js";
1
+ import { n as e, t } from "../chunks/dungeon-map-D0-DAjZ9.js";
2
2
  import { createComponent as n } from "@lit/react";
3
3
  import r, { forwardRef as i, useCallback as a, useEffect as o, useState as s } from "react";
4
4
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
@@ -0,0 +1,14 @@
1
+ import { type EventName } from "@lit/react";
2
+ import type { ImageAssetUrlResolver } from "@crockery/fellowship-data";
3
+ import React, { type ComponentProps } from "react";
4
+ import { FellowshipGearPlannerElement } from "../gear-planner/gear-planner.js";
5
+ import type { GearPlannerBuildChangeEvent, GearPlannerErrorEvent } from "../gear-planner/types.js";
6
+ declare const NativeGearPlanner: import("@lit/react").ReactWebComponent<FellowshipGearPlannerElement, {
7
+ onBuildChange: EventName<GearPlannerBuildChangeEvent>;
8
+ onPlannerError: EventName<GearPlannerErrorEvent>;
9
+ }>;
10
+ export type GearPlannerProps = Omit<ComponentProps<typeof NativeGearPlanner>, "resolveAssetUrl"> & {
11
+ readonly resolveAssetUrl: ImageAssetUrlResolver;
12
+ };
13
+ export declare const GearPlanner: React.ForwardRefExoticComponent<Omit<GearPlannerProps, "ref"> & React.RefAttributes<FellowshipGearPlannerElement>>;
14
+ export default GearPlanner;
@@ -0,0 +1,23 @@
1
+ import { n as e, t } from "../chunks/gear-planner-uQOpm4QI.js";
2
+ import { createComponent as n } from "@lit/react";
3
+ import r, { forwardRef as i } from "react";
4
+ import { jsx as a } from "react/jsx-runtime";
5
+ //#region src/react/gear-planner.tsx
6
+ e();
7
+ var o = n({
8
+ react: r,
9
+ tagName: "fellowship-gear-planner",
10
+ elementClass: t,
11
+ events: {
12
+ onBuildChange: "fellowship-gear-build-change",
13
+ onPlannerError: "fellowship-gear-planner-error"
14
+ }
15
+ }), s = i(function(e, t) {
16
+ return /* @__PURE__ */ a(o, {
17
+ ...e,
18
+ ref: t
19
+ });
20
+ });
21
+ s.displayName = "GearPlanner";
22
+ //#endregion
23
+ export { s as GearPlanner, s as default };
@@ -6,3 +6,5 @@ export { TalentCalculator } from "./talent-calculator.js";
6
6
  export type { ReactTalentRenderer, TalentCalculatorProps } from "./talent-calculator.js";
7
7
  export { Tooltip } from "./tooltip.js";
8
8
  export type { TooltipProps } from "./tooltip.js";
9
+ export { GearPlanner } from "./gear-planner.js";
10
+ export type { GearPlannerProps } from "./gear-planner.js";
@@ -1,4 +1,5 @@
1
1
  import { type EventName } from "@lit/react";
2
+ import type { ImageAssetUrlResolver } from "@crockery/fellowship-data";
2
3
  import React, { type ComponentProps, type ReactNode } from "react";
3
4
  import { FellowshipTalentCalculatorElement } from "../talent-calculator/talent-calculator.js";
4
5
  import type { FellowshipTalentsErrorEvent, FellowshipTalentsReadyEvent, FellowshipTalentsWarningEvent, TalentCalculatorTalentRenderContext, TalentPointsChangeEvent, TalentSelectionChangeEvent } from "../talent-calculator/types.js";
@@ -11,7 +12,8 @@ declare const NativeTalentCalculator: import("@lit/react").ReactWebComponent<Fel
11
12
  }>;
12
13
  type NativeTalentCalculatorProps = ComponentProps<typeof NativeTalentCalculator>;
13
14
  export type ReactTalentRenderer = (context: TalentCalculatorTalentRenderContext) => ReactNode;
14
- export interface TalentCalculatorProps extends Omit<NativeTalentCalculatorProps, "children" | "onReady" | "onSelectionChange" | "onTalentPointsChange" | "renderTalent"> {
15
+ export interface TalentCalculatorProps extends Omit<NativeTalentCalculatorProps, "children" | "onReady" | "onSelectionChange" | "onTalentPointsChange" | "renderTalent" | "resolveAssetUrl"> {
16
+ readonly resolveAssetUrl: ImageAssetUrlResolver;
15
17
  readonly renderTalent?: ReactTalentRenderer;
16
18
  readonly onReady?: (event: FellowshipTalentsReadyEvent) => void;
17
19
  readonly onSelectionChange?: (event: TalentSelectionChangeEvent) => void;
@@ -1,4 +1,4 @@
1
- import { a as e, n as t, o as n, r, t as i } from "../chunks/talent-calculator-Dxuc2dZ8.js";
1
+ import { a as e, n as t, o as n, r, t as i } from "../chunks/talent-calculator-DbU6P1AP.js";
2
2
  import { createComponent as a } from "@lit/react";
3
3
  import o, { forwardRef as s, useCallback as c, useEffect as l, useMemo as u, useState as d } from "react";
4
4
  import { jsx as f } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { n as e, t } from "../chunks/tooltip-DoQVSnOn.js";
1
+ import { n as e, t } from "../chunks/tooltip-C3SSJw-t.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, jsxs as o } from "react/jsx-runtime";
package/dist/react.js CHANGED
@@ -2,4 +2,5 @@ import { DungeonMapViewer as e } from "./react/dungeon-map.js";
2
2
  import { DungeonCastBrowser as t } from "./react/dungeon-cast-browser.js";
3
3
  import { TalentCalculator as n } from "./react/talent-calculator.js";
4
4
  import { Tooltip as r } from "./react/tooltip.js";
5
- export { t as DungeonCastBrowser, e as DungeonMapViewer, n as TalentCalculator, r as Tooltip };
5
+ import { GearPlanner as i } from "./react/gear-planner.js";
6
+ export { t as DungeonCastBrowser, e as DungeonMapViewer, i as GearPlanner, n as TalentCalculator, r as Tooltip };
@@ -0,0 +1,2 @@
1
+ /** Makes the bundled Dungeon Poster faces available to a component's owner document. */
2
+ export declare const installDungeonPosterFonts: (document: Document) => void;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shared internal aliases for the public Dungeon Poster token foundation.
3
+ *
4
+ * Consumers can override any `--fellowship-poster-*` property on a planner or
5
+ * tooltip host without depending on the private aliases below.
6
+ */
7
+ export declare const dungeonPosterStyles: import("lit").CSSResult;
@@ -1,4 +1,5 @@
1
- import type { FellowshipTalentDataSource, TalentCalculatorData } from "../data/talent-data-source.js";
1
+ import type { ImageAssetUrlResolver } from "@crockery/fellowship-data";
2
+ import type { TalentCalculatorData } from "../data/talent-data-source.js";
2
3
  import type { TalentCalculatorRenderModel } from "./types.js";
3
4
  export declare const talentRowLabel: (row: number) => string;
4
- export declare const createTalentCalculatorRenderModel: (data: TalentCalculatorData, source: FellowshipTalentDataSource) => TalentCalculatorRenderModel;
5
+ export declare const createTalentCalculatorRenderModel: (data: TalentCalculatorData, resolveAssetUrl: ImageAssetUrlResolver) => TalentCalculatorRenderModel;
@@ -1,3 +1,4 @@
1
+ import type { ImageAssetUrlResolver } from "@crockery/fellowship-data";
1
2
  import { LitElement, type PropertyValues, type TemplateResult } from "lit";
2
3
  import type { FellowshipTalentDataSource } from "../data/talent-data-source.js";
3
4
  import { MAX_TALENT_POINTS } from "./selection-state.js";
@@ -17,7 +18,7 @@ export declare class FellowshipTalentCalculatorElement extends LitElement {
17
18
  heroId: string;
18
19
  talentPoints: number;
19
20
  selectedTalentIds: readonly string[];
20
- assetBaseUrl: string | null;
21
+ resolveAssetUrl: ImageAssetUrlResolver | null;
21
22
  dataSource: FellowshipTalentDataSource | null;
22
23
  renderTalent: LitTalentRenderer | null;
23
24
  showPointControls: boolean;
@@ -1,4 +1,4 @@
1
- import type { Hero, Talent } from "@crockery/fellowship-data";
1
+ import type { Hero, ImageAssetUrlResolver, Talent } from "@crockery/fellowship-data";
2
2
  import type { nothing, TemplateResult } from "lit";
3
3
  import type { FellowshipTalentDataSource, TalentCalculatorData } from "../data/talent-data-source.js";
4
4
  export type TalentCalculatorWarningCode = "invalid-position" | "duplicate-position" | "invalid-cost" | "missing-name" | "missing-description" | "missing-image" | "asset-url-error" | "asset-image-error" | "renderer-error" | "invalid-selection" | "over-budget";
@@ -74,7 +74,7 @@ export interface FellowshipTalentCalculatorProperties {
74
74
  heroId: string;
75
75
  talentPoints: number;
76
76
  selectedTalentIds: readonly string[];
77
- assetBaseUrl: string | null;
77
+ resolveAssetUrl: ImageAssetUrlResolver;
78
78
  dataSource: FellowshipTalentDataSource | null;
79
79
  renderTalent: LitTalentRenderer | null;
80
80
  showPointControls: boolean;
@@ -1,4 +1,4 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./chunks/talent-calculator-Dxuc2dZ8.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./chunks/talent-calculator-DbU6P1AP.js";
2
2
  //#region src/talent-calculator/index.ts
3
3
  i();
4
4
  //#endregion
package/dist/tooltip.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as e, i as t, n, r, t as i } from "./chunks/tooltip-DoQVSnOn.js";
1
+ import { n as e, o as t, r as n, s as r, t as i } from "./chunks/tooltip-C3SSJw-t.js";
2
2
  //#region src/tooltip/index.ts
3
- n();
3
+ e();
4
4
  //#endregion
5
- export { i as FellowshipTooltipElement, r as calculateTooltipPosition, n as defineFellowshipTooltip, t as resolveFellowshipRichText, e as stripFellowshipRichText };
5
+ export { i as FellowshipTooltipElement, n as calculateTooltipPosition, e as defineFellowshipTooltip, t as resolveFellowshipRichText, r as stripFellowshipRichText };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crockery/fellowship-components",
3
- "version": "0.4.1",
3
+ "version": "1.1.0",
4
4
  "description": "Lit web components for rendering Fellowship game data.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,6 +25,7 @@
25
25
  "./dist/dungeon-map.js",
26
26
  "./dist/talent-calculator.js",
27
27
  "./dist/tooltip.js",
28
+ "./dist/gear-planner.js",
28
29
  "./dist/react.js",
29
30
  "./dist/react/*.js"
30
31
  ],
@@ -57,6 +58,11 @@
57
58
  "import": "./dist/tooltip.js",
58
59
  "default": "./dist/tooltip.js"
59
60
  },
61
+ "./gear-planner": {
62
+ "types": "./dist/gear-planner/index.d.ts",
63
+ "import": "./dist/gear-planner.js",
64
+ "default": "./dist/gear-planner.js"
65
+ },
60
66
  "./react": {
61
67
  "types": "./dist/react/index.d.ts",
62
68
  "import": "./dist/react.js",
@@ -82,6 +88,11 @@
82
88
  "import": "./dist/react/tooltip.js",
83
89
  "default": "./dist/react/tooltip.js"
84
90
  },
91
+ "./react/gear-planner": {
92
+ "types": "./dist/react/gear-planner.d.ts",
93
+ "import": "./dist/react/gear-planner.js",
94
+ "default": "./dist/react/gear-planner.js"
95
+ },
85
96
  "./package.json": "./package.json"
86
97
  },
87
98
  "files": [
@@ -101,7 +112,7 @@
101
112
  "dependencies": {
102
113
  "@lit/react": "^1.0.8",
103
114
  "lit": "^3.3.3",
104
- "@crockery/fellowship-data": "^2.0.0"
115
+ "@crockery/fellowship-data": "^3.1.0"
105
116
  },
106
117
  "peerDependencies": {
107
118
  "react": ">=18 <20",
@@ -118,8 +129,10 @@
118
129
  "devDependencies": {
119
130
  "@arethetypeswrong/cli": "^0.18.5",
120
131
  "@biomejs/biome": "2.5.3",
132
+ "@fontsource/dm-mono": "5.2.7",
121
133
  "@fontsource/ibm-plex-mono": "5.2.7",
122
134
  "@fontsource/ibm-plex-sans-condensed": "5.2.8",
135
+ "@fontsource/syne": "5.3.0",
123
136
  "@ladle/react": "^5.1.1",
124
137
  "@types/react": "^18.3.24",
125
138
  "@types/react-dom": "^18.3.7",
@@ -142,8 +155,6 @@
142
155
  "test": "pnpm test:unit && pnpm test:browser",
143
156
  "test:unit": "vitest run --project unit",
144
157
  "test:browser": "vitest run --project browser",
145
- "test:browser:smoke": "FELLOWSHIP_TEST_BROWSERS=smoke vitest run --project browser -t '\\[smoke\\]'",
146
- "test:browser:all": "FELLOWSHIP_TEST_BROWSERS=all vitest run --project browser",
147
158
  "ladle": "ladle serve",
148
159
  "ladle:build": "ladle build",
149
160
  "package:lint": "publint --strict --pack npm && attw --pack . --profile esm-only",
@@ -4,15 +4,21 @@
4
4
  cast-bearing abilities. Enemies without an actionable Interrupt or Stop response are omitted;
5
5
  non-actionable casts remain visible beneath otherwise eligible enemies.
6
6
 
7
- ```html
8
- <fellowship-dungeon-cast-browser dungeon-id="Level.ID.DemonicRitual">
9
- </fellowship-dungeon-cast-browser>
7
+ ```ts
8
+ import "@crockery/fellowship-components/dungeon-cast-browser";
9
+
10
+ const browser = document.querySelector("fellowship-dungeon-cast-browser");
11
+ browser.dungeonId = "Level.ID.DemonicRitual";
12
+ browser.resolveAssetUrl = (asset) =>
13
+ new URL(asset.path, "https://static.example.com/fellowship/").href;
10
14
  ```
11
15
 
12
16
  The component emits composed `fellowship-cast-browser-ready`,
13
17
  `fellowship-cast-browser-error`, and `fellowship-cast-selected` events. Selection is controlled:
14
18
  set `selectedCast` after receiving a selection event. Use `configuredCasts` to mark rules that
15
- already exist, and replace `dataSource` to provide game data from another host.
19
+ already exist, and replace `dataSource` to provide game data from another host. The
20
+ non-attribute `resolveAssetUrl` property is required; missing callbacks enter the
21
+ error state with code `asset-resolver-missing`.
16
22
 
17
23
  Set `configuredFilter` to `"configured"` or `"unconfigured"` to narrow the visible cast rows;
18
24
  the default is `"all"`. Set `fill` when the browser should occupy a constrained-height workspace