diff --git a/CHANGELOG.md b/CHANGELOG.md index 2baf561..63b57c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +- Recognize chart capabilities imported through the current `plot` package alias so bundled Habits opens offline. + - Pin Ziran ba28d7c0 and Kryon 6a41ba74 so applications share the fixed GPU skinning, native entry, web scene compilation and hosted package naming paths. - Build with Ziran c041afb6 and Kryon 09664f07: the cookbook app declares `main` and runs `App.Run` like every Kryon program now that the program-export program entry is gone. diff --git a/src/band_chart_host.zi b/src/band_chart_host.zi index 56c9092..bbe8cf7 100644 --- a/src/band_chart_host.zi +++ b/src/band_chart_host.zi @@ -27,7 +27,8 @@ band_chart_host_band_codecs: [BAND_CHART_HOST_LIMIT]WidgetBandChartBandCodec; // The module a bundle names the chart by: band_chart, or band_chart in plot's // package namespace when it imports plot/band_chart. BandChartHostModule :: (module: string) -> bool { - return ModuleName(module, "band_chart") || module == "plot_band_chart" + return ModuleName(module, "band_chart") || module == "plot__band_chart" || + module == "plot_band_chart" } // The calls BandChartHostCall answers, for checking a bundle's capabilities diff --git a/tests/band_chart_host_behavior.zi b/tests/band_chart_host_behavior.zi index 24c7c88..48012b1 100644 --- a/tests/band_chart_host_behavior.zi +++ b/tests/band_chart_host_behavior.zi @@ -38,8 +38,9 @@ Call :: (session: Session, module: string, function: string, arguments: []HostVa #program_export main :: () -> s32 { - // A bundle names plot's modules p_band_chart. - if !BandChartHostSupports("plot_band_chart", "BandChartHostedHost") || + // Current imports use the package alias; published bundles retain their identity. + if !BandChartHostSupports("plot__band_chart", "BandChartHostedHost") || + !BandChartHostSupports("plot_band_chart", "BandChartHostedHost") || !BandChartHostSupports("pcb5258445244d90c_band_chart", "BandChartHostedHost") || BandChartHostSupports("pcb5258445244d90c_other_band_chart", "BandChartHostedHost") || BandChartHostSupports("band_chart", "BandChartNearest") {