Use public Kryon module names consistently
This commit is contained in:
1 parent
8aaf46142e
commit
b67e147a3a
6 files changed
+13
-9
No files matched your search
@@ -14,7 +14,7 @@ backend; `make check` checks the source and runs the nonvisual indicator test.
|
||||
The checked-in `ziran.lock` pins both Ziran and Kryon to exact commits. Plot
|
||||
exports `src/module.zi` for other packages. That module re-exports Plot's
|
||||
charts and Kryon's public UI surface; app code can use
|
||||
`using Charts :: #import "plot";`.
|
||||
`using Charts :: #import "Plot";`.
|
||||
|
||||
To add Plot to another Ziran project, run:
|
||||
|
||||
@@ -25,7 +25,7 @@ ziran add kryonlabs/plot
|
||||
Then import its public module:
|
||||
|
||||
```zi
|
||||
using Charts :: #import "plot";
|
||||
using Charts :: #import "Plot";
|
||||
```
|
||||
|
||||
The package exports `PriceBar`, `CandleChartProps`, `CandleChart`,
|
||||
@@ -37,3 +37,6 @@ links or copied chart files are needed in a consuming package. Run
|
||||
|
||||
ATR currently uses source links while its older project layout is migrated
|
||||
to a Ziran package manifest. Other packages can use the dependency directly.
|
||||
Public module names use `UpperCamelCase` (`Kryon`, `PlotWidget`, `Plot`).
|
||||
Lowercase names such as `plot_widget` are implementation modules; the
|
||||
lowercase `plot` export remains available for existing consumers.
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
using UI :: #import "kryon";
|
||||
using PlotWidget :: #import "plot_widget";
|
||||
using UI :: #import "Kryon";
|
||||
using PlotWidget :: #import "PlotWidget";
|
||||
|
||||
PriceBar :: struct {
|
||||
timestamp: s64
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
using UI :: #import "kryon";
|
||||
using PlotWidget :: #import "plot_widget";
|
||||
using UI :: #import "Kryon";
|
||||
using PlotWidget :: #import "PlotWidget";
|
||||
|
||||
ChartRange :: struct {
|
||||
low: float32
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Reusable chart API, independent of the demo application's entry.
|
||||
using UI :: #import "kryon";
|
||||
using UI :: #import "Kryon";
|
||||
using Candle :: #import "candle_chart";
|
||||
using Line :: #import "line_chart";
|
||||
@@ -1,5 +1,5 @@
|
||||
#import "candle_chart"
|
||||
using UI :: #import "kryon";
|
||||
using UI :: #import "Kryon";
|
||||
|
||||
#program_export
|
||||
main :: () -> s32 {
|
||||
|
||||
+2
-1
@@ -11,9 +11,10 @@ ref = "master"
|
||||
[dependencies.kryon]
|
||||
git = "https://github.com/kryonlabs/kryon.git"
|
||||
ref = "master"
|
||||
module_aliases = { Kryon = "kryon", PlotWidget = "plot_widget" }
|
||||
module_aliases = { Kryon = "Kryon", PlotWidget = "PlotWidget" }
|
||||
|
||||
[exports]
|
||||
# Public module is Plot; the lowercase export is retained for older imports.
|
||||
plot = "src/module.zi"
|
||||
Plot = "src/module.zi"
|
||||
|
||||
|
||||
Reference in new issue
Block a user