ranger-compiler 3.5.1 → 3.5.2
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/CHANGELOG.md +1064 -20
- package/LICENSE +3 -1
- package/README.md +123 -28
- package/dist/Lang.rgr +1188 -290
- package/dist/api.d.ts +2343 -879
- package/dist/api.js +79923 -56921
- package/dist/lib/JSON.rgr +102 -91
- package/dist/lib/Shell.rgr +4 -4
- package/dist/lib/apple/AppleToolchain.rgr +4 -4
- package/dist/lib/apple/README.md +5 -4
- package/dist/lib/apple/apple_test.rgr +1 -1
- package/dist/lib/core/README.md +1 -1
- package/dist/lib/evg/EVG.rgr +12 -0
- package/dist/lib/evg/EVGA11yFromTree.rgr +302 -0
- package/dist/lib/evg/EVGA11yTree.rgr +894 -0
- package/dist/lib/evg/EVGBox.rgr +267 -0
- package/dist/lib/evg/EVGBoxShorthandTest.rgr +220 -0
- package/dist/lib/evg/EVGCodepoint.rgr +316 -0
- package/dist/lib/evg/EVGColor.rgr +700 -0
- package/dist/lib/evg/EVGCommands.rgr +177 -0
- package/dist/lib/evg/EVGComponent.rgr +331 -0
- package/dist/lib/evg/EVGComponentTest.rgr +387 -0
- package/dist/lib/evg/EVGConnector.rgr +541 -0
- package/dist/lib/evg/EVGConnectorTest.rgr +306 -0
- package/dist/lib/evg/EVGDisplayList.rgr +4186 -0
- package/dist/lib/evg/EVGEasing.rgr +370 -0
- package/dist/lib/evg/EVGEffectTest.rgr +253 -0
- package/dist/lib/evg/EVGElement.rgr +4914 -0
- package/dist/lib/evg/EVGFixedTest.rgr +289 -0
- package/dist/lib/evg/EVGFlexRulesTest.rgr +317 -0
- package/dist/lib/evg/EVGFlexWrapTest.rgr +246 -0
- package/dist/lib/evg/EVGFling.rgr +244 -0
- package/dist/lib/evg/EVGFocus.rgr +400 -0
- package/dist/lib/evg/EVGFocusTest.rgr +399 -0
- package/dist/lib/evg/EVGGradient.rgr +322 -0
- package/dist/lib/evg/EVGGrapheme.rgr +190 -0
- package/dist/lib/evg/EVGGrid.rgr +975 -0
- package/dist/lib/evg/EVGHitTest.rgr +208 -0
- package/dist/lib/evg/EVGHoles.rgr +294 -0
- package/dist/lib/evg/EVGHostMeasurerTest.rgr +281 -0
- package/dist/lib/evg/EVGHostTextMeasurer.rgr +331 -0
- package/dist/lib/evg/EVGHostTree.rgr +834 -0
- package/dist/lib/evg/EVGHostTreeTest.rgr +447 -0
- package/dist/lib/evg/EVGImageDecode.rgr +117 -0
- package/dist/lib/evg/EVGImageMeasurer.rgr +86 -0
- package/dist/lib/evg/EVGInspect.rgr +883 -0
- package/dist/lib/evg/EVGInvalidateTest.rgr +432 -0
- package/dist/lib/evg/EVGJsonTest.rgr +535 -0
- package/dist/lib/evg/EVGLayout.rgr +4220 -0
- package/dist/lib/evg/EVGMeasure.rgr +1267 -0
- package/dist/lib/evg/EVGOverlayTest.rgr +626 -0
- package/dist/lib/evg/EVGPatch.rgr +1721 -0
- package/dist/lib/evg/EVGPatchTest.rgr +692 -0
- package/dist/lib/evg/EVGPopoverTest.rgr +395 -0
- package/dist/lib/evg/EVGReconcile.rgr +226 -0
- package/dist/lib/evg/EVGReconcileTest.rgr +421 -0
- package/dist/lib/evg/EVGReject.rgr +126 -0
- package/dist/lib/evg/EVGRelayoutTest.rgr +375 -0
- package/dist/lib/evg/EVGRtlLayoutTest.rgr +319 -0
- package/dist/lib/evg/EVGRuler.rgr +232 -0
- package/dist/lib/evg/EVGRulerTest.rgr +172 -0
- package/dist/lib/evg/EVGSelectChrome.rgr +178 -0
- package/dist/lib/evg/EVGStyleCacheTest.rgr +419 -0
- package/dist/lib/evg/EVGStyleSheet.rgr +2148 -0
- package/dist/lib/evg/EVGStyleStateTest.rgr +407 -0
- package/dist/lib/evg/EVGStyleVarTest.rgr +471 -0
- package/dist/lib/evg/EVGText.rgr +105 -0
- package/dist/lib/evg/EVGTextEngine.rgr +536 -0
- package/dist/lib/evg/EVGTextMeasurer.rgr +720 -0
- package/dist/lib/evg/EVGTimingTest.rgr +1417 -0
- package/dist/lib/evg/EVGToolbar.rgr +1369 -0
- package/dist/lib/evg/EVGTransition.rgr +728 -0
- package/dist/lib/evg/EVGTreeJson.rgr +721 -0
- package/dist/lib/evg/EVGUnit.rgr +554 -0
- package/dist/lib/evg/EVGViewportUnitTest.rgr +236 -0
- package/dist/lib/evg/EvgApp.rgr +189 -0
- package/dist/lib/evg/EvgBitmapTracer.rgr +4277 -0
- package/dist/lib/evg/EvgBitmapTracerTest.rgr +2119 -0
- package/dist/lib/evg/EvgHost.rgr +451 -0
- package/dist/lib/evg/EvgTest.rgr +91 -0
- package/dist/lib/evg/EvgTraceColor.rgr +236 -0
- package/dist/lib/evg/EvgTraceCurve.rgr +648 -0
- package/dist/lib/evg/EvgTraceFit.rgr +767 -0
- package/dist/lib/evg/EvgTracePath.rgr +435 -0
- package/dist/lib/evg/EvgTraceTypes.rgr +559 -0
- package/dist/lib/evg/EvgViewport.rgr +313 -0
- package/dist/lib/evg/FxDemoDoc.rgr +185 -0
- package/dist/lib/evg/HOSTS.md +227 -0
- package/dist/lib/evg/ISSUES.md +835 -0
- package/dist/lib/evg/PLAN_ACCESSIBILITY.md +650 -0
- package/dist/lib/evg/PLAN_CSS_LAYOUT_AND_FONTS.md +1124 -0
- package/dist/lib/evg/PLAN_EFFECTS.md +431 -0
- package/dist/lib/evg/PLAN_EVG.md +518 -0
- package/dist/lib/evg/PLAN_EVG_RENDERER.md +1674 -0
- package/dist/lib/evg/PLAN_INSPECTOR.md +788 -0
- package/dist/lib/evg/PLAN_LINKS_AND_FORMS.md +157 -0
- package/dist/lib/evg/PLAN_NATIVE_HOSTS.md +671 -0
- package/dist/lib/evg/PLAN_VECTOR_IR.md +664 -0
- package/dist/lib/evg/PLAN_VIEW_TRANSFORM.md +322 -0
- package/dist/lib/evg/PathBuilder.rgr +333 -0
- package/dist/lib/evg/README.md +1236 -0
- package/dist/lib/evg/SPEC.md +1252 -0
- package/dist/lib/evg/SVGPathParser.rgr +1199 -0
- package/dist/lib/evg/SvgParser.rgr +1736 -0
- package/dist/lib/evg/TODO_EVG_RENDERER.md +595 -0
- package/dist/lib/evg/VectorShapes.rgr +331 -0
- package/dist/lib/evg/VectorStroke.rgr +107 -0
- package/dist/lib/evg/VectorViewBox.rgr +380 -0
- package/dist/lib/evg/agent/README.md +290 -0
- package/dist/lib/evg/agent/evg_agent.rgr +899 -0
- package/dist/lib/evg/agent/fixtures/broken.evg.json +7 -0
- package/dist/lib/evg/agent/fixtures/card.evg.json +9 -0
- package/dist/lib/evg/agent/fixtures/connector.css +63 -0
- package/dist/lib/evg/agent/fixtures/connector.evg.json +14 -0
- package/dist/lib/evg/agent/fixtures/drawn.evg.json +129 -0
- package/dist/lib/evg/agent/fixtures/gradient.evg.json +4 -0
- package/dist/lib/evg/agent/fixtures/popover.css +99 -0
- package/dist/lib/evg/agent/fixtures/popover.evg.json +30 -0
- package/dist/lib/evg/agent/roundtrip.sh +74 -0
- package/dist/lib/evg/agent/smoke.sh +230 -0
- package/dist/lib/evg/android/README.md +97 -0
- package/dist/lib/evg/android/androidstubs/AndroidStubs.kt +175 -0
- package/dist/lib/evg/android/androidstubs/Annotation.kt +10 -0
- package/dist/lib/evg/android/androidstubs/App.kt +30 -0
- package/dist/lib/evg/android/androidstubs/Content.kt +41 -0
- package/dist/lib/evg/android/androidstubs/ContentRes.kt +12 -0
- package/dist/lib/evg/android/androidstubs/InputMethod.kt +46 -0
- package/dist/lib/evg/android/androidstubs/Net.kt +6 -0
- package/dist/lib/evg/android/androidstubs/Os.kt +30 -0
- package/dist/lib/evg/android/androidstubs/Util.kt +15 -0
- package/dist/lib/evg/android/androidstubs/View.kt +113 -0
- package/dist/lib/evg/android/androidstubs/Widget.kt +16 -0
- package/dist/lib/evg/android/src/android/kotlin/fi/ranger/evg/AndroidEvgSurface.kt +323 -0
- package/dist/lib/evg/android/src/android/kotlin/fi/ranger/evg/AndroidTextMeasurer.kt +56 -0
- package/dist/lib/evg/android/src/android/kotlin/fi/ranger/evg/RippleEffect.kt +262 -0
- package/dist/lib/evg/android/src/awt/kotlin/fi/ranger/evg/AwtEvgSurface.kt +238 -0
- package/dist/lib/evg/android/src/awt/kotlin/fi/ranger/evg/AwtTextMeasurer.kt +85 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/EvgEngineThread.kt +115 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/EvgPainter.kt +231 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/EvgSurface.kt +117 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/RecordingSurface.kt +94 -0
- package/dist/lib/evg/apple/README.md +128 -0
- package/dist/lib/evg/apple/Sources/CoreGraphicsEvgSurface.swift +329 -0
- package/dist/lib/evg/apple/Sources/CoreTextMeasurer.swift +70 -0
- package/dist/lib/evg/apple/Sources/EvgEngineQueue.swift +105 -0
- package/dist/lib/evg/apple/Sources/EvgPainter.swift +225 -0
- package/dist/lib/evg/apple/Sources/EvgSurface.swift +163 -0
- package/dist/lib/evg/apple/Sources/RecordingSurface.swift +110 -0
- package/dist/lib/evg/bench/EvgLayoutBench.rgr +34 -0
- package/dist/lib/evg/bench/README.md +64 -0
- package/dist/lib/evg/bench/layout-bench.mjs +316 -0
- package/dist/lib/evg/bench/layout-cases.mjs +510 -0
- package/dist/lib/evg/bench/layout-conformance.mjs +254 -0
- package/dist/lib/evg/bin/.gitignore +17 -0
- package/dist/lib/evg/evg_test.rgr +313 -0
- package/dist/lib/evg/gl/README.md +198 -0
- package/dist/lib/evg/gl/a11y-paint-check.mjs +73 -0
- package/dist/lib/evg/gl/blur-check.mjs +399 -0
- package/dist/lib/evg/gl/boxmodel.json +1 -0
- package/dist/lib/evg/gl/demo.html +46 -0
- package/dist/lib/evg/gl/effect-presets.css +285 -0
- package/dist/lib/evg/gl/effect-presets.js +63 -0
- package/dist/lib/evg/gl/effect-shots.mjs +135 -0
- package/dist/lib/evg/gl/evg-a11y.js +566 -0
- package/dist/lib/evg/gl/evg-binary.js +160 -0
- package/dist/lib/evg/gl/evg-engine.js +296 -0
- package/dist/lib/evg/gl/evg-fx.js +237 -0
- package/dist/lib/evg/gl/evg-gestures.js +209 -0
- package/dist/lib/evg/gl/evg-list.js +167 -0
- package/dist/lib/evg/gl/evg-measure.js +186 -0
- package/dist/lib/evg/gl/evg-textinput.js +303 -0
- package/dist/lib/evg/gl/evg-view.js +144 -0
- package/dist/lib/evg/gl/evg-webgl.js +3942 -0
- package/dist/lib/evg/gl/fx-check.mjs +998 -0
- package/dist/lib/evg/gl/fx-demo.html +166 -0
- package/dist/lib/evg/gl/fx-demo.js +2 -0
- package/dist/lib/evg/gl/fx-serve.mjs +47 -0
- package/dist/lib/evg/gl/gestures-check.mjs +189 -0
- package/dist/lib/evg/gl/list-binary-check.mjs +152 -0
- package/dist/lib/evg/gl/measure-check.mjs +135 -0
- package/dist/lib/evg/gl/rotation-check.mjs +207 -0
- package/dist/lib/evg/gl/shift-check.mjs +113 -0
- package/dist/lib/evg/gl/stroke-check.mjs +168 -0
- package/dist/lib/evg/gl/text-snap-check.mjs +139 -0
- package/dist/lib/evg/gl/view-check.mjs +343 -0
- package/dist/lib/evg/gl/view-policy-check.mjs +184 -0
- package/dist/lib/evg/html/evg-dom.js +318 -0
- package/dist/lib/evg/html/evg-html.js +600 -0
- package/dist/lib/evg/inspect/README.md +415 -0
- package/dist/lib/evg/inspect/browser-smoke.mjs +115 -0
- package/dist/lib/evg/inspect/evg-inspect.js +947 -0
- package/dist/lib/evg/inspect/shots/css.png +0 -0
- package/dist/lib/evg/inspect/shots/dashboard.png +0 -0
- package/dist/lib/evg/inspect/shots/pptx-slide.png +0 -0
- package/dist/lib/evg/inspect/shots/state.png +0 -0
- package/dist/lib/evg/inspect/shots.mjs +226 -0
- package/dist/lib/evg/oracle/css-blur.json +576 -0
- package/dist/lib/evg/oracle/css-box.json +157 -0
- package/dist/lib/evg/oracle/css-timing.json +709 -0
- package/dist/lib/evg/oracle/css_blur_oracle.mjs +529 -0
- package/dist/lib/evg/oracle/css_box_oracle.mjs +106 -0
- package/dist/lib/evg/oracle/css_timing_oracle.mjs +389 -0
- package/dist/lib/evg/original/EVGColor.clj +310 -0
- package/dist/lib/evg/original/EVGColorContext.rgr +178 -0
- package/dist/lib/evg/original/SVGPath.rgr +627 -0
- package/dist/lib/evg/original/Vec2.crgr +103 -0
- package/dist/lib/evg/ranger.json +9 -0
- package/dist/lib/evg/showcase/README.md +246 -0
- package/dist/lib/evg/showcase/assets/emblem.svg +30 -0
- package/dist/lib/evg/showcase/assets/rosette.svg +22 -0
- package/dist/lib/evg/showcase/build.mjs +651 -0
- package/dist/lib/evg/showcase/pages/album.tsx +30 -0
- package/dist/lib/evg/showcase/pages/boxmodel.tsx +37 -0
- package/dist/lib/evg/showcase/pages/cards.tsx +41 -0
- package/dist/lib/evg/showcase/pages/chart_api.tsx +170 -0
- package/dist/lib/evg/showcase/pages/charts.tsx +219 -0
- package/dist/lib/evg/showcase/pages/drawing.tsx +160 -0
- package/dist/lib/evg/showcase/pages/emoji.tsx +91 -0
- package/dist/lib/evg/showcase/pages/flex.tsx +46 -0
- package/dist/lib/evg/showcase/pages/more.tsx +332 -0
- package/dist/lib/evg/showcase/pages/plots.tsx +262 -0
- package/dist/lib/evg/showcase/pages/svg.tsx +63 -0
- package/dist/lib/evg/showcase/pages/tables.tsx +209 -0
- package/dist/lib/evg/showcase/pages/typography.tsx +43 -0
- package/dist/lib/evg/showcase/pages/units.tsx +35 -0
- package/dist/lib/evg/showcase/pages/variants.tsx +233 -0
- package/dist/lib/evg/showcase/pages/vector.tsx +75 -0
- package/dist/lib/evg/showcase/pages/views.tsx +223 -0
- package/dist/lib/evg/showcase/tests/chart_api_smoke.mjs +339 -0
- package/dist/lib/evg/showcase/tests/gl_smoke.mjs +125 -0
- package/dist/lib/evg/showcase/themes/chart_api-default.css +15 -0
- package/dist/lib/evg/showcase/themes/charts-default.css +29 -0
- package/dist/lib/evg/showcase/themes/drawing-default.css +35 -0
- package/dist/lib/evg/showcase/themes/more-default.css +128 -0
- package/dist/lib/evg/showcase/themes/plots-default.css +18 -0
- package/dist/lib/evg/showcase/themes/showcase.css +508 -0
- package/dist/lib/evg/showcase/themes/tables-default.css +123 -0
- package/dist/lib/evg/showcase/themes/variants-default.css +15 -0
- package/dist/lib/evg/showcase/themes/views-default.css +15 -0
- package/dist/lib/evg/tools/bench_vs_potrace.mjs +290 -0
- package/dist/lib/evg/tools/evg_image_tool.rgr +488 -0
- package/dist/lib/evg/tools/evg_trace_bench.rgr +114 -0
- package/dist/lib/evg/tools/evg_trace_cli.rgr +662 -0
- package/dist/lib/evg/tools/evg_trace_cpp_bench.rgr +83 -0
- package/dist/lib/evg/tools/run_trace_bench.sh +74 -0
- package/dist/lib/evg/tools/run_trace_cli_smoke.sh +128 -0
- package/dist/lib/evg/web/responsive/EvgResponsiveCheck.rgr +271 -0
- package/dist/lib/evg/web/responsive/EvgResponsiveDemo.rgr +531 -0
- package/dist/lib/evg/web/responsive/README.md +97 -0
- package/dist/lib/evg/web/responsive/build.mjs +90 -0
- package/dist/lib/evg/web/responsive/dom-check.mjs +169 -0
- package/dist/lib/evg/web/responsive/index.html +177 -0
- package/dist/lib/evg/web/responsive/smoke.mjs +221 -0
- package/dist/lib/evg/web/tools/assets-client.mjs +95 -0
- package/dist/lib/evg/web/tools/boot-bench.mjs +189 -0
- package/dist/lib/evg/web/tools/inline-assets.mjs +119 -0
- package/dist/lib/evg/web/tools/minify.mjs +60 -0
- package/dist/lib/evg/web/tracer/build.mjs +87 -0
- package/dist/lib/evg/web/tracer/index.html +2805 -0
- package/dist/lib/evg/web/tracer/sample.png +0 -0
- package/dist/lib/evg/web/tracer/smoke.mjs +1162 -0
- package/dist/lib/evgr/Cargo.lock +21 -0
- package/dist/lib/evgr/Cargo.toml +19 -0
- package/dist/lib/evgr/README.md +140 -0
- package/dist/lib/evgr/bench/NativeBench.rgr +246 -0
- package/dist/lib/evgr/bench/compare.mjs +252 -0
- package/dist/lib/evgr/bench/speed.mjs +277 -0
- package/dist/lib/evgr/bin/.gitignore +3 -0
- package/dist/lib/evgr/src/bin/bench.rs +106 -0
- package/dist/lib/evgr/src/bin/smoke.rs +13 -0
- package/dist/lib/evgr/src/grid.rs +730 -0
- package/dist/lib/evgr/src/lib.rs +1003 -0
- package/dist/lib/evgr/src/style.rs +468 -0
- package/dist/lib/evgr/src/text.rs +83 -0
- package/dist/lib/image/BitReader.rgr +171 -0
- package/dist/lib/image/Buffer.rgr +173 -0
- package/dist/lib/image/DCT.rgr +283 -0
- package/dist/lib/image/Deflate.rgr +339 -0
- package/dist/lib/image/HuffmanDecoder.rgr +181 -0
- package/dist/lib/image/ImageBuffer.rgr +706 -0
- package/dist/lib/image/JPEGDecoder.rgr +808 -0
- package/dist/lib/image/PNGDecoder.rgr +544 -0
- package/dist/lib/image/PNGEncoder.rgr +388 -0
- package/dist/lib/image/PPMImage.rgr +224 -0
- package/dist/lib/image/ProgressiveJPEGDecoder.rgr +1154 -0
- package/dist/lib/image/README.md +33 -0
- package/dist/lib/image/RasterBuffer.rgr +294 -0
- package/dist/lib/image/VP8BoolDecoder.rgr +163 -0
- package/dist/lib/image/WebPDecoder.rgr +433 -0
- package/dist/lib/image/WebPLossless.rgr +1035 -0
- package/dist/lib/image/WebPLossy.rgr +1929 -0
- package/dist/lib/image/ranger.json +9 -0
- package/dist/lib/image/testdata/webp/anim_2f_24x16.webp +0 -0
- package/dist/lib/image/testdata/webp/fixtures.txt +33 -0
- package/dist/lib/image/testdata/webp/gen_fixtures.py +261 -0
- package/dist/lib/image/testdata/webp/ll_1x1.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_alpha_29x21.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_gradient_64x64.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_meta_32x32.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_noise_17x9.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal11_23x11.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal2_19x7.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal40_16x16.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal4_13x5.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_photo_40x30.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_predictors_64x32.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_1x1.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f0_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f1_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f2_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f3_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f0_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f1_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f2_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f3_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alpha_33x17.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_exif_15x11.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_i16_96x80.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_nofilter_24x20.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_odd_17x9.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_photo_48x40.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_q100_20x18.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_sharp_40x36.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_simple_filter_33x31.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_vpx_parts8_37x45.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_vpx_skip_96x80.webp +0 -0
- package/dist/lib/image/tests/WebPDecodeTool.rgr +81 -0
- package/dist/lib/image/tests/WebPDecoderTest.rgr +1162 -0
- package/dist/lib/image/tests/run_webp_tests.sh +39 -0
- package/dist/lib/rust/RsJson.rgr +468 -0
- package/dist/lib/rust/RsPrelude.rgr +1663 -0
- package/dist/lib/shell_test.rgr +7 -7
- package/dist/lib/stdlib.rgr +21 -5
- package/dist/lib/zip/ranger.json +6 -0
- package/dist/rgrc.js +87318 -67610
- package/package.json +1010 -1040
- package/dist/README.md +0 -117
- package/dist/package.json +0 -47
package/LICENSE
CHANGED
|
@@ -2,7 +2,9 @@ Ranger uses multiple licenses.
|
|
|
2
2
|
|
|
3
3
|
Ranger-authored source code outside the gallery/ directory is licensed
|
|
4
4
|
under the MIT License, unless a file or subdirectory explicitly states
|
|
5
|
-
otherwise. See LICENSE-MIT.
|
|
5
|
+
otherwise. See LICENSE-MIT. This includes the compiler, the runtime,
|
|
6
|
+
lib/ — and with it the EVG layout engine (lib/evg) and the image codecs
|
|
7
|
+
(lib/image), which moved out of gallery/ and to MIT in September 2026.
|
|
6
8
|
|
|
7
9
|
Ranger-authored source code under gallery/ is licensed under the GNU
|
|
8
10
|
Affero General Public License version 3 or later (AGPL-3.0-or-later),
|
package/README.md
CHANGED
|
@@ -73,19 +73,56 @@ const host = ProcessUiHost.__singleton();
|
|
|
73
73
|
host.notifyPath = (path) => { /* sync view model + re-render */ };
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
**Docs:** [PROCESS_MVP.md](PROCESS_MVP.md) (scope), [PROCESS_STATUS.md](PROCESS_STATUS.md) (compiler checklist), [PROCESS_RUNTIME_INVARIANTS.md](PROCESS_RUNTIME_INVARIANTS.md) (dispatch turn / one notify), [PROCESS_UI_NOTIFY.md](PROCESS_UI_NOTIFY.md) (notify batching), [PROCESS_UI_VIEW_MODELS.md](PROCESS_UI_VIEW_MODELS.md) (view DTO assignment). **Gallery:** [process_counter_board](gallery/process_counter_board/README.md) (Vite + React host for `@process`).
|
|
76
|
+
**Docs:** [PROCESS_MVP.md](docs/plans/process/PROCESS_MVP.md) (scope), [PROCESS_STATUS.md](docs/plans/process/PROCESS_STATUS.md) (compiler checklist), [PROCESS_RUNTIME_INVARIANTS.md](docs/plans/process/PROCESS_RUNTIME_INVARIANTS.md) (dispatch turn / one notify), [PROCESS_UI_NOTIFY.md](docs/plans/process/PROCESS_UI_NOTIFY.md) (notify batching), [PROCESS_UI_VIEW_MODELS.md](legacy/docs/PROCESS_UI_VIEW_MODELS.md) (view DTO assignment). **Gallery:** [process_counter_board](gallery/process_counter_board/README.md) (Vite + React host for `@process`).
|
|
77
|
+
|
|
78
|
+
## Getting started with Claude Code
|
|
79
|
+
|
|
80
|
+
Two commands give a Claude Code session everything it needs to write Ranger —
|
|
81
|
+
in any directory, including an empty one:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
/plugin marketplace add terotests/Ranger
|
|
85
|
+
/plugin install ranger@ranger
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Then, in a folder with nothing in it:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm init -y && npm i -D ranger-compiler
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
…and ask for a program. The plugin carries the language's traps, a build
|
|
95
|
+
command that **fails when the compile fails** (compilers through 3.5.1 printed
|
|
96
|
+
`[FAIL]` and exited 0, which made `&&` run the previous build), the EVG and
|
|
97
|
+
Rave skills, and
|
|
98
|
+
`/ranger:example` — worked examples indexed by what they do, with the command
|
|
99
|
+
for each.
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
cp "$CLAUDE_PLUGIN_ROOT/examples/calc/Calc.rgr" .
|
|
103
|
+
rgr run Calc.rgr # a parser and evaluator
|
|
104
|
+
rgr run Calc.rgr -l=python # …the same source, through Python
|
|
105
|
+
rgr run Calc.rgr -l=go # …and Go
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
[`plugins/ranger/README.md`](plugins/ranger/README.md) lists what is in it, and
|
|
109
|
+
[RangerStarter](https://github.com/terotests/RangerStarter) is the same thing as
|
|
110
|
+
a project you clone: the skills are already in `.claude/skills/`, and `npm start`
|
|
111
|
+
prints on a cold checkout.
|
|
77
112
|
|
|
78
113
|
## Where To Start
|
|
79
114
|
|
|
80
115
|
- [Documentation site](https://terotests.github.io/Ranger/docs/) — install, first program, types, optionals, and the **generated operator reference** (838 operators, compiled from the sources of the commit that publishes the site, so it cannot drift)
|
|
81
116
|
- [The front page](https://terotests.github.io/Ranger/) — what Ranger is, the targets, the platforms and the gallery (`landing/`)
|
|
82
117
|
- [Online playground](https://terotests.github.io/Ranger/playground/) — try Ranger in the browser (`playground/`, Vite + current compiler)
|
|
118
|
+
- [UI gallery](https://terotests.github.io/EVGUI/) — EVG controllers measured against Radix (controllers in `gallery/ui/`; the demos live in [terotests/EVGUI](https://github.com/terotests/EVGUI))
|
|
83
119
|
- `README.md` - language overview, installation, and syntax notes
|
|
84
120
|
- [`gallery/README.md`](gallery/README.md) - index of the application stack (AGPL): EVG, Office, DataGrid, parsers, games, and `@process` host apps
|
|
85
121
|
- [`LICENSING.md`](LICENSING.md) - MIT compiler vs AGPL gallery
|
|
86
122
|
- [`TARGET_NOTES.md`](TARGET_NOTES.md) - what each target language supports and where it falls short
|
|
87
|
-
- [`PLAN_FORMATS.md`](PLAN_FORMATS.md) — the architecture for reading more than three file formats: the layer stack, the internal models, and the phased roadmap after DOCX/XLSX/PPTX. Phase 1 is `.odp` beside `.pptx`, run as the experiment that proves or disproves the shared scene
|
|
88
|
-
- [`PLAN_API_DOCS.md`](PLAN_API_DOCS.md) — the design for `doc { … }` declarations: API metadata attached to a Ranger declaration that never restates what the compiler already knows, the `no doc` / `doc` / `doc public` visibility rule, a canonical **ApiIR** that names a logical module and no namespace, and the outputs built from it — native doc comments and annotations per target (XML doc, TSDoc, DocC, KDoc, rustdoc, Javadoc, dartdoc, Doxygen, docstrings), and the language × platform split that separates C# from Unity and Dart from Flutter
|
|
123
|
+
- [`PLAN_FORMATS.md`](docs/plans/PLAN_FORMATS.md) — the architecture for reading more than three file formats: the layer stack, the internal models, and the phased roadmap after DOCX/XLSX/PPTX. Phase 1 is `.odp` beside `.pptx`, run as the experiment that proves or disproves the shared scene
|
|
124
|
+
- [`PLAN_API_DOCS.md`](docs/plans/PLAN_API_DOCS.md) — the design for `doc { … }` declarations: API metadata attached to a Ranger declaration that never restates what the compiler already knows, the `no doc` / `doc` / `doc public` visibility rule, a canonical **ApiIR** that names a logical module and no namespace, and the outputs built from it — native doc comments and annotations per target (XML doc, TSDoc, DocC, KDoc, rustdoc, Javadoc, dartdoc, Doxygen, docstrings), and the language × platform split that separates C# from Unity and Dart from Flutter
|
|
125
|
+
- [`docs/plans/`](docs/plans/README.md) — the plans that are still open: language, shapes, ownership, LLVM/WASM, the portable JS stdlib, formats and tooling. Finished ones move to [`legacy/docs/`](legacy/docs/README.md)
|
|
89
126
|
- [`CHANGELOG.md`](CHANGELOG.md) - version history
|
|
90
127
|
- [`AGENTS.md`](AGENTS.md) — git/PR rules and Ranger gotchas for AI agents; links the [FAQ](https://terotests.github.io/Ranger/docs/faq/)
|
|
91
128
|
- `ai/` — short offline notes for assistants (`README.md`, `QUICKREF.md`, `GRAMMAR.md`, `INTROSPECTION.md`); prefer the docs site when online
|
|
@@ -106,7 +143,7 @@ cross-target gate: Go, Kotlin, Python, C#, Dart and Swift 6 each compile, and
|
|
|
106
143
|
where the toolchain is on `PATH` they build and answer the Node benchmark cases
|
|
107
144
|
(`npm run test:tsengine`). Dart also keeps the `gallery/ts_parser` golden
|
|
108
145
|
(AST identical to the JS `-d` demo). Details:
|
|
109
|
-
[`TS_ENGINE_PERF.md`](TS_ENGINE_PERF.md), [`TARGET_NOTES.md`](TARGET_NOTES.md).
|
|
146
|
+
[`TS_ENGINE_PERF.md`](gallery/ranger_engine/TS_ENGINE_PERF.md), [`TARGET_NOTES.md`](TARGET_NOTES.md).
|
|
110
147
|
|
|
111
148
|
**Thinner CI** — `PHP`, `Java 7` and `Scala` still have operator templates and
|
|
112
149
|
appear in the syntax-app matrix, but they are not on the large-engine golden
|
|
@@ -158,6 +195,20 @@ Regenerate the fixture list with `node scripts/generate-conformance-table.mjs`.
|
|
|
158
195
|
|
|
159
196
|
## Quick start
|
|
160
197
|
|
|
198
|
+
You do not need this repository to write a program in Ranger. This is the
|
|
199
|
+
compiler, the gallery and their own test corpus — what you clone to work *on*
|
|
200
|
+
Ranger. To start a program *in* it,
|
|
201
|
+
[RangerStarter](https://github.com/terotests/RangerStarter) is a project already
|
|
202
|
+
built around the npm compiler: two source files, a test, a build loop that fails
|
|
203
|
+
when the compile fails, all fourteen targets, and the agent skills. MIT.
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
git clone https://github.com/terotests/RangerStarter my-app
|
|
207
|
+
cd my-app && npm install
|
|
208
|
+
npm start # hei maailma
|
|
209
|
+
npm run targets # the same source as Swift, Kotlin, Rust, Go, C++, …
|
|
210
|
+
```
|
|
211
|
+
|
|
161
212
|
Source files use the `.rgr` extension (`.clj` is the legacy extension and still
|
|
162
213
|
works) and the CLI is `rgrc`:
|
|
163
214
|
|
|
@@ -214,12 +265,14 @@ def c (Config.__singleton())
|
|
|
214
265
|
**Optionals have to be wrapped and unwrapped.** Any variable declared without a
|
|
215
266
|
value is optional, and several operators — `get` on a hash above all — always
|
|
216
267
|
return one. Reading the value takes `unwrap` / `!!`, or `??` for a default;
|
|
217
|
-
`wrap` makes an optional out of a plain value.
|
|
268
|
+
`wrap` makes an optional out of a plain value. Inside `if (!null? x) { … }`
|
|
269
|
+
an optional object is narrowed: `x.field` and `x.method()` need no `unwrap`
|
|
270
|
+
there. Forgetting this shows up as a
|
|
218
271
|
type error between `T` and `<optional>T`. See
|
|
219
272
|
[Optional variables](#optional-variables).
|
|
220
273
|
|
|
221
274
|
**Extending the language does not mean recompiling the compiler.**
|
|
222
|
-
`compiler/Lang.rgr` is read at compile time, not baked into `
|
|
275
|
+
`compiler/Lang.rgr` is read at compile time, not baked into `dist/rgrc.js`.
|
|
223
276
|
Add or change an operator template there, and the very next compile uses it —
|
|
224
277
|
no `npm run compile` in between. The compiler looks for `Lang.rgr` in the
|
|
225
278
|
working directory first, so a copy beside your sources overrides the installed
|
|
@@ -384,7 +437,7 @@ Two things about that table are worth knowing before quoting it. **Every row is
|
|
|
384
437
|
checked against Node's answer** and the command exits non-zero if any engine
|
|
385
438
|
disagrees — a fast wrong answer is not a result. And **the strcat row flatters
|
|
386
439
|
us**: QuickJS 2021-03-27 has no string ropes, so its `s += "ab"` is quadratic.
|
|
387
|
-
Quote the excluding-strcat number. [`QUICKJS_COMPARISON.md`](QUICKJS_COMPARISON.md)
|
|
440
|
+
Quote the excluding-strcat number. [`QUICKJS_COMPARISON.md`](gallery/ranger_engine/QUICKJS_COMPARISON.md)
|
|
388
441
|
has the measurement methodology and a source-level comparison of what the two
|
|
389
442
|
engines do differently.
|
|
390
443
|
|
|
@@ -491,13 +544,13 @@ The compiler supports three JavaScript module output formats:
|
|
|
491
544
|
|
|
492
545
|
```bash
|
|
493
546
|
# Standalone JavaScript (runs main function)
|
|
494
|
-
node
|
|
547
|
+
node dist/rgrc.js -es6 myfile.rgr -o=myfile.js
|
|
495
548
|
|
|
496
549
|
# CommonJS module (.cjs)
|
|
497
|
-
node
|
|
550
|
+
node dist/rgrc.js -es6 -nodemodule myfile.rgr -o=myfile.cjs
|
|
498
551
|
|
|
499
552
|
# ES6/ESM module (.mjs)
|
|
500
|
-
node
|
|
553
|
+
node dist/rgrc.js -es6 -esm myfile.rgr -o=myfile.mjs
|
|
501
554
|
```
|
|
502
555
|
|
|
503
556
|
**File Extensions:**
|
|
@@ -519,7 +572,7 @@ Use `-sourcemap` with `-es6` or `-typescript` to emit a sibling `.js.map` / `.ts
|
|
|
519
572
|
|
|
520
573
|
```bash
|
|
521
574
|
# Standalone ES module + map
|
|
522
|
-
node
|
|
575
|
+
node dist/rgrc.js -es6 -esm -nodemodule -sourcemap ./myapp/App.rgr -o=app.js
|
|
523
576
|
|
|
524
577
|
# Result: bin/app.js and bin/app.js.map
|
|
525
578
|
```
|
|
@@ -540,9 +593,9 @@ npx vitest run tests/compiler-sourcemap.test.ts
|
|
|
540
593
|
|
|
541
594
|
**Implementation notes** (for compiler hackers)
|
|
542
595
|
|
|
543
|
-
- `compiler/
|
|
544
|
-
- `compiler/
|
|
545
|
-
- Flag: `compiler/
|
|
596
|
+
- `compiler/SourceMap.rgr` — `SourceMapBuilder`, VLQ encoder, `addMappingFromNode()` uses `node.getLine()` + `node.code.getColumn(sp)` (not stale `node.row`).
|
|
597
|
+
- `compiler/CodeWriter.rgr` — `lineNumber` / `columnNumber` on emit, `walkNodeStack`, `outMapped()`, `.map` write in `CodeFileSystem.saveTo`.
|
|
598
|
+
- Flag: `compiler/Compiler.rgr` → `flag sourcemap`; enabled in `VirtualCompiler.rgr` via `fileSystem.enableSourceMaps()`.
|
|
546
599
|
|
|
547
600
|
## Getting started with Hello World
|
|
548
601
|
|
|
@@ -550,14 +603,14 @@ Create file `hello.rgr`
|
|
|
550
603
|
|
|
551
604
|
```
|
|
552
605
|
class Hello {
|
|
553
|
-
sfn
|
|
606
|
+
sfn main () {
|
|
554
607
|
print "Hello World"
|
|
555
608
|
}
|
|
556
609
|
}
|
|
557
610
|
```
|
|
558
611
|
|
|
559
612
|
```
|
|
560
|
-
ranger-compiler hello.rgr ; writes bin/
|
|
613
|
+
ranger-compiler hello.rgr ; writes bin/hello.js
|
|
561
614
|
ranger-compiler hello.rgr -o=hello.js
|
|
562
615
|
```
|
|
563
616
|
|
|
@@ -786,7 +839,7 @@ comment starts with `;`.
|
|
|
786
839
|
```
|
|
787
840
|
; here is a comment
|
|
788
841
|
class Hello {
|
|
789
|
-
sfn main
|
|
842
|
+
sfn main () {
|
|
790
843
|
def o (new Hello)
|
|
791
844
|
o.SomeNonStaticFn()
|
|
792
845
|
}
|
|
@@ -921,7 +974,7 @@ Dart and Python `public` writes the export list itself — a barrel file and
|
|
|
921
974
|
`__all__` are exactly the kind of list that rots when a person maintains it. A
|
|
922
975
|
class with no doc block is not opted into the API model and compiles exactly as
|
|
923
976
|
it did before. Design and the remaining targets:
|
|
924
|
-
[`PLAN_API_DOCS.md`](PLAN_API_DOCS.md).
|
|
977
|
+
[`PLAN_API_DOCS.md`](docs/plans/PLAN_API_DOCS.md).
|
|
925
978
|
|
|
926
979
|
## Types
|
|
927
980
|
|
|
@@ -1147,7 +1200,7 @@ class childClass {
|
|
|
1147
1200
|
Extends( fatherClass )
|
|
1148
1201
|
}
|
|
1149
1202
|
class mainProgram {
|
|
1150
|
-
sfn
|
|
1203
|
+
sfn main () {
|
|
1151
1204
|
; invoke the class
|
|
1152
1205
|
def cc (new childClass)
|
|
1153
1206
|
cc.foo("World!")
|
|
@@ -1221,6 +1274,45 @@ return one.
|
|
|
1221
1274
|
}
|
|
1222
1275
|
```
|
|
1223
1276
|
|
|
1277
|
+
Inside the then block of `if (!null? x)` an optional **object** is narrowed:
|
|
1278
|
+
fields and methods are read through it without `unwrap`, also under `-strict`.
|
|
1279
|
+
A condition narrows only when it must be true for the block to run — a single
|
|
1280
|
+
`!null?` or an `&&` of them, on a name or a path such as `a.friend`:
|
|
1281
|
+
|
|
1282
|
+
```
|
|
1283
|
+
fn describe:string (p@(optional):Person) {
|
|
1284
|
+
if (!null? p) {
|
|
1285
|
+
return (p.greet() + " " + p.name)
|
|
1286
|
+
}
|
|
1287
|
+
return "nobody"
|
|
1288
|
+
}
|
|
1289
|
+
```
|
|
1290
|
+
|
|
1291
|
+
`if p { … }` is the same test. Inside the block `def q:Person p` takes the
|
|
1292
|
+
value: the compiler writes one unwrap for it, the same code as
|
|
1293
|
+
`def q:Person (unwrap p)`.
|
|
1294
|
+
|
|
1295
|
+
The flow narrows as well: the else branch of `if (null? p)`, the code after
|
|
1296
|
+
`if (null? p) { return … }` (also `throw`, `break` and `continue`), and the
|
|
1297
|
+
code after `p = <a value>`:
|
|
1298
|
+
|
|
1299
|
+
```
|
|
1300
|
+
fn describe:string (p@(optional):Person) {
|
|
1301
|
+
if (null? p) {
|
|
1302
|
+
return "nobody"
|
|
1303
|
+
}
|
|
1304
|
+
return p.name
|
|
1305
|
+
}
|
|
1306
|
+
```
|
|
1307
|
+
|
|
1308
|
+
Not narrowed: an `||` of `!null?` tests, and optional scalars — `(n + 1)` on
|
|
1309
|
+
an optional int still needs `(unwrap n)`.
|
|
1310
|
+
|
|
1311
|
+
A field declared without a value is optional too. Under `-strict` it counts
|
|
1312
|
+
as present when the constructor assigns it at its top level, and a field that
|
|
1313
|
+
an attach or init method sets before use is declared `@(late)`
|
|
1314
|
+
(`def model@(late):SheetModel`), like Kotlin's `lateinit`.
|
|
1315
|
+
|
|
1224
1316
|
[Optional values](https://terotests.github.io/Ranger/docs/language/optionals/)
|
|
1225
1317
|
lists the operators (`??`, `!!`, `unwrap`, `null?`, `!null?`, `wrap`,
|
|
1226
1318
|
`nullify`), what each target uses for an empty value, and the `-strict` flag.
|
|
@@ -1448,7 +1540,7 @@ class Main {
|
|
|
1448
1540
|
}))
|
|
1449
1541
|
print (join n.items " ")
|
|
1450
1542
|
}
|
|
1451
|
-
sfn
|
|
1543
|
+
sfn main () {
|
|
1452
1544
|
def hello (new Main ())
|
|
1453
1545
|
hello.testCollection()
|
|
1454
1546
|
}
|
|
@@ -1574,7 +1666,7 @@ the reserved words and the compilation rules live in `compiler/Lang.rgr`, which
|
|
|
1574
1666
|
the compiler reads at compile time. Adding a target to an existing operator, or
|
|
1575
1667
|
adding a whole operator, takes effect on the next compile with no rebuild step.
|
|
1576
1668
|
The compiler looks for `Lang.rgr` in the working directory first and falls back
|
|
1577
|
-
to the copy beside `
|
|
1669
|
+
to the copy beside `dist/rgrc.js`, so a modified copy next to your sources
|
|
1578
1670
|
overrides the installed one — which makes an experiment cheap to try and cheap
|
|
1579
1671
|
to revert. `lib/stdops.rgr` (macros, the `ret` operator) works the same way.
|
|
1580
1672
|
|
|
@@ -1583,16 +1675,16 @@ are Ranger source under `compiler/`. Changing them means compiling the compiler
|
|
|
1583
1675
|
with itself:
|
|
1584
1676
|
|
|
1585
1677
|
```bash
|
|
1586
|
-
npm run compile # compiler/
|
|
1678
|
+
npm run compile # compiler/Compiler.rgr -> dist/rgrc.js, and copies Lang.rgr to dist/
|
|
1587
1679
|
npm test # the suite runs against the compiler you just built
|
|
1588
1680
|
```
|
|
1589
1681
|
|
|
1590
|
-
`npm run compile` is the self-hosting step: the current `
|
|
1591
|
-
the new sources into the next `
|
|
1682
|
+
`npm run compile` is the self-hosting step: the current `dist/rgrc.js` compiles
|
|
1683
|
+
the new sources into the next `dist/rgrc.js`. A change that breaks codegen can
|
|
1592
1684
|
therefore break the compiler that builds the next one, so keep the previous
|
|
1593
|
-
`
|
|
1594
|
-
|
|
1595
|
-
|
|
1685
|
+
`dist/rgrc.js` until the tests pass -- `git checkout dist/rgrc.js` restores
|
|
1686
|
+
the last committed build, and the git history of that one file is the rollback.
|
|
1687
|
+
The published CLI is `dist/rgrc.js`, built by `npm run build:dist`.
|
|
1596
1688
|
|
|
1597
1689
|
# Annotations
|
|
1598
1690
|
|
|
@@ -1600,7 +1692,10 @@ Compiler is using annotation syntax for specifying some parameters for class, tr
|
|
|
1600
1692
|
|
|
1601
1693
|
## sfn someFn@(main)
|
|
1602
1694
|
|
|
1603
|
-
|
|
1695
|
+
A static function named `main` is the start point of the compiled application:
|
|
1696
|
+
`sfn main () { … }`. A static function with another name can be made the start
|
|
1697
|
+
point with the `@(main)` annotation, `sfn start@(main):void ()`, which is what
|
|
1698
|
+
older code does.
|
|
1604
1699
|
|
|
1605
1700
|
## trait myTrait @params(...)
|
|
1606
1701
|
|