@crockery/fellowship-components 0.1.0 → 0.4.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/README.md +10 -3
- package/RELEASING.md +9 -45
- package/dist/chunks/data-source-XbksqUrw.js +9 -0
- package/dist/chunks/data-source-XbksqUrw.js.map +1 -0
- package/dist/chunks/decorate-B_ZTN9li.js.map +1 -1
- package/dist/chunks/dungeon-cast-browser-CSnu3gC5.js +705 -0
- package/dist/chunks/dungeon-cast-browser-CSnu3gC5.js.map +1 -0
- package/dist/chunks/{dungeon-map-IPN6sEDj.js → dungeon-map-CutIcCVP.js} +93 -119
- package/dist/chunks/dungeon-map-CutIcCVP.js.map +1 -0
- package/dist/chunks/{talent-calculator-Ch1Pbbba.js → talent-calculator-Dxuc2dZ8.js} +75 -105
- package/dist/chunks/talent-calculator-Dxuc2dZ8.js.map +1 -0
- package/dist/data/cast-data-source.d.ts +5 -0
- package/dist/data/cast-data-source.d.ts.map +1 -0
- package/dist/data/data-source.d.ts +7 -16
- package/dist/data/data-source.d.ts.map +1 -1
- package/dist/data/package-cast-data-source.d.ts +8 -0
- package/dist/data/package-cast-data-source.d.ts.map +1 -0
- package/dist/data/package-data-source.d.ts +3 -1
- package/dist/data/package-data-source.d.ts.map +1 -1
- package/dist/data/package-talent-data-source.d.ts +2 -0
- package/dist/data/package-talent-data-source.d.ts.map +1 -1
- package/dist/data/talent-data-source.d.ts +4 -10
- package/dist/data/talent-data-source.d.ts.map +1 -1
- package/dist/dungeon-cast-browser/dungeon-cast-browser.d.ts +36 -0
- package/dist/dungeon-cast-browser/dungeon-cast-browser.d.ts.map +1 -0
- package/dist/dungeon-cast-browser/dungeon-cast-browser.styles.d.ts +2 -0
- package/dist/dungeon-cast-browser/dungeon-cast-browser.styles.d.ts.map +1 -0
- package/dist/dungeon-cast-browser/index.d.ts +4 -0
- package/dist/dungeon-cast-browser/index.d.ts.map +1 -0
- package/dist/dungeon-cast-browser/render-model.d.ts +5 -0
- package/dist/dungeon-cast-browser/render-model.d.ts.map +1 -0
- package/dist/dungeon-cast-browser/types.d.ts +60 -0
- package/dist/dungeon-cast-browser/types.d.ts.map +1 -0
- package/dist/dungeon-cast-browser.js +7 -0
- package/dist/dungeon-cast-browser.js.map +1 -0
- package/dist/dungeon-map/dungeon-map.d.ts.map +1 -1
- package/dist/dungeon-map.js +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -5
- package/dist/react/dungeon-cast-browser.d.ts +12 -0
- package/dist/react/dungeon-cast-browser.d.ts.map +1 -0
- package/dist/react/dungeon-cast-browser.js +19 -0
- package/dist/react/dungeon-cast-browser.js.map +1 -0
- package/dist/react/dungeon-map.js +1 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/talent-calculator.js +1 -1
- package/dist/react.js +4 -3
- package/dist/talent-calculator/talent-calculator.d.ts.map +1 -1
- package/dist/talent-calculator.js +1 -1
- package/package.json +35 -25
- package/src/dungeon-cast-browser/README.md +22 -0
- package/dist/chunks/data-source-CoIFvV72.js +0 -10
- package/dist/chunks/data-source-CoIFvV72.js.map +0 -1
- package/dist/chunks/dungeon-map-IPN6sEDj.js.map +0 -1
- package/dist/chunks/talent-calculator-Ch1Pbbba.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"talent-calculator-Dxuc2dZ8.js","names":["#abortController","#flushRendererWarnings","#loadHeroTalents","#skipNextPropertyPointEvent","#emitPointsChange","#normalizeSelections","#reportOverBudget","#rendererFailures","#prepareTalentRenderContent","#emitSelectionChange","#renderHeader","#renderGrid","#renderStatus","#setTalentPoints","#renderTalent","#handleTalentActivation","#renderTalentContent","#pendingRendererWarnings","#renderDefaultTalentIcon","#handleImageError","#loadToken","#lastOverBudgetSignature","#reportWarnings","#setError"],"sources":["../../src/data/package-talent-data-source.ts","../../src/talent-calculator/render-model.ts","../../src/talent-calculator/selection-state.ts","../../src/talent-calculator/talent-calculator.styles.ts","../../src/talent-calculator/talent-calculator.ts"],"sourcesContent":["import { createPackageFellowshipDataClient } from \"@crockery/fellowship-data/client\";\n\nimport type { FellowshipTalentDataSource } from \"./talent-data-source.js\";\n\n/** @deprecated Create a package Fellowship data client instead. */\nexport interface PackageFellowshipTalentDataSourceOptions {\n readonly assetBaseUrl?: string;\n}\n\n/** @deprecated Use `createPackageFellowshipDataClient` from `@crockery/fellowship-data/client`. */\nexport const createPackageFellowshipTalentDataSource = (\n options: PackageFellowshipTalentDataSourceOptions = {},\n): FellowshipTalentDataSource => {\n const client = createPackageFellowshipDataClient(options);\n return {\n loadHeroTalents: (heroId, signal) => client.loadHeroTalents(heroId, signal),\n resolveAssetUrl: (asset) => client.resolveAssetUrl(asset),\n };\n};\n","import { findImage } from \"@crockery/fellowship-data\";\nimport type { Talent } from \"@crockery/fellowship-data\";\n\nimport type {\n FellowshipTalentDataSource,\n TalentCalculatorData,\n} from \"../data/talent-data-source.js\";\nimport type {\n TalentCalculatorRenderModel,\n TalentCalculatorTalentModel,\n TalentCalculatorWarning,\n} from \"./types.js\";\n\nconst romanNumerals = [\"I\", \"II\", \"III\", \"IV\", \"V\", \"VI\"] as const;\n\nexport const talentRowLabel = (row: number): string => romanNumerals[row - 1] ?? String(row);\n\nconst warning = (\n code: TalentCalculatorWarning[\"code\"],\n talent: Talent,\n message: string,\n): TalentCalculatorWarning => ({ code, message, talentId: talent.id });\n\nexport const createTalentCalculatorRenderModel = (\n data: TalentCalculatorData,\n source: FellowshipTalentDataSource,\n): TalentCalculatorRenderModel => {\n const warnings: TalentCalculatorWarning[] = [];\n const occupied = new Set<string>();\n const models: TalentCalculatorTalentModel[] = [];\n\n for (const talent of data.talents) {\n if (talent.row === null && talent.column === null) {\n continue;\n }\n if (\n !Number.isInteger(talent.row) ||\n !Number.isInteger(talent.column) ||\n talent.row === null ||\n talent.column === null ||\n talent.row < 1 ||\n talent.row > 6 ||\n talent.column < 1 ||\n talent.column > 3\n ) {\n warnings.push(\n warning(\n \"invalid-position\",\n talent,\n `Talent “${talent.id}” has an invalid row or column and was skipped.`,\n ),\n );\n continue;\n }\n\n const cell = `${talent.row}:${talent.column}`;\n if (occupied.has(cell)) {\n warnings.push(\n warning(\n \"duplicate-position\",\n talent,\n `Talent “${talent.id}” duplicates row ${talent.row}, column ${talent.column} and was skipped.`,\n ),\n );\n continue;\n }\n occupied.add(cell);\n\n const pointCost =\n Number.isInteger(talent.pointCost) && (talent.pointCost ?? 0) > 0 ? talent.pointCost : null;\n if (pointCost === null) {\n warnings.push(\n warning(\"invalid-cost\", talent, `Talent “${talent.id}” has an invalid point cost.`),\n );\n }\n if (!talent.name) {\n warnings.push(warning(\"missing-name\", talent, `Talent “${talent.id}” has no display name.`));\n }\n if (!talent.description) {\n warnings.push(\n warning(\"missing-description\", talent, `Talent “${talent.id}” has no description.`),\n );\n }\n\n const image =\n findImage(talent.images, { type: \"talent\", size: \"200\" }) ??\n findImage(talent.images, { type: \"talent\", size: \"full\" });\n let imageUrl: string | null = null;\n if (!image) {\n warnings.push(warning(\"missing-image\", talent, `Talent “${talent.id}” has no icon.`));\n } else {\n try {\n imageUrl = source.resolveAssetUrl(image);\n } catch (error: unknown) {\n warnings.push(\n warning(\n \"asset-url-error\",\n talent,\n `The icon URL for talent “${talent.id}” could not be resolved: ${String(error)}.`,\n ),\n );\n }\n }\n\n models.push({\n talent,\n row: talent.row,\n column: talent.column,\n pointCost,\n imageUrl,\n });\n }\n\n models.sort((a, b) => a.row - b.row || a.column - b.column);\n const talentById = new Map(models.map((model) => [model.talent.id, model]));\n const rows = [...new Set(models.map(({ row }) => row))].map((row) => ({\n row,\n label: talentRowLabel(row),\n talents: models.filter((talent) => talent.row === row),\n }));\n\n return { hero: data.hero, rows, talentById, warnings };\n};\n","import type { TalentCalculatorRenderModel, TalentCalculatorSelectionState } from \"./types.js\";\n\nexport const MAX_TALENT_POINTS = 14;\n\nexport const normalizeTalentPoints = (value: number): number =>\n Math.min(\n MAX_TALENT_POINTS,\n Math.max(0, Math.round(Number.isFinite(value) ? value : MAX_TALENT_POINTS)),\n );\n\nexport const normalizeSelectedTalentIds = (\n model: TalentCalculatorRenderModel,\n selectedTalentIds: readonly string[],\n): {\n readonly selectedTalentIds: readonly string[];\n readonly removedTalentIds: readonly string[];\n} => {\n const requested = new Set(selectedTalentIds);\n const selected = [...model.talentById.values()]\n .filter(({ talent }) => requested.has(talent.id))\n .map(({ talent }) => talent.id);\n const selectedSet = new Set(selected);\n const removed = [...new Set(selectedTalentIds)].filter((id) => !selectedSet.has(id));\n return { selectedTalentIds: selected, removedTalentIds: removed };\n};\n\nexport const createTalentCalculatorSelectionState = (\n model: TalentCalculatorRenderModel,\n selectedTalentIds: readonly string[],\n talentPoints: number,\n): TalentCalculatorSelectionState => {\n const selected = new Set(selectedTalentIds);\n const spentPoints = [...model.talentById.values()].reduce(\n (total, talent) =>\n selected.has(talent.talent.id) && talent.pointCost !== null\n ? total + talent.pointCost\n : total,\n 0,\n );\n const remainingPoints = talentPoints - spentPoints;\n return {\n selectedTalentIds: [...model.talentById.values()]\n .filter(({ talent }) => selected.has(talent.id))\n .map(({ talent }) => talent.id),\n spentPoints,\n remainingPoints,\n overBudget: remainingPoints < 0,\n };\n};\n\nexport const canSelectTalent = (\n pointCost: number | null,\n state: TalentCalculatorSelectionState,\n): boolean => pointCost !== null && !state.overBudget && pointCost <= state.remainingPoints;\n","import { css } from \"lit\";\n\nexport const talentCalculatorStyles = css`\n :host {\n --fellowship-talent-background: var(--_fellowship-field-canvas);\n --fellowship-talent-surface: var(--_fellowship-field-surface);\n --fellowship-talent-card-background: var(--_fellowship-field-surface);\n --fellowship-talent-card-selected-background: color-mix(\n in srgb,\n var(--_fellowship-field-surface-raised) 88%,\n var(--_fellowship-field-accent)\n );\n --fellowship-talent-foreground: var(--_fellowship-field-ink);\n --fellowship-talent-muted: var(--_fellowship-field-muted);\n --fellowship-talent-disabled: var(--_fellowship-field-tertiary);\n --fellowship-talent-border: var(--_fellowship-field-border);\n --fellowship-talent-selection: var(--_fellowship-field-accent);\n --fellowship-talent-focus: var(--_fellowship-field-focus);\n --fellowship-talent-points: var(--_fellowship-field-brass);\n --fellowship-talent-danger: var(--_fellowship-field-ember);\n --fellowship-talent-control-surface: var(--_fellowship-field-inset);\n --fellowship-talent-icon-size: 56px;\n --fellowship-talent-font-family: var(--_fellowship-field-font-family);\n --fellowship-talent-tactical-font-family: var(--_fellowship-field-mono-font-family);\n --fellowship-talent-radius: var(--_fellowship-field-radius);\n\n display: block;\n min-width: 0;\n container-type: inline-size;\n color: var(--fellowship-talent-foreground);\n font-family: var(--fellowship-talent-font-family);\n -webkit-font-smoothing: antialiased;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n button {\n font: inherit;\n }\n\n .container {\n min-width: 0;\n padding: 16px;\n border-radius: calc(var(--fellowship-talent-radius) + 2px);\n background: var(--fellowship-talent-background);\n }\n\n .header {\n min-height: 72px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n padding: 8px 8px 24px;\n }\n\n .heading {\n margin: 0;\n color: var(--fellowship-talent-muted);\n font-size: 12px;\n font-weight: 600;\n line-height: 16px;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n }\n\n .points-cluster,\n .point-controls {\n display: flex;\n align-items: center;\n }\n\n .points-cluster {\n gap: 16px;\n }\n\n .points {\n display: flex;\n align-items: baseline;\n gap: 4px;\n color: var(--fellowship-talent-foreground);\n font-family: var(--fellowship-talent-tactical-font-family);\n font-size: 32px;\n font-weight: 600;\n line-height: 40px;\n letter-spacing: -0.04em;\n font-variant-numeric: tabular-nums;\n }\n\n .points-spent {\n color: var(--fellowship-talent-points);\n }\n\n .points-separator,\n .points-total {\n color: var(--_fellowship-field-tertiary);\n }\n\n .points-separator {\n font-size: 18px;\n font-weight: 500;\n }\n\n .points[data-invalid=\"true\"],\n .points[data-invalid=\"true\"] .points-spent {\n color: var(--fellowship-talent-danger);\n }\n\n .point-controls {\n gap: 4px;\n padding: 2px;\n border-radius: calc(var(--fellowship-talent-radius) + 2px);\n background: var(--fellowship-talent-control-surface);\n box-shadow: inset 0 0 0 1px var(--fellowship-talent-border);\n }\n\n .point-control {\n width: 40px;\n height: 40px;\n display: inline-grid;\n place-items: center;\n padding: 0;\n border: 0;\n border-radius: 4px;\n background: transparent;\n color: var(--fellowship-talent-muted);\n font-family: var(--fellowship-talent-tactical-font-family);\n font-size: 18px;\n font-weight: 500;\n line-height: 1;\n cursor: pointer;\n transition:\n background-color 120ms cubic-bezier(0.23, 1, 0.32, 1),\n color 120ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 120ms cubic-bezier(0.23, 1, 0.32, 1);\n }\n\n .point-control:active:not(:disabled) {\n transform: scale(0.97);\n }\n\n .point-control:focus-visible,\n .clear-all:focus-visible,\n .talent:focus-visible,\n .retry-button:focus-visible {\n outline: 2px solid var(--fellowship-talent-focus);\n outline-offset: 2px;\n }\n\n .point-control:disabled {\n color: var(--fellowship-talent-disabled);\n cursor: not-allowed;\n opacity: 0.48;\n }\n\n .clear-all {\n min-height: 44px;\n padding: 0 8px;\n border: 0;\n border-radius: 4px;\n background: transparent;\n color: var(--fellowship-talent-muted);\n font-size: 12px;\n font-weight: 600;\n line-height: 1;\n letter-spacing: 0.04em;\n white-space: nowrap;\n cursor: pointer;\n transition:\n background-color 120ms cubic-bezier(0.23, 1, 0.32, 1),\n color 120ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 120ms cubic-bezier(0.23, 1, 0.32, 1);\n }\n\n .clear-all:active:not(:disabled) {\n transform: scale(0.97);\n }\n\n .clear-all:disabled {\n color: var(--fellowship-talent-disabled);\n cursor: not-allowed;\n opacity: 0.42;\n }\n\n .grid {\n display: grid;\n gap: 16px;\n padding: 8px 0 0;\n }\n\n .row {\n min-width: 0;\n min-inline-size: 0;\n width: 100%;\n display: grid;\n grid-template-columns: 48px minmax(0, 1fr);\n align-items: stretch;\n gap: 8px;\n margin: 0;\n padding: 0;\n border: 0;\n }\n\n .row-label {\n position: relative;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding-top: 16px;\n color: var(--fellowship-talent-disabled);\n font-family: var(--fellowship-talent-tactical-font-family);\n font-size: 11px;\n font-weight: 600;\n line-height: 16px;\n text-align: center;\n letter-spacing: 0.08em;\n }\n\n .row-label::before {\n position: absolute;\n inset: 0 0 0 auto;\n width: 1px;\n background: var(--fellowship-talent-border);\n content: \"\";\n }\n\n .row-label::after {\n position: absolute;\n top: 23px;\n right: -3px;\n width: 7px;\n height: 1px;\n background: var(--fellowship-talent-selection);\n content: \"\";\n }\n\n .row-talents {\n min-width: 0;\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 8px;\n }\n\n fellowship-tooltip {\n display: block;\n min-width: 0;\n }\n\n .talent {\n position: relative;\n width: 100%;\n min-width: 0;\n min-height: 88px;\n display: grid;\n grid-template-columns: var(--fellowship-talent-icon-size) minmax(0, 1fr);\n align-items: center;\n gap: 16px;\n padding: 16px 36px 16px 16px;\n overflow: hidden;\n border: 1px solid transparent;\n border-radius: var(--fellowship-talent-radius);\n background: var(--fellowship-talent-card-background);\n color: var(--fellowship-talent-foreground);\n box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fellowship-talent-border) 64%, transparent);\n text-align: left;\n cursor: pointer;\n transition:\n background-color 140ms cubic-bezier(0.23, 1, 0.32, 1),\n box-shadow 140ms cubic-bezier(0.23, 1, 0.32, 1),\n transform 120ms cubic-bezier(0.23, 1, 0.32, 1),\n opacity 140ms linear;\n }\n\n .talent::before {\n position: absolute;\n top: 16px;\n left: 0;\n width: 2px;\n height: 24px;\n background: transparent;\n content: \"\";\n }\n\n .talent:active:not([aria-disabled=\"true\"]) {\n transform: scale(0.99);\n }\n\n .talent[aria-pressed=\"true\"] {\n background: var(--fellowship-talent-card-selected-background);\n box-shadow: inset 0 0 0 1px\n color-mix(in srgb, var(--fellowship-talent-selection) 32%, transparent);\n }\n\n .talent[aria-pressed=\"true\"]::before {\n background: var(--fellowship-talent-selection);\n }\n\n .talent[aria-disabled=\"true\"] {\n color: var(--fellowship-talent-disabled);\n cursor: not-allowed;\n opacity: 0.46;\n }\n\n .talent-icon,\n .talent-icon-fallback {\n width: var(--fellowship-talent-icon-size);\n height: var(--fellowship-talent-icon-size);\n border-radius: calc(var(--fellowship-talent-radius) - 2px);\n box-shadow: inset 0 0 0 1px var(--fellowship-talent-border);\n }\n\n .talent-icon {\n display: block;\n object-fit: cover;\n }\n\n .talent-icon-fallback {\n display: grid;\n place-items: center;\n background: var(--fellowship-talent-control-surface);\n color: var(--fellowship-talent-muted);\n font-family: var(--fellowship-talent-tactical-font-family);\n font-size: 13px;\n font-weight: 600;\n letter-spacing: 0.08em;\n }\n\n .talent[aria-pressed=\"true\"] .talent-icon,\n .talent[aria-pressed=\"true\"] .talent-icon-fallback {\n box-shadow:\n inset 0 0 0 1px var(--fellowship-talent-border),\n 0 0 0 1px color-mix(in srgb, var(--fellowship-talent-selection) 60%, transparent);\n }\n\n .talent-name {\n min-width: 0;\n overflow: hidden;\n color: currentColor;\n font-size: 16px;\n font-weight: 600;\n line-height: 24px;\n text-overflow: ellipsis;\n text-wrap: balance;\n white-space: nowrap;\n }\n\n .talent-cost {\n position: absolute;\n top: 12px;\n right: 12px;\n color: var(--fellowship-talent-muted);\n font-family: var(--fellowship-talent-tactical-font-family);\n font-size: 11px;\n font-weight: 600;\n line-height: 16px;\n font-variant-numeric: tabular-nums;\n }\n\n .talent[aria-pressed=\"true\"] .talent-cost {\n color: var(--fellowship-talent-focus);\n }\n\n .status {\n min-height: 256px;\n display: grid;\n place-items: center;\n padding: 32px;\n color: var(--fellowship-talent-muted);\n text-align: center;\n }\n\n .status-card {\n max-width: 480px;\n }\n\n .status-mark {\n display: flex;\n width: 40px;\n height: 24px;\n align-items: center;\n justify-content: space-between;\n margin: 0 auto 16px;\n color: var(--fellowship-talent-points);\n font-family: var(--fellowship-talent-tactical-font-family);\n font-size: 16px;\n }\n\n .status-mark::before,\n .status-mark::after {\n width: 8px;\n height: 1px;\n background: var(--fellowship-talent-border);\n content: \"\";\n }\n\n .status-title {\n margin: 0;\n color: var(--fellowship-talent-foreground);\n font-size: 18px;\n font-weight: 600;\n line-height: 24px;\n text-wrap: balance;\n }\n\n .status-copy {\n margin: 8px 0 0;\n font-size: 14px;\n line-height: 24px;\n text-wrap: pretty;\n }\n\n .retry-button {\n min-height: 44px;\n margin-top: 24px;\n padding: 0 16px;\n border: 1px solid var(--fellowship-talent-border);\n border-radius: 4px;\n background: var(--fellowship-talent-control-surface);\n color: var(--fellowship-talent-foreground);\n font-weight: 600;\n cursor: pointer;\n }\n\n .visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n @media (hover: hover) {\n .point-control:hover:not(:disabled) {\n background: var(--fellowship-talent-surface);\n color: var(--fellowship-talent-foreground);\n }\n\n .clear-all:hover:not(:disabled) {\n background: color-mix(in srgb, var(--fellowship-talent-danger) 8%, transparent);\n color: var(--fellowship-talent-danger);\n }\n\n .talent:hover:not([aria-disabled=\"true\"]) {\n background: var(--_fellowship-field-surface-raised);\n box-shadow: inset 0 0 0 1px var(--fellowship-talent-border);\n }\n }\n\n @container (max-width: 719px) {\n .container {\n padding: 16px 12px;\n }\n\n .header {\n min-height: 80px;\n grid-template-columns: 1fr;\n display: grid;\n gap: 8px;\n padding: 4px 4px 20px;\n }\n\n .heading {\n font-size: 11px;\n }\n\n .points-cluster {\n width: 100%;\n flex-wrap: wrap;\n justify-content: flex-start;\n gap: 8px;\n }\n\n .points {\n font-size: 28px;\n line-height: 36px;\n }\n\n .grid {\n gap: 24px;\n }\n\n .row {\n grid-template-columns: 1fr;\n gap: 8px;\n }\n\n .row-label {\n min-height: 24px;\n align-items: center;\n justify-content: flex-start;\n padding: 0 0 0 16px;\n text-align: left;\n }\n\n .row-label::before {\n inset: 12px auto auto 0;\n width: 8px;\n height: 1px;\n }\n\n .row-label::after {\n top: 9px;\n right: auto;\n left: 0;\n width: 1px;\n height: 7px;\n }\n\n .row-talents {\n grid-template-columns: 1fr;\n gap: 8px;\n }\n\n .talent {\n --fellowship-talent-icon-size: 52px;\n\n min-height: 80px;\n padding-block: 12px;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .point-control,\n .clear-all,\n .talent {\n transition:\n background-color 100ms linear,\n box-shadow 100ms linear,\n color 100ms linear,\n opacity 100ms linear;\n }\n\n .point-control:active:not(:disabled),\n .clear-all:active:not(:disabled),\n .talent:active:not([aria-disabled=\"true\"]) {\n transform: none;\n }\n }\n`;\n","import { html, LitElement, nothing, type PropertyValues, type TemplateResult } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { repeat } from \"lit/directives/repeat.js\";\n\nimport { assertSupportedFellowshipDataSchema, FellowshipDataError } from \"../data/data-source.js\";\nimport { createPackageFellowshipTalentDataSource } from \"../data/package-talent-data-source.js\";\nimport type { FellowshipTalentDataSource } from \"../data/talent-data-source.js\";\nimport { fieldManualStyles } from \"../styles/field-manual.styles.js\";\nimport { installFieldManualFonts } from \"../styles/field-manual-fonts.js\";\nimport { stripFellowshipRichText } from \"../tooltip/rich-text.js\";\nimport { defineFellowshipTooltip } from \"../tooltip/tooltip.js\";\nimport { createTalentCalculatorRenderModel } from \"./render-model.js\";\nimport {\n canSelectTalent,\n createTalentCalculatorSelectionState,\n MAX_TALENT_POINTS,\n normalizeSelectedTalentIds,\n normalizeTalentPoints,\n} from \"./selection-state.js\";\nimport { talentCalculatorStyles } from \"./talent-calculator.styles.js\";\nimport type {\n FellowshipTalentsErrorDetail,\n FellowshipTalentsReadyDetail,\n FellowshipTalentsWarningDetail,\n LitTalentRenderer,\n TalentCalculatorRenderModel,\n TalentCalculatorSelectionState,\n TalentCalculatorTalentModel,\n TalentCalculatorTalentRenderContext,\n TalentCalculatorWarning,\n TalentPointsChangeDetail,\n TalentPointsChangeSource,\n TalentSelectionChangeDetail,\n TalentSelectionChangeSource,\n} from \"./types.js\";\n\ntype ComponentStatus = \"empty\" | \"loading\" | \"ready\" | \"error\";\n\ninterface TalentPresentation {\n readonly context: TalentCalculatorTalentRenderContext;\n readonly name: string;\n readonly descriptionId: string;\n readonly affordability: string;\n readonly description: string;\n}\n\nconst eventOptions = { bubbles: true, composed: true } as const;\n\nconst stringArrayChanged = (\n value: readonly string[],\n previous: readonly string[] | undefined,\n): boolean =>\n value.length !== previous?.length || value.some((item, index) => item !== previous[index]);\n\nexport const talentSlotName = (talentId: string): string => `talent:${talentId}`;\n\nconst fallbackSelectionState = (talentPoints: number): TalentCalculatorSelectionState => ({\n selectedTalentIds: [],\n spentPoints: 0,\n remainingPoints: talentPoints,\n overBudget: false,\n});\n\nexport { MAX_TALENT_POINTS };\n\n/**\n * @fires fellowship-talents-ready - Fired after talent data is loaded and rendered.\n * @fires fellowship-talents-error - Fired when talent data cannot be loaded.\n * @fires fellowship-talents-warning - Fired for recoverable data and renderer issues.\n * @fires fellowship-talent-selection-change - Fired when selected talents change.\n * @fires fellowship-talent-points-change - Fired when the point budget changes.\n */\n@customElement(\"fellowship-talent-calculator\")\nexport class FellowshipTalentCalculatorElement extends LitElement {\n static override styles = [fieldManualStyles, talentCalculatorStyles];\n\n @property({ type: String, attribute: \"hero-id\" }) heroId = \"\";\n @property({ type: Number, attribute: \"talent-points\" }) talentPoints = MAX_TALENT_POINTS;\n @property({ attribute: false, hasChanged: stringArrayChanged })\n selectedTalentIds: readonly string[] = [];\n @property({ type: String, attribute: \"asset-base-url\" }) assetBaseUrl: string | null = null;\n @property({ attribute: false }) dataSource: FellowshipTalentDataSource | null = null;\n @property({ attribute: false }) renderTalent: LitTalentRenderer | null = null;\n @property({ type: Boolean, attribute: \"show-point-controls\" }) showPointControls = true;\n @property({ type: Boolean, attribute: \"show-tooltips\" }) showTooltips = true;\n\n @state() private _status: ComponentStatus = \"empty\";\n @state() private _error: FellowshipTalentsErrorDetail | null = null;\n @state() private _model: TalentCalculatorRenderModel | null = null;\n @state() private _failedImages = new Set<string>();\n @state() private _announcement = \"\";\n @state() private _renderSelectionState = fallbackSelectionState(MAX_TALENT_POINTS);\n @state() private _talentPresentation = new Map<string, TalentPresentation>();\n @state() private _talentRenderContent = new Map<string, unknown>();\n\n #abortController: AbortController | null = null;\n #loadToken = 0;\n #lastOverBudgetSignature: string | null = null;\n #skipNextPropertyPointEvent = false;\n #rendererFailures = new Set<string>();\n #pendingRendererWarnings: TalentCalculatorWarning[] = [];\n\n override connectedCallback(): void {\n super.connectedCallback();\n installFieldManualFonts(this.ownerDocument);\n }\n\n override disconnectedCallback(): void {\n this.#abortController?.abort();\n super.disconnectedCallback();\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n super.updated(changed);\n this.#flushRendererWarnings();\n\n if (changed.has(\"heroId\") || changed.has(\"dataSource\") || changed.has(\"assetBaseUrl\")) {\n queueMicrotask(() => {\n if (this.isConnected) {\n void this.#loadHeroTalents();\n }\n });\n return;\n }\n\n if (changed.has(\"talentPoints\")) {\n const normalized = normalizeTalentPoints(this.talentPoints);\n if (normalized !== this.talentPoints) {\n this.#skipNextPropertyPointEvent = true;\n this.talentPoints = normalized;\n this.#emitPointsChange(\"normalization\");\n return;\n }\n if (this.#skipNextPropertyPointEvent) {\n this.#skipNextPropertyPointEvent = false;\n } else if (changed.get(\"talentPoints\") !== undefined) {\n this.#emitPointsChange(\"property\");\n }\n }\n\n if (changed.has(\"selectedTalentIds\") && this._model) {\n this.#normalizeSelections(true);\n }\n\n this.#reportOverBudget();\n }\n\n protected override willUpdate(changed: PropertyValues): void {\n super.willUpdate(changed);\n\n const selectionChanged =\n changed.has(\"_model\") || changed.has(\"selectedTalentIds\") || changed.has(\"talentPoints\");\n if (selectionChanged) {\n this._renderSelectionState = this._model\n ? createTalentCalculatorSelectionState(\n this._model,\n this.selectedTalentIds,\n this.talentPoints,\n )\n : fallbackSelectionState(this.talentPoints);\n }\n\n if (changed.has(\"renderTalent\")) {\n this.#rendererFailures.clear();\n }\n if (selectionChanged || changed.has(\"renderTalent\")) {\n this.#prepareTalentRenderContent(this._renderSelectionState);\n }\n }\n\n get renderModel(): TalentCalculatorRenderModel | null {\n return this._model;\n }\n\n get selectionState(): TalentCalculatorSelectionState {\n return this._model\n ? createTalentCalculatorSelectionState(this._model, this.selectedTalentIds, this.talentPoints)\n : fallbackSelectionState(this.talentPoints);\n }\n\n reset(): void {\n if (this.selectedTalentIds.length === 0) {\n return;\n }\n this.selectedTalentIds = [];\n this.#emitSelectionChange(\"reset\");\n }\n\n selectTalent(talentId: string): boolean {\n const model = this._model?.talentById.get(talentId);\n const state = this.selectionState;\n if (\n !model ||\n state.selectedTalentIds.includes(talentId) ||\n !canSelectTalent(model.pointCost, state)\n ) {\n return false;\n }\n this.selectedTalentIds = [...state.selectedTalentIds, talentId];\n this.#emitSelectionChange(\"api\");\n return true;\n }\n\n deselectTalent(talentId: string): boolean {\n if (!this.selectionState.selectedTalentIds.includes(talentId)) {\n return false;\n }\n this.selectedTalentIds = this.selectionState.selectedTalentIds.filter((id) => id !== talentId);\n this.#emitSelectionChange(\"api\");\n return true;\n }\n\n retry(): void {\n void this.#loadHeroTalents();\n }\n\n override render(): TemplateResult {\n const state = this._renderSelectionState;\n const label = this._model?.hero.name ?? this._model?.hero.id ?? \"Fellowship hero\";\n return html`\n <section\n class=\"container\"\n part=\"container\"\n aria-label=${`${label} talent calculator`}\n aria-invalid=${String(state.overBudget)}\n >\n ${this.#renderHeader(state)}\n ${\n this._status === \"ready\" && this._model\n ? this.#renderGrid(this._model)\n : this.#renderStatus()\n }\n <p class=\"visually-hidden\" role=\"status\" aria-live=\"polite\">${this._announcement}</p>\n </section>\n `;\n }\n\n #renderHeader(state: TalentCalculatorSelectionState): TemplateResult {\n return html`\n <header class=\"header\" part=\"header\">\n <h2 class=\"heading\" part=\"heading\">Talent points</h2>\n <div class=\"points-cluster\">\n <div\n class=\"points\"\n part=\"points\"\n data-invalid=${String(state.overBudget)}\n aria-label=${`${state.spentPoints} of ${this.talentPoints} talent points spent`}\n aria-live=\"polite\"\n >\n <span class=\"points-spent\" part=\"points-spent\">${state.spentPoints}</span>\n <span class=\"points-separator\" aria-hidden=\"true\">/</span>\n <span class=\"points-total\" part=\"points-total\">${this.talentPoints}</span>\n </div>\n ${\n this.showPointControls\n ? html`\n <div\n class=\"point-controls\"\n part=\"point-controls\"\n role=\"group\"\n aria-label=\"Talent points\"\n >\n <button\n class=\"point-control\"\n part=\"point-control\"\n type=\"button\"\n aria-label=\"Decrease available talent points\"\n title=\"Decrease available talent points\"\n ?disabled=${this.talentPoints <= state.spentPoints}\n @click=${() => this.#setTalentPoints(this.talentPoints - 1, \"decrement\")}\n >\n −\n </button>\n <button\n class=\"point-control\"\n part=\"point-control\"\n type=\"button\"\n aria-label=\"Increase available talent points\"\n title=\"Increase available talent points\"\n ?disabled=${this.talentPoints >= MAX_TALENT_POINTS}\n @click=${() => this.#setTalentPoints(this.talentPoints + 1, \"increment\")}\n >\n +\n </button>\n </div>\n `\n : nothing\n }\n <button\n class=\"clear-all\"\n part=\"clear-all\"\n type=\"button\"\n ?disabled=${state.selectedTalentIds.length === 0}\n @click=${this.reset}\n >\n Clear All\n </button>\n </div>\n </header>\n `;\n }\n\n #renderGrid(model: TalentCalculatorRenderModel): TemplateResult {\n if (model.rows.length === 0) {\n return html`\n <div class=\"status\" part=\"empty-state\" role=\"status\">\n <div class=\"status-card\">\n <div class=\"status-mark\" aria-hidden=\"true\">◇</div>\n <p class=\"status-title\">No active talents</p>\n <p class=\"status-copy\">\n ${model.hero.name ?? model.hero.id} has no positioned talents.\n </p>\n </div>\n </div>\n `;\n }\n\n return html`\n <div class=\"grid\" part=\"grid\" role=\"group\" aria-label=\"Talent tiers\">\n ${repeat(\n model.rows,\n (row) => row.row,\n (row) => html`\n <fieldset class=\"row\" part=\"row\">\n <legend class=\"visually-hidden\">Talent tier ${row.label}</legend>\n <span class=\"row-label\" part=\"row-label\" aria-hidden=\"true\">${row.label}</span>\n <div class=\"row-talents\">\n ${repeat(\n row.talents,\n (talent) => talent.talent.id,\n (talent) => this.#renderTalent(talent),\n )}\n </div>\n </fieldset>\n `,\n )}\n </div>\n `;\n }\n\n #renderTalent(talent: TalentCalculatorTalentModel): TemplateResult | typeof nothing {\n const presentation = this._talentPresentation.get(talent.talent.id);\n if (!presentation) {\n return nothing;\n }\n const { context, name, descriptionId, affordability, description } = presentation;\n const { selected, disabled } = context;\n const card = html`\n <button\n class=\"talent\"\n part=\"talent\"\n type=\"button\"\n aria-label=${`${name}, ${affordability}`}\n aria-describedby=${descriptionId}\n aria-pressed=${String(selected)}\n aria-disabled=${String(disabled)}\n @click=${() => this.#handleTalentActivation(talent, selected, disabled)}\n >\n ${this.#renderTalentContent(context)}\n <span class=\"talent-cost\" part=\"talent-cost\">${talent.pointCost ?? \"–\"}</span>\n </button>\n `;\n\n return html`\n ${\n this.showTooltips && (talent.talent.description || disabled)\n ? html`\n <fellowship-tooltip\n .heading=${name}\n .text=${talent.talent.description ?? affordability}\n >\n ${card}\n </fellowship-tooltip>\n `\n : card\n }\n <span class=\"visually-hidden\" id=${descriptionId}>${description}</span>\n `;\n }\n\n #prepareTalentRenderContent(state: TalentCalculatorSelectionState): void {\n const renderer = this.renderTalent;\n const model = this._model;\n const content = new Map<string, unknown>();\n const presentations = new Map<string, TalentPresentation>();\n\n if (model) {\n for (const talent of model.talentById.values()) {\n const selected = state.selectedTalentIds.includes(talent.talent.id);\n const affordable = canSelectTalent(talent.pointCost, state);\n const disabled = !selected && !affordable;\n const name = talent.talent.name ?? talent.talent.id;\n const affordability =\n talent.pointCost === null\n ? \"This talent has no valid point cost.\"\n : disabled\n ? `Requires ${talent.pointCost} talent points; ${Math.max(0, state.remainingPoints)} remaining.`\n : `${talent.pointCost} talent ${talent.pointCost === 1 ? \"point\" : \"points\"}.`;\n const context: TalentCalculatorTalentRenderContext = {\n talent,\n hero: model.hero,\n selected,\n affordable,\n disabled,\n spentPoints: state.spentPoints,\n remainingPoints: state.remainingPoints,\n talentPoints: this.talentPoints,\n };\n presentations.set(talent.talent.id, {\n context,\n name,\n descriptionId: `talent-description-${talent.row}-${talent.column}`,\n affordability,\n description: [stripFellowshipRichText(talent.talent.description ?? \"\"), affordability]\n .filter(Boolean)\n .join(\" \"),\n });\n if (!renderer) {\n continue;\n }\n try {\n content.set(talent.talent.id, renderer(context));\n } catch (error: unknown) {\n if (!this.#rendererFailures.has(talent.talent.id)) {\n this.#rendererFailures.add(talent.talent.id);\n this.#pendingRendererWarnings.push({\n code: \"renderer-error\",\n message: `The talent renderer failed for “${talent.talent.id}”: ${String(error)}.`,\n talentId: talent.talent.id,\n });\n }\n }\n }\n }\n\n this._talentPresentation = presentations;\n this._talentRenderContent = content;\n }\n\n #renderTalentContent(context: TalentCalculatorTalentRenderContext): unknown {\n const talent = context.talent;\n const name = talent.talent.name ?? talent.talent.id;\n const content =\n this.renderTalent && this._talentRenderContent.has(talent.talent.id)\n ? this._talentRenderContent.get(talent.talent.id)\n : html`\n <slot name=${talentSlotName(talent.talent.id)}>\n <span class=\"talent-name\" part=\"talent-name\" title=${name}>${name}</span>\n </slot>\n `;\n\n return html`\n ${this.#renderDefaultTalentIcon(talent, name)} ${content}\n `;\n }\n\n #renderDefaultTalentIcon(talent: TalentCalculatorTalentModel, name: string): TemplateResult {\n if (talent.imageUrl && !this._failedImages.has(talent.talent.id)) {\n return html`\n <img\n class=\"talent-icon\"\n part=\"talent-icon\"\n src=${talent.imageUrl}\n alt=\"\"\n draggable=\"false\"\n @error=${() => this.#handleImageError(talent)}\n />\n `;\n }\n const rune = name\n .split(/\\s+/)\n .map((part) => part[0])\n .join(\"\")\n .slice(0, 2)\n .toUpperCase();\n return html`<span class=\"talent-icon-fallback\" part=\"talent-icon-fallback\">${rune}</span>`;\n }\n\n #renderStatus(): TemplateResult {\n const loading = this._status === \"loading\";\n const empty = this._status === \"empty\";\n const title = loading\n ? \"Reading talent codex\"\n : empty\n ? \"Choose a hero\"\n : \"Talents unavailable\";\n const copy = loading\n ? \"Loading the hero and their available talents.\"\n : empty\n ? \"Set the hero-id attribute or heroId property to build a talent loadout.\"\n : (this._error?.message ?? \"An unexpected talent data error occurred.\");\n return html`\n <div\n class=\"status\"\n part=${this._status === \"error\" ? \"error-state\" : \"status\"}\n role=${this._status === \"error\" ? \"alert\" : \"status\"}\n >\n <div class=\"status-card\">\n <div class=\"status-mark\" aria-hidden=\"true\">${loading ? \"…\" : \"✦\"}</div>\n <p class=\"status-title\">${title}</p>\n <p class=\"status-copy\">${copy}</p>\n ${\n this._status === \"error\"\n ? html`<button class=\"retry-button\" type=\"button\" @click=${this.retry}>Retry</button>`\n : nothing\n }\n </div>\n </div>\n `;\n }\n\n async #loadHeroTalents(): Promise<void> {\n const heroId = this.heroId.trim();\n const token = ++this.#loadToken;\n this.#abortController?.abort();\n this.#abortController = new AbortController();\n this._model = null;\n this._error = null;\n this._failedImages = new Set();\n this.#rendererFailures.clear();\n this.#lastOverBudgetSignature = null;\n\n if (!heroId) {\n this._status = \"empty\";\n return;\n }\n\n this._status = \"loading\";\n const source =\n this.dataSource ??\n createPackageFellowshipTalentDataSource(\n this.assetBaseUrl ? { assetBaseUrl: this.assetBaseUrl } : {},\n );\n\n try {\n const data = await source.loadHeroTalents(heroId, this.#abortController.signal);\n if (token !== this.#loadToken || this.#abortController.signal.aborted) {\n return;\n }\n assertSupportedFellowshipDataSchema(data.manifest.schemaVersion);\n const model = createTalentCalculatorRenderModel(data, source);\n this._model = model;\n this._status = \"ready\";\n const normalized = this.#normalizeSelections(false);\n await this.updateComplete;\n const selection = this.selectionState;\n this.dispatchEvent(\n new CustomEvent<FellowshipTalentsReadyDetail>(\"fellowship-talents-ready\", {\n ...eventOptions,\n detail: { data, model, selection },\n }),\n );\n if (model.warnings.length > 0) {\n this.#reportWarnings(model.warnings);\n }\n if (normalized) {\n this.#emitSelectionChange(\"normalization\");\n }\n this.#reportOverBudget();\n } catch (error: unknown) {\n if (token !== this.#loadToken || this.#abortController.signal.aborted) {\n return;\n }\n this.#setError(error);\n }\n }\n\n #normalizeSelections(emit: boolean): boolean {\n if (!this._model) {\n return false;\n }\n const normalized = normalizeSelectedTalentIds(this._model, this.selectedTalentIds);\n const changed =\n normalized.selectedTalentIds.length !== this.selectedTalentIds.length ||\n normalized.selectedTalentIds.some((id, index) => id !== this.selectedTalentIds[index]);\n if (!changed) {\n return false;\n }\n this.selectedTalentIds = normalized.selectedTalentIds;\n if (normalized.removedTalentIds.length > 0) {\n this.#reportWarnings([\n {\n code: \"invalid-selection\",\n message: `Removed unavailable talent selections: ${normalized.removedTalentIds.join(\", \")}.`,\n talentId: null,\n },\n ]);\n }\n if (emit) {\n this.#emitSelectionChange(\"normalization\");\n }\n return true;\n }\n\n #handleTalentActivation(\n talent: TalentCalculatorTalentModel,\n selected: boolean,\n disabled: boolean,\n ): void {\n if (selected) {\n this.selectedTalentIds = this.selectionState.selectedTalentIds.filter(\n (id) => id !== talent.talent.id,\n );\n this.#emitSelectionChange(\"user\");\n return;\n }\n if (disabled) {\n this._announcement = this.selectionState.overBudget\n ? \"The current build exceeds the available talent points. Deselect a talent first.\"\n : `Not enough points for ${talent.talent.name ?? talent.talent.id}.`;\n return;\n }\n this.selectedTalentIds = [...this.selectionState.selectedTalentIds, talent.talent.id];\n this.#emitSelectionChange(\"user\");\n }\n\n #setTalentPoints(value: number, source: TalentPointsChangeSource): void {\n const normalized = normalizeTalentPoints(value);\n const state = this.selectionState;\n if (normalized === this.talentPoints || normalized < state.spentPoints) {\n return;\n }\n this.talentPoints = normalized;\n this.#skipNextPropertyPointEvent = true;\n this.#emitPointsChange(source);\n }\n\n #emitSelectionChange(source: TalentSelectionChangeSource): void {\n const state = this._model\n ? createTalentCalculatorSelectionState(this._model, this.selectedTalentIds, this.talentPoints)\n : fallbackSelectionState(this.talentPoints);\n this.dispatchEvent(\n new CustomEvent<TalentSelectionChangeDetail>(\"fellowship-talent-selection-change\", {\n ...eventOptions,\n detail: { ...state, source },\n }),\n );\n }\n\n #emitPointsChange(source: TalentPointsChangeSource): void {\n const state = this.selectionState;\n this.dispatchEvent(\n new CustomEvent<TalentPointsChangeDetail>(\"fellowship-talent-points-change\", {\n ...eventOptions,\n detail: { ...state, talentPoints: this.talentPoints, source },\n }),\n );\n }\n\n #reportOverBudget(): void {\n const state = this.selectionState;\n if (!state.overBudget) {\n this.#lastOverBudgetSignature = null;\n this.removeAttribute(\"aria-invalid\");\n return;\n }\n this.setAttribute(\"aria-invalid\", \"true\");\n const signature = `${this.talentPoints}:${state.selectedTalentIds.join(\",\")}`;\n if (signature === this.#lastOverBudgetSignature) {\n return;\n }\n this.#lastOverBudgetSignature = signature;\n this.#reportWarnings([\n {\n code: \"over-budget\",\n message: `The selected talents cost ${state.spentPoints} points, exceeding the ${this.talentPoints}-point budget.`,\n talentId: null,\n },\n ]);\n }\n\n #handleImageError(talent: TalentCalculatorTalentModel): void {\n if (this._failedImages.has(talent.talent.id)) {\n return;\n }\n this._failedImages = new Set(this._failedImages).add(talent.talent.id);\n this.#reportWarnings([\n {\n code: \"asset-image-error\",\n message: `The icon for talent “${talent.talent.id}” could not be loaded.`,\n talentId: talent.talent.id,\n },\n ]);\n }\n\n #reportWarnings(warnings: readonly TalentCalculatorWarning[]): void {\n this.dispatchEvent(\n new CustomEvent<FellowshipTalentsWarningDetail>(\"fellowship-talents-warning\", {\n ...eventOptions,\n detail: { warnings, model: this._model },\n }),\n );\n }\n\n #flushRendererWarnings(): void {\n if (this.#pendingRendererWarnings.length === 0) {\n return;\n }\n const warnings = this.#pendingRendererWarnings;\n this.#pendingRendererWarnings = [];\n this.#reportWarnings(warnings);\n }\n\n #setError(error: unknown): void {\n const detail: FellowshipTalentsErrorDetail =\n typeof error === \"object\" && error !== null && \"code\" in error && \"message\" in error\n ? {\n code: String(error.code),\n message: String(error.message),\n ...(error instanceof FellowshipDataError && error.cause !== undefined\n ? { cause: error.cause }\n : {}),\n }\n : { code: \"unknown\", message: error instanceof Error ? error.message : String(error) };\n this._error = detail;\n this._status = \"error\";\n this.dispatchEvent(\n new CustomEvent<FellowshipTalentsErrorDetail>(\"fellowship-talents-error\", {\n ...eventOptions,\n detail,\n }),\n );\n }\n}\n\nexport const defineFellowshipTalentCalculator = (): void => {\n defineFellowshipTooltip();\n if (!customElements.get(\"fellowship-talent-calculator\")) {\n customElements.define(\"fellowship-talent-calculator\", FellowshipTalentCalculatorElement);\n }\n};\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"fellowship-talent-calculator\": FellowshipTalentCalculatorElement;\n }\n}\n"],"mappings":";;;;;;;;;AAUA,IAAa,KACX,IAAoD,CAAC,MACtB;CAC/B,IAAM,IAAS,EAAkC,CAAO;CACxD,OAAO;EACL,kBAAkB,GAAQ,MAAW,EAAO,gBAAgB,GAAQ,CAAM;EAC1E,kBAAkB,MAAU,EAAO,gBAAgB,CAAK;CAC1D;AACF,GCLM,IAAgB;CAAC;CAAK;CAAM;CAAO;CAAM;CAAK;AAAI,GAE3C,KAAkB,MAAwB,EAAc,IAAM,MAAM,OAAO,CAAG,GAErF,KACJ,GACA,GACA,OAC6B;CAAE;CAAM;CAAS,UAAU,EAAO;AAAG,IAEvD,KACX,GACA,MACgC;CAChC,IAAM,IAAsC,CAAC,GACvC,oBAAW,IAAI,IAAY,GAC3B,IAAwC,CAAC;CAE/C,KAAK,IAAM,KAAU,EAAK,SAAS;EACjC,IAAI,EAAO,QAAQ,QAAQ,EAAO,WAAW,MAC3C;EAEF,IACE,CAAC,OAAO,UAAU,EAAO,GAAG,KAC5B,CAAC,OAAO,UAAU,EAAO,MAAM,KAC/B,EAAO,QAAQ,QACf,EAAO,WAAW,QAClB,EAAO,MAAM,KACb,EAAO,MAAM,KACb,EAAO,SAAS,KAChB,EAAO,SAAS,GAChB;GACA,EAAS,KACP,EACE,oBACA,GACA,WAAW,EAAO,GAAG,gDACvB,CACF;GACA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AA8B,CAAA,GAAA,CAAA;AA6oB7C,IAAa,UAA+C;CAE1D,AADA,EAAwB,GACnB,eAAe,IAAI,8BAA8B,KACpD,eAAe,OAAO,gCAAgC,CAAiC;AAE3F"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { DungeonCastData } from "@crockery/fellowship-data/client";
|
|
2
|
+
import type { FellowshipDataClient } from "@crockery/fellowship-data/client";
|
|
3
|
+
/** @deprecated Use the corresponding `FellowshipDataClient` methods. */
|
|
4
|
+
export type FellowshipCastDataSource = Pick<FellowshipDataClient, "loadDungeonCasts" | "resolveAssetUrl">;
|
|
5
|
+
//# sourceMappingURL=cast-data-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cast-data-source.d.ts","sourceRoot":"","sources":["../../src/data/cast-data-source.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,wEAAwE;AACxE,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,oBAAoB,EACpB,kBAAkB,GAAG,iBAAiB,CACvC,CAAC"}
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
loadDungeon(dungeonId: string, signal?: AbortSignal): Promise<DungeonMapData>;
|
|
9
|
-
resolveAssetUrl(asset: ImageAssetRef): string;
|
|
10
|
-
}
|
|
11
|
-
export type FellowshipDataErrorCode = "aborted" | "dungeon-not-found" | "hero-not-found" | "unsupported-schema" | "data-load-failed";
|
|
12
|
-
export declare class FellowshipDataError extends Error {
|
|
13
|
-
readonly code: FellowshipDataErrorCode;
|
|
14
|
-
readonly cause?: unknown;
|
|
15
|
-
constructor(code: FellowshipDataErrorCode, message: string, cause?: unknown);
|
|
16
|
-
}
|
|
1
|
+
import { FellowshipDataError } from "@crockery/fellowship-data/client";
|
|
2
|
+
export { FellowshipDataError };
|
|
3
|
+
export type { DungeonMapData, FellowshipDataErrorCode, } from "@crockery/fellowship-data/client";
|
|
4
|
+
import type { FellowshipDataClient } from "@crockery/fellowship-data/client";
|
|
5
|
+
export declare const assertSupportedFellowshipDataSchema: (schemaVersion: number) => void;
|
|
6
|
+
/** @deprecated Use the corresponding `FellowshipDataClient` methods. */
|
|
7
|
+
export type FellowshipDataSource = Pick<FellowshipDataClient, "loadDungeon" | "resolveAssetUrl">;
|
|
17
8
|
//# sourceMappingURL=data-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-source.d.ts","sourceRoot":"","sources":["../../src/data/data-source.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"data-source.d.ts","sourceRoot":"","sources":["../../src/data/data-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EACV,cAAc,EACd,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAI7E,eAAO,MAAM,mCAAmC,GAAI,eAAe,MAAM,KAAG,IAO3E,CAAC;AAEF,wEAAwE;AACxE,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,EAAE,aAAa,GAAG,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FellowshipCastDataSource } from "./cast-data-source.js";
|
|
2
|
+
/** @deprecated Create a package Fellowship data client instead. */
|
|
3
|
+
export interface PackageFellowshipCastDataSourceOptions {
|
|
4
|
+
readonly assetBaseUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
/** @deprecated Use `createPackageFellowshipDataClient` from `@crockery/fellowship-data/client`. */
|
|
7
|
+
export declare const createPackageFellowshipCastDataSource: (options?: PackageFellowshipCastDataSourceOptions) => FellowshipCastDataSource;
|
|
8
|
+
//# sourceMappingURL=package-cast-data-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-cast-data-source.d.ts","sourceRoot":"","sources":["../../src/data/package-cast-data-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,mEAAmE;AACnE,MAAM,WAAW,sCAAsC;IACrD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,mGAAmG;AACnG,eAAO,MAAM,qCAAqC,GAChD,UAAS,sCAA2C,KACnD,wBAMF,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { FellowshipDataSource } from "./data-source.js";
|
|
2
|
+
/** @deprecated Create a package Fellowship data client instead. */
|
|
2
3
|
export interface PackageFellowshipDataSourceOptions {
|
|
3
4
|
readonly assetBaseUrl?: string;
|
|
4
5
|
}
|
|
6
|
+
/** @deprecated Use `createPackageFellowshipDataClient` from `@crockery/fellowship-data/client`. */
|
|
5
7
|
export declare const createPackageFellowshipDataSource: (options?: PackageFellowshipDataSourceOptions) => FellowshipDataSource;
|
|
6
8
|
//# sourceMappingURL=package-data-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-data-source.d.ts","sourceRoot":"","sources":["../../src/data/package-data-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package-data-source.d.ts","sourceRoot":"","sources":["../../src/data/package-data-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,mEAAmE;AACnE,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,mGAAmG;AACnG,eAAO,MAAM,iCAAiC,GAC5C,UAAS,kCAAuC,KAC/C,oBAMF,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { FellowshipTalentDataSource } from "./talent-data-source.js";
|
|
2
|
+
/** @deprecated Create a package Fellowship data client instead. */
|
|
2
3
|
export interface PackageFellowshipTalentDataSourceOptions {
|
|
3
4
|
readonly assetBaseUrl?: string;
|
|
4
5
|
}
|
|
6
|
+
/** @deprecated Use `createPackageFellowshipDataClient` from `@crockery/fellowship-data/client`. */
|
|
5
7
|
export declare const createPackageFellowshipTalentDataSource: (options?: PackageFellowshipTalentDataSourceOptions) => FellowshipTalentDataSource;
|
|
6
8
|
//# sourceMappingURL=package-talent-data-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-talent-data-source.d.ts","sourceRoot":"","sources":["../../src/data/package-talent-data-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"package-talent-data-source.d.ts","sourceRoot":"","sources":["../../src/data/package-talent-data-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,mEAAmE;AACnE,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,mGAAmG;AACnG,eAAO,MAAM,uCAAuC,GAClD,UAAS,wCAA6C,KACrD,0BAMF,CAAC"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly talents: readonly Talent[];
|
|
6
|
-
}
|
|
7
|
-
export interface FellowshipTalentDataSource {
|
|
8
|
-
loadHeroTalents(heroId: string, signal?: AbortSignal): Promise<TalentCalculatorData>;
|
|
9
|
-
resolveAssetUrl(asset: ImageAssetRef): string;
|
|
10
|
-
}
|
|
1
|
+
export type { TalentCalculatorData } from "@crockery/fellowship-data/client";
|
|
2
|
+
import type { FellowshipDataClient } from "@crockery/fellowship-data/client";
|
|
3
|
+
/** @deprecated Use the corresponding `FellowshipDataClient` methods. */
|
|
4
|
+
export type FellowshipTalentDataSource = Pick<FellowshipDataClient, "loadHeroTalents" | "resolveAssetUrl">;
|
|
11
5
|
//# sourceMappingURL=talent-data-source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"talent-data-source.d.ts","sourceRoot":"","sources":["../../src/data/talent-data-source.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"talent-data-source.d.ts","sourceRoot":"","sources":["../../src/data/talent-data-source.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,wEAAwE;AACxE,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAC3C,oBAAoB,EACpB,iBAAiB,GAAG,iBAAiB,CACtC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LitElement, type PropertyValues, type TemplateResult } from "lit";
|
|
2
|
+
import type { FellowshipCastDataSource } from "../data/cast-data-source.js";
|
|
3
|
+
import type { ConfiguredCastFilter, DungeonCastBrowserModel, FellowshipCastIdentity } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* @fires fellowship-cast-browser-ready - Fired after dungeon casts have been loaded and joined.
|
|
6
|
+
* @fires fellowship-cast-browser-error - Fired when dungeon cast data cannot be loaded.
|
|
7
|
+
* @fires fellowship-cast-selected - Fired when a user selects an actionable cast.
|
|
8
|
+
*/
|
|
9
|
+
export declare class FellowshipDungeonCastBrowserElement extends LitElement {
|
|
10
|
+
#private;
|
|
11
|
+
static styles: import("lit").CSSResult[];
|
|
12
|
+
dungeonId: string;
|
|
13
|
+
selectedCast: FellowshipCastIdentity | null;
|
|
14
|
+
configuredCasts: readonly FellowshipCastIdentity[];
|
|
15
|
+
configuredFilter: ConfiguredCastFilter;
|
|
16
|
+
fill: boolean;
|
|
17
|
+
assetBaseUrl: string | null;
|
|
18
|
+
dataSource: FellowshipCastDataSource | null;
|
|
19
|
+
private _status;
|
|
20
|
+
private _error;
|
|
21
|
+
private _model;
|
|
22
|
+
private _query;
|
|
23
|
+
connectedCallback(): void;
|
|
24
|
+
disconnectedCallback(): void;
|
|
25
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
26
|
+
retry(): void;
|
|
27
|
+
get renderModel(): DungeonCastBrowserModel | null;
|
|
28
|
+
render(): TemplateResult;
|
|
29
|
+
}
|
|
30
|
+
export declare const defineFellowshipDungeonCastBrowser: () => void;
|
|
31
|
+
declare global {
|
|
32
|
+
interface HTMLElementTagNameMap {
|
|
33
|
+
"fellowship-dungeon-cast-browser": FellowshipDungeonCastBrowserElement;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=dungeon-cast-browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dungeon-cast-browser.d.ts","sourceRoot":"","sources":["../../src/dungeon-cast-browser/dungeon-cast-browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAW,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAO5E,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EAKvB,sBAAsB,EAEvB,MAAM,YAAY,CAAC;AAMpB;;;;GAIG;AACH,qBACa,mCAAoC,SAAQ,UAAU;;IACjE,OAAgB,MAAM,4BAAiD;IAElB,SAAS,SAAM;IACpC,YAAY,EAAE,sBAAsB,GAAG,IAAI,CAAQ;IACnD,eAAe,EAAE,SAAS,sBAAsB,EAAE,CAAM;IAExF,gBAAgB,EAAE,oBAAoB,CAAS;IACH,IAAI,UAAS;IACA,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5D,UAAU,EAAE,wBAAwB,GAAG,IAAI,CAAQ;IAE1E,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,MAAM,CAAiD;IAC/D,OAAO,CAAC,MAAM,CAAwC;IACtD,OAAO,CAAC,MAAM,CAAM;IAKpB,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;cAKlB,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAS/D,KAAK,IAAI,IAAI;IAIb,IAAI,WAAW,IAAI,uBAAuB,GAAG,IAAI,CAEhD;IAEQ,MAAM,IAAI,cAAc;CAySlC;AAED,eAAO,MAAM,kCAAkC,QAAO,IAUrD,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iCAAiC,EAAE,mCAAmC,CAAC;KACxE;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dungeon-cast-browser.styles.d.ts","sourceRoot":"","sources":["../../src/dungeon-cast-browser/dungeon-cast-browser.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,yBAwapC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { defineFellowshipDungeonCastBrowser, FellowshipDungeonCastBrowserElement, } from "./dungeon-cast-browser.js";
|
|
2
|
+
export { castIdentityKey, createDungeonCastBrowserModel } from "./render-model.js";
|
|
3
|
+
export type { CastCapabilityLabel, ConfiguredCastFilter, DungeonCastBrowserModel, DungeonCastEnemyModel, DungeonCastModel, FellowshipCastBrowserErrorDetail, FellowshipCastBrowserErrorEvent, FellowshipCastBrowserReadyDetail, FellowshipCastBrowserReadyEvent, FellowshipCastIdentity, FellowshipCastSelectedDetail, FellowshipCastSelectedEvent, FellowshipDungeonCastBrowserProperties, } from "./types.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dungeon-cast-browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,mCAAmC,GACpC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AACnF,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,gCAAgC,EAChC,+BAA+B,EAC/B,gCAAgC,EAChC,+BAA+B,EAC/B,sBAAsB,EACtB,4BAA4B,EAC5B,2BAA2B,EAC3B,sCAAsC,GACvC,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DungeonCastData, FellowshipCastDataSource } from "../data/cast-data-source.js";
|
|
2
|
+
import type { DungeonCastBrowserModel, FellowshipCastIdentity } from "./types.js";
|
|
3
|
+
export declare const castIdentityKey: ({ enemyId, abilityId }: FellowshipCastIdentity) => string;
|
|
4
|
+
export declare const createDungeonCastBrowserModel: (data: DungeonCastData, source: FellowshipCastDataSource) => DungeonCastBrowserModel;
|
|
5
|
+
//# sourceMappingURL=render-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-model.d.ts","sourceRoot":"","sources":["../../src/dungeon-cast-browser/render-model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC7F,OAAO,KAAK,EAEV,uBAAuB,EAGvB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,eAAe,GAAI,wBAAwB,sBAAsB,KAAG,MACjD,CAAC;AAgBjC,eAAO,MAAM,6BAA6B,GACxC,MAAM,eAAe,EACrB,QAAQ,wBAAwB,KAC/B,uBA+CF,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { Ability, Dungeon, Enemy } from "@crockery/fellowship-data";
|
|
2
|
+
import type { DungeonCastData, FellowshipCastDataSource } from "../data/cast-data-source.js";
|
|
3
|
+
export interface FellowshipCastIdentity {
|
|
4
|
+
readonly enemyId: string;
|
|
5
|
+
readonly abilityId: string;
|
|
6
|
+
}
|
|
7
|
+
export type ConfiguredCastFilter = "all" | "configured" | "unconfigured";
|
|
8
|
+
export type CastCapabilityLabel = "Interrupt" | "Interrupt varies" | "Stop" | "No response";
|
|
9
|
+
export interface DungeonCastModel {
|
|
10
|
+
readonly identity: FellowshipCastIdentity;
|
|
11
|
+
readonly ability: Ability;
|
|
12
|
+
readonly enemy: Enemy;
|
|
13
|
+
readonly canInterrupt: boolean;
|
|
14
|
+
readonly interruptVaries: boolean;
|
|
15
|
+
readonly canStop: boolean;
|
|
16
|
+
readonly actionable: boolean;
|
|
17
|
+
readonly capabilityLabel: CastCapabilityLabel;
|
|
18
|
+
readonly imageUrl: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface DungeonCastEnemyModel {
|
|
21
|
+
readonly enemy: Enemy;
|
|
22
|
+
readonly casts: readonly DungeonCastModel[];
|
|
23
|
+
}
|
|
24
|
+
export interface DungeonCastBrowserModel {
|
|
25
|
+
readonly dungeon: Dungeon;
|
|
26
|
+
readonly enemies: readonly DungeonCastEnemyModel[];
|
|
27
|
+
readonly castCount: number;
|
|
28
|
+
}
|
|
29
|
+
export interface FellowshipCastBrowserReadyDetail {
|
|
30
|
+
readonly model: DungeonCastBrowserModel;
|
|
31
|
+
readonly data: DungeonCastData;
|
|
32
|
+
}
|
|
33
|
+
export interface FellowshipCastBrowserErrorDetail {
|
|
34
|
+
readonly code: string;
|
|
35
|
+
readonly message: string;
|
|
36
|
+
readonly cause?: unknown;
|
|
37
|
+
}
|
|
38
|
+
export interface FellowshipCastSelectedDetail {
|
|
39
|
+
readonly cast: DungeonCastModel;
|
|
40
|
+
}
|
|
41
|
+
export type FellowshipCastBrowserReadyEvent = CustomEvent<FellowshipCastBrowserReadyDetail>;
|
|
42
|
+
export type FellowshipCastBrowserErrorEvent = CustomEvent<FellowshipCastBrowserErrorDetail>;
|
|
43
|
+
export type FellowshipCastSelectedEvent = CustomEvent<FellowshipCastSelectedDetail>;
|
|
44
|
+
export interface FellowshipDungeonCastBrowserProperties {
|
|
45
|
+
dungeonId: string;
|
|
46
|
+
selectedCast: FellowshipCastIdentity | null;
|
|
47
|
+
configuredCasts: readonly FellowshipCastIdentity[];
|
|
48
|
+
configuredFilter: ConfiguredCastFilter;
|
|
49
|
+
fill: boolean;
|
|
50
|
+
assetBaseUrl: string | null;
|
|
51
|
+
dataSource: FellowshipCastDataSource | null;
|
|
52
|
+
}
|
|
53
|
+
declare global {
|
|
54
|
+
interface HTMLElementEventMap {
|
|
55
|
+
"fellowship-cast-browser-ready": FellowshipCastBrowserReadyEvent;
|
|
56
|
+
"fellowship-cast-browser-error": FellowshipCastBrowserErrorEvent;
|
|
57
|
+
"fellowship-cast-selected": FellowshipCastSelectedEvent;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dungeon-cast-browser/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEzE,OAAO,KAAK,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE7F,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,YAAY,GAAG,cAAc,CAAC;AAEzE,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAAG,kBAAkB,GAAG,MAAM,GAAG,aAAa,CAAC;AAE5F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AC,gCAAgC,CAAC,CAAC;AAC5F,MAAM,MAAM,2BAA2B,GAAG,WAAW,CAAC,4BAA4B,CAAC,CAAC;AAEpF,MAAM,WAAW,sCAAsC;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC5C,eAAe,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACnD,gBAAgB,EAAE,oBAAoB,CAAC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,wBAAwB,GAAG,IAAI,CAAC;CAC7C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,mBAAmB;QAC3B,+BAA+B,EAAE,+BAA+B,CAAC;QACjE,+BAA+B,EAAE,+BAA+B,CAAC;QACjE,0BAA0B,EAAE,2BAA2B,CAAC;KACzD;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { i as e, n as t, r as n, t as r } from "./chunks/dungeon-cast-browser-CSnu3gC5.js";
|
|
2
|
+
//#region src/dungeon-cast-browser/index.ts
|
|
3
|
+
t();
|
|
4
|
+
//#endregion
|
|
5
|
+
export { r as FellowshipDungeonCastBrowserElement, n as castIdentityKey, e as createDungeonCastBrowserModel, t as defineFellowshipDungeonCastBrowser };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=dungeon-cast-browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dungeon-cast-browser.js","names":[],"sources":["../src/dungeon-cast-browser/index.ts"],"sourcesContent":["export {\n defineFellowshipDungeonCastBrowser,\n FellowshipDungeonCastBrowserElement,\n} from \"./dungeon-cast-browser.js\";\nexport { castIdentityKey, createDungeonCastBrowserModel } from \"./render-model.js\";\nexport type {\n CastCapabilityLabel,\n ConfiguredCastFilter,\n DungeonCastBrowserModel,\n DungeonCastEnemyModel,\n DungeonCastModel,\n FellowshipCastBrowserErrorDetail,\n FellowshipCastBrowserErrorEvent,\n FellowshipCastBrowserReadyDetail,\n FellowshipCastBrowserReadyEvent,\n FellowshipCastIdentity,\n FellowshipCastSelectedDetail,\n FellowshipCastSelectedEvent,\n FellowshipDungeonCastBrowserProperties,\n} from \"./types.js\";\n\nimport { defineFellowshipDungeonCastBrowser } from \"./dungeon-cast-browser.js\";\n\ndefineFellowshipDungeonCastBrowser();\n"],"mappings":";;AAuBA,EAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dungeon-map.d.ts","sourceRoot":"","sources":["../../src/dungeon-map/dungeon-map.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAW,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1F,OAAO,
|
|
1
|
+
{"version":3,"file":"dungeon-map.d.ts","sourceRoot":"","sources":["../../src/dungeon-map/dungeon-map.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAW,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1F,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,wBAAwB,CAAC;AAMhC,OAAO,KAAK,EAGV,qBAAqB,EAMrB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EAGlB,MAAM,YAAY,CAAC;AAYpB;;;;;;GAMG;AACH,qBACa,2BAA4B,SAAQ,UAAU;;IACzD,OAAgB,MAAM,4BAAyC;IAEV,SAAS,SAAM;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC5D,UAAU,EAAE,oBAAoB,GAAG,IAAI,CAAQ;IAC/C,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAC5C,WAAW,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAC5C,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IAC1B,YAAY,UAAQ;IAChB,eAAe,UAAQ;IACjC,OAAO,SAAK;IAE/D,iDAAiD;IACF,eAAe,UAAS;IAE9D,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,MAAM,CAAyC;IACvD,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,MAAM,CAAsC;IACpD,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,cAAc,CAAoD;IAC1E,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,mBAAmB,CAAsD;IACjF,OAAO,CAAC,mBAAmB,CAAsD;IACjF,OAAO,CAAC,UAAU,CAA6B;IAEpC,OAAO,CAAC,gBAAgB,CAAC,CAAc;IAC1C,OAAO,CAAC,cAAc,CAAC,CAAoB;IAenD,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;cAMlB,YAAY,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cAQjD,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cA4B5C,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAkB5D,SAAS,IAAI,IAAI;IAKjB,MAAM,IAAI,IAAI;IAKd,OAAO,IAAI,IAAI;IAKf,KAAK,IAAI,IAAI;IAIb,IAAI,WAAW,IAAI,qBAAqB,GAAG,IAAI,CAE9C;IAEQ,MAAM,IAAI,cAAc;CA4uBlC;AAED,eAAO,MAAM,0BAA0B,QAAO,IAO7C,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,wBAAwB,EAAE,2BAA2B,CAAC;KACvD;CACF"}
|
package/dist/dungeon-map.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
export type { Dungeon, 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, Position2D, Position3D, Talent, } from "@crockery/fellowship-data";
|
|
2
|
+
export { createPackageFellowshipDataClient } from "@crockery/fellowship-data/client";
|
|
3
|
+
export type { FellowshipDataClient, PackageFellowshipDataClientOptions, } from "@crockery/fellowship-data/client";
|
|
2
4
|
export { FellowshipDataError, type DungeonMapData, type FellowshipDataErrorCode, type FellowshipDataSource, } from "./data/data-source.js";
|
|
3
5
|
export { createPackageFellowshipDataSource, type PackageFellowshipDataSourceOptions, } from "./data/package-data-source.js";
|
|
6
|
+
export type { DungeonCastData, FellowshipCastDataSource } from "./data/cast-data-source.js";
|
|
7
|
+
export { createPackageFellowshipCastDataSource, type PackageFellowshipCastDataSourceOptions, } from "./data/package-cast-data-source.js";
|
|
4
8
|
export { createPackageFellowshipTalentDataSource, type PackageFellowshipTalentDataSourceOptions, } from "./data/package-talent-data-source.js";
|
|
5
9
|
export type { FellowshipTalentDataSource, TalentCalculatorData, } from "./data/talent-data-source.js";
|
|
6
10
|
export * from "./dungeon-map/index.js";
|
|
11
|
+
export * from "./dungeon-cast-browser/index.js";
|
|
7
12
|
export * from "./talent-calculator/index.js";
|
|
8
13
|
export * from "./tooltip/index.js";
|
|
9
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,OAAO,EACP,YAAY,EACZ,0BAA0B,EAC1B,SAAS,EACT,KAAK,EACL,OAAO,EACP,sBAAsB,EACtB,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,aAAa,EACb,UAAU,EACV,UAAU,EACV,MAAM,GACP,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,OAAO,EACP,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,0BAA0B,EAC1B,SAAS,EACT,KAAK,EACL,OAAO,EACP,sBAAsB,EACtB,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,aAAa,EACb,UAAU,EACV,UAAU,EACV,MAAM,GACP,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AACrF,YAAY,EACV,oBAAoB,EACpB,kCAAkC,GACnC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iCAAiC,EACjC,KAAK,kCAAkC,GACxC,MAAM,+BAA+B,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC5F,OAAO,EACL,qCAAqC,EACrC,KAAK,sCAAsC,GAC5C,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,uCAAuC,EACvC,KAAK,wCAAwC,GAC9C,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,0BAA0B,EAC1B,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { t as e } from "./chunks/data-source-
|
|
2
|
-
import { a as t, i as n, n as r, o as i, r as a, t as o } from "./chunks/dungeon-map-
|
|
3
|
-
import { a as s,
|
|
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";
|
|
4
5
|
import "./dungeon-map.js";
|
|
5
|
-
import
|
|
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";
|
|
6
8
|
import "./talent-calculator.js";
|
|
7
9
|
import "./tooltip.js";
|
|
8
|
-
|
|
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 };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type EventName } from "@lit/react";
|
|
2
|
+
import { type ComponentProps } from "react";
|
|
3
|
+
import { FellowshipDungeonCastBrowserElement } from "../dungeon-cast-browser/dungeon-cast-browser.js";
|
|
4
|
+
import type { FellowshipCastBrowserErrorEvent, FellowshipCastBrowserReadyEvent, FellowshipCastSelectedEvent } from "../dungeon-cast-browser/types.js";
|
|
5
|
+
export declare const DungeonCastBrowser: import("@lit/react").ReactWebComponent<FellowshipDungeonCastBrowserElement, {
|
|
6
|
+
onReady: EventName<FellowshipCastBrowserReadyEvent>;
|
|
7
|
+
onError: EventName<FellowshipCastBrowserErrorEvent>;
|
|
8
|
+
onCastSelected: EventName<FellowshipCastSelectedEvent>;
|
|
9
|
+
}>;
|
|
10
|
+
export type DungeonCastBrowserProps = ComponentProps<typeof DungeonCastBrowser>;
|
|
11
|
+
export default DungeonCastBrowser;
|
|
12
|
+
//# sourceMappingURL=dungeon-cast-browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dungeon-cast-browser.d.ts","sourceRoot":"","sources":["../../src/react/dungeon-cast-browser.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAc,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAEL,mCAAmC,EACpC,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;AAI1C,eAAO,MAAM,kBAAkB;aAKiB,SAAS,CAAC,+BAA+B,CAAC;aAC1C,SAAS,CAAC,+BAA+B,CAAC;oBACxC,SAAS,CAAC,2BAA2B,CAAC;EAEtF,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEhF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { n as e, t } from "../chunks/dungeon-cast-browser-CSnu3gC5.js";
|
|
2
|
+
import { createComponent as n } from "@lit/react";
|
|
3
|
+
import r from "react";
|
|
4
|
+
//#region src/react/dungeon-cast-browser.tsx
|
|
5
|
+
e();
|
|
6
|
+
var i = n({
|
|
7
|
+
react: r,
|
|
8
|
+
tagName: "fellowship-dungeon-cast-browser",
|
|
9
|
+
elementClass: t,
|
|
10
|
+
events: {
|
|
11
|
+
onReady: "fellowship-cast-browser-ready",
|
|
12
|
+
onError: "fellowship-cast-browser-error",
|
|
13
|
+
onCastSelected: "fellowship-cast-selected"
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { i as DungeonCastBrowser, i as default };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=dungeon-cast-browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dungeon-cast-browser.js","names":[],"sources":["../../src/react/dungeon-cast-browser.tsx"],"sourcesContent":["import { createComponent, type EventName } from \"@lit/react\";\nimport React, { type ComponentProps } from \"react\";\n\nimport {\n defineFellowshipDungeonCastBrowser,\n FellowshipDungeonCastBrowserElement,\n} from \"../dungeon-cast-browser/dungeon-cast-browser.js\";\nimport type {\n FellowshipCastBrowserErrorEvent,\n FellowshipCastBrowserReadyEvent,\n FellowshipCastSelectedEvent,\n} from \"../dungeon-cast-browser/types.js\";\n\ndefineFellowshipDungeonCastBrowser();\n\nexport const DungeonCastBrowser = createComponent({\n react: React,\n tagName: \"fellowship-dungeon-cast-browser\",\n elementClass: FellowshipDungeonCastBrowserElement,\n events: {\n onReady: \"fellowship-cast-browser-ready\" as EventName<FellowshipCastBrowserReadyEvent>,\n onError: \"fellowship-cast-browser-error\" as EventName<FellowshipCastBrowserErrorEvent>,\n onCastSelected: \"fellowship-cast-selected\" as EventName<FellowshipCastSelectedEvent>,\n },\n});\n\nexport type DungeonCastBrowserProps = ComponentProps<typeof DungeonCastBrowser>;\n\nexport default DungeonCastBrowser;\n"],"mappings":";;;;AAaA,EAAmC;AAEnC,IAAa,IAAqB,EAAgB;CAChD,OAAO;CACP,SAAS;CACT,cAAc;CACd,QAAQ;EACN,SAAS;EACT,SAAS;EACT,gBAAgB;CAClB;AACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e, t } from "../chunks/dungeon-map-
|
|
1
|
+
import { n as e, t } from "../chunks/dungeon-map-CutIcCVP.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";
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { DungeonMapViewer } from "./dungeon-map.js";
|
|
2
2
|
export type { DungeonMapViewerProps, ReactEnemyRenderer, ReactGroupRenderer, } from "./dungeon-map.js";
|
|
3
|
+
export { DungeonCastBrowser } from "./dungeon-cast-browser.js";
|
|
4
|
+
export type { DungeonCastBrowserProps } from "./dungeon-cast-browser.js";
|
|
3
5
|
export { TalentCalculator } from "./talent-calculator.js";
|
|
4
6
|
export type { ReactTalentRenderer, TalentCalculatorProps } from "./talent-calculator.js";
|
|
5
7
|
export { Tooltip } from "./tooltip.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,YAAY,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, n as t, o as n, r, t as i } from "../chunks/talent-calculator-
|
|
1
|
+
import { a as e, n as t, o as n, r, t as i } from "../chunks/talent-calculator-Dxuc2dZ8.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";
|
package/dist/react.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DungeonMapViewer as e } from "./react/dungeon-map.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { DungeonCastBrowser as t } from "./react/dungeon-cast-browser.js";
|
|
3
|
+
import { TalentCalculator as n } from "./react/talent-calculator.js";
|
|
4
|
+
import { Tooltip as r } from "./react/tooltip.js";
|
|
5
|
+
export { t as DungeonCastBrowser, e as DungeonMapViewer, n as TalentCalculator, r as Tooltip };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"talent-calculator.d.ts","sourceRoot":"","sources":["../../src/talent-calculator/talent-calculator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAW,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK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,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;cAKlB,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cAmC5C,UAAU,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAuB5D,IAAI,WAAW,IAAI,2BAA2B,GAAG,IAAI,CAEpD;IAED,IAAI,cAAc,IAAI,8BAA8B,CAInD;IAED,KAAK,IAAI,IAAI;IAQb,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAevC,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IASzC,KAAK,IAAI,IAAI;IAIJ,MAAM,IAAI,cAAc;CA2flC;AAED,eAAO,MAAM,gCAAgC,QAAO,IAKnD,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,8BAA8B,EAAE,iCAAiC,CAAC;KACnE;CACF"}
|
|
@@ -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-
|
|
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";
|
|
2
2
|
//#region src/talent-calculator/index.ts
|
|
3
3
|
i();
|
|
4
4
|
//#endregion
|