@industry-theme/repository-composition-panels 0.6.29 → 0.6.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BufferResource-YswoFLTX.js → BufferResource-CgXBwTAK.js} +2 -2
- package/dist/{BufferResource-YswoFLTX.js.map → BufferResource-CgXBwTAK.js.map} +1 -1
- package/dist/{CanvasRenderer-DiE9xoC1.js → CanvasRenderer-4WtcAgzc.js} +3 -3
- package/dist/{CanvasRenderer-DiE9xoC1.js.map → CanvasRenderer-4WtcAgzc.js.map} +1 -1
- package/dist/{Filter-BDSWHfT_.js → Filter-CCbEvcn-.js} +2 -2
- package/dist/{Filter-BDSWHfT_.js.map → Filter-CCbEvcn-.js.map} +1 -1
- package/dist/{RenderTargetSystem-siAGRAs8.js → RenderTargetSystem-CUjfwYdJ.js} +3 -3
- package/dist/{RenderTargetSystem-siAGRAs8.js.map → RenderTargetSystem-CUjfwYdJ.js.map} +1 -1
- package/dist/{WebGLRenderer-Bk97mqCL.js → WebGLRenderer-Bpz07IxR.js} +4 -4
- package/dist/{WebGLRenderer-Bk97mqCL.js.map → WebGLRenderer-Bpz07IxR.js.map} +1 -1
- package/dist/{WebGPURenderer-CSx7jyoo.js → WebGPURenderer-CYHP_r5v.js} +4 -4
- package/dist/{WebGPURenderer-CSx7jyoo.js.map → WebGPURenderer-CYHP_r5v.js.map} +1 -1
- package/dist/{browserAll-pibszWlK.js → browserAll-8dgNqS_u.js} +3 -3
- package/dist/{browserAll-pibszWlK.js.map → browserAll-8dgNqS_u.js.map} +1 -1
- package/dist/{index-D7jhhj0e.js → index-DKt_e7J1.js} +1346 -201
- package/dist/{index-D7jhhj0e.js.map → index-DKt_e7J1.js.map} +1 -1
- package/dist/{init-BzMZo9gP.js → init-CnAv03An.js} +3 -3
- package/dist/{init-BzMZo9gP.js.map → init-CnAv03An.js.map} +1 -1
- package/dist/panels/CollectionMapPanel.d.ts.map +1 -1
- package/dist/panels/PackageCompositionPanel.d.ts +2 -2
- package/dist/panels/PackageCompositionPanel.d.ts.map +1 -1
- package/dist/panels/components/DependencyRow.d.ts.map +1 -1
- package/dist/panels/components/EmptyDependencies.d.ts +7 -0
- package/dist/panels/components/EmptyDependencies.d.ts.map +1 -0
- package/dist/panels/components/FilterBar.d.ts +2 -0
- package/dist/panels/components/FilterBar.d.ts.map +1 -1
- package/dist/panels/components/PackageDetailCard.d.ts.map +1 -1
- package/dist/panels/overworld-map/LayoutEngineTest.d.ts +1 -0
- package/dist/panels/overworld-map/LayoutEngineTest.d.ts.map +1 -1
- package/dist/panels/overworld-map/LicenseSignTest.d.ts +7 -0
- package/dist/panels/overworld-map/LicenseSignTest.d.ts.map +1 -0
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/IsometricRenderer.d.ts +3 -0
- package/dist/panels/overworld-map/components/IsometricRenderer.d.ts.map +1 -1
- package/dist/panels/overworld-map/components/licenseSignSprites.d.ts +122 -0
- package/dist/panels/overworld-map/components/licenseSignSprites.d.ts.map +1 -0
- package/dist/panels/overworld-map/genericMapper.d.ts +1 -0
- package/dist/panels/overworld-map/genericMapper.d.ts.map +1 -1
- package/dist/panels/overworld-map/types.d.ts +1 -0
- package/dist/panels/overworld-map/types.d.ts.map +1 -1
- package/dist/panels.bundle.js +1 -1
- package/dist/types/dependencies.d.ts +13 -1
- package/dist/types/dependencies.d.ts.map +1 -1
- package/dist/webworkerAll-x0txRvuX.js +3 -0
- package/dist/webworkerAll-x0txRvuX.js.map +1 -0
- package/package.json +2 -2
- package/dist/panels/overworld-map/IsometricGridTest.d.ts +0 -15
- package/dist/panels/overworld-map/IsometricGridTest.d.ts.map +0 -1
- package/dist/webworkerAll-Cru5_fTr.js +0 -3
- package/dist/webworkerAll-Cru5_fTr.js.map +0 -1
|
@@ -1544,43 +1544,41 @@ const InfoItem = ({ badge, title, description, theme: theme2 }) => /* @__PURE__
|
|
|
1544
1544
|
]
|
|
1545
1545
|
}
|
|
1546
1546
|
);
|
|
1547
|
+
const typeLabels = {
|
|
1548
|
+
production: "prod",
|
|
1549
|
+
development: "dev",
|
|
1550
|
+
peer: "peer"
|
|
1551
|
+
};
|
|
1547
1552
|
const DependencyRow = ({ dependency }) => {
|
|
1548
1553
|
const { theme: theme2 } = useTheme();
|
|
1549
1554
|
const [isHovered, setIsHovered] = useState(false);
|
|
1550
1555
|
const [copied, setCopied] = useState(false);
|
|
1551
1556
|
const getDependencyTypeBadgeStyle = (type2) => {
|
|
1552
1557
|
const baseStyle = {
|
|
1553
|
-
|
|
1554
|
-
borderRadius: `${theme2.radii[1]}px`,
|
|
1555
|
-
fontSize: `${theme2.fontSizes[0]}px`,
|
|
1558
|
+
fontSize: "9px",
|
|
1556
1559
|
fontWeight: theme2.fontWeights.medium,
|
|
1557
1560
|
fontFamily: theme2.fonts.body,
|
|
1558
|
-
|
|
1559
|
-
textAlign: "center"
|
|
1561
|
+
lineHeight: 1.2
|
|
1560
1562
|
};
|
|
1561
1563
|
switch (type2) {
|
|
1562
1564
|
case "production":
|
|
1563
1565
|
return {
|
|
1564
1566
|
...baseStyle,
|
|
1565
|
-
backgroundColor: `${theme2.colors.primary}20`,
|
|
1566
1567
|
color: theme2.colors.primary
|
|
1567
1568
|
};
|
|
1568
1569
|
case "development":
|
|
1569
1570
|
return {
|
|
1570
1571
|
...baseStyle,
|
|
1571
|
-
backgroundColor: `${theme2.colors.secondary}20`,
|
|
1572
1572
|
color: theme2.colors.secondary
|
|
1573
1573
|
};
|
|
1574
1574
|
case "peer":
|
|
1575
1575
|
return {
|
|
1576
1576
|
...baseStyle,
|
|
1577
|
-
backgroundColor: `${theme2.colors.accent}20`,
|
|
1578
1577
|
color: theme2.colors.accent
|
|
1579
1578
|
};
|
|
1580
1579
|
default:
|
|
1581
1580
|
return {
|
|
1582
1581
|
...baseStyle,
|
|
1583
|
-
backgroundColor: theme2.colors.backgroundLight,
|
|
1584
1582
|
color: theme2.colors.textSecondary
|
|
1585
1583
|
};
|
|
1586
1584
|
}
|
|
@@ -1617,13 +1615,14 @@ const DependencyRow = ({ dependency }) => {
|
|
|
1617
1615
|
display: "flex",
|
|
1618
1616
|
alignItems: "center",
|
|
1619
1617
|
justifyContent: "space-between",
|
|
1620
|
-
padding: `${theme2.space[
|
|
1618
|
+
padding: `${theme2.space[2]}px ${theme2.space[3]}px`,
|
|
1621
1619
|
backgroundColor: theme2.colors.background,
|
|
1622
1620
|
borderRadius: 0,
|
|
1623
1621
|
fontSize: `${theme2.fontSizes[1]}px`,
|
|
1624
1622
|
fontFamily: theme2.fonts.body,
|
|
1625
1623
|
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
1626
|
-
transition: "all 0.2s"
|
|
1624
|
+
transition: "all 0.2s",
|
|
1625
|
+
minHeight: "44px"
|
|
1627
1626
|
},
|
|
1628
1627
|
onMouseEnter: () => setIsHovered(true),
|
|
1629
1628
|
onMouseLeave: () => setIsHovered(false),
|
|
@@ -1633,40 +1632,75 @@ const DependencyRow = ({ dependency }) => {
|
|
|
1633
1632
|
{
|
|
1634
1633
|
style: {
|
|
1635
1634
|
display: "flex",
|
|
1636
|
-
|
|
1637
|
-
gap:
|
|
1635
|
+
flexDirection: "column",
|
|
1636
|
+
gap: "2px",
|
|
1638
1637
|
flex: 1,
|
|
1639
1638
|
minWidth: 0
|
|
1640
1639
|
},
|
|
1641
1640
|
children: [
|
|
1642
|
-
/* @__PURE__ */
|
|
1643
|
-
|
|
1644
|
-
"span",
|
|
1641
|
+
/* @__PURE__ */ jsxs(
|
|
1642
|
+
"div",
|
|
1645
1643
|
{
|
|
1646
1644
|
style: {
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
textOverflow: "ellipsis",
|
|
1651
|
-
whiteSpace: "nowrap"
|
|
1645
|
+
display: "flex",
|
|
1646
|
+
alignItems: "center",
|
|
1647
|
+
gap: "4px"
|
|
1652
1648
|
},
|
|
1653
|
-
children:
|
|
1649
|
+
children: [
|
|
1650
|
+
dependency.namespace && /* @__PURE__ */ jsx(
|
|
1651
|
+
"span",
|
|
1652
|
+
{
|
|
1653
|
+
style: {
|
|
1654
|
+
fontSize: "10px",
|
|
1655
|
+
color: theme2.colors.textSecondary,
|
|
1656
|
+
fontFamily: theme2.fonts.body
|
|
1657
|
+
},
|
|
1658
|
+
children: dependency.namespace
|
|
1659
|
+
}
|
|
1660
|
+
),
|
|
1661
|
+
dependency.dependencyTypes.map((type2) => /* @__PURE__ */ jsx("span", { style: getDependencyTypeBadgeStyle(type2), children: typeLabels[type2] }, type2))
|
|
1662
|
+
]
|
|
1654
1663
|
}
|
|
1655
1664
|
),
|
|
1656
|
-
/* @__PURE__ */
|
|
1657
|
-
"
|
|
1665
|
+
/* @__PURE__ */ jsxs(
|
|
1666
|
+
"div",
|
|
1658
1667
|
{
|
|
1659
|
-
href: `https://www.npmjs.com/package/${dependency.name}`,
|
|
1660
|
-
target: "_blank",
|
|
1661
|
-
rel: "noopener noreferrer",
|
|
1662
1668
|
style: {
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
flexShrink: 0
|
|
1669
|
+
display: "flex",
|
|
1670
|
+
alignItems: "center",
|
|
1671
|
+
gap: `${theme2.space[2]}px`
|
|
1667
1672
|
},
|
|
1668
|
-
|
|
1669
|
-
|
|
1673
|
+
children: [
|
|
1674
|
+
/* @__PURE__ */ jsx(
|
|
1675
|
+
"span",
|
|
1676
|
+
{
|
|
1677
|
+
style: {
|
|
1678
|
+
fontWeight: theme2.fontWeights.medium,
|
|
1679
|
+
color: theme2.colors.text,
|
|
1680
|
+
overflow: "hidden",
|
|
1681
|
+
textOverflow: "ellipsis",
|
|
1682
|
+
whiteSpace: "nowrap"
|
|
1683
|
+
},
|
|
1684
|
+
children: dependency.packageName
|
|
1685
|
+
}
|
|
1686
|
+
),
|
|
1687
|
+
/* @__PURE__ */ jsx(
|
|
1688
|
+
"a",
|
|
1689
|
+
{
|
|
1690
|
+
href: `https://www.npmjs.com/package/${dependency.name}`,
|
|
1691
|
+
target: "_blank",
|
|
1692
|
+
rel: "noopener noreferrer",
|
|
1693
|
+
style: {
|
|
1694
|
+
...actionButtonStyle,
|
|
1695
|
+
color: theme2.colors.textSecondary,
|
|
1696
|
+
textDecoration: "none",
|
|
1697
|
+
flexShrink: 0
|
|
1698
|
+
},
|
|
1699
|
+
title: "View on npm",
|
|
1700
|
+
children: /* @__PURE__ */ jsx(ExternalLink$1, { size: 12 })
|
|
1701
|
+
}
|
|
1702
|
+
)
|
|
1703
|
+
]
|
|
1670
1704
|
}
|
|
1671
1705
|
)
|
|
1672
1706
|
]
|
|
@@ -1716,7 +1750,8 @@ const FilterBar = ({
|
|
|
1716
1750
|
onToggleFilter,
|
|
1717
1751
|
searchQuery,
|
|
1718
1752
|
onSearchChange,
|
|
1719
|
-
counts
|
|
1753
|
+
counts,
|
|
1754
|
+
showSearch = true
|
|
1720
1755
|
}) => {
|
|
1721
1756
|
const { theme: theme2 } = useTheme();
|
|
1722
1757
|
const availableFilters = [
|
|
@@ -1733,7 +1768,7 @@ const FilterBar = ({
|
|
|
1733
1768
|
flexDirection: "column"
|
|
1734
1769
|
},
|
|
1735
1770
|
children: [
|
|
1736
|
-
/* @__PURE__ */ jsxs(
|
|
1771
|
+
showSearch && /* @__PURE__ */ jsxs(
|
|
1737
1772
|
"div",
|
|
1738
1773
|
{
|
|
1739
1774
|
style: {
|
|
@@ -2141,7 +2176,7 @@ const LensRow = ({ lens }) => {
|
|
|
2141
2176
|
const RequirementRow = ({ check }) => {
|
|
2142
2177
|
const { theme: theme2 } = useTheme();
|
|
2143
2178
|
const { requirement, satisfied, foundValue, isInherited, inheritedFrom } = check;
|
|
2144
|
-
const
|
|
2179
|
+
const typeLabels2 = {
|
|
2145
2180
|
devDependency: "dep",
|
|
2146
2181
|
script: "script",
|
|
2147
2182
|
config: "config"
|
|
@@ -2170,7 +2205,7 @@ const RequirementRow = ({ check }) => {
|
|
|
2170
2205
|
fontWeight: 500,
|
|
2171
2206
|
textTransform: "uppercase"
|
|
2172
2207
|
},
|
|
2173
|
-
children:
|
|
2208
|
+
children: typeLabels2[requirement.type] || requirement.type
|
|
2174
2209
|
}
|
|
2175
2210
|
),
|
|
2176
2211
|
/* @__PURE__ */ jsx(
|
|
@@ -2577,6 +2612,206 @@ const OtherScriptsSection = ({
|
|
|
2577
2612
|
)
|
|
2578
2613
|
] });
|
|
2579
2614
|
};
|
|
2615
|
+
const SUPPORTED_MANIFESTS = [
|
|
2616
|
+
{ file: "package.json", ecosystem: "Node.js" },
|
|
2617
|
+
{ file: "pyproject.toml", ecosystem: "Python" },
|
|
2618
|
+
{ file: "setup.py", ecosystem: "Python" },
|
|
2619
|
+
{ file: "requirements.txt", ecosystem: "Python" },
|
|
2620
|
+
{ file: "Cargo.toml", ecosystem: "Rust" }
|
|
2621
|
+
];
|
|
2622
|
+
const EmptyDependencies = ({
|
|
2623
|
+
foundManifests = []
|
|
2624
|
+
}) => {
|
|
2625
|
+
const { theme: theme2 } = useTheme();
|
|
2626
|
+
const supportedFound = SUPPORTED_MANIFESTS.filter(
|
|
2627
|
+
(m2) => foundManifests.some((f2) => f2.endsWith(m2.file))
|
|
2628
|
+
);
|
|
2629
|
+
const unsupportedFound = foundManifests.filter(
|
|
2630
|
+
(f2) => !SUPPORTED_MANIFESTS.some((m2) => f2.endsWith(m2.file))
|
|
2631
|
+
);
|
|
2632
|
+
const hasFoundFiles = foundManifests.length > 0;
|
|
2633
|
+
return /* @__PURE__ */ jsxs(
|
|
2634
|
+
"div",
|
|
2635
|
+
{
|
|
2636
|
+
style: {
|
|
2637
|
+
padding: "32px 24px",
|
|
2638
|
+
color: theme2.colors.textSecondary,
|
|
2639
|
+
fontSize: theme2.fontSizes[1],
|
|
2640
|
+
fontFamily: theme2.fonts.body,
|
|
2641
|
+
display: "flex",
|
|
2642
|
+
flexDirection: "column",
|
|
2643
|
+
alignItems: "center",
|
|
2644
|
+
justifyContent: "center",
|
|
2645
|
+
gap: "24px",
|
|
2646
|
+
height: "100%",
|
|
2647
|
+
minHeight: "200px"
|
|
2648
|
+
},
|
|
2649
|
+
children: [
|
|
2650
|
+
/* @__PURE__ */ jsxs(
|
|
2651
|
+
"div",
|
|
2652
|
+
{
|
|
2653
|
+
style: {
|
|
2654
|
+
display: "flex",
|
|
2655
|
+
alignItems: "center",
|
|
2656
|
+
gap: "8px",
|
|
2657
|
+
color: theme2.colors.text,
|
|
2658
|
+
fontSize: theme2.fontSizes[2]
|
|
2659
|
+
},
|
|
2660
|
+
children: [
|
|
2661
|
+
/* @__PURE__ */ jsx(Package$1, { size: 20 }),
|
|
2662
|
+
"No packages detected"
|
|
2663
|
+
]
|
|
2664
|
+
}
|
|
2665
|
+
),
|
|
2666
|
+
/* @__PURE__ */ jsxs(
|
|
2667
|
+
"div",
|
|
2668
|
+
{
|
|
2669
|
+
style: {
|
|
2670
|
+
display: "flex",
|
|
2671
|
+
gap: "24px",
|
|
2672
|
+
flexWrap: "wrap",
|
|
2673
|
+
justifyContent: "center"
|
|
2674
|
+
},
|
|
2675
|
+
children: [
|
|
2676
|
+
/* @__PURE__ */ jsxs(
|
|
2677
|
+
"div",
|
|
2678
|
+
{
|
|
2679
|
+
style: {
|
|
2680
|
+
display: "flex",
|
|
2681
|
+
flexDirection: "column",
|
|
2682
|
+
gap: "8px",
|
|
2683
|
+
padding: "16px",
|
|
2684
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
2685
|
+
borderRadius: "8px",
|
|
2686
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
2687
|
+
minWidth: "180px"
|
|
2688
|
+
},
|
|
2689
|
+
children: [
|
|
2690
|
+
/* @__PURE__ */ jsx(
|
|
2691
|
+
"div",
|
|
2692
|
+
{
|
|
2693
|
+
style: {
|
|
2694
|
+
fontSize: theme2.fontSizes[0],
|
|
2695
|
+
fontWeight: theme2.fontWeights.semibold,
|
|
2696
|
+
color: theme2.colors.textSecondary,
|
|
2697
|
+
textTransform: "uppercase",
|
|
2698
|
+
letterSpacing: "0.5px"
|
|
2699
|
+
},
|
|
2700
|
+
children: "Found in project"
|
|
2701
|
+
}
|
|
2702
|
+
),
|
|
2703
|
+
hasFoundFiles ? /* @__PURE__ */ jsxs(
|
|
2704
|
+
"div",
|
|
2705
|
+
{
|
|
2706
|
+
style: { display: "flex", flexDirection: "column", gap: "4px" },
|
|
2707
|
+
children: [
|
|
2708
|
+
supportedFound.map((m2) => /* @__PURE__ */ jsxs(
|
|
2709
|
+
"div",
|
|
2710
|
+
{
|
|
2711
|
+
style: {
|
|
2712
|
+
display: "flex",
|
|
2713
|
+
alignItems: "center",
|
|
2714
|
+
gap: "6px",
|
|
2715
|
+
fontSize: theme2.fontSizes[1]
|
|
2716
|
+
},
|
|
2717
|
+
children: [
|
|
2718
|
+
/* @__PURE__ */ jsx(FileCode$1, { size: 12, style: { color: theme2.colors.success } }),
|
|
2719
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.text }, children: m2.file }),
|
|
2720
|
+
/* @__PURE__ */ jsxs("span", { style: { opacity: 0.5 }, children: [
|
|
2721
|
+
"(",
|
|
2722
|
+
m2.ecosystem,
|
|
2723
|
+
")"
|
|
2724
|
+
] })
|
|
2725
|
+
]
|
|
2726
|
+
},
|
|
2727
|
+
m2.file
|
|
2728
|
+
)),
|
|
2729
|
+
unsupportedFound.map((file) => /* @__PURE__ */ jsxs(
|
|
2730
|
+
"div",
|
|
2731
|
+
{
|
|
2732
|
+
style: {
|
|
2733
|
+
display: "flex",
|
|
2734
|
+
alignItems: "center",
|
|
2735
|
+
gap: "6px",
|
|
2736
|
+
fontSize: theme2.fontSizes[1]
|
|
2737
|
+
},
|
|
2738
|
+
children: [
|
|
2739
|
+
/* @__PURE__ */ jsx(X$3, { size: 12, style: { color: theme2.colors.warning } }),
|
|
2740
|
+
/* @__PURE__ */ jsx("span", { style: { color: theme2.colors.text }, children: file.split("/").pop() }),
|
|
2741
|
+
/* @__PURE__ */ jsx("span", { style: { opacity: 0.5 }, children: "(not supported)" })
|
|
2742
|
+
]
|
|
2743
|
+
},
|
|
2744
|
+
file
|
|
2745
|
+
))
|
|
2746
|
+
]
|
|
2747
|
+
}
|
|
2748
|
+
) : /* @__PURE__ */ jsx(
|
|
2749
|
+
"div",
|
|
2750
|
+
{
|
|
2751
|
+
style: {
|
|
2752
|
+
fontSize: theme2.fontSizes[1],
|
|
2753
|
+
fontStyle: "italic",
|
|
2754
|
+
opacity: 0.6
|
|
2755
|
+
},
|
|
2756
|
+
children: "No manifest files found"
|
|
2757
|
+
}
|
|
2758
|
+
)
|
|
2759
|
+
]
|
|
2760
|
+
}
|
|
2761
|
+
),
|
|
2762
|
+
/* @__PURE__ */ jsxs(
|
|
2763
|
+
"div",
|
|
2764
|
+
{
|
|
2765
|
+
style: {
|
|
2766
|
+
display: "flex",
|
|
2767
|
+
flexDirection: "column",
|
|
2768
|
+
gap: "8px",
|
|
2769
|
+
padding: "16px",
|
|
2770
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
2771
|
+
borderRadius: "8px",
|
|
2772
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
2773
|
+
minWidth: "180px"
|
|
2774
|
+
},
|
|
2775
|
+
children: [
|
|
2776
|
+
/* @__PURE__ */ jsx(
|
|
2777
|
+
"div",
|
|
2778
|
+
{
|
|
2779
|
+
style: {
|
|
2780
|
+
fontSize: theme2.fontSizes[0],
|
|
2781
|
+
fontWeight: theme2.fontWeights.semibold,
|
|
2782
|
+
color: theme2.colors.textSecondary,
|
|
2783
|
+
textTransform: "uppercase",
|
|
2784
|
+
letterSpacing: "0.5px"
|
|
2785
|
+
},
|
|
2786
|
+
children: "Supported"
|
|
2787
|
+
}
|
|
2788
|
+
),
|
|
2789
|
+
/* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: SUPPORTED_MANIFESTS.map((m2) => /* @__PURE__ */ jsxs(
|
|
2790
|
+
"div",
|
|
2791
|
+
{
|
|
2792
|
+
style: {
|
|
2793
|
+
display: "flex",
|
|
2794
|
+
alignItems: "center",
|
|
2795
|
+
gap: "6px",
|
|
2796
|
+
fontSize: theme2.fontSizes[1]
|
|
2797
|
+
},
|
|
2798
|
+
children: [
|
|
2799
|
+
/* @__PURE__ */ jsx(Check$1, { size: 12, style: { opacity: 0.4 } }),
|
|
2800
|
+
/* @__PURE__ */ jsx("span", { children: m2.file })
|
|
2801
|
+
]
|
|
2802
|
+
},
|
|
2803
|
+
m2.file
|
|
2804
|
+
)) })
|
|
2805
|
+
]
|
|
2806
|
+
}
|
|
2807
|
+
)
|
|
2808
|
+
]
|
|
2809
|
+
}
|
|
2810
|
+
)
|
|
2811
|
+
]
|
|
2812
|
+
}
|
|
2813
|
+
);
|
|
2814
|
+
};
|
|
2580
2815
|
function parseEnvJson(content2) {
|
|
2581
2816
|
const parsed = JSON.parse(content2);
|
|
2582
2817
|
if (!parsed.variables || !Array.isArray(parsed.variables)) {
|
|
@@ -2686,28 +2921,72 @@ const dependencyTypeOrder = {
|
|
|
2686
2921
|
production: 1,
|
|
2687
2922
|
development: 2
|
|
2688
2923
|
};
|
|
2924
|
+
function parsePackageName(name2) {
|
|
2925
|
+
if (name2.startsWith("@")) {
|
|
2926
|
+
const slashIndex = name2.indexOf("/");
|
|
2927
|
+
if (slashIndex > 0) {
|
|
2928
|
+
return {
|
|
2929
|
+
namespace: name2.substring(0, slashIndex),
|
|
2930
|
+
packageName: name2.substring(slashIndex + 1)
|
|
2931
|
+
};
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
return { packageName: name2 };
|
|
2935
|
+
}
|
|
2689
2936
|
function extractDependencies(packageLayer) {
|
|
2690
2937
|
const { dependencies, devDependencies, peerDependencies } = packageLayer.packageData;
|
|
2691
|
-
const
|
|
2938
|
+
const depMap = /* @__PURE__ */ new Map();
|
|
2939
|
+
if (peerDependencies) {
|
|
2940
|
+
Object.entries(peerDependencies).forEach(([name2, version]) => {
|
|
2941
|
+
const existing = depMap.get(name2);
|
|
2942
|
+
if (existing) {
|
|
2943
|
+
existing.types.add("peer");
|
|
2944
|
+
} else {
|
|
2945
|
+
depMap.set(name2, { version, types: /* @__PURE__ */ new Set(["peer"]) });
|
|
2946
|
+
}
|
|
2947
|
+
});
|
|
2948
|
+
}
|
|
2692
2949
|
if (dependencies) {
|
|
2693
2950
|
Object.entries(dependencies).forEach(([name2, version]) => {
|
|
2694
|
-
|
|
2951
|
+
const existing = depMap.get(name2);
|
|
2952
|
+
if (existing) {
|
|
2953
|
+
existing.types.add("production");
|
|
2954
|
+
} else {
|
|
2955
|
+
depMap.set(name2, { version, types: /* @__PURE__ */ new Set(["production"]) });
|
|
2956
|
+
}
|
|
2695
2957
|
});
|
|
2696
2958
|
}
|
|
2697
2959
|
if (devDependencies) {
|
|
2698
2960
|
Object.entries(devDependencies).forEach(([name2, version]) => {
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2961
|
+
const existing = depMap.get(name2);
|
|
2962
|
+
if (existing) {
|
|
2963
|
+
existing.types.add("development");
|
|
2964
|
+
} else {
|
|
2965
|
+
depMap.set(name2, { version, types: /* @__PURE__ */ new Set(["development"]) });
|
|
2966
|
+
}
|
|
2705
2967
|
});
|
|
2706
2968
|
}
|
|
2969
|
+
const items = Array.from(depMap.entries()).map(
|
|
2970
|
+
([name2, { version, types: types2 }]) => {
|
|
2971
|
+
const typesArray = Array.from(types2).sort(
|
|
2972
|
+
(a2, b2) => dependencyTypeOrder[a2] - dependencyTypeOrder[b2]
|
|
2973
|
+
);
|
|
2974
|
+
const { namespace: namespace2, packageName } = parsePackageName(name2);
|
|
2975
|
+
return {
|
|
2976
|
+
name: name2,
|
|
2977
|
+
version,
|
|
2978
|
+
dependencyType: typesArray[0],
|
|
2979
|
+
// Primary type for sorting
|
|
2980
|
+
dependencyTypes: typesArray,
|
|
2981
|
+
namespace: namespace2,
|
|
2982
|
+
packageName
|
|
2983
|
+
};
|
|
2984
|
+
}
|
|
2985
|
+
);
|
|
2707
2986
|
return items.sort((a2, b2) => {
|
|
2708
2987
|
const typeCompare = dependencyTypeOrder[a2.dependencyType] - dependencyTypeOrder[b2.dependencyType];
|
|
2709
2988
|
if (typeCompare !== 0) return typeCompare;
|
|
2710
|
-
return a2.
|
|
2989
|
+
return a2.packageName.localeCompare(b2.packageName);
|
|
2711
2990
|
});
|
|
2712
2991
|
}
|
|
2713
2992
|
const PackageDetailCard = ({
|
|
@@ -3349,25 +3628,7 @@ const PackageDetailCard = ({
|
|
|
3349
3628
|
height: "100%"
|
|
3350
3629
|
},
|
|
3351
3630
|
children: [
|
|
3352
|
-
dependencyItems.length === 0 ? /* @__PURE__ */ jsxs(
|
|
3353
|
-
"div",
|
|
3354
|
-
{
|
|
3355
|
-
style: {
|
|
3356
|
-
padding: "12px",
|
|
3357
|
-
color: theme2.colors.textSecondary,
|
|
3358
|
-
fontSize: theme2.fontSizes[1],
|
|
3359
|
-
fontFamily: theme2.fonts.body,
|
|
3360
|
-
display: "flex",
|
|
3361
|
-
alignItems: "center",
|
|
3362
|
-
justifyContent: "center",
|
|
3363
|
-
gap: "8px"
|
|
3364
|
-
},
|
|
3365
|
-
children: [
|
|
3366
|
-
/* @__PURE__ */ jsx(Package$1, { size: 16 }),
|
|
3367
|
-
"No dependencies"
|
|
3368
|
-
]
|
|
3369
|
-
}
|
|
3370
|
-
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3631
|
+
dependencyItems.length === 0 ? /* @__PURE__ */ jsx(EmptyDependencies, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3371
3632
|
/* @__PURE__ */ jsx(
|
|
3372
3633
|
"div",
|
|
3373
3634
|
{
|
|
@@ -3381,7 +3642,8 @@ const PackageDetailCard = ({
|
|
|
3381
3642
|
onToggleFilter: handleToggleFilter,
|
|
3382
3643
|
searchQuery,
|
|
3383
3644
|
onSearchChange: setSearchQuery,
|
|
3384
|
-
counts: depCounts
|
|
3645
|
+
counts: depCounts,
|
|
3646
|
+
showSearch: dependencyItems.length > 10
|
|
3385
3647
|
}
|
|
3386
3648
|
)
|
|
3387
3649
|
}
|
|
@@ -3906,25 +4168,7 @@ const PackageDetailCard = ({
|
|
|
3906
4168
|
height: "100%"
|
|
3907
4169
|
},
|
|
3908
4170
|
children: [
|
|
3909
|
-
dependencyItems.length === 0 ? /* @__PURE__ */ jsxs(
|
|
3910
|
-
"div",
|
|
3911
|
-
{
|
|
3912
|
-
style: {
|
|
3913
|
-
padding: "12px",
|
|
3914
|
-
color: theme2.colors.textSecondary,
|
|
3915
|
-
fontSize: theme2.fontSizes[1],
|
|
3916
|
-
fontFamily: theme2.fonts.body,
|
|
3917
|
-
display: "flex",
|
|
3918
|
-
alignItems: "center",
|
|
3919
|
-
justifyContent: "center",
|
|
3920
|
-
gap: "8px"
|
|
3921
|
-
},
|
|
3922
|
-
children: [
|
|
3923
|
-
/* @__PURE__ */ jsx(Package$1, { size: 16 }),
|
|
3924
|
-
"No dependencies"
|
|
3925
|
-
]
|
|
3926
|
-
}
|
|
3927
|
-
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4171
|
+
dependencyItems.length === 0 ? /* @__PURE__ */ jsx(EmptyDependencies, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3928
4172
|
/* @__PURE__ */ jsx(
|
|
3929
4173
|
"div",
|
|
3930
4174
|
{
|
|
@@ -3938,7 +4182,8 @@ const PackageDetailCard = ({
|
|
|
3938
4182
|
onToggleFilter: handleToggleFilter,
|
|
3939
4183
|
searchQuery,
|
|
3940
4184
|
onSearchChange: setSearchQuery,
|
|
3941
|
-
counts: depCounts
|
|
4185
|
+
counts: depCounts,
|
|
4186
|
+
showSearch: dependencyItems.length > 10
|
|
3942
4187
|
}
|
|
3943
4188
|
)
|
|
3944
4189
|
}
|
|
@@ -4256,7 +4501,6 @@ const PackageSummaryCard = ({
|
|
|
4256
4501
|
const PackageCompositionPanelContent = ({
|
|
4257
4502
|
packages,
|
|
4258
4503
|
isLoading = false,
|
|
4259
|
-
emptyMessage = "No packages detected",
|
|
4260
4504
|
onCommandClick,
|
|
4261
4505
|
onConfigClick,
|
|
4262
4506
|
onPackageClick,
|
|
@@ -4297,18 +4541,7 @@ const PackageCompositionPanelContent = ({
|
|
|
4297
4541
|
);
|
|
4298
4542
|
}
|
|
4299
4543
|
if (packages.length === 0) {
|
|
4300
|
-
return /* @__PURE__ */ jsx(
|
|
4301
|
-
"div",
|
|
4302
|
-
{
|
|
4303
|
-
style: {
|
|
4304
|
-
padding: "20px",
|
|
4305
|
-
textAlign: "center",
|
|
4306
|
-
color: theme2.colors.textSecondary,
|
|
4307
|
-
fontFamily: theme2.fonts.body
|
|
4308
|
-
},
|
|
4309
|
-
children: emptyMessage
|
|
4310
|
-
}
|
|
4311
|
-
);
|
|
4544
|
+
return /* @__PURE__ */ jsx(EmptyDependencies, {});
|
|
4312
4545
|
}
|
|
4313
4546
|
if (packages.length === 1) {
|
|
4314
4547
|
return /* @__PURE__ */ jsx(
|
|
@@ -105576,18 +105809,18 @@ var ProxyTracer = (
|
|
|
105576
105809
|
return this._getTracer().startSpan(name2, options, context2);
|
|
105577
105810
|
};
|
|
105578
105811
|
ProxyTracer2.prototype.startActiveSpan = function(_name, _options, _context, _fn) {
|
|
105579
|
-
var
|
|
105580
|
-
return Reflect.apply(
|
|
105812
|
+
var tracer = this._getTracer();
|
|
105813
|
+
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
105581
105814
|
};
|
|
105582
105815
|
ProxyTracer2.prototype._getTracer = function() {
|
|
105583
105816
|
if (this._delegate) {
|
|
105584
105817
|
return this._delegate;
|
|
105585
105818
|
}
|
|
105586
|
-
var
|
|
105587
|
-
if (!
|
|
105819
|
+
var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
105820
|
+
if (!tracer) {
|
|
105588
105821
|
return NOOP_TRACER;
|
|
105589
105822
|
}
|
|
105590
|
-
this._delegate =
|
|
105823
|
+
this._delegate = tracer;
|
|
105591
105824
|
return this._delegate;
|
|
105592
105825
|
};
|
|
105593
105826
|
return ProxyTracer2;
|
|
@@ -105943,7 +106176,7 @@ const browserExt = {
|
|
|
105943
106176
|
},
|
|
105944
106177
|
test: () => true,
|
|
105945
106178
|
load: async () => {
|
|
105946
|
-
await import("./browserAll-
|
|
106179
|
+
await import("./browserAll-8dgNqS_u.js");
|
|
105947
106180
|
}
|
|
105948
106181
|
};
|
|
105949
106182
|
const webworkerExt = {
|
|
@@ -105954,7 +106187,7 @@ const webworkerExt = {
|
|
|
105954
106187
|
},
|
|
105955
106188
|
test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
|
|
105956
106189
|
load: async () => {
|
|
105957
|
-
await import("./webworkerAll-
|
|
106190
|
+
await import("./webworkerAll-x0txRvuX.js");
|
|
105958
106191
|
}
|
|
105959
106192
|
};
|
|
105960
106193
|
class ObservablePoint {
|
|
@@ -118197,19 +118430,19 @@ async function autoDetectRenderer(options) {
|
|
|
118197
118430
|
for (let i2 = 0; i2 < preferredOrder.length; i2++) {
|
|
118198
118431
|
const rendererType = preferredOrder[i2];
|
|
118199
118432
|
if (rendererType === "webgpu" && await isWebGPUSupported()) {
|
|
118200
|
-
const { WebGPURenderer } = await import("./WebGPURenderer-
|
|
118433
|
+
const { WebGPURenderer } = await import("./WebGPURenderer-CYHP_r5v.js");
|
|
118201
118434
|
RendererClass = WebGPURenderer;
|
|
118202
118435
|
finalOptions = { ...options, ...options.webgpu };
|
|
118203
118436
|
break;
|
|
118204
118437
|
} else if (rendererType === "webgl" && isWebGLSupported(
|
|
118205
118438
|
options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
|
|
118206
118439
|
)) {
|
|
118207
|
-
const { WebGLRenderer } = await import("./WebGLRenderer-
|
|
118440
|
+
const { WebGLRenderer } = await import("./WebGLRenderer-Bpz07IxR.js");
|
|
118208
118441
|
RendererClass = WebGLRenderer;
|
|
118209
118442
|
finalOptions = { ...options, ...options.webgl };
|
|
118210
118443
|
break;
|
|
118211
118444
|
} else if (rendererType === "canvas") {
|
|
118212
|
-
const { CanvasRenderer } = await import("./CanvasRenderer-
|
|
118445
|
+
const { CanvasRenderer } = await import("./CanvasRenderer-4WtcAgzc.js");
|
|
118213
118446
|
RendererClass = CanvasRenderer;
|
|
118214
118447
|
finalOptions = { ...options, ...options.canvasOptions };
|
|
118215
118448
|
break;
|
|
@@ -132687,6 +132920,834 @@ function domEventToGridCoords(clientX, clientY, viewport, canvasElement) {
|
|
|
132687
132920
|
const gridCoords = screenToGrid(worldPoint.x, worldPoint.y);
|
|
132688
132921
|
return gridCoords;
|
|
132689
132922
|
}
|
|
132923
|
+
const TILE_WIDTH = ISO_TILE_WIDTH$1;
|
|
132924
|
+
const TILE_HEIGHT = ISO_TILE_HEIGHT$1;
|
|
132925
|
+
function calculateFootprint(sizeMultiplier) {
|
|
132926
|
+
const tiles = 4 * sizeMultiplier;
|
|
132927
|
+
return {
|
|
132928
|
+
tiles,
|
|
132929
|
+
width: tiles * TILE_WIDTH / 2,
|
|
132930
|
+
height: tiles * TILE_HEIGHT / 2
|
|
132931
|
+
};
|
|
132932
|
+
}
|
|
132933
|
+
const COLORS = {
|
|
132934
|
+
// Wood colors
|
|
132935
|
+
woodDark: 6111287,
|
|
132936
|
+
woodMedium: 7951688,
|
|
132937
|
+
woodLight: 9268835,
|
|
132938
|
+
// Flower/vine colors (MIT - welcoming, open)
|
|
132939
|
+
flowerPink: 16738740,
|
|
132940
|
+
flowerPinkDark: 14381203,
|
|
132941
|
+
flowerYellow: 16766720,
|
|
132942
|
+
leafGreen: 2263842,
|
|
132943
|
+
leafGreenLight: 3329330,
|
|
132944
|
+
vineGreen: 3050327,
|
|
132945
|
+
// Grass colors
|
|
132946
|
+
grassLight: 9498256,
|
|
132947
|
+
grassMedium: 3329330,
|
|
132948
|
+
grassDark: 2263842
|
|
132949
|
+
};
|
|
132950
|
+
function generateMITFlowerArch(config) {
|
|
132951
|
+
const { name: name2, sizeMultiplier, archWidth: customArchWidth } = config;
|
|
132952
|
+
const container = new Container();
|
|
132953
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
132954
|
+
const archWidth = customArchWidth ?? footprint.width * 0.5;
|
|
132955
|
+
const scale = archWidth / 80;
|
|
132956
|
+
const postWidth = Math.max(3, 4 * scale);
|
|
132957
|
+
const postHeight = Math.max(25, 35 * scale);
|
|
132958
|
+
const archHeight = postHeight + 4 * scale;
|
|
132959
|
+
const graphics = new Graphics();
|
|
132960
|
+
graphics.rect(-archWidth / 2, -postHeight, postWidth, postHeight);
|
|
132961
|
+
graphics.fill(COLORS.woodMedium);
|
|
132962
|
+
graphics.rect(-archWidth / 2, -postHeight, Math.max(1, scale), postHeight);
|
|
132963
|
+
graphics.fill(COLORS.woodLight);
|
|
132964
|
+
graphics.rect(
|
|
132965
|
+
-archWidth / 2 + postWidth - Math.max(1, scale),
|
|
132966
|
+
-postHeight,
|
|
132967
|
+
Math.max(1, scale),
|
|
132968
|
+
postHeight
|
|
132969
|
+
);
|
|
132970
|
+
graphics.fill(COLORS.woodDark);
|
|
132971
|
+
graphics.rect(archWidth / 2 - postWidth, -postHeight, postWidth, postHeight);
|
|
132972
|
+
graphics.fill(COLORS.woodMedium);
|
|
132973
|
+
graphics.rect(
|
|
132974
|
+
archWidth / 2 - postWidth,
|
|
132975
|
+
-postHeight,
|
|
132976
|
+
Math.max(1, scale),
|
|
132977
|
+
postHeight
|
|
132978
|
+
);
|
|
132979
|
+
graphics.fill(COLORS.woodLight);
|
|
132980
|
+
graphics.rect(
|
|
132981
|
+
archWidth / 2 - Math.max(1, scale),
|
|
132982
|
+
-postHeight,
|
|
132983
|
+
Math.max(1, scale),
|
|
132984
|
+
postHeight
|
|
132985
|
+
);
|
|
132986
|
+
graphics.fill(COLORS.woodDark);
|
|
132987
|
+
const crossbarHeight = Math.max(3, 4 * scale);
|
|
132988
|
+
graphics.rect(-archWidth / 2, -archHeight, archWidth, crossbarHeight);
|
|
132989
|
+
graphics.fill(COLORS.woodMedium);
|
|
132990
|
+
graphics.rect(-archWidth / 2, -archHeight, archWidth, Math.max(1, scale));
|
|
132991
|
+
graphics.fill(COLORS.woodLight);
|
|
132992
|
+
graphics.rect(
|
|
132993
|
+
-archWidth / 2,
|
|
132994
|
+
-archHeight + crossbarHeight - Math.max(1, scale),
|
|
132995
|
+
archWidth,
|
|
132996
|
+
Math.max(1, scale)
|
|
132997
|
+
);
|
|
132998
|
+
graphics.fill(COLORS.woodDark);
|
|
132999
|
+
const flagWidth = archWidth * 0.5;
|
|
133000
|
+
const flagHeight = Math.max(18, 24 * scale);
|
|
133001
|
+
const flagTop = -postHeight + 2 * scale;
|
|
133002
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, flagHeight);
|
|
133003
|
+
graphics.fill(9498256);
|
|
133004
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, Math.max(1, scale));
|
|
133005
|
+
graphics.fill(8244349);
|
|
133006
|
+
graphics.rect(
|
|
133007
|
+
-flagWidth / 2,
|
|
133008
|
+
flagTop + flagHeight - Math.max(1, scale),
|
|
133009
|
+
flagWidth,
|
|
133010
|
+
Math.max(1, scale)
|
|
133011
|
+
);
|
|
133012
|
+
graphics.fill(7059563);
|
|
133013
|
+
graphics.rect(-flagWidth / 2, flagTop, Math.max(1, scale), flagHeight);
|
|
133014
|
+
graphics.fill(8244349);
|
|
133015
|
+
graphics.rect(
|
|
133016
|
+
flagWidth / 2 - Math.max(1, scale),
|
|
133017
|
+
flagTop,
|
|
133018
|
+
Math.max(1, scale),
|
|
133019
|
+
flagHeight
|
|
133020
|
+
);
|
|
133021
|
+
graphics.fill(7059563);
|
|
133022
|
+
const vineSize = Math.max(2, 3 * scale);
|
|
133023
|
+
const vinePositions = [
|
|
133024
|
+
{ x: -archWidth / 2 - 2 * scale, y: -postHeight * 0.9 },
|
|
133025
|
+
{ x: -archWidth / 2 - 1 * scale, y: -postHeight * 0.6 },
|
|
133026
|
+
{ x: -archWidth / 2 + 1 * scale, y: -postHeight * 0.4 },
|
|
133027
|
+
{ x: -archWidth / 2 - 2 * scale, y: -postHeight * 0.2 }
|
|
133028
|
+
];
|
|
133029
|
+
for (const pos of vinePositions) {
|
|
133030
|
+
graphics.rect(pos.x, pos.y, vineSize, vineSize * 0.66);
|
|
133031
|
+
graphics.fill(COLORS.vineGreen);
|
|
133032
|
+
}
|
|
133033
|
+
const rightVinePositions = [
|
|
133034
|
+
{ x: archWidth / 2 - 1 * scale, y: -postHeight * 0.8 },
|
|
133035
|
+
{ x: archWidth / 2 + 1 * scale, y: -postHeight * 0.5 },
|
|
133036
|
+
{ x: archWidth / 2 - 2 * scale, y: -postHeight * 0.3 },
|
|
133037
|
+
{ x: archWidth / 2, y: -postHeight * 0.1 }
|
|
133038
|
+
];
|
|
133039
|
+
for (const pos of rightVinePositions) {
|
|
133040
|
+
graphics.rect(pos.x, pos.y, vineSize, vineSize * 0.66);
|
|
133041
|
+
graphics.fill(COLORS.vineGreen);
|
|
133042
|
+
}
|
|
133043
|
+
const flowerCount = Math.max(4, Math.floor(6 * scale));
|
|
133044
|
+
const flowerSpacing = archWidth / (flowerCount + 1);
|
|
133045
|
+
const flowerSize = Math.max(3, 4 * scale);
|
|
133046
|
+
for (let i2 = 0; i2 < flowerCount; i2++) {
|
|
133047
|
+
const fx = -archWidth / 2 + flowerSpacing * (i2 + 1);
|
|
133048
|
+
const flowerColor = i2 % 2 === 0 ? COLORS.flowerPink : COLORS.flowerYellow;
|
|
133049
|
+
graphics.rect(
|
|
133050
|
+
fx - flowerSize * 0.5,
|
|
133051
|
+
-flowerSize - 2 * scale,
|
|
133052
|
+
flowerSize * 0.5,
|
|
133053
|
+
flowerSize * 0.5
|
|
133054
|
+
);
|
|
133055
|
+
graphics.fill(COLORS.leafGreen);
|
|
133056
|
+
graphics.rect(
|
|
133057
|
+
fx + flowerSize * 0.25,
|
|
133058
|
+
-flowerSize - 1 * scale,
|
|
133059
|
+
flowerSize * 0.5,
|
|
133060
|
+
flowerSize * 0.5
|
|
133061
|
+
);
|
|
133062
|
+
graphics.fill(COLORS.leafGreenLight);
|
|
133063
|
+
graphics.rect(fx - flowerSize * 0.5, -flowerSize, flowerSize, flowerSize);
|
|
133064
|
+
graphics.fill(flowerColor);
|
|
133065
|
+
graphics.rect(
|
|
133066
|
+
fx - flowerSize * 0.25,
|
|
133067
|
+
-flowerSize * 0.75,
|
|
133068
|
+
flowerSize * 0.5,
|
|
133069
|
+
flowerSize * 0.5
|
|
133070
|
+
);
|
|
133071
|
+
graphics.fill(COLORS.flowerYellow);
|
|
133072
|
+
}
|
|
133073
|
+
const cornerFlowerSize = Math.max(4, 5 * scale);
|
|
133074
|
+
graphics.rect(
|
|
133075
|
+
-archWidth / 2 - cornerFlowerSize * 0.3,
|
|
133076
|
+
-cornerFlowerSize,
|
|
133077
|
+
cornerFlowerSize,
|
|
133078
|
+
cornerFlowerSize
|
|
133079
|
+
);
|
|
133080
|
+
graphics.fill(COLORS.flowerPink);
|
|
133081
|
+
graphics.rect(
|
|
133082
|
+
-archWidth / 2 - cornerFlowerSize * 0.1,
|
|
133083
|
+
-cornerFlowerSize * 0.8,
|
|
133084
|
+
cornerFlowerSize * 0.6,
|
|
133085
|
+
cornerFlowerSize * 0.6
|
|
133086
|
+
);
|
|
133087
|
+
graphics.fill(COLORS.flowerPinkDark);
|
|
133088
|
+
graphics.rect(
|
|
133089
|
+
archWidth / 2 - cornerFlowerSize * 0.7,
|
|
133090
|
+
-cornerFlowerSize,
|
|
133091
|
+
cornerFlowerSize,
|
|
133092
|
+
cornerFlowerSize
|
|
133093
|
+
);
|
|
133094
|
+
graphics.fill(COLORS.flowerPink);
|
|
133095
|
+
graphics.rect(
|
|
133096
|
+
archWidth / 2 - cornerFlowerSize * 0.5,
|
|
133097
|
+
-cornerFlowerSize * 0.8,
|
|
133098
|
+
cornerFlowerSize * 0.6,
|
|
133099
|
+
cornerFlowerSize * 0.6
|
|
133100
|
+
);
|
|
133101
|
+
graphics.fill(COLORS.flowerPinkDark);
|
|
133102
|
+
container.addChild(graphics);
|
|
133103
|
+
const mitFontSize = Math.max(10, 14 * scale);
|
|
133104
|
+
const mitText = new Text({
|
|
133105
|
+
text: "MIT",
|
|
133106
|
+
style: {
|
|
133107
|
+
fontSize: mitFontSize,
|
|
133108
|
+
fill: 2263842,
|
|
133109
|
+
// Forest green text
|
|
133110
|
+
fontFamily: "Arial",
|
|
133111
|
+
fontWeight: "bold"
|
|
133112
|
+
},
|
|
133113
|
+
resolution: 2
|
|
133114
|
+
});
|
|
133115
|
+
mitText.anchor.set(0.5, 0.5);
|
|
133116
|
+
mitText.y = flagTop + flagHeight * 0.5;
|
|
133117
|
+
container.addChild(mitText);
|
|
133118
|
+
const signBoard = new Graphics();
|
|
133119
|
+
const fontSize = Math.max(8, 9 * scale);
|
|
133120
|
+
const estimatedTextWidth = name2.length * fontSize * 0.6;
|
|
133121
|
+
const signWidth = Math.min(
|
|
133122
|
+
estimatedTextWidth + 16 * scale,
|
|
133123
|
+
archWidth - 8 * scale
|
|
133124
|
+
);
|
|
133125
|
+
const signHeight = Math.max(8, 10 * scale);
|
|
133126
|
+
const signBoardY = -archHeight - signHeight - 2 * scale;
|
|
133127
|
+
signBoard.rect(-signWidth / 2, signBoardY, signWidth, signHeight);
|
|
133128
|
+
signBoard.fill(COLORS.woodLight);
|
|
133129
|
+
signBoard.rect(-signWidth / 2, signBoardY, signWidth, Math.max(1, scale));
|
|
133130
|
+
signBoard.fill(COLORS.woodMedium);
|
|
133131
|
+
signBoard.rect(
|
|
133132
|
+
-signWidth / 2,
|
|
133133
|
+
signBoardY + signHeight - Math.max(1, scale),
|
|
133134
|
+
signWidth,
|
|
133135
|
+
Math.max(1, scale)
|
|
133136
|
+
);
|
|
133137
|
+
signBoard.fill(COLORS.woodDark);
|
|
133138
|
+
container.addChild(signBoard);
|
|
133139
|
+
const nameText = new Text({
|
|
133140
|
+
text: name2,
|
|
133141
|
+
style: {
|
|
133142
|
+
fontSize,
|
|
133143
|
+
fill: 4073251,
|
|
133144
|
+
// Dark brown text
|
|
133145
|
+
fontFamily: "Arial",
|
|
133146
|
+
fontWeight: "600"
|
|
133147
|
+
},
|
|
133148
|
+
resolution: 2
|
|
133149
|
+
});
|
|
133150
|
+
nameText.anchor.set(0.5, 0.5);
|
|
133151
|
+
nameText.y = signBoardY + signHeight / 2;
|
|
133152
|
+
container.addChild(nameText);
|
|
133153
|
+
return container;
|
|
133154
|
+
}
|
|
133155
|
+
function generateOpenGrassGround(sizeMultiplier) {
|
|
133156
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
133157
|
+
const grass = new Graphics();
|
|
133158
|
+
const halfW = footprint.width;
|
|
133159
|
+
const halfH = footprint.height;
|
|
133160
|
+
grass.moveTo(0, -halfH);
|
|
133161
|
+
grass.lineTo(halfW, 0);
|
|
133162
|
+
grass.lineTo(0, halfH);
|
|
133163
|
+
grass.lineTo(-halfW, 0);
|
|
133164
|
+
grass.closePath();
|
|
133165
|
+
grass.fill(COLORS.grassMedium);
|
|
133166
|
+
const textureCount = Math.max(6, Math.floor(8 * sizeMultiplier));
|
|
133167
|
+
for (let i2 = 0; i2 < textureCount; i2++) {
|
|
133168
|
+
const angle = i2 / textureCount * Math.PI * 2;
|
|
133169
|
+
const radius = 0.3 + i2 % 3 * 0.15;
|
|
133170
|
+
const x2 = Math.cos(angle) * halfW * radius;
|
|
133171
|
+
const y2 = Math.sin(angle) * halfH * radius;
|
|
133172
|
+
const dotSize = Math.max(1.5, 2 * sizeMultiplier);
|
|
133173
|
+
grass.circle(x2, y2, dotSize);
|
|
133174
|
+
grass.fill(i2 % 2 === 0 ? COLORS.grassLight : COLORS.grassDark);
|
|
133175
|
+
}
|
|
133176
|
+
const flowerSize = Math.max(1, 1.5 * sizeMultiplier);
|
|
133177
|
+
const flowerSpots = [
|
|
133178
|
+
{ x: -halfW * 0.5, y: -halfH * 0.2 },
|
|
133179
|
+
{ x: halfW * 0.4, y: halfH * 0.3 },
|
|
133180
|
+
{ x: -halfW * 0.2, y: halfH * 0.4 },
|
|
133181
|
+
{ x: halfW * 0.3, y: -halfH * 0.35 }
|
|
133182
|
+
];
|
|
133183
|
+
for (const spot of flowerSpots) {
|
|
133184
|
+
grass.circle(spot.x, spot.y, flowerSize);
|
|
133185
|
+
grass.fill(COLORS.flowerPink);
|
|
133186
|
+
}
|
|
133187
|
+
return grass;
|
|
133188
|
+
}
|
|
133189
|
+
function generateApacheSign(config) {
|
|
133190
|
+
const { name: name2, sizeMultiplier, archWidth: customArchWidth } = config;
|
|
133191
|
+
const container = new Container();
|
|
133192
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
133193
|
+
const archWidth = customArchWidth ?? footprint.width * 0.5;
|
|
133194
|
+
const scale = archWidth / 80;
|
|
133195
|
+
const graphics = new Graphics();
|
|
133196
|
+
const postWidth = Math.max(3, 4 * scale);
|
|
133197
|
+
const postHeight = Math.max(25, 35 * scale);
|
|
133198
|
+
graphics.rect(-archWidth / 2, -postHeight, postWidth, postHeight);
|
|
133199
|
+
graphics.fill(COLORS.woodMedium);
|
|
133200
|
+
graphics.rect(-archWidth / 2, -postHeight, Math.max(1, scale), postHeight);
|
|
133201
|
+
graphics.fill(COLORS.woodLight);
|
|
133202
|
+
graphics.rect(
|
|
133203
|
+
-archWidth / 2 + postWidth - Math.max(1, scale),
|
|
133204
|
+
-postHeight,
|
|
133205
|
+
Math.max(1, scale),
|
|
133206
|
+
postHeight
|
|
133207
|
+
);
|
|
133208
|
+
graphics.fill(COLORS.woodDark);
|
|
133209
|
+
graphics.rect(archWidth / 2 - postWidth, -postHeight, postWidth, postHeight);
|
|
133210
|
+
graphics.fill(COLORS.woodMedium);
|
|
133211
|
+
graphics.rect(
|
|
133212
|
+
archWidth / 2 - postWidth,
|
|
133213
|
+
-postHeight,
|
|
133214
|
+
Math.max(1, scale),
|
|
133215
|
+
postHeight
|
|
133216
|
+
);
|
|
133217
|
+
graphics.fill(COLORS.woodLight);
|
|
133218
|
+
graphics.rect(
|
|
133219
|
+
archWidth / 2 - Math.max(1, scale),
|
|
133220
|
+
-postHeight,
|
|
133221
|
+
Math.max(1, scale),
|
|
133222
|
+
postHeight
|
|
133223
|
+
);
|
|
133224
|
+
graphics.fill(COLORS.woodDark);
|
|
133225
|
+
const crossbarHeight = Math.max(3, 4 * scale);
|
|
133226
|
+
graphics.rect(
|
|
133227
|
+
-archWidth / 2,
|
|
133228
|
+
-postHeight - crossbarHeight,
|
|
133229
|
+
archWidth,
|
|
133230
|
+
crossbarHeight
|
|
133231
|
+
);
|
|
133232
|
+
graphics.fill(COLORS.woodMedium);
|
|
133233
|
+
graphics.rect(
|
|
133234
|
+
-archWidth / 2,
|
|
133235
|
+
-postHeight - crossbarHeight,
|
|
133236
|
+
archWidth,
|
|
133237
|
+
Math.max(1, scale)
|
|
133238
|
+
);
|
|
133239
|
+
graphics.fill(COLORS.woodLight);
|
|
133240
|
+
const flagWidth = archWidth * 0.5;
|
|
133241
|
+
const flagHeight = Math.max(18, 24 * scale);
|
|
133242
|
+
const flagTop = -postHeight + 2 * scale;
|
|
133243
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, flagHeight);
|
|
133244
|
+
graphics.fill(16777215);
|
|
133245
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, Math.max(1, scale));
|
|
133246
|
+
graphics.fill(14540253);
|
|
133247
|
+
graphics.rect(
|
|
133248
|
+
-flagWidth / 2,
|
|
133249
|
+
flagTop + flagHeight - Math.max(1, scale),
|
|
133250
|
+
flagWidth,
|
|
133251
|
+
Math.max(1, scale)
|
|
133252
|
+
);
|
|
133253
|
+
graphics.fill(13421772);
|
|
133254
|
+
graphics.rect(-flagWidth / 2, flagTop, Math.max(1, scale), flagHeight);
|
|
133255
|
+
graphics.fill(14540253);
|
|
133256
|
+
graphics.rect(
|
|
133257
|
+
flagWidth / 2 - Math.max(1, scale),
|
|
133258
|
+
flagTop,
|
|
133259
|
+
Math.max(1, scale),
|
|
133260
|
+
flagHeight
|
|
133261
|
+
);
|
|
133262
|
+
graphics.fill(13421772);
|
|
133263
|
+
const leafCenterY = flagTop + flagHeight * 0.55;
|
|
133264
|
+
const leafSize = Math.min(flagWidth, flagHeight) * 0.35;
|
|
133265
|
+
const leafColor = 13369344;
|
|
133266
|
+
const leafGraphics = new Graphics();
|
|
133267
|
+
leafGraphics.rect(-scale * 0.5, 0, scale, leafSize * 0.6);
|
|
133268
|
+
leafGraphics.fill(9109504);
|
|
133269
|
+
leafGraphics.beginPath();
|
|
133270
|
+
leafGraphics.moveTo(0, -leafSize * 0.8);
|
|
133271
|
+
leafGraphics.lineTo(leafSize * 0.3, -leafSize * 0.4);
|
|
133272
|
+
leafGraphics.lineTo(leafSize * 0.6, -leafSize * 0.3);
|
|
133273
|
+
leafGraphics.lineTo(leafSize * 0.3, -leafSize * 0.1);
|
|
133274
|
+
leafGraphics.lineTo(leafSize * 0.4, leafSize * 0.2);
|
|
133275
|
+
leafGraphics.lineTo(leafSize * 0.15, leafSize * 0.15);
|
|
133276
|
+
leafGraphics.lineTo(0, leafSize * 0.4);
|
|
133277
|
+
leafGraphics.lineTo(-leafSize * 0.15, leafSize * 0.15);
|
|
133278
|
+
leafGraphics.lineTo(-leafSize * 0.4, leafSize * 0.2);
|
|
133279
|
+
leafGraphics.lineTo(-leafSize * 0.3, -leafSize * 0.1);
|
|
133280
|
+
leafGraphics.lineTo(-leafSize * 0.6, -leafSize * 0.3);
|
|
133281
|
+
leafGraphics.lineTo(-leafSize * 0.3, -leafSize * 0.4);
|
|
133282
|
+
leafGraphics.closePath();
|
|
133283
|
+
leafGraphics.fill(leafColor);
|
|
133284
|
+
leafGraphics.x = 0;
|
|
133285
|
+
leafGraphics.y = leafCenterY;
|
|
133286
|
+
leafGraphics.rotation = 0.3;
|
|
133287
|
+
graphics.addChild(leafGraphics);
|
|
133288
|
+
container.addChild(graphics);
|
|
133289
|
+
const signBoard = new Graphics();
|
|
133290
|
+
const fontSize = Math.max(8, 9 * scale);
|
|
133291
|
+
const estimatedTextWidth = name2.length * fontSize * 0.6;
|
|
133292
|
+
const signBoardWidth = Math.min(
|
|
133293
|
+
estimatedTextWidth + 16 * scale,
|
|
133294
|
+
archWidth - 8 * scale
|
|
133295
|
+
);
|
|
133296
|
+
const signBoardHeight = Math.max(8, 10 * scale);
|
|
133297
|
+
const signBoardY = -postHeight - crossbarHeight + 2 * scale;
|
|
133298
|
+
signBoard.rect(
|
|
133299
|
+
-signBoardWidth / 2,
|
|
133300
|
+
signBoardY,
|
|
133301
|
+
signBoardWidth,
|
|
133302
|
+
signBoardHeight
|
|
133303
|
+
);
|
|
133304
|
+
signBoard.fill(COLORS.woodLight);
|
|
133305
|
+
signBoard.rect(
|
|
133306
|
+
-signBoardWidth / 2,
|
|
133307
|
+
signBoardY,
|
|
133308
|
+
signBoardWidth,
|
|
133309
|
+
Math.max(1, scale)
|
|
133310
|
+
);
|
|
133311
|
+
signBoard.fill(COLORS.woodMedium);
|
|
133312
|
+
signBoard.rect(
|
|
133313
|
+
-signBoardWidth / 2,
|
|
133314
|
+
signBoardY + signBoardHeight - Math.max(1, scale),
|
|
133315
|
+
signBoardWidth,
|
|
133316
|
+
Math.max(1, scale)
|
|
133317
|
+
);
|
|
133318
|
+
signBoard.fill(COLORS.woodDark);
|
|
133319
|
+
container.addChild(signBoard);
|
|
133320
|
+
const nameText = new Text({
|
|
133321
|
+
text: name2,
|
|
133322
|
+
style: {
|
|
133323
|
+
fontSize,
|
|
133324
|
+
fill: 4073251,
|
|
133325
|
+
fontFamily: "Arial",
|
|
133326
|
+
fontWeight: "600"
|
|
133327
|
+
},
|
|
133328
|
+
resolution: 2
|
|
133329
|
+
});
|
|
133330
|
+
nameText.anchor.set(0.5, 0.5);
|
|
133331
|
+
nameText.y = signBoardY + signBoardHeight / 2;
|
|
133332
|
+
container.addChild(nameText);
|
|
133333
|
+
return container;
|
|
133334
|
+
}
|
|
133335
|
+
function generateGPLSign(config) {
|
|
133336
|
+
const { name: name2, sizeMultiplier, archWidth: customArchWidth } = config;
|
|
133337
|
+
const container = new Container();
|
|
133338
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
133339
|
+
const archWidth = customArchWidth ?? footprint.width * 0.5;
|
|
133340
|
+
const scale = archWidth / 80;
|
|
133341
|
+
const graphics = new Graphics();
|
|
133342
|
+
const ironDark = 2763306;
|
|
133343
|
+
const ironMedium = 3815994;
|
|
133344
|
+
const ironLight = 4868682;
|
|
133345
|
+
const ironHighlight = 5921370;
|
|
133346
|
+
const postWidth = Math.max(4, 5 * scale);
|
|
133347
|
+
const postHeight = Math.max(25, 35 * scale);
|
|
133348
|
+
graphics.rect(-archWidth / 2, -postHeight, postWidth, postHeight);
|
|
133349
|
+
graphics.fill(ironMedium);
|
|
133350
|
+
graphics.rect(-archWidth / 2, -postHeight, Math.max(1, scale), postHeight);
|
|
133351
|
+
graphics.fill(ironHighlight);
|
|
133352
|
+
graphics.rect(
|
|
133353
|
+
-archWidth / 2 + postWidth - Math.max(1, scale),
|
|
133354
|
+
-postHeight,
|
|
133355
|
+
Math.max(1, scale),
|
|
133356
|
+
postHeight
|
|
133357
|
+
);
|
|
133358
|
+
graphics.fill(ironDark);
|
|
133359
|
+
const finialSize = postWidth * 1.2;
|
|
133360
|
+
graphics.circle(
|
|
133361
|
+
-archWidth / 2 + postWidth / 2,
|
|
133362
|
+
-postHeight - finialSize / 2,
|
|
133363
|
+
finialSize / 2
|
|
133364
|
+
);
|
|
133365
|
+
graphics.fill(ironMedium);
|
|
133366
|
+
graphics.circle(
|
|
133367
|
+
-archWidth / 2 + postWidth / 2 - finialSize * 0.15,
|
|
133368
|
+
-postHeight - finialSize * 0.65,
|
|
133369
|
+
finialSize * 0.15
|
|
133370
|
+
);
|
|
133371
|
+
graphics.fill(ironHighlight);
|
|
133372
|
+
graphics.rect(archWidth / 2 - postWidth, -postHeight, postWidth, postHeight);
|
|
133373
|
+
graphics.fill(ironMedium);
|
|
133374
|
+
graphics.rect(
|
|
133375
|
+
archWidth / 2 - postWidth,
|
|
133376
|
+
-postHeight,
|
|
133377
|
+
Math.max(1, scale),
|
|
133378
|
+
postHeight
|
|
133379
|
+
);
|
|
133380
|
+
graphics.fill(ironHighlight);
|
|
133381
|
+
graphics.rect(
|
|
133382
|
+
archWidth / 2 - Math.max(1, scale),
|
|
133383
|
+
-postHeight,
|
|
133384
|
+
Math.max(1, scale),
|
|
133385
|
+
postHeight
|
|
133386
|
+
);
|
|
133387
|
+
graphics.fill(ironDark);
|
|
133388
|
+
graphics.circle(
|
|
133389
|
+
archWidth / 2 - postWidth / 2,
|
|
133390
|
+
-postHeight - finialSize / 2,
|
|
133391
|
+
finialSize / 2
|
|
133392
|
+
);
|
|
133393
|
+
graphics.fill(ironMedium);
|
|
133394
|
+
graphics.circle(
|
|
133395
|
+
archWidth / 2 - postWidth / 2 - finialSize * 0.15,
|
|
133396
|
+
-postHeight - finialSize * 0.65,
|
|
133397
|
+
finialSize * 0.15
|
|
133398
|
+
);
|
|
133399
|
+
graphics.fill(ironHighlight);
|
|
133400
|
+
const crossbarHeight = Math.max(4, 5 * scale);
|
|
133401
|
+
graphics.rect(
|
|
133402
|
+
-archWidth / 2,
|
|
133403
|
+
-postHeight - crossbarHeight,
|
|
133404
|
+
archWidth,
|
|
133405
|
+
crossbarHeight
|
|
133406
|
+
);
|
|
133407
|
+
graphics.fill(ironMedium);
|
|
133408
|
+
graphics.rect(
|
|
133409
|
+
-archWidth / 2,
|
|
133410
|
+
-postHeight - crossbarHeight,
|
|
133411
|
+
archWidth,
|
|
133412
|
+
Math.max(1, scale)
|
|
133413
|
+
);
|
|
133414
|
+
graphics.fill(ironHighlight);
|
|
133415
|
+
graphics.rect(
|
|
133416
|
+
-archWidth / 2,
|
|
133417
|
+
-postHeight - Math.max(1, scale),
|
|
133418
|
+
archWidth,
|
|
133419
|
+
Math.max(1, scale)
|
|
133420
|
+
);
|
|
133421
|
+
graphics.fill(ironDark);
|
|
133422
|
+
const scrollY = -postHeight + 3 * scale;
|
|
133423
|
+
const scrollWidth = archWidth * 0.15;
|
|
133424
|
+
graphics.circle(-archWidth / 4, scrollY, scrollWidth);
|
|
133425
|
+
graphics.stroke({ width: Math.max(2, 2 * scale), color: ironMedium });
|
|
133426
|
+
graphics.circle(archWidth / 4, scrollY, scrollWidth);
|
|
133427
|
+
graphics.stroke({ width: Math.max(2, 2 * scale), color: ironMedium });
|
|
133428
|
+
const flagWidth = archWidth * 0.5;
|
|
133429
|
+
const flagHeight = Math.max(18, 24 * scale);
|
|
133430
|
+
const flagTop = -postHeight + 8 * scale;
|
|
133431
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, flagHeight);
|
|
133432
|
+
graphics.fill(2250154);
|
|
133433
|
+
graphics.rect(-flagWidth / 2, flagTop, flagWidth, Math.max(1, scale));
|
|
133434
|
+
graphics.fill(3368635);
|
|
133435
|
+
graphics.rect(
|
|
133436
|
+
-flagWidth / 2,
|
|
133437
|
+
flagTop + flagHeight - Math.max(1, scale),
|
|
133438
|
+
flagWidth,
|
|
133439
|
+
Math.max(1, scale)
|
|
133440
|
+
);
|
|
133441
|
+
graphics.fill(1131690);
|
|
133442
|
+
graphics.rect(-flagWidth / 2, flagTop, Math.max(1, scale), flagHeight);
|
|
133443
|
+
graphics.fill(3368635);
|
|
133444
|
+
graphics.rect(
|
|
133445
|
+
flagWidth / 2 - Math.max(1, scale),
|
|
133446
|
+
flagTop,
|
|
133447
|
+
Math.max(1, scale),
|
|
133448
|
+
flagHeight
|
|
133449
|
+
);
|
|
133450
|
+
graphics.fill(1131690);
|
|
133451
|
+
container.addChild(graphics);
|
|
133452
|
+
const gplFontSize = Math.max(10, 14 * scale);
|
|
133453
|
+
const gplText = new Text({
|
|
133454
|
+
text: "GPL",
|
|
133455
|
+
style: {
|
|
133456
|
+
fontSize: gplFontSize,
|
|
133457
|
+
fill: 16777215,
|
|
133458
|
+
fontFamily: "Arial",
|
|
133459
|
+
fontWeight: "bold"
|
|
133460
|
+
},
|
|
133461
|
+
resolution: 2
|
|
133462
|
+
});
|
|
133463
|
+
gplText.anchor.set(0.5, 0.5);
|
|
133464
|
+
gplText.y = flagTop + flagHeight * 0.5;
|
|
133465
|
+
container.addChild(gplText);
|
|
133466
|
+
const signBoard = new Graphics();
|
|
133467
|
+
const fontSize = Math.max(8, 9 * scale);
|
|
133468
|
+
const estimatedTextWidth = name2.length * fontSize * 0.6;
|
|
133469
|
+
const signBoardWidth = Math.min(
|
|
133470
|
+
estimatedTextWidth + 16 * scale,
|
|
133471
|
+
archWidth - 8 * scale
|
|
133472
|
+
);
|
|
133473
|
+
const signBoardHeight = Math.max(8, 10 * scale);
|
|
133474
|
+
const signBoardY = -postHeight - crossbarHeight - signBoardHeight - 2 * scale;
|
|
133475
|
+
signBoard.rect(
|
|
133476
|
+
-signBoardWidth / 2,
|
|
133477
|
+
signBoardY,
|
|
133478
|
+
signBoardWidth,
|
|
133479
|
+
signBoardHeight
|
|
133480
|
+
);
|
|
133481
|
+
signBoard.fill(ironLight);
|
|
133482
|
+
signBoard.rect(
|
|
133483
|
+
-signBoardWidth / 2,
|
|
133484
|
+
signBoardY,
|
|
133485
|
+
signBoardWidth,
|
|
133486
|
+
Math.max(1, scale)
|
|
133487
|
+
);
|
|
133488
|
+
signBoard.fill(ironHighlight);
|
|
133489
|
+
signBoard.rect(
|
|
133490
|
+
-signBoardWidth / 2,
|
|
133491
|
+
signBoardY + signBoardHeight - Math.max(1, scale),
|
|
133492
|
+
signBoardWidth,
|
|
133493
|
+
Math.max(1, scale)
|
|
133494
|
+
);
|
|
133495
|
+
signBoard.fill(ironDark);
|
|
133496
|
+
container.addChild(signBoard);
|
|
133497
|
+
const nameText = new Text({
|
|
133498
|
+
text: name2,
|
|
133499
|
+
style: {
|
|
133500
|
+
fontSize,
|
|
133501
|
+
fill: 16777215,
|
|
133502
|
+
fontFamily: "Arial",
|
|
133503
|
+
fontWeight: "600"
|
|
133504
|
+
},
|
|
133505
|
+
resolution: 2
|
|
133506
|
+
});
|
|
133507
|
+
nameText.anchor.set(0.5, 0.5);
|
|
133508
|
+
nameText.y = signBoardY + signBoardHeight / 2;
|
|
133509
|
+
container.addChild(nameText);
|
|
133510
|
+
return container;
|
|
133511
|
+
}
|
|
133512
|
+
function generatePicketFenceGround(sizeMultiplier) {
|
|
133513
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
133514
|
+
const ground = new Graphics();
|
|
133515
|
+
const halfW = footprint.width;
|
|
133516
|
+
const halfH = footprint.height;
|
|
133517
|
+
ground.moveTo(0, -halfH);
|
|
133518
|
+
ground.lineTo(halfW, 0);
|
|
133519
|
+
ground.lineTo(0, halfH);
|
|
133520
|
+
ground.lineTo(-halfW, 0);
|
|
133521
|
+
ground.closePath();
|
|
133522
|
+
ground.fill(COLORS.grassMedium);
|
|
133523
|
+
const textureCount = Math.max(6, Math.floor(8 * sizeMultiplier));
|
|
133524
|
+
for (let i2 = 0; i2 < textureCount; i2++) {
|
|
133525
|
+
const angle = i2 / textureCount * Math.PI * 2;
|
|
133526
|
+
const radius = 0.3 + i2 % 3 * 0.1;
|
|
133527
|
+
const x2 = Math.cos(angle) * halfW * radius;
|
|
133528
|
+
const y2 = Math.sin(angle) * halfH * radius;
|
|
133529
|
+
const dotSize = Math.max(1.5, 2 * sizeMultiplier);
|
|
133530
|
+
ground.circle(x2, y2, dotSize);
|
|
133531
|
+
ground.fill(i2 % 2 === 0 ? COLORS.grassLight : COLORS.grassDark);
|
|
133532
|
+
}
|
|
133533
|
+
const fenceWhite = 16119285;
|
|
133534
|
+
const fenceHighlight = 16777215;
|
|
133535
|
+
const picketWidth = Math.max(2, 3 * sizeMultiplier);
|
|
133536
|
+
const picketHeight = Math.max(8, 12 * sizeMultiplier);
|
|
133537
|
+
const picketSpacing = Math.max(4, 6 * sizeMultiplier);
|
|
133538
|
+
const edgeLength = Math.sqrt(halfW * halfW + halfH * halfH);
|
|
133539
|
+
const picketCount = Math.floor(edgeLength / picketSpacing);
|
|
133540
|
+
const slopeRatio = 0.5;
|
|
133541
|
+
const drawPicket = (px, py, edgeDir) => {
|
|
133542
|
+
const halfW2 = picketWidth / 2;
|
|
133543
|
+
const dx = halfW2 * edgeDir;
|
|
133544
|
+
const dy = halfW2 * slopeRatio;
|
|
133545
|
+
const bottomLeftX = px - dx;
|
|
133546
|
+
const bottomLeftY = py - dy;
|
|
133547
|
+
const bottomRightX = px + dx;
|
|
133548
|
+
const bottomRightY = py + dy;
|
|
133549
|
+
const topLeftX = bottomLeftX;
|
|
133550
|
+
const topLeftY = bottomLeftY - picketHeight;
|
|
133551
|
+
const topRightX = bottomRightX;
|
|
133552
|
+
const topRightY = bottomRightY - picketHeight;
|
|
133553
|
+
ground.beginPath();
|
|
133554
|
+
ground.moveTo(bottomLeftX, bottomLeftY);
|
|
133555
|
+
ground.lineTo(bottomRightX, bottomRightY);
|
|
133556
|
+
ground.lineTo(topRightX, topRightY);
|
|
133557
|
+
ground.lineTo(topLeftX, topLeftY);
|
|
133558
|
+
ground.closePath();
|
|
133559
|
+
ground.fill(fenceWhite);
|
|
133560
|
+
const highlightWidth = Math.max(1, sizeMultiplier * 0.5);
|
|
133561
|
+
ground.beginPath();
|
|
133562
|
+
if (edgeDir > 0) {
|
|
133563
|
+
ground.moveTo(bottomLeftX, bottomLeftY);
|
|
133564
|
+
ground.lineTo(
|
|
133565
|
+
bottomLeftX + highlightWidth * 0.5,
|
|
133566
|
+
bottomLeftY + highlightWidth * 0.25
|
|
133567
|
+
);
|
|
133568
|
+
ground.lineTo(
|
|
133569
|
+
topLeftX + highlightWidth * 0.5,
|
|
133570
|
+
topLeftY + highlightWidth * 0.25
|
|
133571
|
+
);
|
|
133572
|
+
ground.lineTo(topLeftX, topLeftY);
|
|
133573
|
+
} else {
|
|
133574
|
+
ground.moveTo(bottomRightX, bottomRightY);
|
|
133575
|
+
ground.lineTo(
|
|
133576
|
+
bottomRightX - highlightWidth * 0.5,
|
|
133577
|
+
bottomRightY + highlightWidth * 0.25
|
|
133578
|
+
);
|
|
133579
|
+
ground.lineTo(
|
|
133580
|
+
topRightX - highlightWidth * 0.5,
|
|
133581
|
+
topRightY + highlightWidth * 0.25
|
|
133582
|
+
);
|
|
133583
|
+
ground.lineTo(topRightX, topRightY);
|
|
133584
|
+
}
|
|
133585
|
+
ground.closePath();
|
|
133586
|
+
ground.fill(fenceHighlight);
|
|
133587
|
+
ground.beginPath();
|
|
133588
|
+
ground.moveTo(topLeftX, topLeftY);
|
|
133589
|
+
ground.lineTo(px, py - dy * 0 - picketHeight - picketWidth);
|
|
133590
|
+
ground.lineTo(topRightX, topRightY);
|
|
133591
|
+
ground.closePath();
|
|
133592
|
+
ground.fill(fenceWhite);
|
|
133593
|
+
};
|
|
133594
|
+
for (let i2 = 1; i2 < picketCount; i2++) {
|
|
133595
|
+
const t2 = i2 / picketCount;
|
|
133596
|
+
const px = -halfW * t2;
|
|
133597
|
+
const py = -halfH * (1 - t2);
|
|
133598
|
+
drawPicket(px, py, -1);
|
|
133599
|
+
}
|
|
133600
|
+
for (let i2 = 1; i2 < picketCount; i2++) {
|
|
133601
|
+
const t2 = i2 / picketCount;
|
|
133602
|
+
const px = halfW * t2;
|
|
133603
|
+
const py = -halfH * (1 - t2);
|
|
133604
|
+
drawPicket(px, py, 1);
|
|
133605
|
+
}
|
|
133606
|
+
for (let i2 = 1; i2 < picketCount * 0.75; i2++) {
|
|
133607
|
+
const t2 = i2 / picketCount;
|
|
133608
|
+
const px = -halfW * (1 - t2);
|
|
133609
|
+
const py = halfH * t2;
|
|
133610
|
+
drawPicket(px, py, 1);
|
|
133611
|
+
}
|
|
133612
|
+
for (let i2 = 1; i2 < picketCount * 0.75; i2++) {
|
|
133613
|
+
const t2 = i2 / picketCount;
|
|
133614
|
+
const px = halfW * (1 - t2);
|
|
133615
|
+
const py = halfH * t2;
|
|
133616
|
+
drawPicket(px, py, -1);
|
|
133617
|
+
}
|
|
133618
|
+
const cornerPostWidth = picketWidth * 1.5;
|
|
133619
|
+
const cornerPostHeight = picketHeight * 1.2;
|
|
133620
|
+
ground.rect(
|
|
133621
|
+
-cornerPostWidth / 2,
|
|
133622
|
+
-halfH - cornerPostHeight,
|
|
133623
|
+
cornerPostWidth,
|
|
133624
|
+
cornerPostHeight
|
|
133625
|
+
);
|
|
133626
|
+
ground.fill(fenceWhite);
|
|
133627
|
+
ground.rect(
|
|
133628
|
+
-halfW - cornerPostWidth / 2,
|
|
133629
|
+
-cornerPostHeight,
|
|
133630
|
+
cornerPostWidth,
|
|
133631
|
+
cornerPostHeight
|
|
133632
|
+
);
|
|
133633
|
+
ground.fill(fenceWhite);
|
|
133634
|
+
ground.rect(
|
|
133635
|
+
halfW - cornerPostWidth / 2,
|
|
133636
|
+
-cornerPostHeight,
|
|
133637
|
+
cornerPostWidth,
|
|
133638
|
+
cornerPostHeight
|
|
133639
|
+
);
|
|
133640
|
+
ground.fill(fenceWhite);
|
|
133641
|
+
const gatePostT = 0.75;
|
|
133642
|
+
const gatePostLeftX = -halfW * (1 - gatePostT);
|
|
133643
|
+
const gatePostLeftY = halfH * gatePostT;
|
|
133644
|
+
const gatePostRightX = halfW * (1 - gatePostT);
|
|
133645
|
+
const gatePostRightY = halfH * gatePostT;
|
|
133646
|
+
ground.rect(
|
|
133647
|
+
gatePostLeftX - cornerPostWidth / 2,
|
|
133648
|
+
gatePostLeftY - cornerPostHeight,
|
|
133649
|
+
cornerPostWidth,
|
|
133650
|
+
cornerPostHeight
|
|
133651
|
+
);
|
|
133652
|
+
ground.fill(fenceWhite);
|
|
133653
|
+
ground.rect(
|
|
133654
|
+
gatePostRightX - cornerPostWidth / 2,
|
|
133655
|
+
gatePostRightY - cornerPostHeight,
|
|
133656
|
+
cornerPostWidth,
|
|
133657
|
+
cornerPostHeight
|
|
133658
|
+
);
|
|
133659
|
+
ground.fill(fenceWhite);
|
|
133660
|
+
return ground;
|
|
133661
|
+
}
|
|
133662
|
+
function generateCobblestoneGround(sizeMultiplier) {
|
|
133663
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
133664
|
+
const ground = new Graphics();
|
|
133665
|
+
const halfW = footprint.width;
|
|
133666
|
+
const halfH = footprint.height;
|
|
133667
|
+
ground.moveTo(0, -halfH);
|
|
133668
|
+
ground.lineTo(halfW, 0);
|
|
133669
|
+
ground.lineTo(0, halfH);
|
|
133670
|
+
ground.lineTo(-halfW, 0);
|
|
133671
|
+
ground.closePath();
|
|
133672
|
+
ground.fill(COLORS.grassMedium);
|
|
133673
|
+
const textureCount = Math.max(6, Math.floor(8 * sizeMultiplier));
|
|
133674
|
+
for (let i2 = 0; i2 < textureCount; i2++) {
|
|
133675
|
+
const angle = i2 / textureCount * Math.PI * 2;
|
|
133676
|
+
const radius = 0.4 + i2 % 3 * 0.15;
|
|
133677
|
+
const x2 = Math.cos(angle) * halfW * radius;
|
|
133678
|
+
const y2 = Math.sin(angle) * halfH * radius;
|
|
133679
|
+
if (Math.abs(x2) > halfW * 0.15 || Math.abs(y2) < halfH * 0.3) {
|
|
133680
|
+
const dotSize = Math.max(1.5, 2 * sizeMultiplier);
|
|
133681
|
+
ground.circle(x2, y2, dotSize);
|
|
133682
|
+
ground.fill(i2 % 2 === 0 ? COLORS.grassLight : COLORS.grassDark);
|
|
133683
|
+
}
|
|
133684
|
+
}
|
|
133685
|
+
const stoneSize = Math.max(3, 5 * sizeMultiplier);
|
|
133686
|
+
const stoneColors = [8421504, 9474192, 7368816, 8947848];
|
|
133687
|
+
const pathSteps = Math.max(4, Math.floor(6 * sizeMultiplier));
|
|
133688
|
+
for (let i2 = 0; i2 < pathSteps; i2++) {
|
|
133689
|
+
const progress = i2 / (pathSteps - 1);
|
|
133690
|
+
const y2 = -halfH * 0.5 + progress * halfH * 1.2;
|
|
133691
|
+
for (let j2 = -1; j2 <= 1; j2 += 2) {
|
|
133692
|
+
const offsetX = j2 * stoneSize * 0.6;
|
|
133693
|
+
const offsetY = i2 % 2 * stoneSize * 0.3;
|
|
133694
|
+
const color2 = stoneColors[(i2 + j2 + 10) % stoneColors.length];
|
|
133695
|
+
ground.roundRect(
|
|
133696
|
+
offsetX - stoneSize / 2,
|
|
133697
|
+
y2 + offsetY - stoneSize / 2,
|
|
133698
|
+
stoneSize,
|
|
133699
|
+
stoneSize * 0.7,
|
|
133700
|
+
stoneSize * 0.2
|
|
133701
|
+
);
|
|
133702
|
+
ground.fill(color2);
|
|
133703
|
+
}
|
|
133704
|
+
if (i2 < pathSteps - 1) {
|
|
133705
|
+
const centerY = y2 + stoneSize * 0.5;
|
|
133706
|
+
const color2 = stoneColors[(i2 + 2) % stoneColors.length];
|
|
133707
|
+
ground.roundRect(
|
|
133708
|
+
-stoneSize / 2,
|
|
133709
|
+
centerY - stoneSize / 2,
|
|
133710
|
+
stoneSize,
|
|
133711
|
+
stoneSize * 0.7,
|
|
133712
|
+
stoneSize * 0.2
|
|
133713
|
+
);
|
|
133714
|
+
ground.fill(color2);
|
|
133715
|
+
}
|
|
133716
|
+
}
|
|
133717
|
+
return ground;
|
|
133718
|
+
}
|
|
133719
|
+
function generateLicenseSign(license, config) {
|
|
133720
|
+
switch (license) {
|
|
133721
|
+
case "MIT":
|
|
133722
|
+
case "BSD":
|
|
133723
|
+
case "ISC":
|
|
133724
|
+
case "Unlicense":
|
|
133725
|
+
return generateMITFlowerArch(config);
|
|
133726
|
+
case "Apache-2.0":
|
|
133727
|
+
return generateApacheSign(config);
|
|
133728
|
+
case "GPL-3.0":
|
|
133729
|
+
case "LGPL-3.0":
|
|
133730
|
+
return generateGPLSign(config);
|
|
133731
|
+
default:
|
|
133732
|
+
return generateMITFlowerArch(config);
|
|
133733
|
+
}
|
|
133734
|
+
}
|
|
133735
|
+
function generateLicenseGround(license, sizeMultiplier) {
|
|
133736
|
+
switch (license) {
|
|
133737
|
+
case "MIT":
|
|
133738
|
+
case "BSD":
|
|
133739
|
+
case "ISC":
|
|
133740
|
+
case "Unlicense":
|
|
133741
|
+
return generateOpenGrassGround(sizeMultiplier);
|
|
133742
|
+
case "Apache-2.0":
|
|
133743
|
+
return generateCobblestoneGround(sizeMultiplier);
|
|
133744
|
+
case "GPL-3.0":
|
|
133745
|
+
case "LGPL-3.0":
|
|
133746
|
+
return generatePicketFenceGround(sizeMultiplier);
|
|
133747
|
+
default:
|
|
133748
|
+
return generateOpenGrassGround(sizeMultiplier);
|
|
133749
|
+
}
|
|
133750
|
+
}
|
|
132690
133751
|
const ISO_TILE_WIDTH = 64;
|
|
132691
133752
|
const ISO_TILE_HEIGHT = 32;
|
|
132692
133753
|
class IsometricRenderer {
|
|
@@ -132725,9 +133786,11 @@ class IsometricRenderer {
|
|
|
132725
133786
|
renderScene(mapData, showGrid = true) {
|
|
132726
133787
|
const background = new Container();
|
|
132727
133788
|
const tiles = new Container();
|
|
133789
|
+
const licenseGrounds = new Container();
|
|
132728
133790
|
const bridges = new Container();
|
|
132729
133791
|
const paths = new Container();
|
|
132730
133792
|
const nodes = new Container();
|
|
133793
|
+
licenseGrounds.sortableChildren = true;
|
|
132731
133794
|
if (showGrid) {
|
|
132732
133795
|
const grid = this.renderGrid(
|
|
132733
133796
|
mapData.width,
|
|
@@ -132748,11 +133811,17 @@ class IsometricRenderer {
|
|
|
132748
133811
|
}
|
|
132749
133812
|
const spriteInstances = this.renderSprites(mapData.nodes);
|
|
132750
133813
|
for (const instance of spriteInstances.values()) {
|
|
133814
|
+
if (instance.licenseGround) {
|
|
133815
|
+
licenseGrounds.addChild(instance.licenseGround);
|
|
133816
|
+
}
|
|
132751
133817
|
nodes.addChild(instance.highlight);
|
|
132752
133818
|
nodes.addChild(instance.sprite);
|
|
132753
133819
|
if (instance.weathering) {
|
|
132754
133820
|
nodes.addChild(instance.weathering);
|
|
132755
133821
|
}
|
|
133822
|
+
if (instance.licenseSign) {
|
|
133823
|
+
nodes.addChild(instance.licenseSign);
|
|
133824
|
+
}
|
|
132756
133825
|
nodes.addChild(instance.label);
|
|
132757
133826
|
if (instance.hoverLabel) {
|
|
132758
133827
|
nodes.addChild(instance.hoverLabel);
|
|
@@ -132761,6 +133830,7 @@ class IsometricRenderer {
|
|
|
132761
133830
|
return {
|
|
132762
133831
|
background,
|
|
132763
133832
|
tiles,
|
|
133833
|
+
licenseGrounds,
|
|
132764
133834
|
bridges,
|
|
132765
133835
|
paths,
|
|
132766
133836
|
nodes,
|
|
@@ -133153,6 +134223,24 @@ class IsometricRenderer {
|
|
|
133153
134223
|
);
|
|
133154
134224
|
weathering.zIndex = container.zIndex + 0.1;
|
|
133155
134225
|
}
|
|
134226
|
+
let licenseGround;
|
|
134227
|
+
let licenseSign;
|
|
134228
|
+
if (node2.license) {
|
|
134229
|
+
const licenseType = node2.license;
|
|
134230
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
134231
|
+
licenseGround = generateLicenseGround(licenseType, sizeMultiplier);
|
|
134232
|
+
licenseGround.x = screenX;
|
|
134233
|
+
licenseGround.y = screenY;
|
|
134234
|
+
licenseGround.zIndex = screenY;
|
|
134235
|
+
licenseSign = generateLicenseSign(licenseType, {
|
|
134236
|
+
name: node2.label,
|
|
134237
|
+
sizeMultiplier
|
|
134238
|
+
});
|
|
134239
|
+
licenseSign.x = screenX;
|
|
134240
|
+
licenseSign.y = screenY + footprint.height * 0.75;
|
|
134241
|
+
licenseSign.zIndex = container.zIndex + 0.15;
|
|
134242
|
+
label.visible = false;
|
|
134243
|
+
}
|
|
133156
134244
|
const instance = {
|
|
133157
134245
|
sprite: container,
|
|
133158
134246
|
// Container acts as the sprite
|
|
@@ -133160,6 +134248,8 @@ class IsometricRenderer {
|
|
|
133160
134248
|
label,
|
|
133161
134249
|
hoverLabel,
|
|
133162
134250
|
weathering,
|
|
134251
|
+
licenseGround,
|
|
134252
|
+
licenseSign,
|
|
133163
134253
|
gridPosition: { gridX: node2.gridX, gridY: node2.gridY },
|
|
133164
134254
|
size: sizeMultiplier,
|
|
133165
134255
|
update: (gridX, gridY) => {
|
|
@@ -133188,6 +134278,17 @@ class IsometricRenderer {
|
|
|
133188
134278
|
weathering.x = pos.screenX;
|
|
133189
134279
|
weathering.y = pos.screenY;
|
|
133190
134280
|
}
|
|
134281
|
+
if (licenseGround) {
|
|
134282
|
+
licenseGround.x = pos.screenX;
|
|
134283
|
+
licenseGround.y = pos.screenY;
|
|
134284
|
+
licenseGround.zIndex = pos.screenY;
|
|
134285
|
+
}
|
|
134286
|
+
if (licenseSign) {
|
|
134287
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
134288
|
+
licenseSign.x = pos.screenX;
|
|
134289
|
+
licenseSign.y = pos.screenY + footprint.height * 0.75;
|
|
134290
|
+
licenseSign.zIndex = getIsometricZIndex(gridX, gridY) + 0.15;
|
|
134291
|
+
}
|
|
133191
134292
|
instance.gridPosition = { gridX, gridY };
|
|
133192
134293
|
},
|
|
133193
134294
|
destroy: () => {
|
|
@@ -133196,6 +134297,8 @@ class IsometricRenderer {
|
|
|
133196
134297
|
label.destroy();
|
|
133197
134298
|
hoverLabel.destroy();
|
|
133198
134299
|
weathering == null ? void 0 : weathering.destroy();
|
|
134300
|
+
licenseGround == null ? void 0 : licenseGround.destroy();
|
|
134301
|
+
licenseSign == null ? void 0 : licenseSign.destroy();
|
|
133199
134302
|
}
|
|
133200
134303
|
};
|
|
133201
134304
|
return instance;
|
|
@@ -133269,11 +134372,31 @@ class IsometricRenderer {
|
|
|
133269
134372
|
label.y = screenY + sprite.height * 0.15 + 8;
|
|
133270
134373
|
label.anchor.set(0.5, 0);
|
|
133271
134374
|
label.zIndex = sprite.zIndex + 0.2;
|
|
134375
|
+
let licenseGround;
|
|
134376
|
+
let licenseSign;
|
|
134377
|
+
if (node2.license) {
|
|
134378
|
+
const licenseType = node2.license;
|
|
134379
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
134380
|
+
licenseGround = generateLicenseGround(licenseType, sizeMultiplier);
|
|
134381
|
+
licenseGround.x = screenX;
|
|
134382
|
+
licenseGround.y = screenY;
|
|
134383
|
+
licenseGround.zIndex = screenY;
|
|
134384
|
+
licenseSign = generateLicenseSign(licenseType, {
|
|
134385
|
+
name: node2.label,
|
|
134386
|
+
sizeMultiplier
|
|
134387
|
+
});
|
|
134388
|
+
licenseSign.x = screenX;
|
|
134389
|
+
licenseSign.y = screenY + footprint.height * 0.75;
|
|
134390
|
+
licenseSign.zIndex = sprite.zIndex + 0.15;
|
|
134391
|
+
label.visible = false;
|
|
134392
|
+
}
|
|
133272
134393
|
const instance = {
|
|
133273
134394
|
sprite,
|
|
133274
134395
|
highlight,
|
|
133275
134396
|
label,
|
|
133276
134397
|
weathering,
|
|
134398
|
+
licenseGround,
|
|
134399
|
+
licenseSign,
|
|
133277
134400
|
gridPosition: { gridX: node2.gridX, gridY: node2.gridY },
|
|
133278
134401
|
size: sizeMultiplier,
|
|
133279
134402
|
update: (gridX, gridY) => {
|
|
@@ -133300,6 +134423,17 @@ class IsometricRenderer {
|
|
|
133300
134423
|
weathering.x = pos.screenX;
|
|
133301
134424
|
weathering.y = pos.screenY;
|
|
133302
134425
|
}
|
|
134426
|
+
if (licenseGround) {
|
|
134427
|
+
licenseGround.x = pos.screenX;
|
|
134428
|
+
licenseGround.y = pos.screenY;
|
|
134429
|
+
licenseGround.zIndex = pos.screenY;
|
|
134430
|
+
}
|
|
134431
|
+
if (licenseSign) {
|
|
134432
|
+
const footprint = calculateFootprint(sizeMultiplier);
|
|
134433
|
+
licenseSign.x = pos.screenX;
|
|
134434
|
+
licenseSign.y = pos.screenY + footprint.height * 0.75;
|
|
134435
|
+
licenseSign.zIndex = getIsometricZIndex(gridX, gridY) + 0.15;
|
|
134436
|
+
}
|
|
133303
134437
|
instance.gridPosition = { gridX, gridY };
|
|
133304
134438
|
},
|
|
133305
134439
|
destroy: () => {
|
|
@@ -133307,6 +134441,8 @@ class IsometricRenderer {
|
|
|
133307
134441
|
highlight.destroy();
|
|
133308
134442
|
label.destroy();
|
|
133309
134443
|
weathering == null ? void 0 : weathering.destroy();
|
|
134444
|
+
licenseGround == null ? void 0 : licenseGround.destroy();
|
|
134445
|
+
licenseSign == null ? void 0 : licenseSign.destroy();
|
|
133310
134446
|
}
|
|
133311
134447
|
};
|
|
133312
134448
|
spriteInstances.set(node2.id, instance);
|
|
@@ -134499,7 +135635,8 @@ function nodesToUnifiedOverworldMap(nodes, options = {}) {
|
|
|
134499
135635
|
aging: node2.aging,
|
|
134500
135636
|
subdivisions,
|
|
134501
135637
|
stars: node2.stars,
|
|
134502
|
-
collaborators: node2.collaborators
|
|
135638
|
+
collaborators: node2.collaborators,
|
|
135639
|
+
license: node2.license
|
|
134503
135640
|
};
|
|
134504
135641
|
});
|
|
134505
135642
|
const paths = [];
|
|
@@ -134673,6 +135810,7 @@ const OverworldMapPanelContent = ({
|
|
|
134673
135810
|
if (sceneContainersRef.current) {
|
|
134674
135811
|
viewport.removeChild(sceneContainersRef.current.background);
|
|
134675
135812
|
viewport.removeChild(sceneContainersRef.current.tiles);
|
|
135813
|
+
viewport.removeChild(sceneContainersRef.current.licenseGrounds);
|
|
134676
135814
|
viewport.removeChild(sceneContainersRef.current.bridges);
|
|
134677
135815
|
viewport.removeChild(sceneContainersRef.current.paths);
|
|
134678
135816
|
viewport.removeChild(sceneContainersRef.current.nodes);
|
|
@@ -134680,6 +135818,7 @@ const OverworldMapPanelContent = ({
|
|
|
134680
135818
|
const scene = renderer.renderScene(mapData, true);
|
|
134681
135819
|
viewport.addChild(scene.background);
|
|
134682
135820
|
viewport.addChild(scene.tiles);
|
|
135821
|
+
viewport.addChild(scene.licenseGrounds);
|
|
134683
135822
|
viewport.addChild(scene.bridges);
|
|
134684
135823
|
viewport.addChild(scene.paths);
|
|
134685
135824
|
viewport.addChild(scene.nodes);
|
|
@@ -134771,6 +135910,7 @@ const OverworldMapPanelContent = ({
|
|
|
134771
135910
|
const scene = renderer.renderScene(mapData, true);
|
|
134772
135911
|
viewport.addChild(scene.background);
|
|
134773
135912
|
viewport.addChild(scene.tiles);
|
|
135913
|
+
viewport.addChild(scene.licenseGrounds);
|
|
134774
135914
|
viewport.addChild(scene.bridges);
|
|
134775
135915
|
viewport.addChild(scene.paths);
|
|
134776
135916
|
viewport.addChild(scene.nodes);
|
|
@@ -135167,11 +136307,13 @@ const OverworldMapPanelContent = ({
|
|
|
135167
136307
|
if (sceneContainersRef.current) {
|
|
135168
136308
|
viewport.removeChild(sceneContainersRef.current.background);
|
|
135169
136309
|
viewport.removeChild(sceneContainersRef.current.tiles);
|
|
136310
|
+
viewport.removeChild(sceneContainersRef.current.licenseGrounds);
|
|
135170
136311
|
viewport.removeChild(sceneContainersRef.current.bridges);
|
|
135171
136312
|
viewport.removeChild(sceneContainersRef.current.paths);
|
|
135172
136313
|
viewport.removeChild(sceneContainersRef.current.nodes);
|
|
135173
136314
|
sceneContainersRef.current.background.destroy({ children: true });
|
|
135174
136315
|
sceneContainersRef.current.tiles.destroy({ children: true });
|
|
136316
|
+
sceneContainersRef.current.licenseGrounds.destroy({ children: true });
|
|
135175
136317
|
sceneContainersRef.current.bridges.destroy({ children: true });
|
|
135176
136318
|
sceneContainersRef.current.paths.destroy({ children: true });
|
|
135177
136319
|
sceneContainersRef.current.nodes.destroy({ children: true });
|
|
@@ -135179,6 +136321,7 @@ const OverworldMapPanelContent = ({
|
|
|
135179
136321
|
const scene = renderer.renderScene(mapData, true);
|
|
135180
136322
|
viewport.addChild(scene.background);
|
|
135181
136323
|
viewport.addChild(scene.tiles);
|
|
136324
|
+
viewport.addChild(scene.licenseGrounds);
|
|
135182
136325
|
viewport.addChild(scene.bridges);
|
|
135183
136326
|
viewport.addChild(scene.paths);
|
|
135184
136327
|
viewport.addChild(scene.nodes);
|
|
@@ -135549,7 +136692,7 @@ function calculateAgingMetrics(lastEditedAt) {
|
|
|
135549
136692
|
// Store for region grouping
|
|
135550
136693
|
};
|
|
135551
136694
|
}
|
|
135552
|
-
const
|
|
136695
|
+
const getTracer = () => trace.getTracer("collection-map-panel", "0.6.9");
|
|
135553
136696
|
const CollectionMapPanelContent = ({
|
|
135554
136697
|
collection,
|
|
135555
136698
|
repositories,
|
|
@@ -135776,83 +136919,73 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
135776
136919
|
showVisualFeedback: true
|
|
135777
136920
|
});
|
|
135778
136921
|
const nodes = useMemo(() => {
|
|
135779
|
-
|
|
135780
|
-
|
|
135781
|
-
|
|
135782
|
-
|
|
135783
|
-
|
|
135784
|
-
|
|
135785
|
-
|
|
135786
|
-
|
|
135787
|
-
|
|
135788
|
-
|
|
135789
|
-
|
|
135790
|
-
|
|
135791
|
-
|
|
135792
|
-
console.warn(
|
|
135793
|
-
"[nodes memo] No repository found for membership:",
|
|
135794
|
-
membership.repositoryId
|
|
135795
|
-
);
|
|
135796
|
-
return null;
|
|
135797
|
-
}
|
|
135798
|
-
let category;
|
|
135799
|
-
if (repo.github) {
|
|
135800
|
-
category = "git-repo";
|
|
135801
|
-
} else {
|
|
135802
|
-
category = repo.theme || "git-repo";
|
|
135803
|
-
}
|
|
135804
|
-
let language2;
|
|
135805
|
-
if (repo.github) {
|
|
135806
|
-
language2 = repo.github.primaryLanguage;
|
|
135807
|
-
}
|
|
135808
|
-
const importance = ((_a2 = membership.metadata) == null ? void 0 : _a2.pinned) ? 95 : 75;
|
|
135809
|
-
let size = calculateRepositorySize(repo.metrics);
|
|
135810
|
-
const aging = calculateAgingMetrics((_b = repo.metrics) == null ? void 0 : _b.lastEditedAt);
|
|
135811
|
-
const packages = extractPackageInfo(repo);
|
|
135812
|
-
const stars = (_c = repo.github) == null ? void 0 : _c.stars;
|
|
135813
|
-
if (stars && stars > 0) {
|
|
135814
|
-
const decorationBonus = getDecorationSizeBonus(stars);
|
|
135815
|
-
size = size + decorationBonus;
|
|
135816
|
-
}
|
|
135817
|
-
const collaborators = (_d = repo.metrics) == null ? void 0 : _d.contributors;
|
|
135818
|
-
if (collaborators && collaborators > 0) {
|
|
135819
|
-
const decorationBonus = getCollaboratorDecorationSizeBonus(collaborators);
|
|
135820
|
-
size = size + decorationBonus;
|
|
135821
|
-
}
|
|
135822
|
-
const node2 = {
|
|
135823
|
-
id: membership.repositoryId,
|
|
135824
|
-
name: repo.name,
|
|
135825
|
-
category,
|
|
135826
|
-
language: language2,
|
|
135827
|
-
// Pass language for color-based visualization
|
|
135828
|
-
importance,
|
|
135829
|
-
size,
|
|
135830
|
-
aging,
|
|
135831
|
-
// Pass aging metrics for visual weathering
|
|
135832
|
-
packages,
|
|
135833
|
-
// Package subdivision data
|
|
135834
|
-
stars,
|
|
135835
|
-
// GitHub star count for decorations
|
|
135836
|
-
collaborators,
|
|
135837
|
-
// Contributor count for community space decorations
|
|
135838
|
-
dependencies: dependencies[membership.repositoryId] || [],
|
|
135839
|
-
isRoot: ((_e2 = membership.metadata) == null ? void 0 : _e2.pinned) || false,
|
|
135840
|
-
regionId: (_f = membership.metadata) == null ? void 0 : _f.regionId,
|
|
135841
|
-
// Preserve region assignment
|
|
135842
|
-
layout: (_g = membership.metadata) == null ? void 0 : _g.layout
|
|
135843
|
-
// Pass saved position data
|
|
135844
|
-
};
|
|
135845
|
-
return node2;
|
|
135846
|
-
}).filter((n2) => n2 !== null);
|
|
135847
|
-
span.setAttribute("nodes.created", memberNodes.length);
|
|
135848
|
-
span.end();
|
|
135849
|
-
return memberNodes;
|
|
135850
|
-
} catch (error) {
|
|
135851
|
-
span.recordException(error);
|
|
135852
|
-
span.end();
|
|
135853
|
-
throw error;
|
|
136922
|
+
const memberNodes = collection.members.map((membership) => {
|
|
136923
|
+
var _a2, _b, _c, _d, _e2, _f, _g, _h;
|
|
136924
|
+
const repo = repositories.find((r2) => {
|
|
136925
|
+
var _a3;
|
|
136926
|
+
const repoId = ((_a3 = r2.github) == null ? void 0 : _a3.id) || r2.name;
|
|
136927
|
+
return repoId === membership.repositoryId;
|
|
136928
|
+
});
|
|
136929
|
+
if (!repo) {
|
|
136930
|
+
console.warn(
|
|
136931
|
+
"[nodes memo] No repository found for membership:",
|
|
136932
|
+
membership.repositoryId
|
|
136933
|
+
);
|
|
136934
|
+
return null;
|
|
135854
136935
|
}
|
|
135855
|
-
|
|
136936
|
+
let category;
|
|
136937
|
+
if (repo.github) {
|
|
136938
|
+
category = "git-repo";
|
|
136939
|
+
} else {
|
|
136940
|
+
category = repo.theme || "git-repo";
|
|
136941
|
+
}
|
|
136942
|
+
let language2;
|
|
136943
|
+
if (repo.github) {
|
|
136944
|
+
language2 = repo.github.primaryLanguage;
|
|
136945
|
+
}
|
|
136946
|
+
const importance = ((_a2 = membership.metadata) == null ? void 0 : _a2.pinned) ? 95 : 75;
|
|
136947
|
+
let size = calculateRepositorySize(repo.metrics);
|
|
136948
|
+
const aging = calculateAgingMetrics((_b = repo.metrics) == null ? void 0 : _b.lastEditedAt);
|
|
136949
|
+
const packages = extractPackageInfo(repo);
|
|
136950
|
+
const stars = (_c = repo.github) == null ? void 0 : _c.stars;
|
|
136951
|
+
if (stars && stars > 0) {
|
|
136952
|
+
const decorationBonus = getDecorationSizeBonus(stars);
|
|
136953
|
+
size = size + decorationBonus;
|
|
136954
|
+
}
|
|
136955
|
+
const collaborators = (_d = repo.metrics) == null ? void 0 : _d.contributors;
|
|
136956
|
+
if (collaborators && collaborators > 0) {
|
|
136957
|
+
const decorationBonus = getCollaboratorDecorationSizeBonus(collaborators);
|
|
136958
|
+
size = size + decorationBonus;
|
|
136959
|
+
}
|
|
136960
|
+
const license = (_e2 = repo.github) == null ? void 0 : _e2.license;
|
|
136961
|
+
const node2 = {
|
|
136962
|
+
id: membership.repositoryId,
|
|
136963
|
+
name: repo.name,
|
|
136964
|
+
category,
|
|
136965
|
+
language: language2,
|
|
136966
|
+
// Pass language for color-based visualization
|
|
136967
|
+
importance,
|
|
136968
|
+
size,
|
|
136969
|
+
aging,
|
|
136970
|
+
// Pass aging metrics for visual weathering
|
|
136971
|
+
packages,
|
|
136972
|
+
// Package subdivision data
|
|
136973
|
+
stars,
|
|
136974
|
+
// GitHub star count for decorations
|
|
136975
|
+
collaborators,
|
|
136976
|
+
// Contributor count for community space decorations
|
|
136977
|
+
license,
|
|
136978
|
+
// License identifier for sign/ground treatment
|
|
136979
|
+
dependencies: dependencies[membership.repositoryId] || [],
|
|
136980
|
+
isRoot: ((_f = membership.metadata) == null ? void 0 : _f.pinned) || false,
|
|
136981
|
+
regionId: (_g = membership.metadata) == null ? void 0 : _g.regionId,
|
|
136982
|
+
// Preserve region assignment
|
|
136983
|
+
layout: (_h = membership.metadata) == null ? void 0 : _h.layout
|
|
136984
|
+
// Pass saved position data
|
|
136985
|
+
};
|
|
136986
|
+
return node2;
|
|
136987
|
+
}).filter((n2) => n2 !== null);
|
|
136988
|
+
return memberNodes;
|
|
135856
136989
|
}, [collection.id, collection.members, repositories, dependencies]);
|
|
135857
136990
|
const { validNodes, unplacedNodes } = useMemo(() => {
|
|
135858
136991
|
const nodesWithPositions = nodes.filter(
|
|
@@ -135910,19 +137043,28 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
135910
137043
|
return;
|
|
135911
137044
|
}
|
|
135912
137045
|
hasComputedLayout.current = true;
|
|
135913
|
-
const span =
|
|
137046
|
+
const span = getTracer().startSpan("collection-map.load");
|
|
135914
137047
|
span.setAttribute("collection.id", collection.id);
|
|
135915
|
-
span.
|
|
135916
|
-
|
|
135917
|
-
|
|
137048
|
+
span.addEvent("collection-map.convert-nodes", {
|
|
137049
|
+
"collection.id": collection.id,
|
|
137050
|
+
"memberships.count": collection.members.length,
|
|
137051
|
+
"repositories.count": repositories.length,
|
|
137052
|
+
"nodes.created": nodes.length
|
|
137053
|
+
});
|
|
135918
137054
|
const map2 = nodesToUnifiedOverworldMap(nodes, {
|
|
135919
137055
|
regionLayout,
|
|
135920
137056
|
customRegions
|
|
135921
137057
|
});
|
|
135922
|
-
span.
|
|
135923
|
-
|
|
137058
|
+
span.addEvent("collection-map.initialize-layout", {
|
|
137059
|
+
"collection.id": collection.id,
|
|
137060
|
+
"nodes.count": nodes.length,
|
|
137061
|
+
"needs.regions": needsRegions,
|
|
137062
|
+
"needs.layout": needsLayout,
|
|
137063
|
+
"regions.computed": map2.regions.length,
|
|
137064
|
+
"nodes.positioned": map2.nodes.length
|
|
137065
|
+
});
|
|
135924
137066
|
(async () => {
|
|
135925
|
-
var _a2
|
|
137067
|
+
var _a2;
|
|
135926
137068
|
try {
|
|
135927
137069
|
const updates = {};
|
|
135928
137070
|
if (needsRegions && map2.regions.length > 0) {
|
|
@@ -135961,11 +137103,6 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
135961
137103
|
}
|
|
135962
137104
|
}
|
|
135963
137105
|
}
|
|
135964
|
-
span.addEvent("batch-layout-update", {
|
|
135965
|
-
"regions.count": ((_b = updates.regions) == null ? void 0 : _b.length) || 0,
|
|
135966
|
-
"assignments.count": ((_c = updates.assignments) == null ? void 0 : _c.length) || 0,
|
|
135967
|
-
"positions.count": ((_d = updates.positions) == null ? void 0 : _d.length) || 0
|
|
135968
|
-
});
|
|
135969
137106
|
await regionCallbacks.onBatchLayoutInitialized(collection.id, updates);
|
|
135970
137107
|
span.setStatus({ code: 1 });
|
|
135971
137108
|
span.end();
|
|
@@ -135976,7 +137113,15 @@ This indicates a sprite was rendered without valid backing data.`
|
|
|
135976
137113
|
throw error;
|
|
135977
137114
|
}
|
|
135978
137115
|
})();
|
|
135979
|
-
}, [
|
|
137116
|
+
}, [
|
|
137117
|
+
collection.id,
|
|
137118
|
+
collection.members.length,
|
|
137119
|
+
repositories.length,
|
|
137120
|
+
nodes,
|
|
137121
|
+
regionLayout,
|
|
137122
|
+
customRegions,
|
|
137123
|
+
regionCallbacks
|
|
137124
|
+
]);
|
|
135980
137125
|
const handleViewportReady = useCallback((viewport) => {
|
|
135981
137126
|
viewportRef.current = viewport;
|
|
135982
137127
|
}, []);
|
|
@@ -137323,4 +138468,4 @@ export {
|
|
|
137323
138468
|
UPDATE_PRIORITY as y,
|
|
137324
138469
|
removeItems as z
|
|
137325
138470
|
};
|
|
137326
|
-
//# sourceMappingURL=index-
|
|
138471
|
+
//# sourceMappingURL=index-DKt_e7J1.js.map
|