ember-source 6.12.0-beta.3 → 7.0.0-alpha.1
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/blueprints/initializer-test/files/__root__/__testType__/__path__/__name__-test.ts +2 -2
- package/blueprints/instance-initializer-test/files/__root__/__testType__/__path__/__name__-test.ts +3 -3
- package/build-metadata.json +3 -3
- package/dist/{packages/shared-chunks/registry-XY5cfmbH.js → dev/packages/@ember/-internals/container/index.js} +28 -27
- package/dist/{packages → dev/packages}/@ember/-internals/deprecations/index.js +5 -16
- package/dist/{packages/shared-chunks/env-DEd6hPbj.js → dev/packages/@ember/-internals/environment/index.js} +31 -53
- package/dist/dev/packages/@ember/-internals/glimmer/index.js +42 -0
- package/dist/{packages → dev/packages}/@ember/-internals/meta/lib/meta.js +37 -38
- package/dist/dev/packages/@ember/-internals/metal/index.js +63 -0
- package/dist/{packages → dev/packages}/@ember/-internals/routing/index.js +7 -8
- package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/ext/rsvp.js +1 -2
- package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/-proxy.js +14 -15
- package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/action_handler.js +21 -9
- package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/registry_proxy.js +11 -2
- package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/target_action_support.js +22 -9
- package/dist/{packages → dev/packages}/@ember/-internals/string/index.js +1 -2
- package/dist/dev/packages/@ember/-internals/utils/index.js +34 -0
- package/dist/{packages → dev/packages}/@ember/-internals/views/lib/compat/fallback-view-registry.js +1 -2
- package/dist/{packages → dev/packages}/@ember/-internals/views/lib/mixins/action_support.js +16 -10
- package/dist/{packages → dev/packages}/@ember/-internals/views/lib/system/event_dispatcher.js +19 -20
- package/dist/{packages → dev/packages}/@ember/-internals/views/lib/system/utils.js +7 -23
- package/dist/{packages → dev/packages}/@ember/-internals/views/lib/views/core_view.js +6 -7
- package/dist/{packages → dev/packages}/@ember/-internals/views/lib/views/states.js +3 -4
- package/dist/{packages → dev/packages}/@ember/application/index.js +50 -121
- package/dist/{packages → dev/packages}/@ember/application/instance.js +17 -17
- package/dist/{packages → dev/packages}/@ember/application/namespace.js +27 -9
- package/dist/{packages → dev/packages}/@ember/array/index.js +34 -25
- package/dist/{packages → dev/packages}/@ember/array/proxy.js +19 -20
- package/dist/{packages → dev/packages}/@ember/canary-features/index.js +1 -1
- package/dist/dev/packages/@ember/component/helper.js +14 -0
- package/dist/{packages → dev/packages}/@ember/component/index.js +12 -12
- package/dist/{packages → dev/packages}/@ember/component/template-only.js +6 -6
- package/dist/{packages → dev/packages}/@ember/controller/index.js +7 -9
- package/dist/{packages → dev/packages}/@ember/debug/container-debug-adapter.js +6 -7
- package/dist/{packages → dev/packages}/@ember/debug/data-adapter.js +6 -7
- package/dist/{packages → dev/packages}/@ember/debug/index.js +4 -11
- package/dist/{packages → dev/packages}/@ember/debug/lib/assert.js +1 -3
- package/dist/{packages → dev/packages}/@ember/debug/lib/deprecate.js +7 -3
- package/dist/{packages → dev/packages}/@ember/debug/lib/handlers.js +1 -3
- package/dist/{packages → dev/packages}/@ember/debug/lib/warn.js +1 -2
- package/dist/{packages → dev/packages}/@ember/engine/index.js +22 -22
- package/dist/dev/packages/@ember/engine/instance.js +200 -0
- package/dist/{packages → dev/packages}/@ember/helper/index.js +12 -11
- package/dist/{packages → dev/packages}/@ember/instrumentation/index.js +3 -8
- package/dist/dev/packages/@ember/modifier/index.js +23 -0
- package/dist/{packages → dev/packages}/@ember/modifier/on.js +6 -6
- package/dist/dev/packages/@ember/object/-internals.js +49 -0
- package/dist/{packages → dev/packages}/@ember/object/compat.js +11 -12
- package/dist/{packages → dev/packages}/@ember/object/computed.js +7 -8
- package/dist/{packages → dev/packages}/@ember/object/core.js +28 -29
- package/dist/{packages → dev/packages}/@ember/object/evented.js +7 -8
- package/dist/dev/packages/@ember/object/events.js +11 -0
- package/dist/{packages → dev/packages}/@ember/object/index.js +18 -19
- package/dist/{packages → dev/packages}/@ember/object/internals.js +1 -1
- package/dist/{packages → dev/packages}/@ember/object/lib/computed/computed_macros.js +30 -27
- package/dist/{packages → dev/packages}/@ember/object/lib/computed/reduce_computed_macros.js +36 -37
- package/dist/{packages → dev/packages}/@ember/object/mixin.js +15 -23
- package/dist/dev/packages/@ember/object/observable.js +181 -0
- package/dist/dev/packages/@ember/object/observers.js +11 -0
- package/dist/{packages → dev/packages}/@ember/object/promise-proxy-mixin.js +7 -8
- package/dist/dev/packages/@ember/renderer/index.js +14 -0
- package/dist/dev/packages/@ember/routing/-internals.js +22 -0
- package/dist/{packages → dev/packages}/@ember/routing/hash-location.js +1 -1
- package/dist/{packages → dev/packages}/@ember/routing/history-location.js +9 -25
- package/dist/dev/packages/@ember/routing/index.js +14 -0
- package/dist/{packages → dev/packages}/@ember/routing/lib/dsl.js +5 -6
- package/dist/{packages → dev/packages}/@ember/routing/lib/generate_controller.js +22 -10
- package/dist/{packages → dev/packages}/@ember/routing/lib/location-utils.js +3 -16
- package/dist/{packages → dev/packages}/@ember/routing/lib/routing-service.js +19 -9
- package/dist/{packages → dev/packages}/@ember/routing/lib/utils.js +12 -13
- package/dist/{packages → dev/packages}/@ember/routing/none-location.js +2 -4
- package/dist/{packages → dev/packages}/@ember/routing/route.js +38 -39
- package/dist/{packages → dev/packages}/@ember/routing/router-service.js +13 -14
- package/dist/{packages → dev/packages}/@ember/routing/router.js +63 -71
- package/dist/{packages → dev/packages}/@ember/runloop/index.js +9 -8
- package/dist/{packages → dev/packages}/@ember/service/index.js +6 -7
- package/dist/dev/packages/@ember/template/index.js +14 -0
- package/dist/{packages → dev/packages}/@ember/template-compilation/index.js +3 -3
- package/dist/dev/packages/@ember/template-compiler/index.js +2 -0
- package/dist/{packages → dev/packages}/@ember/template-compiler/lib/compile-options.js +11 -6
- package/dist/{packages → dev/packages}/@ember/template-compiler/lib/dasherize-component-name.js +1 -2
- package/dist/dev/packages/@ember/template-compiler/lib/plugins/allowed-globals.js +56 -0
- package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/assert-against-attrs.js +19 -3
- package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/assert-against-named-outlets.js +11 -2
- package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.js +1 -2
- package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.js +3 -4
- package/dist/dev/packages/@ember/template-compiler/lib/plugins/index.js +40 -0
- package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-each-track-array.js +21 -2
- package/dist/dev/packages/@ember/template-compiler/lib/plugins/transform-in-element.js +50 -0
- package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-resolutions.js +2 -3
- package/dist/dev/packages/@ember/template-compiler/lib/template.js +248 -0
- package/dist/dev/packages/@ember/template-factory/index.js +8 -0
- package/dist/dev/packages/@ember/test/index.js +18 -0
- package/dist/{packages → dev/packages}/@ember/utils/lib/compare.js +5 -6
- package/dist/{packages → dev/packages}/@ember/utils/lib/is_empty.js +6 -7
- package/dist/{packages → dev/packages}/@glimmer/destroyable/index.js +21 -16
- package/dist/{packages/shared-chunks/encoder-CT1wqYMF.js → dev/packages/@glimmer/encoder/index.js} +3 -4
- package/dist/{packages → dev/packages}/@glimmer/global-context/index.js +6 -5
- package/dist/{packages/shared-chunks/api-1B_9SjFR.js → dev/packages/@glimmer/manager/index.js} +17 -14
- package/dist/dev/packages/@glimmer/node/index.js +40 -0
- package/dist/{packages → dev/packages}/@glimmer/opcode-compiler/index.js +5 -6
- package/dist/dev/packages/@glimmer/program/index.js +12 -0
- package/dist/dev/packages/@glimmer/reference/index.js +208 -0
- package/dist/dev/packages/@glimmer/runtime/index.js +11 -0
- package/dist/dev/packages/@glimmer/tracking/index.js +137 -0
- package/dist/dev/packages/@glimmer/tracking/primitives/cache/index.js +11 -0
- package/dist/{packages → dev/packages}/@glimmer/util/index.js +2 -3
- package/dist/{packages → dev/packages}/@glimmer/validator/index.js +304 -372
- package/dist/{packages → dev/packages}/@glimmer/vm/index.js +1 -1
- package/dist/{packages → dev/packages}/ember/version.js +2 -2
- package/dist/dev/packages/ember-template-compiler/index.js +109 -0
- package/dist/{packages → dev/packages}/ember-testing/index.js +1 -3
- package/dist/dev/packages/ember-testing/lib/public-api.js +2 -0
- package/dist/dev/packages/ember-testing/lib/test/pending_requests.js +10 -0
- package/dist/dev/packages/ember-testing/lib/test.js +25 -0
- package/dist/{packages/shared-chunks/router-DSi8WnDi.js → dev/packages/router_js/index.js} +120 -58
- package/dist/{packages/shared-chunks/alias-BEMS3qgG.js → dev/packages/shared-chunks/alias-CSC0WIbj.js} +4 -5
- package/dist/{packages/shared-chunks/api-CkUl6KyJ.js → dev/packages/shared-chunks/api-BqXkkT0p.js} +14 -16
- package/dist/{packages/shared-chunks/args-proxy-B91L3LRK.js → dev/packages/shared-chunks/args-proxy-DgXMc9b5.js} +7 -8
- package/dist/{packages/shared-chunks/array-BqYCCatg.js → dev/packages/shared-chunks/array-D8PfjQHi.js} +3 -4
- package/dist/dev/packages/shared-chunks/capabilities-O_xc7Yqk.js +34 -0
- package/dist/{packages/shared-chunks/collections-B8me-ZlQ.js → dev/packages/shared-chunks/collections-D_nY_0UJ.js} +1 -2
- package/dist/{packages/@ember/template-compiler/lib/template.js → dev/packages/shared-chunks/compiler-CNj62pww.js} +22 -243
- package/dist/{packages/shared-chunks/constants-oDhF27qL.js → dev/packages/shared-chunks/constants-eoaL3OJQ.js} +9 -9
- package/dist/{packages/shared-chunks/debug-to-string-BsFOvUtQ.js → dev/packages/shared-chunks/debug-to-string-CFb7h0lY.js} +1 -3
- package/dist/{packages/shared-chunks/dynamic-CuBsUXX8.js → dev/packages/shared-chunks/dynamic-CFg3dljk.js} +108 -134
- package/dist/{packages/shared-chunks/element-builder-BuVym8EM.js → dev/packages/shared-chunks/element-builder-BOxP8emt.js} +4 -5
- package/dist/{packages/shared-chunks/flags-BsZlvEeR.js → dev/packages/shared-chunks/flags-B9qxc-pB.js} +1 -1
- package/dist/{packages/shared-chunks/capabilities-DHiXCCuB.js → dev/packages/shared-chunks/fragment-Cc5k9Oy4.js} +2 -33
- package/dist/{packages/shared-chunks/index-ByyoGpfz.js → dev/packages/shared-chunks/index-PxU6E7q8.js} +658 -214
- package/dist/{packages/shared-chunks/index-CQkjwqTv.js → dev/packages/shared-chunks/index-Q7JnrdBn.js} +20 -19
- package/dist/dev/packages/shared-chunks/invoke-DxRPE05O.js +67 -0
- package/dist/{packages/shared-chunks/is_proxy-C2q5rUMp.js → dev/packages/shared-chunks/is_proxy-B0smdQy8.js} +1 -1
- package/dist/{packages/shared-chunks/mandatory-setter-DLKyVs4Q.js → dev/packages/shared-chunks/mandatory-setter-DHZe7-kW.js} +47 -48
- package/dist/{packages/shared-chunks/name-DVtQREj6.js → dev/packages/shared-chunks/name-Z7dpqvzn.js} +1 -1
- package/dist/{packages/shared-chunks/namespace_search-ClQOZuFA.js → dev/packages/shared-chunks/namespace_search-uT8odThF.js} +3 -4
- package/dist/{packages/shared-chunks/observers-DhgQ6ba5.js → dev/packages/shared-chunks/observers-Bj9qLVau.js} +231 -87
- package/dist/{packages/shared-chunks/program-CcLlGnAU.js → dev/packages/shared-chunks/program-DfV0v8aa.js} +4 -6
- package/dist/{packages/shared-chunks/program-context-CZJnCFdo.js → dev/packages/shared-chunks/program-context-BRjCC_BA.js} +2 -2
- package/dist/{packages/shared-chunks/property_set-DrZnfGQ7.js → dev/packages/shared-chunks/property_set-DaoZXGM5.js} +11 -16
- package/dist/dev/packages/shared-chunks/public-api-C3KlJmEr.js +10 -0
- package/dist/{packages/shared-chunks/reference-B6HMX4y0.js → dev/packages/shared-chunks/reference-C3TKDRnP.js} +11 -12
- package/dist/{packages/@glimmer/runtime/index.js → dev/packages/shared-chunks/rehydrate-builder-DPImr9e9.js} +8 -16
- package/dist/{packages/shared-chunks/render-DTOhhssy.js → dev/packages/shared-chunks/render-sg8BuFaE.js} +16 -23
- package/dist/{packages/shared-chunks/serialize-builder-DEgRJgNQ.js → dev/packages/shared-chunks/serialize-builder-b_gSYCSS.js} +7 -7
- package/dist/{packages/shared-chunks/set_properties-Dag9Xz6u.js → dev/packages/shared-chunks/set_properties-kVGzZL_a.js} +2 -2
- package/dist/{packages/shared-chunks/setup-registry-Bbj8WQen.js → dev/packages/shared-chunks/setup-registry-DGdDOxrk.js} +12 -12
- package/dist/{packages/shared-chunks/simple-cast-BXTrayoV.js → dev/packages/shared-chunks/simple-cast-DCvJLSin.js} +1 -1
- package/dist/{packages/shared-chunks/template-CMHIG4cn.js → dev/packages/shared-chunks/template-kM-7TTcc.js} +3 -4
- package/dist/dev/packages/shared-chunks/to-string-C7M8LBLH.js +36 -0
- package/dist/{packages/shared-chunks/transform-resolutions-vHYYonpB.js → dev/packages/shared-chunks/transform-resolutions-fXGQKGsL.js} +331 -288
- package/dist/{packages/shared-chunks/unrecognized-url-error-BBMMZhBN.js → dev/packages/shared-chunks/unrecognized-url-error-B3wUTorp.js} +103 -39
- package/dist/prod/packages/@ember/-internals/browser-environment/index.js +2 -0
- package/dist/prod/packages/@ember/-internals/container/index.js +697 -0
- package/dist/prod/packages/@ember/-internals/deprecations/index.js +114 -0
- package/dist/prod/packages/@ember/-internals/environment/index.js +171 -0
- package/dist/prod/packages/@ember/-internals/error-handling/index.js +26 -0
- package/dist/prod/packages/@ember/-internals/glimmer/index.js +39 -0
- package/dist/prod/packages/@ember/-internals/meta/index.js +1 -0
- package/dist/prod/packages/@ember/-internals/meta/lib/meta.js +455 -0
- package/dist/prod/packages/@ember/-internals/metal/index.js +61 -0
- package/dist/prod/packages/@ember/-internals/owner/index.js +252 -0
- package/dist/prod/packages/@ember/-internals/routing/index.js +14 -0
- package/dist/prod/packages/@ember/-internals/runtime/index.js +9 -0
- package/dist/prod/packages/@ember/-internals/runtime/lib/ext/rsvp.js +51 -0
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/-proxy.js +89 -0
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +187 -0
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/comparable.js +37 -0
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/container_proxy.js +44 -0
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/registry_proxy.js +42 -0
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +142 -0
- package/dist/prod/packages/@ember/-internals/string/index.js +93 -0
- package/dist/prod/packages/@ember/-internals/utility-types/index.js +12 -0
- package/dist/prod/packages/@ember/-internals/utils/index.js +75 -0
- package/dist/prod/packages/@ember/-internals/views/index.js +7 -0
- package/dist/prod/packages/@ember/-internals/views/lib/compat/attrs.js +3 -0
- package/dist/prod/packages/@ember/-internals/views/lib/compat/fallback-view-registry.js +7 -0
- package/dist/prod/packages/@ember/-internals/views/lib/component_lookup.js +14 -0
- package/dist/prod/packages/@ember/-internals/views/lib/mixins/action_support.js +35 -0
- package/dist/prod/packages/@ember/-internals/views/lib/system/event_dispatcher.js +227 -0
- package/dist/prod/packages/@ember/-internals/views/lib/system/utils.js +172 -0
- package/dist/prod/packages/@ember/-internals/views/lib/views/core_view.js +87 -0
- package/dist/prod/packages/@ember/-internals/views/lib/views/states.js +83 -0
- package/dist/prod/packages/@ember/application/index.js +899 -0
- package/dist/prod/packages/@ember/application/instance.js +438 -0
- package/dist/prod/packages/@ember/application/namespace.js +68 -0
- package/dist/prod/packages/@ember/array/-internals.js +9 -0
- package/dist/prod/packages/@ember/array/index.js +591 -0
- package/dist/prod/packages/@ember/array/lib/make-array.js +42 -0
- package/dist/prod/packages/@ember/array/make.js +1 -0
- package/dist/prod/packages/@ember/array/mutable.js +1 -0
- package/dist/prod/packages/@ember/array/proxy.js +267 -0
- package/dist/prod/packages/@ember/canary-features/index.js +67 -0
- package/dist/prod/packages/@ember/component/helper.js +12 -0
- package/dist/prod/packages/@ember/component/index.js +32 -0
- package/dist/prod/packages/@ember/component/template-only.js +39 -0
- package/dist/prod/packages/@ember/controller/index.js +177 -0
- package/dist/prod/packages/@ember/debug/container-debug-adapter.js +117 -0
- package/dist/prod/packages/@ember/debug/data-adapter.js +553 -0
- package/dist/prod/packages/@ember/debug/index.js +30 -0
- package/dist/prod/packages/@ember/debug/lib/assert.js +7 -0
- package/dist/prod/packages/@ember/debug/lib/capture-render-tree.js +28 -0
- package/dist/prod/packages/@ember/debug/lib/deprecate.js +56 -0
- package/dist/prod/packages/@ember/debug/lib/handlers.js +5 -0
- package/dist/prod/packages/@ember/debug/lib/inspect.js +120 -0
- package/dist/prod/packages/@ember/debug/lib/testing.js +9 -0
- package/dist/prod/packages/@ember/debug/lib/warn.js +6 -0
- package/dist/prod/packages/@ember/deprecated-features/index.js +7 -0
- package/dist/prod/packages/@ember/destroyable/index.js +251 -0
- package/dist/prod/packages/@ember/engine/index.js +450 -0
- package/dist/{packages → prod/packages}/@ember/engine/instance.js +24 -10
- package/dist/prod/packages/@ember/engine/lib/engine-parent.js +33 -0
- package/dist/prod/packages/@ember/engine/parent.js +1 -0
- package/dist/prod/packages/@ember/enumerable/index.js +20 -0
- package/dist/prod/packages/@ember/enumerable/mutable.js +22 -0
- package/dist/prod/packages/@ember/helper/index.js +489 -0
- package/dist/prod/packages/@ember/instrumentation/index.js +242 -0
- package/dist/prod/packages/@ember/modifier/index.js +21 -0
- package/dist/prod/packages/@ember/modifier/on.js +20 -0
- package/dist/prod/packages/@ember/object/-internals.js +28 -0
- package/dist/prod/packages/@ember/object/compat.js +128 -0
- package/dist/prod/packages/@ember/object/computed.js +10 -0
- package/dist/prod/packages/@ember/object/core.js +781 -0
- package/dist/prod/packages/@ember/object/evented.js +76 -0
- package/dist/prod/packages/@ember/object/events.js +6 -0
- package/dist/prod/packages/@ember/object/index.js +205 -0
- package/dist/prod/packages/@ember/object/internals.js +8 -0
- package/dist/prod/packages/@ember/object/lib/computed/computed_macros.js +776 -0
- package/dist/prod/packages/@ember/object/lib/computed/reduce_computed_macros.js +1032 -0
- package/dist/prod/packages/@ember/object/mixin.js +560 -0
- package/dist/{packages → prod/packages}/@ember/object/observable.js +80 -15
- package/dist/prod/packages/@ember/object/observers.js +6 -0
- package/dist/prod/packages/@ember/object/promise-proxy-mixin.js +138 -0
- package/dist/prod/packages/@ember/object/proxy.js +98 -0
- package/dist/prod/packages/@ember/owner/index.js +88 -0
- package/dist/prod/packages/@ember/reactive/collections.js +1 -0
- package/dist/prod/packages/@ember/reactive/index.js +12 -0
- package/dist/prod/packages/@ember/renderer/index.js +12 -0
- package/dist/prod/packages/@ember/routing/hash-location.js +153 -0
- package/dist/prod/packages/@ember/routing/history-location.js +250 -0
- package/dist/prod/packages/@ember/routing/index.js +12 -0
- package/dist/prod/packages/@ember/routing/lib/cache.js +37 -0
- package/dist/prod/packages/@ember/routing/lib/controller_for.js +16 -0
- package/dist/prod/packages/@ember/routing/lib/dsl.js +178 -0
- package/dist/prod/packages/@ember/routing/lib/generate_controller.js +62 -0
- package/dist/prod/packages/@ember/routing/lib/location-utils.js +48 -0
- package/dist/prod/packages/@ember/routing/lib/query_params.js +9 -0
- package/dist/prod/packages/@ember/routing/lib/router_state.js +26 -0
- package/dist/prod/packages/@ember/routing/lib/routing-service.js +125 -0
- package/dist/prod/packages/@ember/routing/lib/utils.js +236 -0
- package/dist/prod/packages/@ember/routing/none-location.js +120 -0
- package/dist/prod/packages/@ember/routing/route.js +1604 -0
- package/dist/prod/packages/@ember/routing/router-service.js +640 -0
- package/dist/prod/packages/@ember/routing/router.js +1335 -0
- package/dist/prod/packages/@ember/runloop/index.js +736 -0
- package/dist/prod/packages/@ember/service/index.js +124 -0
- package/dist/prod/packages/@ember/template/index.js +12 -0
- package/dist/prod/packages/@ember/template-compilation/index.js +20 -0
- package/dist/prod/packages/@ember/template-compiler/-internal-primitives.js +1 -0
- package/dist/prod/packages/@ember/template-compiler/-internal-utils.js +1 -0
- package/dist/prod/packages/@ember/template-compiler/index.js +2 -0
- package/dist/prod/packages/@ember/template-compiler/lib/-internal/primitives.js +1 -0
- package/dist/prod/packages/@ember/template-compiler/lib/compile-options.js +103 -0
- package/dist/prod/packages/@ember/template-compiler/lib/dasherize-component-name.js +21 -0
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/allowed-globals.js +56 -0
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-attrs.js +49 -0
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-against-named-outlets.js +34 -0
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-input-helper-without-block.js +22 -0
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/assert-reserved-named-arguments.js +37 -0
- package/dist/{packages → prod/packages}/@ember/template-compiler/lib/plugins/index.js +1 -1
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-action-syntax.js +65 -0
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-each-in-into-each.js +51 -0
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-each-track-array.js +50 -0
- package/dist/{packages → prod/packages}/@ember/template-compiler/lib/plugins/transform-in-element.js +20 -6
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js +37 -0
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-resolutions.js +4 -0
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/transform-wrap-mount-and-outlet.js +57 -0
- package/dist/prod/packages/@ember/template-compiler/lib/plugins/utils.js +55 -0
- package/dist/prod/packages/@ember/template-compiler/lib/public-api.js +1 -0
- package/dist/prod/packages/@ember/template-compiler/lib/runtime.js +1 -0
- package/dist/prod/packages/@ember/template-compiler/lib/system/calculate-location-display.js +28 -0
- package/dist/prod/packages/@ember/template-compiler/lib/template.js +245 -0
- package/dist/prod/packages/@ember/template-factory/index.js +5 -0
- package/dist/prod/packages/@ember/test/adapter.js +2 -0
- package/dist/prod/packages/@ember/test/index.js +18 -0
- package/dist/prod/packages/@ember/utils/index.js +7 -0
- package/dist/prod/packages/@ember/utils/lib/compare.js +159 -0
- package/dist/prod/packages/@ember/utils/lib/is-equal.js +60 -0
- package/dist/prod/packages/@ember/utils/lib/is_blank.js +36 -0
- package/dist/prod/packages/@ember/utils/lib/is_empty.js +67 -0
- package/dist/prod/packages/@ember/utils/lib/is_none.js +28 -0
- package/dist/prod/packages/@ember/utils/lib/is_present.js +39 -0
- package/dist/prod/packages/@ember/utils/lib/type-of.js +110 -0
- package/dist/prod/packages/@ember/version/index.js +1 -0
- package/dist/prod/packages/@glimmer/destroyable/index.js +128 -0
- package/dist/prod/packages/@glimmer/encoder/index.js +28 -0
- package/dist/prod/packages/@glimmer/env/index.js +4 -0
- package/dist/prod/packages/@glimmer/global-context/index.js +138 -0
- package/dist/prod/packages/@glimmer/manager/index.js +293 -0
- package/dist/{packages/shared-chunks/node-dom-helper-BYL7Plyj.js → prod/packages/@glimmer/node/index.js} +10 -12
- package/dist/prod/packages/@glimmer/opcode-compiler/index.js +40 -0
- package/dist/prod/packages/@glimmer/owner/index.js +19 -0
- package/dist/prod/packages/@glimmer/program/index.js +12 -0
- package/dist/{packages/shared-chunks/iterable-BKS7az3P.js → prod/packages/@glimmer/reference/index.js} +13 -12
- package/dist/prod/packages/@glimmer/runtime/index.js +9 -0
- package/dist/prod/packages/@glimmer/tracking/index.js +115 -0
- package/dist/prod/packages/@glimmer/tracking/primitives/cache/index.js +6 -0
- package/dist/prod/packages/@glimmer/util/index.js +129 -0
- package/dist/prod/packages/@glimmer/validator/index.js +1027 -0
- package/dist/prod/packages/@glimmer/vm/index.js +15 -0
- package/dist/prod/packages/@glimmer/wire-format/index.js +102 -0
- package/dist/prod/packages/@simple-dom/document/index.js +355 -0
- package/dist/prod/packages/backburner.js/index.js +939 -0
- package/dist/prod/packages/dag-map/index.js +202 -0
- package/dist/prod/packages/ember/version.js +4 -0
- package/dist/prod/packages/ember-template-compiler/index.js +100 -0
- package/dist/prod/packages/ember-testing/index.js +6 -0
- package/dist/prod/packages/ember-testing/lib/adapters/adapter.js +49 -0
- package/dist/prod/packages/ember-testing/lib/public-api.js +2 -0
- package/dist/prod/packages/ember-testing/lib/test/adapter.js +32 -0
- package/dist/prod/packages/ember-testing/lib/test/pending_requests.js +10 -0
- package/dist/prod/packages/ember-testing/lib/test/waiters.js +128 -0
- package/dist/prod/packages/ember-testing/lib/test.js +25 -0
- package/dist/prod/packages/route-recognizer/index.js +671 -0
- package/dist/prod/packages/router_js/index.js +1527 -0
- package/dist/prod/packages/rsvp/index.js +1 -0
- package/dist/prod/packages/shared-chunks/alias-BkT-0B1G.js +81 -0
- package/dist/prod/packages/shared-chunks/api-Co-k4HVs.js +200 -0
- package/dist/prod/packages/shared-chunks/args-proxy-Dl0A0YWI.js +131 -0
- package/dist/prod/packages/shared-chunks/array-EwekEvId.js +117 -0
- package/dist/prod/packages/shared-chunks/array-utils-CZQxrdD3.js +45 -0
- package/dist/prod/packages/shared-chunks/assert-CUCJBR2C.js +19 -0
- package/dist/prod/packages/shared-chunks/cache-qDyqAcpg.js +35 -0
- package/dist/prod/packages/shared-chunks/capabilities-DGmQ_mz4.js +26 -0
- package/dist/prod/packages/shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js +121 -0
- package/dist/prod/packages/shared-chunks/collections-GpG8lT2g.js +75 -0
- package/dist/prod/packages/shared-chunks/compiler-Ddfo5StE.js +6806 -0
- package/dist/prod/packages/shared-chunks/computed_cache-DmYKevAP.js +12 -0
- package/dist/prod/packages/shared-chunks/constants-b-2IVErl.js +210 -0
- package/dist/prod/packages/shared-chunks/debug-brand-B1TWjOCH.js +12 -0
- package/dist/prod/packages/shared-chunks/decorator-BdDDBUd2.js +123 -0
- package/dist/prod/packages/shared-chunks/dictionary-gc5gpyOG.js +13 -0
- package/dist/prod/packages/shared-chunks/element-builder-CiLTrXD6.js +776 -0
- package/dist/prod/packages/shared-chunks/flags-B9qxc-pB.js +24 -0
- package/dist/prod/packages/shared-chunks/fragment-EpVz5Xuc.js +910 -0
- package/dist/prod/packages/shared-chunks/get-debug-name-BDxIL2Y1.js +3 -0
- package/dist/prod/packages/shared-chunks/has-dom-DdQORPzI.js +4 -0
- package/dist/prod/packages/shared-chunks/index-CSVCFS_p.js +1904 -0
- package/dist/prod/packages/shared-chunks/index-Cc8WmrB-.js +21 -0
- package/dist/prod/packages/shared-chunks/index-DZLHQAlb.js +5842 -0
- package/dist/prod/packages/shared-chunks/injected_property-DL3vQoFA.js +58 -0
- package/dist/prod/packages/shared-chunks/invoke-DxL00a1D.js +53 -0
- package/dist/prod/packages/shared-chunks/is_proxy-Cr1qlMv_.js +16 -0
- package/dist/prod/packages/shared-chunks/lookup-descriptor-CwcVgaLv.js +13 -0
- package/dist/prod/packages/shared-chunks/name-C68GLLO3.js +11 -0
- package/dist/prod/packages/shared-chunks/namespace_search-Aog9nySA.js +1070 -0
- package/dist/prod/packages/shared-chunks/object-utils-AijlD-JH.js +12 -0
- package/dist/prod/packages/shared-chunks/observers-R1ZklwWy.js +714 -0
- package/dist/prod/packages/shared-chunks/on-CrTl7JQU.js +3329 -0
- package/dist/prod/packages/shared-chunks/program-B7SJZ5NF.js +176 -0
- package/dist/prod/packages/shared-chunks/program-context-C-JdYXRA.js +146 -0
- package/dist/prod/packages/shared-chunks/property_set-O080KTKZ.js +99 -0
- package/dist/prod/packages/shared-chunks/public-api-C3KlJmEr.js +10 -0
- package/dist/prod/packages/shared-chunks/reference-BNqcwZWH.js +151 -0
- package/dist/prod/packages/shared-chunks/registers-ylirb0dq.js +35 -0
- package/dist/prod/packages/shared-chunks/rehydrate-builder-CSn1aIO1.js +459 -0
- package/dist/prod/packages/shared-chunks/render-C1ZnScKH.js +1464 -0
- package/dist/prod/packages/shared-chunks/rsvp-CnCSY930.js +2306 -0
- package/dist/prod/packages/shared-chunks/serialize-builder-CVQ3q8rJ.js +124 -0
- package/dist/prod/packages/shared-chunks/set_properties-CjsDTRey.js +101 -0
- package/dist/prod/packages/shared-chunks/setup-registry-CMNYh2jY.js +53 -0
- package/dist/prod/packages/shared-chunks/simple-cast-DCvJLSin.js +33 -0
- package/dist/prod/packages/shared-chunks/super-Cm_a_cLQ.js +275 -0
- package/dist/prod/packages/shared-chunks/template-Dc_cBOoX.js +19 -0
- package/dist/prod/packages/shared-chunks/tracked-ChVNBE2f.js +131 -0
- package/dist/prod/packages/shared-chunks/transform-resolutions-C7wq_Q_c.js +6939 -0
- package/dist/prod/packages/shared-chunks/unrecognized-url-error-DDBwfzdm.js +537 -0
- package/docs/data.json +3009 -2358
- package/lib/index.js +157 -279
- package/package.json +27 -58
- package/types/stable/@ember/-internals/deprecations/index.d.ts +0 -6
- package/types/stable/@ember/-internals/environment/index.d.ts +0 -1
- package/types/stable/@ember/-internals/environment/lib/env.d.ts +0 -3
- package/types/stable/@ember/-internals/glimmer/lib/component-managers/curly.d.ts +3 -6
- package/types/stable/@ember/-internals/glimmer/lib/component-managers/root.d.ts +1 -2
- package/types/stable/@ember/-internals/glimmer/lib/helper.d.ts +22 -29
- package/types/stable/@ember/-internals/glimmer/lib/renderer.d.ts +2 -2
- package/types/stable/@ember/-internals/glimmer/lib/resolver.d.ts +0 -2
- package/types/stable/@ember/-internals/glimmer/lib/utils/bindings.d.ts +0 -1
- package/types/stable/@ember/-internals/meta/lib/meta.d.ts +1 -1
- package/types/stable/@ember/-internals/metal/lib/alias.d.ts +0 -11
- package/types/stable/@ember/-internals/metal/lib/decorator.d.ts +0 -1
- package/types/stable/@ember/-internals/metal/lib/each_proxy_events.d.ts +0 -1
- package/types/stable/@ember/-internals/metal/lib/observer.d.ts +0 -2
- package/types/stable/@ember/-internals/metal/lib/property_get.d.ts +4 -10
- package/types/stable/@ember/-internals/utils/index.d.ts +0 -1
- package/types/stable/@ember/-internals/views/lib/system/utils.d.ts +3 -15
- package/types/stable/@ember/application/index.d.ts +2 -63
- package/types/stable/@ember/routing/history-location.d.ts +0 -1
- package/types/stable/@ember/routing/lib/location-utils.d.ts +1 -2
- package/types/stable/@ember/routing/none-location.d.ts +1 -2
- package/types/stable/@ember/template-compiler/index.d.ts +1 -0
- package/types/stable/@ember/template-compiler/lib/plugins/allowed-globals.d.ts +26 -0
- package/types/stable/@ember/test/index.d.ts +0 -3
- package/types/stable/@glimmer/interfaces/lib/compile/wire-format/api.d.ts +1 -1
- package/types/stable/@glimmer/interfaces/lib/template.d.ts +1 -1
- package/types/stable/@glimmer/program/lib/program.d.ts +0 -1
- package/types/stable/@glimmer/validator/lib/collections/map.d.ts +1 -1
- package/types/stable/@handlebars/parser/types/ast.d.ts +148 -0
- package/types/stable/@handlebars/parser/types/index.d.ts +13 -0
- package/types/stable/ember-template-compiler/index.d.ts +0 -2
- package/types/stable/ember-template-compiler/lib/public-api.d.ts +0 -1
- package/types/stable/ember-testing/lib/public-api.d.ts +0 -6
- package/types/stable/ember-testing/lib/test/pending_requests.d.ts +0 -3
- package/types/stable/ember-testing/lib/test.d.ts +0 -23
- package/types/stable/index.d.ts +15 -32
- package/types/stable/router_js/index.d.ts +7 -0
- package/types/stable/router_js/lib/core.d.ts +9 -0
- package/types/stable/router_js/lib/route-info.d.ts +107 -0
- package/types/stable/router_js/lib/router.d.ts +245 -0
- package/types/stable/router_js/lib/transition-aborted-error.d.ts +15 -0
- package/types/stable/router_js/lib/transition-intent/named-transition-intent.d.ts +23 -0
- package/types/stable/router_js/lib/transition-intent/url-transition-intent.d.ts +12 -0
- package/types/stable/router_js/lib/transition-intent.d.ts +13 -0
- package/types/stable/router_js/lib/transition-state.d.ts +25 -0
- package/types/stable/router_js/lib/transition.d.ts +241 -0
- package/types/stable/router_js/lib/unrecognized-url-error.d.ts +11 -0
- package/types/stable/router_js/lib/utils.d.ts +41 -0
- package/dist/ember-template-compiler.js +0 -20631
- package/dist/ember-template-compiler.js.map +0 -1
- package/dist/ember-testing.js +0 -1351
- package/dist/ember-testing.js.map +0 -1
- package/dist/ember.debug.js +0 -52306
- package/dist/ember.debug.js.map +0 -1
- package/dist/ember.prod.js +0 -49369
- package/dist/ember.prod.js.map +0 -1
- package/dist/packages/@ember/-internals/container/index.js +0 -1
- package/dist/packages/@ember/-internals/environment/index.js +0 -1
- package/dist/packages/@ember/-internals/glimmer/index.js +0 -18
- package/dist/packages/@ember/-internals/metal/index.js +0 -51
- package/dist/packages/@ember/-internals/utils/index.js +0 -7
- package/dist/packages/@ember/application/lib/lazy_load.js +0 -68
- package/dist/packages/@ember/component/helper.js +0 -14
- package/dist/packages/@ember/modifier/index.js +0 -23
- package/dist/packages/@ember/object/-internals.js +0 -35
- package/dist/packages/@ember/object/events.js +0 -12
- package/dist/packages/@ember/object/observers.js +0 -12
- package/dist/packages/@ember/renderer/index.js +0 -14
- package/dist/packages/@ember/routing/index.js +0 -14
- package/dist/packages/@ember/template/index.js +0 -14
- package/dist/packages/@ember/template-factory/index.js +0 -8
- package/dist/packages/@ember/test/index.js +0 -27
- package/dist/packages/@glimmer/encoder/index.js +0 -1
- package/dist/packages/@glimmer/manager/index.js +0 -5
- package/dist/packages/@glimmer/node/index.js +0 -2
- package/dist/packages/@glimmer/program/index.js +0 -3
- package/dist/packages/@glimmer/reference/index.js +0 -2
- package/dist/packages/@glimmer/tracking/index.js +0 -48
- package/dist/packages/@glimmer/tracking/primitives/cache/index.js +0 -12
- package/dist/packages/ember/barrel.js +0 -511
- package/dist/packages/ember/index.js +0 -20
- package/dist/packages/ember-template-compiler/index.js +0 -17135
- package/dist/packages/ember-testing/lib/adapters/qunit.js +0 -53
- package/dist/packages/ember-testing/lib/ext/application.js +0 -174
- package/dist/packages/ember-testing/lib/ext/rsvp.js +0 -17
- package/dist/packages/ember-testing/lib/helpers/and_then.js +0 -11
- package/dist/packages/ember-testing/lib/helpers/current_path.js +0 -32
- package/dist/packages/ember-testing/lib/helpers/current_route_name.js +0 -32
- package/dist/packages/ember-testing/lib/helpers/current_url.js +0 -29
- package/dist/packages/ember-testing/lib/helpers/pause_test.js +0 -76
- package/dist/packages/ember-testing/lib/helpers/visit.js +0 -51
- package/dist/packages/ember-testing/lib/helpers/wait.js +0 -55
- package/dist/packages/ember-testing/lib/helpers.js +0 -17
- package/dist/packages/ember-testing/lib/initializers.js +0 -56
- package/dist/packages/ember-testing/lib/public-api.js +0 -8
- package/dist/packages/ember-testing/lib/setup_for_testing.js +0 -31
- package/dist/packages/ember-testing/lib/test/helpers.js +0 -133
- package/dist/packages/ember-testing/lib/test/on_inject_helpers.js +0 -39
- package/dist/packages/ember-testing/lib/test/pending_requests.js +0 -22
- package/dist/packages/ember-testing/lib/test/promise.js +0 -83
- package/dist/packages/ember-testing/lib/test/run.js +0 -11
- package/dist/packages/ember-testing/lib/test.js +0 -68
- package/dist/packages/router_js/index.js +0 -2
- package/dist/packages/shared-chunks/helpers-C1rIkuSd.js +0 -11
- package/dist/packages/shared-chunks/invoke-BjRgvK2V.js +0 -27
- package/dist/packages/shared-chunks/public-api-BQsJemZG.js +0 -20
- package/dist/packages/shared-chunks/template_registry-DigcUg9m.js +0 -24
- package/dist/packages/shared-chunks/to-string-CqD7_vQ4.js +0 -60
- package/types/stable/@ember/-internals/environment/lib/global.d.ts +0 -4
- package/types/stable/@ember/-internals/glimmer/lib/modifiers/internal.d.ts +0 -34
- package/types/stable/@ember/-internals/glimmer/lib/syntax/utils.d.ts +0 -5
- package/types/stable/@ember/-internals/glimmer/lib/templates/empty.d.ts +0 -4
- package/types/stable/@ember/-internals/glimmer/lib/utils/debug-render-message.d.ts +0 -4
- package/types/stable/@ember/-internals/metal/lib/dependent_keys.d.ts +0 -3
- package/types/stable/@ember/-internals/utils/lib/symbol.d.ts +0 -5
- package/types/stable/@ember/application/lib/lazy_load.d.ts +0 -38
- package/types/stable/@ember/template-compiler/lib/public-types.d.ts +0 -3
- package/types/stable/ember/barrel.d.ts +0 -358
- package/types/stable/ember/index.d.ts +0 -358
- package/types/stable/ember-template-compiler/lib/system/bootstrap.d.ts +0 -26
- package/types/stable/ember-template-compiler/lib/system/initializer.d.ts +0 -3
- package/types/stable/ember-testing/lib/adapters/qunit.d.ts +0 -22
- package/types/stable/ember-testing/lib/ext/application.d.ts +0 -12
- package/types/stable/ember-testing/lib/ext/rsvp.d.ts +0 -4
- package/types/stable/ember-testing/lib/helpers/and_then.d.ts +0 -4
- package/types/stable/ember-testing/lib/helpers/current_path.d.ts +0 -22
- package/types/stable/ember-testing/lib/helpers/current_route_name.d.ts +0 -21
- package/types/stable/ember-testing/lib/helpers/current_url.d.ts +0 -22
- package/types/stable/ember-testing/lib/helpers/pause_test.d.ts +0 -52
- package/types/stable/ember-testing/lib/helpers/visit.d.ts +0 -22
- package/types/stable/ember-testing/lib/helpers/wait.d.ts +0 -34
- package/types/stable/ember-testing/lib/helpers.d.ts +0 -3
- package/types/stable/ember-testing/lib/initializers.d.ts +0 -3
- package/types/stable/ember-testing/lib/setup_for_testing.d.ts +0 -15
- package/types/stable/ember-testing/lib/test/helpers.d.ts +0 -116
- package/types/stable/ember-testing/lib/test/on_inject_helpers.d.ts +0 -33
- package/types/stable/ember-testing/lib/test/promise.d.ts +0 -37
- package/types/stable/ember-testing/lib/test/run.d.ts +0 -3
- package/types/stable/loader/lib/index.d.ts +0 -4
- package/types/stable/require.d.ts +0 -4
- /package/dist/{packages → dev/packages}/@ember/-internals/browser-environment/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/-internals/error-handling/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/-internals/meta/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/-internals/owner/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/-internals/runtime/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/comparable.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/-internals/runtime/lib/mixins/container_proxy.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/-internals/utility-types/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/-internals/views/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/-internals/views/lib/compat/attrs.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/-internals/views/lib/component_lookup.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/array/-internals.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/array/lib/make-array.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/array/make.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/array/mutable.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/debug/lib/capture-render-tree.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/debug/lib/inspect.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/debug/lib/testing.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/deprecated-features/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/destroyable/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/engine/lib/engine-parent.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/engine/parent.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/enumerable/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/enumerable/mutable.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/object/proxy.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/owner/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/reactive/collections.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/reactive/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/routing/lib/cache.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/routing/lib/controller_for.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/routing/lib/query_params.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/routing/lib/router_state.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/-internal-primitives.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/-internal-utils.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/-internal/primitives.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-action-syntax.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-each-in-into-each.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/transform-wrap-mount-and-outlet.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/plugins/utils.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/public-api.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/runtime.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/lib/system/calculate-location-display.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/template-compiler/runtime.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/test/adapter.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/utils/index.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/utils/lib/is-equal.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/utils/lib/is_blank.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/utils/lib/is_none.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/utils/lib/is_present.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/utils/lib/type-of.js +0 -0
- /package/dist/{packages → dev/packages}/@ember/version/index.js +0 -0
- /package/dist/{packages → dev/packages}/@glimmer/env/index.js +0 -0
- /package/dist/{packages → dev/packages}/@glimmer/owner/index.js +0 -0
- /package/dist/{packages → dev/packages}/@glimmer/wire-format/index.js +0 -0
- /package/dist/{packages → dev/packages}/@simple-dom/document/index.js +0 -0
- /package/dist/{packages → dev/packages}/backburner.js/index.js +0 -0
- /package/dist/{packages → dev/packages}/dag-map/index.js +0 -0
- /package/dist/{packages → dev/packages}/ember-testing/lib/adapters/adapter.js +0 -0
- /package/dist/{packages → dev/packages}/ember-testing/lib/test/adapter.js +0 -0
- /package/dist/{packages → dev/packages}/ember-testing/lib/test/waiters.js +0 -0
- /package/dist/{packages → dev/packages}/route-recognizer/index.js +0 -0
- /package/dist/{packages → dev/packages}/rsvp/index.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/array-utils-CZQxrdD3.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/assert-CUCJBR2C.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/cache-qDyqAcpg.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/chunk-3SQBS3Y5-Cj4eryg1.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/computed_cache-DmYKevAP.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/debug-brand-B1TWjOCH.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/dictionary-gc5gpyOG.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/index-BGP1rw3B.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/object-utils-AijlD-JH.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/present-B1rrjAVM.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/registers-ylirb0dq.js +0 -0
- /package/dist/{packages → dev/packages}/shared-chunks/rsvp-CnCSY930.js +0 -0
- /package/dist/{packages → prod/packages}/@ember/routing/-internals.js +0 -0
- /package/dist/{packages/@ember/template-compiler/index.js → prod/packages/@ember/template-compiler/runtime.js} +0 -0
|
@@ -0,0 +1,910 @@
|
|
|
1
|
+
import { e as $v0, f as $t1, g as $t0, h as $s1, $ as $s0, d as $sp, c as $fp, b as $ra, a as $pc } from './registers-ylirb0dq.js';
|
|
2
|
+
import { b as assertNever } from './assert-CUCJBR2C.js';
|
|
3
|
+
|
|
4
|
+
const CURRIED_COMPONENT = 0;
|
|
5
|
+
const CURRIED_HELPER = 1;
|
|
6
|
+
const CURRIED_MODIFIER = 2;
|
|
7
|
+
|
|
8
|
+
const SIGN_BIT = -536870913;
|
|
9
|
+
const MAX_INT = ~SIGN_BIT - 1;
|
|
10
|
+
const MIN_INT = ~MAX_INT;
|
|
11
|
+
function isHandle(value) {
|
|
12
|
+
return value >= 0;
|
|
13
|
+
}
|
|
14
|
+
function constants(...values) {
|
|
15
|
+
return [false, true, null, undefined, ...values];
|
|
16
|
+
}
|
|
17
|
+
function isSmallInt(value) {
|
|
18
|
+
return value % 1 === 0 && value <= MAX_INT && value >= MIN_INT;
|
|
19
|
+
}
|
|
20
|
+
function encodeNegative(num) {
|
|
21
|
+
return num & SIGN_BIT;
|
|
22
|
+
}
|
|
23
|
+
function decodeNegative(num) {
|
|
24
|
+
return num | ~SIGN_BIT;
|
|
25
|
+
}
|
|
26
|
+
function encodePositive(num) {
|
|
27
|
+
return ~num;
|
|
28
|
+
}
|
|
29
|
+
function decodePositive(num) {
|
|
30
|
+
return ~num;
|
|
31
|
+
}
|
|
32
|
+
function encodeHandle(num) {
|
|
33
|
+
return num;
|
|
34
|
+
}
|
|
35
|
+
function decodeHandle(num) {
|
|
36
|
+
return num;
|
|
37
|
+
}
|
|
38
|
+
function encodeImmediate(num) {
|
|
39
|
+
num |= 0;
|
|
40
|
+
return num < 0 ? encodeNegative(num) : encodePositive(num);
|
|
41
|
+
}
|
|
42
|
+
function decodeImmediate(num) {
|
|
43
|
+
num |= 0;
|
|
44
|
+
return num > SIGN_BIT ? decodePositive(num) : decodeNegative(num);
|
|
45
|
+
}
|
|
46
|
+
[1, -1].forEach(x => decodeImmediate(encodeImmediate(x)));
|
|
47
|
+
|
|
48
|
+
const VM_HELPER_OP = 16;
|
|
49
|
+
const VM_SET_NAMED_VARIABLES_OP = 17;
|
|
50
|
+
const VM_SET_BLOCKS_OP = 18;
|
|
51
|
+
const VM_SET_VARIABLE_OP = 19;
|
|
52
|
+
const VM_SET_BLOCK_OP = 20;
|
|
53
|
+
const VM_GET_VARIABLE_OP = 21;
|
|
54
|
+
const VM_GET_PROPERTY_OP = 22;
|
|
55
|
+
const VM_GET_BLOCK_OP = 23;
|
|
56
|
+
const VM_SPREAD_BLOCK_OP = 24;
|
|
57
|
+
const VM_HAS_BLOCK_OP = 25;
|
|
58
|
+
const VM_HAS_BLOCK_PARAMS_OP = 26;
|
|
59
|
+
const VM_CONCAT_OP = 27;
|
|
60
|
+
const VM_CONSTANT_OP = 28;
|
|
61
|
+
const VM_CONSTANT_REFERENCE_OP = 29;
|
|
62
|
+
const VM_PRIMITIVE_OP = 30;
|
|
63
|
+
const VM_PRIMITIVE_REFERENCE_OP = 31;
|
|
64
|
+
const VM_DUP_OP = 33;
|
|
65
|
+
const VM_POP_OP = 34;
|
|
66
|
+
const VM_LOAD_OP = 35;
|
|
67
|
+
const VM_FETCH_OP = 36;
|
|
68
|
+
const VM_ROOT_SCOPE_OP = 37;
|
|
69
|
+
const VM_VIRTUAL_ROOT_SCOPE_OP = 38;
|
|
70
|
+
const VM_CHILD_SCOPE_OP = 39;
|
|
71
|
+
const VM_POP_SCOPE_OP = 40;
|
|
72
|
+
const VM_TEXT_OP = 41;
|
|
73
|
+
const VM_COMMENT_OP = 42;
|
|
74
|
+
const VM_APPEND_HTML_OP = 43;
|
|
75
|
+
const VM_APPEND_SAFE_HTML_OP = 44;
|
|
76
|
+
const VM_APPEND_DOCUMENT_FRAGMENT_OP = 45;
|
|
77
|
+
const VM_APPEND_NODE_OP = 46;
|
|
78
|
+
const VM_APPEND_TEXT_OP = 47;
|
|
79
|
+
const VM_OPEN_ELEMENT_OP = 48;
|
|
80
|
+
const VM_OPEN_DYNAMIC_ELEMENT_OP = 49;
|
|
81
|
+
const VM_PUSH_REMOTE_ELEMENT_OP = 50;
|
|
82
|
+
const VM_STATIC_ATTR_OP = 51;
|
|
83
|
+
const VM_DYNAMIC_ATTR_OP = 52;
|
|
84
|
+
const VM_COMPONENT_ATTR_OP = 53;
|
|
85
|
+
const VM_FLUSH_ELEMENT_OP = 54;
|
|
86
|
+
const VM_CLOSE_ELEMENT_OP = 55;
|
|
87
|
+
const VM_POP_REMOTE_ELEMENT_OP = 56;
|
|
88
|
+
const VM_MODIFIER_OP = 57;
|
|
89
|
+
const VM_BIND_DYNAMIC_SCOPE_OP = 58;
|
|
90
|
+
const VM_PUSH_DYNAMIC_SCOPE_OP = 59;
|
|
91
|
+
const VM_POP_DYNAMIC_SCOPE_OP = 60;
|
|
92
|
+
const VM_COMPILE_BLOCK_OP = 61;
|
|
93
|
+
const VM_PUSH_BLOCK_SCOPE_OP = 62;
|
|
94
|
+
const VM_PUSH_SYMBOL_TABLE_OP = 63;
|
|
95
|
+
const VM_INVOKE_YIELD_OP = 64;
|
|
96
|
+
const VM_JUMP_IF_OP = 65;
|
|
97
|
+
const VM_JUMP_UNLESS_OP = 66;
|
|
98
|
+
const VM_JUMP_EQ_OP = 67;
|
|
99
|
+
const VM_ASSERT_SAME_OP = 68;
|
|
100
|
+
const VM_ENTER_OP = 69;
|
|
101
|
+
const VM_EXIT_OP = 70;
|
|
102
|
+
const VM_TO_BOOLEAN_OP = 71;
|
|
103
|
+
const VM_ENTER_LIST_OP = 72;
|
|
104
|
+
const VM_EXIT_LIST_OP = 73;
|
|
105
|
+
const VM_ITERATE_OP = 74;
|
|
106
|
+
const VM_MAIN_OP = 75;
|
|
107
|
+
const VM_CONTENT_TYPE_OP = 76;
|
|
108
|
+
const VM_CURRY_OP = 77;
|
|
109
|
+
const VM_PUSH_COMPONENT_DEFINITION_OP = 78;
|
|
110
|
+
const VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP = 79;
|
|
111
|
+
const VM_RESOLVE_DYNAMIC_COMPONENT_OP = 80;
|
|
112
|
+
const VM_RESOLVE_CURRIED_COMPONENT_OP = 81;
|
|
113
|
+
const VM_PUSH_ARGS_OP = 82;
|
|
114
|
+
const VM_PUSH_EMPTY_ARGS_OP = 83;
|
|
115
|
+
const VM_PREPARE_ARGS_OP = 85;
|
|
116
|
+
const VM_CAPTURE_ARGS_OP = 86;
|
|
117
|
+
const VM_CREATE_COMPONENT_OP = 87;
|
|
118
|
+
const VM_REGISTER_COMPONENT_DESTRUCTOR_OP = 88;
|
|
119
|
+
const VM_PUT_COMPONENT_OPERATIONS_OP = 89;
|
|
120
|
+
const VM_GET_COMPONENT_SELF_OP = 90;
|
|
121
|
+
const VM_GET_COMPONENT_TAG_NAME_OP = 91;
|
|
122
|
+
const VM_GET_COMPONENT_LAYOUT_OP = 92;
|
|
123
|
+
const VM_POPULATE_LAYOUT_OP = 95;
|
|
124
|
+
const VM_INVOKE_COMPONENT_LAYOUT_OP = 96;
|
|
125
|
+
const VM_BEGIN_COMPONENT_TRANSACTION_OP = 97;
|
|
126
|
+
const VM_COMMIT_COMPONENT_TRANSACTION_OP = 98;
|
|
127
|
+
const VM_DID_CREATE_ELEMENT_OP = 99;
|
|
128
|
+
const VM_DID_RENDER_LAYOUT_OP = 100;
|
|
129
|
+
const VM_DEBUGGER_OP = 103;
|
|
130
|
+
const VM_STATIC_COMPONENT_ATTR_OP = 105;
|
|
131
|
+
const VM_DYNAMIC_CONTENT_TYPE_OP = 106;
|
|
132
|
+
const VM_DYNAMIC_HELPER_OP = 107;
|
|
133
|
+
const VM_DYNAMIC_MODIFIER_OP = 108;
|
|
134
|
+
const VM_IF_INLINE_OP = 109;
|
|
135
|
+
const VM_NOT_OP = 110;
|
|
136
|
+
const VM_GET_DYNAMIC_VAR_OP = 111;
|
|
137
|
+
const VM_LOG_OP = 112;
|
|
138
|
+
const VM_SYSCALL_SIZE = 113;
|
|
139
|
+
|
|
140
|
+
const VM_PUSH_FRAME_OP = 0;
|
|
141
|
+
const VM_POP_FRAME_OP = 1;
|
|
142
|
+
const VM_INVOKE_VIRTUAL_OP = 2;
|
|
143
|
+
const VM_INVOKE_STATIC_OP = 3;
|
|
144
|
+
const VM_JUMP_OP = 4;
|
|
145
|
+
const VM_RETURN_OP = 5;
|
|
146
|
+
const VM_RETURN_TO_OP = 6;
|
|
147
|
+
const VM_MACHINE_SIZE = 7;
|
|
148
|
+
function isMachineOp(value) {
|
|
149
|
+
return value >= 0 && value <= 15;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function decodeCurry(curry) {
|
|
153
|
+
switch (curry) {
|
|
154
|
+
case CURRIED_COMPONENT:
|
|
155
|
+
return 'component';
|
|
156
|
+
case CURRIED_HELPER:
|
|
157
|
+
return 'helper';
|
|
158
|
+
case CURRIED_MODIFIER:
|
|
159
|
+
return 'modifier';
|
|
160
|
+
default:
|
|
161
|
+
throw Error(`Unexpected curry value: ${curry}`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function decodeRegister(register) {
|
|
165
|
+
switch (register) {
|
|
166
|
+
case $pc:
|
|
167
|
+
return '$pc';
|
|
168
|
+
case $ra:
|
|
169
|
+
return '$ra';
|
|
170
|
+
case $fp:
|
|
171
|
+
return '$fp';
|
|
172
|
+
case $sp:
|
|
173
|
+
return '$sp';
|
|
174
|
+
case $s0:
|
|
175
|
+
return '$s0';
|
|
176
|
+
case $s1:
|
|
177
|
+
return '$s1';
|
|
178
|
+
case $t0:
|
|
179
|
+
return '$t0';
|
|
180
|
+
case $t1:
|
|
181
|
+
return '$t1';
|
|
182
|
+
case $v0:
|
|
183
|
+
return '$v0';
|
|
184
|
+
default:
|
|
185
|
+
return `$bug${register}`;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function decodePrimitive(primitive, constants) {
|
|
189
|
+
if (primitive >= 0) {
|
|
190
|
+
return constants.getValue(decodeHandle(primitive));
|
|
191
|
+
}
|
|
192
|
+
return decodeImmediate(primitive);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const todo = ({
|
|
196
|
+
label,
|
|
197
|
+
value
|
|
198
|
+
}) => ['error:operand', value, {
|
|
199
|
+
label
|
|
200
|
+
}];
|
|
201
|
+
|
|
202
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
203
|
+
|
|
204
|
+
class Disassembler {
|
|
205
|
+
static build(builder) {
|
|
206
|
+
return builder(new Disassembler()).#disms;
|
|
207
|
+
}
|
|
208
|
+
#disms;
|
|
209
|
+
constructor() {
|
|
210
|
+
this.#disms = {};
|
|
211
|
+
}
|
|
212
|
+
addNullable(names, dism) {
|
|
213
|
+
for (const name of names) {
|
|
214
|
+
this.#disms[name] = dism;
|
|
215
|
+
this.#disms[`${name}?`] = dism;
|
|
216
|
+
}
|
|
217
|
+
return this;
|
|
218
|
+
}
|
|
219
|
+
add(names, dism) {
|
|
220
|
+
const add = (name, dism) => this.#disms[name] = dism;
|
|
221
|
+
for (const name of names) {
|
|
222
|
+
add(name, dism);
|
|
223
|
+
}
|
|
224
|
+
return this;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
Disassembler.build(d => {
|
|
228
|
+
return d.add(['imm/u32', 'imm/i32', 'imm/u32{todo}', 'imm/i32{todo}'], ({
|
|
229
|
+
value
|
|
230
|
+
}) => ['number', value]).add(['const/i32[]'], ({
|
|
231
|
+
value,
|
|
232
|
+
constants
|
|
233
|
+
}) => ['array', constants.getArray(value), {
|
|
234
|
+
kind: Number
|
|
235
|
+
}]).add(['const/bool'], ({
|
|
236
|
+
value
|
|
237
|
+
}) => ['boolean', !!value]).add(['imm/bool'], ({
|
|
238
|
+
value,
|
|
239
|
+
constants
|
|
240
|
+
}) => ['boolean', constants.getValue(decodeHandle(value))]).add(['handle'], ({
|
|
241
|
+
constants,
|
|
242
|
+
value
|
|
243
|
+
}) => ['constant', constants.getValue(value)]).add(['handle/block'], ({
|
|
244
|
+
value,
|
|
245
|
+
heap
|
|
246
|
+
}) => ['instruction', heap.getaddr(value)]).add(['imm/pc'], ({
|
|
247
|
+
value
|
|
248
|
+
}) => ['instruction', value]).add(['const/any[]'], ({
|
|
249
|
+
value,
|
|
250
|
+
constants
|
|
251
|
+
}) => ['array', constants.getArray(value)]).add(['const/primitive'], ({
|
|
252
|
+
value,
|
|
253
|
+
constants
|
|
254
|
+
}) => ['primitive', decodePrimitive(value, constants)]).add(['register'], ({
|
|
255
|
+
value
|
|
256
|
+
}) => ['register', decodeRegister(value)]).add(['const/any'], ({
|
|
257
|
+
value,
|
|
258
|
+
constants
|
|
259
|
+
}) => ['dynamic', constants.getValue(value)]).add(['variable'], ({
|
|
260
|
+
value,
|
|
261
|
+
meta
|
|
262
|
+
}) => {
|
|
263
|
+
return ['variable', value, {
|
|
264
|
+
name: meta?.symbols.lexical?.at(value) ?? null
|
|
265
|
+
}];
|
|
266
|
+
}).add(['register/instruction'], ({
|
|
267
|
+
value
|
|
268
|
+
}) => ['instruction', value]).add(['imm/enum<curry>'], ({
|
|
269
|
+
value
|
|
270
|
+
}) => ['enum<curry>', decodeCurry(value)]).addNullable(['const/str'], ({
|
|
271
|
+
value,
|
|
272
|
+
constants
|
|
273
|
+
}) => ['string', constants.getValue(value)]).addNullable(['const/str[]'], ({
|
|
274
|
+
value,
|
|
275
|
+
constants
|
|
276
|
+
}) => ['array', constants.getArray(value), {
|
|
277
|
+
kind: String
|
|
278
|
+
}]).add(['imm/block:handle'], todo).add(['const/definition'], todo).add(['const/fn'], todo).add(['instruction/relative'], ({
|
|
279
|
+
value,
|
|
280
|
+
offset
|
|
281
|
+
}) => ['instruction', offset + value]).add(['register/sN'], todo).add(['register/stack'], todo).add(['register/tN'], todo).add(['register/v0'], todo);
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
/* This file is generated by build/debug.js */
|
|
285
|
+
|
|
286
|
+
new Array(VM_SYSCALL_SIZE).fill(null);
|
|
287
|
+
new Array(VM_MACHINE_SIZE).fill(null);
|
|
288
|
+
|
|
289
|
+
const ANNOTATION_STYLES = ['background-color: oklch(93% 0.03 300); color: oklch(34% 0.18 300)', 'background-color: oklch(93% 0.03 250); color: oklch(34% 0.18 250)', 'background-color: oklch(93% 0.03 200); color: oklch(34% 0.18 200)', 'background-color: oklch(93% 0.03 150); color: oklch(34% 0.18 150)', 'background-color: oklch(93% 0.03 100); color: oklch(34% 0.18 100)', 'background-color: oklch(93% 0.03 50); color: oklch(34% 0.18 50)', 'background-color: oklch(93% 0.03 0); color: oklch(34% 0.18 0)'];
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* The `LogFragmentBuffer` is responsible for collecting the fragments that are logged to the
|
|
293
|
+
* `DebugLogger` so that they can be accumulated during a group and flushed together.
|
|
294
|
+
*
|
|
295
|
+
* This queuing serves two purposes:
|
|
296
|
+
*
|
|
297
|
+
* 1. To allow the individual fragments that make up a single line to append their values to
|
|
298
|
+
* the current line. To accomplish this, each fragment can append static content and its
|
|
299
|
+
* formatting specifier (e.g. `%o`) to the accumulated {@link #template} *and* append the
|
|
300
|
+
* value to format to the {@link #substitutions} array.
|
|
301
|
+
* 2. To allow logs that refer to objects to be represented as footnotes in the current line,
|
|
302
|
+
* with the footnote to be printed in a later line.
|
|
303
|
+
*
|
|
304
|
+
* This allows a list of fragments, each of which represent formattable values, to be flattened
|
|
305
|
+
* into a single template string and an array of values to format.
|
|
306
|
+
*
|
|
307
|
+
* ## Footnotes
|
|
308
|
+
*
|
|
309
|
+
* An opcode slice containing constant references will be logged like this:
|
|
310
|
+
*
|
|
311
|
+
* ```
|
|
312
|
+
* ...
|
|
313
|
+
* 362. (PushArgs names=[] block-names=[] flags=16)
|
|
314
|
+
* 366. (Helper helper=[0])
|
|
315
|
+
* [0] glimmerHelper()
|
|
316
|
+
* 368. (PopFrame)
|
|
317
|
+
* 369. (Fetch register=$v0)
|
|
318
|
+
* 371. (Primitive constant="/index.html")
|
|
319
|
+
* ...
|
|
320
|
+
* ```
|
|
321
|
+
*
|
|
322
|
+
* The fragment for line `366` includes an `ObjectFragment` for the helper value. When logged,
|
|
323
|
+
* the object will be represented as a footnote and the value will be printed in a later
|
|
324
|
+
* line.
|
|
325
|
+
*/
|
|
326
|
+
class LogFragmentBuffer {
|
|
327
|
+
/**
|
|
328
|
+
* The first parameter to the `console.log` family of APIs is a *template* that can use
|
|
329
|
+
* format specifiers (e.g. `%c`, `%o`, and `%O`) to refer to subsequent parameters.
|
|
330
|
+
*
|
|
331
|
+
* When a fragment is appended to a line,
|
|
332
|
+
*/
|
|
333
|
+
#template = '';
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Each format specified in the {@link #template} corresponds to a value in the
|
|
337
|
+
* `#substitutions` array.
|
|
338
|
+
*/
|
|
339
|
+
#substitutions = [];
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* The logging options for the buffer, which currently only contains `showSubtle`.
|
|
343
|
+
*
|
|
344
|
+
* When fragments call the buffer's {@linkcode append} method, they specify whether the
|
|
345
|
+
* content to append is subtle or not. If the buffer is not configured to show subtle
|
|
346
|
+
* content, the content is not appended.
|
|
347
|
+
*
|
|
348
|
+
* This allows fragments to append content to the buffer without having to know how the
|
|
349
|
+
* buffer is configured.
|
|
350
|
+
*/
|
|
351
|
+
#options;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* A single line can produce multiple queued log entries. This happens when fragments
|
|
355
|
+
* append *footnotes* to the buffer. A *reference* to the footnote is appended to the
|
|
356
|
+
* primary line, and a line containing the *value* of the footnote is appended to the
|
|
357
|
+
* `#queued` array.
|
|
358
|
+
*
|
|
359
|
+
* Both the primary line and any queued footnotes are flushed together when the buffer
|
|
360
|
+
* is flushed.
|
|
361
|
+
*/
|
|
362
|
+
#footnotes = [];
|
|
363
|
+
#nextFootnote = 1;
|
|
364
|
+
#style = 0;
|
|
365
|
+
constructor(options) {
|
|
366
|
+
this.#options = options;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Add a footnoted value to the current buffer.
|
|
371
|
+
*
|
|
372
|
+
* If the `subtle` option is set, the fragment will only be printed if the buffer is configured
|
|
373
|
+
* to show subtle content.
|
|
374
|
+
*
|
|
375
|
+
* This method takes two callbacks: `add` and `append`.
|
|
376
|
+
*
|
|
377
|
+
* The `append` callback behaves like {@linkcode append}, but without the `subtle` argument. If
|
|
378
|
+
* `addFootnoted` is called with `subtle: false`, then the callback will never be called, so
|
|
379
|
+
* there is no need to pass the `subtle` argument again.
|
|
380
|
+
*
|
|
381
|
+
* The `add` callback is responsible for appending the footnote itself to the buffer. The first
|
|
382
|
+
* parameter to `add` (`useNumber`) specifies whether the caller has used the footnote number
|
|
383
|
+
* to refer to the footnote.
|
|
384
|
+
*
|
|
385
|
+
* This is typically true, but fragments can specify an alternative annotation that should be used
|
|
386
|
+
* instead of the default footnote number. In that case, the footnote number is not used, and the
|
|
387
|
+
* next footnote is free to use it.
|
|
388
|
+
*
|
|
389
|
+
* The `add` callback also takes a template string and an optional list of substitutions, which
|
|
390
|
+
* describe the way the footnote itself should be formatted.
|
|
391
|
+
*/
|
|
392
|
+
addFootnoted(subtle, add) {
|
|
393
|
+
if (subtle && !this.#options.showSubtle) return;
|
|
394
|
+
const child = new LogFragmentBuffer(this.#options);
|
|
395
|
+
const style = ANNOTATION_STYLES[this.#style++ % ANNOTATION_STYLES.length];
|
|
396
|
+
const usedNumber = add({
|
|
397
|
+
n: this.#nextFootnote,
|
|
398
|
+
style
|
|
399
|
+
}, child);
|
|
400
|
+
if (usedNumber) {
|
|
401
|
+
this.#nextFootnote += 1;
|
|
402
|
+
}
|
|
403
|
+
this.#footnotes.push({
|
|
404
|
+
type: 'line',
|
|
405
|
+
subtle: false,
|
|
406
|
+
template: child.#template,
|
|
407
|
+
substitutions: child.#substitutions
|
|
408
|
+
});
|
|
409
|
+
this.#footnotes.push(...child.#footnotes);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Append a fragment to the current buffer.
|
|
414
|
+
*
|
|
415
|
+
* If the `subtle` option is set, the fragment will only be printed if the buffer is configured
|
|
416
|
+
* to show subtle content.
|
|
417
|
+
*/
|
|
418
|
+
append(subtle, template, ...substitutions) {
|
|
419
|
+
if (subtle && !this.#options.showSubtle) return;
|
|
420
|
+
this.#template += template;
|
|
421
|
+
this.#substitutions.push(...substitutions);
|
|
422
|
+
}
|
|
423
|
+
#mapLine(line) {
|
|
424
|
+
if (line.subtle && !this.#options.showSubtle) return [];
|
|
425
|
+
return [{
|
|
426
|
+
type: 'line',
|
|
427
|
+
line: [line.template, ...line.substitutions]
|
|
428
|
+
}];
|
|
429
|
+
}
|
|
430
|
+
flush() {
|
|
431
|
+
return [{
|
|
432
|
+
type: 'line',
|
|
433
|
+
line: [this.#template, ...this.#substitutions]
|
|
434
|
+
}, ...this.#footnotes.flatMap(queued => this.#mapLine(queued))];
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// inspired by https://github.com/ChromeDevTools/devtools-frontend/blob/c2c17396c9e0da3f1ce6514c3a946f88a06b17f2/front_end/ui/legacy/themeColors.css#L65
|
|
439
|
+
const STYLES = {
|
|
440
|
+
var: 'color: grey',
|
|
441
|
+
varReference: 'color: blue; text-decoration: underline',
|
|
442
|
+
varBinding: 'color: blue;',
|
|
443
|
+
specialVar: 'color: blue',
|
|
444
|
+
prop: 'color: grey',
|
|
445
|
+
specialProp: 'color: red',
|
|
446
|
+
token: 'color: green',
|
|
447
|
+
def: 'color: blue',
|
|
448
|
+
builtin: 'color: blue',
|
|
449
|
+
punct: 'color: GrayText',
|
|
450
|
+
kw: 'color: rgb(185 0 99 / 100%);',
|
|
451
|
+
type: 'color: teal',
|
|
452
|
+
number: 'color: blue',
|
|
453
|
+
string: 'color: red',
|
|
454
|
+
null: 'color: grey',
|
|
455
|
+
specialString: 'color: darkred',
|
|
456
|
+
atom: 'color: blue',
|
|
457
|
+
attrName: 'color: orange',
|
|
458
|
+
attrValue: 'color: blue',
|
|
459
|
+
boolean: 'color: blue',
|
|
460
|
+
comment: 'color: green',
|
|
461
|
+
meta: 'color: grey',
|
|
462
|
+
register: 'color: purple',
|
|
463
|
+
constant: 'color: purple',
|
|
464
|
+
dim: 'color: grey',
|
|
465
|
+
internals: 'color: lightgrey; font-style: italic',
|
|
466
|
+
diffAdd: 'color: Highlight',
|
|
467
|
+
diffDelete: 'color: SelectedItemText; background-color: SelectedItem',
|
|
468
|
+
diffChange: 'color: MarkText; background-color: Mark',
|
|
469
|
+
sublabel: 'font-style: italic; color: grey',
|
|
470
|
+
error: 'color: red',
|
|
471
|
+
label: 'text-decoration: underline',
|
|
472
|
+
errorLabel: 'color: darkred; font-style: italic',
|
|
473
|
+
errorMessage: 'color: darkred; text-decoration: underline',
|
|
474
|
+
stack: 'color: grey; font-style: italic',
|
|
475
|
+
unbold: 'font-weight: normal',
|
|
476
|
+
pointer: 'background-color: lavender; color: indigo',
|
|
477
|
+
pointee: 'background-color: lavender; color: indigo',
|
|
478
|
+
focus: 'font-weight: bold',
|
|
479
|
+
focusColor: 'background-color: lightred; color: darkred'
|
|
480
|
+
};
|
|
481
|
+
function mergeStyle(a, b) {
|
|
482
|
+
if (a && b) {
|
|
483
|
+
return `${a}; ${b}`;
|
|
484
|
+
} else {
|
|
485
|
+
return a || b;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
function intoFormat(format) {
|
|
490
|
+
if (typeof format === 'string') {
|
|
491
|
+
return {
|
|
492
|
+
style: STYLES[format]
|
|
493
|
+
};
|
|
494
|
+
} else {
|
|
495
|
+
return format;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
function formats(...formats) {
|
|
499
|
+
return formats.map(c => intoFormat(c).style).join('; ');
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
const FORMATTERS = {
|
|
503
|
+
value: '%O',
|
|
504
|
+
string: '%s',
|
|
505
|
+
integer: '%d',
|
|
506
|
+
float: '%f',
|
|
507
|
+
special: '%o'
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* A leaf fragment that represents an arbitrary value.
|
|
512
|
+
*
|
|
513
|
+
* When the value is a primitive, the fragment is appended to the buffer as if it was an instance of
|
|
514
|
+
* the appropriate leaf fragment type (e.g. strings are appended as if they were `StringFragment`).
|
|
515
|
+
*
|
|
516
|
+
* Otherwise, `ValueFragment` is appended to the current line as a footnote reference and the value
|
|
517
|
+
* itself is appended to a later line that *defines* the footnote using the `%O` format specifier.
|
|
518
|
+
*/
|
|
519
|
+
|
|
520
|
+
/**
|
|
521
|
+
* A leaf fragment that represents a string value.
|
|
522
|
+
*
|
|
523
|
+
* Corresponds to the `%s` format specifier.
|
|
524
|
+
*/
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* A leaf fragment that represents an integer value.
|
|
528
|
+
*
|
|
529
|
+
* Corresponds to the `%d` format specifier.
|
|
530
|
+
*/
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* A leaf fragment that represents a float value.
|
|
534
|
+
*
|
|
535
|
+
* Corresponds to the `%f` format specifier.
|
|
536
|
+
*/
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* A leaf fragment that represents a DOM node.
|
|
540
|
+
*
|
|
541
|
+
* Corresponds to the `%o` format specifier.
|
|
542
|
+
*/
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* The list of leaf fragment types correspond exactly to the list of console.log
|
|
546
|
+
* format specifiers.
|
|
547
|
+
*/
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* @import { StyleName } from './styles';
|
|
551
|
+
*/
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Fragment is the most fundamental building block of the debug logger.
|
|
555
|
+
*
|
|
556
|
+
*/
|
|
557
|
+
class Fragment {
|
|
558
|
+
static integer(value, options) {
|
|
559
|
+
return new Fragment({
|
|
560
|
+
kind: 'integer',
|
|
561
|
+
value,
|
|
562
|
+
...options
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
static float(value, options) {
|
|
566
|
+
return new Fragment({
|
|
567
|
+
kind: 'float',
|
|
568
|
+
value,
|
|
569
|
+
...options
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
static string(value, options) {
|
|
573
|
+
return new Fragment({
|
|
574
|
+
kind: 'string',
|
|
575
|
+
value,
|
|
576
|
+
...options
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
static special(value, options) {
|
|
580
|
+
return new Fragment({
|
|
581
|
+
kind: 'special',
|
|
582
|
+
value,
|
|
583
|
+
...options
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
#type;
|
|
587
|
+
constructor(type) {
|
|
588
|
+
this.#type = type;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* A subtle fragment is only printed if the `showSubtle` option is set.
|
|
593
|
+
*
|
|
594
|
+
* Returns true if this fragment is a subtle leaf or is a multi fragment
|
|
595
|
+
* with all subtle leaves.
|
|
596
|
+
*/
|
|
597
|
+
isSubtle() {
|
|
598
|
+
return this.leaves().every(leaf => leaf.#type.subtle);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* If the current fragment is not empty, apply `ifPresent` to the current
|
|
603
|
+
* fragment. Otherwise, do nothing.
|
|
604
|
+
*
|
|
605
|
+
* If the current fragment is subtle, the result is also subtle.
|
|
606
|
+
*/
|
|
607
|
+
map(ifPresent) {
|
|
608
|
+
if (this.isEmpty()) return this;
|
|
609
|
+
const fragment = ifPresent(this);
|
|
610
|
+
return this.isSubtle() ? fragment.subtle() : fragment;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* A fragment is empty if it should not be printed with the provided display options.
|
|
615
|
+
*
|
|
616
|
+
* This means that if a fragment is subtle and `showSubtle` is false, the fragment is empty.
|
|
617
|
+
*/
|
|
618
|
+
isEmpty(options = {
|
|
619
|
+
showSubtle: true
|
|
620
|
+
}) {
|
|
621
|
+
return this.leaves().every(leaf => !leaf.#shouldShow(options));
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Returns an array of {@linkcode LeafFragment}s that make up the current
|
|
626
|
+
* fragment.
|
|
627
|
+
*
|
|
628
|
+
* This effectively flattens any number of nested multi-fragments into a flat array of leaf
|
|
629
|
+
* fragments.
|
|
630
|
+
*/
|
|
631
|
+
leaves() {
|
|
632
|
+
if (this.#type.kind === 'multi') {
|
|
633
|
+
return this.#type.value.flatMap(f => f.leaves());
|
|
634
|
+
} else if (this.#type.kind === 'string' && this.#type.value === '') {
|
|
635
|
+
return [];
|
|
636
|
+
} else {
|
|
637
|
+
return [this];
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Returns a fragment with the specified subtle status without mutating the current fragment.
|
|
643
|
+
*
|
|
644
|
+
* If `isSubtle` is true, the fragment will also be styled with the `subtle` style.
|
|
645
|
+
*/
|
|
646
|
+
subtle(isSubtle = true) {
|
|
647
|
+
if (!this.isSubtle() && !isSubtle) {
|
|
648
|
+
return this;
|
|
649
|
+
}
|
|
650
|
+
const fragment = this.#subtle(isSubtle);
|
|
651
|
+
return isSubtle ? fragment.styleAll('dim') : fragment;
|
|
652
|
+
}
|
|
653
|
+
#subtle(isSubtle) {
|
|
654
|
+
if (this.#type.kind === 'multi') {
|
|
655
|
+
return new Fragment({
|
|
656
|
+
...this.#type,
|
|
657
|
+
value: this.leaves().flatMap(f => f.subtle(isSubtle).leaves())
|
|
658
|
+
});
|
|
659
|
+
} else {
|
|
660
|
+
return new Fragment({
|
|
661
|
+
...this.#type,
|
|
662
|
+
subtle: isSubtle
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Apply the specified styles to the current fragment (if it's a leaf) or all
|
|
669
|
+
* of its children (if it's a multi-fragment).
|
|
670
|
+
*
|
|
671
|
+
* Keep in mind that merging styles might be very difficult to undo, so treat
|
|
672
|
+
* this as a low-level operation, and prefer to use higher-level concepts like
|
|
673
|
+
* `subtle` if you can instead.
|
|
674
|
+
*/
|
|
675
|
+
styleAll(...allFormats) {
|
|
676
|
+
if (allFormats.length === 0) return this;
|
|
677
|
+
if (this.#type.kind === 'multi') {
|
|
678
|
+
return new Fragment({
|
|
679
|
+
...this.#type,
|
|
680
|
+
value: this.#type.value.flatMap(f => f.styleAll(...allFormats).leaves())
|
|
681
|
+
});
|
|
682
|
+
} else {
|
|
683
|
+
return new Fragment({
|
|
684
|
+
...this.#type,
|
|
685
|
+
style: mergeStyle(this.#type.style, formats(...allFormats))
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Convert the current fragment into a string with no additional formatting.
|
|
692
|
+
* The primary purpose for this method is to support converting a fragment
|
|
693
|
+
* into a string for inclusion in thrown Errors. If you're going to *log*
|
|
694
|
+
* a fragment, log it using `DebugLogger` and don't convert it to
|
|
695
|
+
* a string first.
|
|
696
|
+
*/
|
|
697
|
+
stringify(options) {
|
|
698
|
+
return this.leaves().filter(leaf => leaf.#shouldShow(options)).map(leaf => {
|
|
699
|
+
const fragment = leaf.#type;
|
|
700
|
+
if (fragment.kind === 'value') {
|
|
701
|
+
return `<object>`;
|
|
702
|
+
} else {
|
|
703
|
+
// eslint-disable-next-line @typescript-eslint/no-base-to-string -- @fixme
|
|
704
|
+
return String(fragment.value);
|
|
705
|
+
}
|
|
706
|
+
}).join('');
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Should the current fragment be printed with the provided display options?
|
|
711
|
+
*
|
|
712
|
+
* Importantly, if the current fragment contains subtle content but the `showSubtle` option is
|
|
713
|
+
* false, `#shouldShow` will return false.
|
|
714
|
+
*
|
|
715
|
+
* @see isEmpty
|
|
716
|
+
*/
|
|
717
|
+
#shouldShow(options) {
|
|
718
|
+
return this.leaves().some(leaf => {
|
|
719
|
+
const fragment = leaf.#type;
|
|
720
|
+
if (fragment.subtle && !options.showSubtle) {
|
|
721
|
+
return false;
|
|
722
|
+
} else if (fragment.kind === 'string' && fragment.value === '') {
|
|
723
|
+
return false;
|
|
724
|
+
}
|
|
725
|
+
return true;
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Convert this fragment into a Loggable for logging through the `DebugLogger`.
|
|
731
|
+
*/
|
|
732
|
+
toLoggable(options) {
|
|
733
|
+
const buffer = new LogFragmentBuffer(options);
|
|
734
|
+
for (const leaf of this.leaves()) {
|
|
735
|
+
leaf.appendTo(buffer);
|
|
736
|
+
}
|
|
737
|
+
return buffer.flush();
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Append this fragment to the low-level `LogFragmentBuffer`.
|
|
742
|
+
*/
|
|
743
|
+
appendTo(buffer) {
|
|
744
|
+
const fragment = this.#type;
|
|
745
|
+
const subtle = this.isSubtle();
|
|
746
|
+
|
|
747
|
+
// If the fragment is a multi fragment, append each of its leaves to the buffer
|
|
748
|
+
// and return.
|
|
749
|
+
if (fragment.kind === 'multi') {
|
|
750
|
+
for (const f of fragment.value) {
|
|
751
|
+
f.appendTo(buffer);
|
|
752
|
+
}
|
|
753
|
+
return;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
// If the fragment is a value fragment and the value is a primitive, give it special
|
|
757
|
+
// treatment since we can trivially serialize it.
|
|
758
|
+
if (fragment.kind === 'value') {
|
|
759
|
+
// If the value is a string or number, convert it into a string, float or integer
|
|
760
|
+
// fragment and append that instead. This means that strings and numbers are
|
|
761
|
+
// represented the same way in logs whether they are explicitly created as string,
|
|
762
|
+
// float or integer fragments *or* whether they are the value of a value fragment.
|
|
763
|
+
if (typeof fragment.value === 'string') {
|
|
764
|
+
return Fragment.string(JSON.stringify(fragment.value), {
|
|
765
|
+
style: STYLES.string,
|
|
766
|
+
subtle
|
|
767
|
+
}).appendTo(buffer);
|
|
768
|
+
} else if (typeof fragment.value === 'number') {
|
|
769
|
+
const f = fragment.value % 1 === 0 ? Fragment.integer : Fragment.float;
|
|
770
|
+
return f(fragment.value, {
|
|
771
|
+
style: STYLES.number,
|
|
772
|
+
subtle
|
|
773
|
+
}).appendTo(buffer);
|
|
774
|
+
|
|
775
|
+
// Alternatively, if the value of a `value` fragment is `null` or `undefined`,
|
|
776
|
+
// append the string `null` or `undefined`, respectively with the `null` style.
|
|
777
|
+
} else if (fragment.value === null || fragment.value === undefined) {
|
|
778
|
+
return Fragment.string('null', {
|
|
779
|
+
style: STYLES.null,
|
|
780
|
+
subtle: this.isSubtle()
|
|
781
|
+
}).appendTo(buffer);
|
|
782
|
+
|
|
783
|
+
// Finally, if the value of a `value` fragment is boolean, append the string
|
|
784
|
+
// `true` or `false` with the `boolean` style.
|
|
785
|
+
} else if (typeof fragment.value === 'boolean') {
|
|
786
|
+
return Fragment.string(String(fragment.value), {
|
|
787
|
+
style: STYLES.boolean,
|
|
788
|
+
subtle
|
|
789
|
+
}).appendTo(buffer);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
// All other values (i.e. objects and functions) are represented as footnotes and
|
|
793
|
+
// are handled below.
|
|
794
|
+
}
|
|
795
|
+
switch (fragment.kind) {
|
|
796
|
+
// strings are appended using %s
|
|
797
|
+
case 'string':
|
|
798
|
+
// integers are appended using %d
|
|
799
|
+
case 'integer':
|
|
800
|
+
// floats are appended using %f
|
|
801
|
+
case 'float':
|
|
802
|
+
buffer.append(fragment.subtle ?? false, `%c${FORMATTERS[fragment.kind]}`, fragment.style, fragment.value);
|
|
803
|
+
break;
|
|
804
|
+
// the remaining value types are represented as footnotes
|
|
805
|
+
// dom nodes are appended to the footnote line using %o
|
|
806
|
+
case 'special':
|
|
807
|
+
// values are appended to the footnote line using %O
|
|
808
|
+
case 'value':
|
|
809
|
+
{
|
|
810
|
+
// If a fragment has an associated annotation, we'll use the annotation as the
|
|
811
|
+
// footnote rather than the footnote number.
|
|
812
|
+
const override = fragment.kind === 'value' ? fragment.display : undefined;
|
|
813
|
+
buffer.addFootnoted(fragment.subtle ?? false, ({
|
|
814
|
+
n,
|
|
815
|
+
style
|
|
816
|
+
}, footnote) => {
|
|
817
|
+
const appendValueAsFootnote = ref => void footnote.append(subtle, `%c| %c[${ref}]%c ${FORMATTERS[fragment.kind]}`, STYLES.dim, style, '', fragment.value);
|
|
818
|
+
if (override) {
|
|
819
|
+
if ('inline' in override) {
|
|
820
|
+
override.inline.subtle(subtle).appendTo(footnote);
|
|
821
|
+
return false;
|
|
822
|
+
}
|
|
823
|
+
buffer.append(subtle, `%c[${override.ref}]%c`, style, '');
|
|
824
|
+
if (override.footnote) {
|
|
825
|
+
frag`${as.dim('| ')}${override.footnote}`.subtle(subtle).appendTo(footnote);
|
|
826
|
+
} else {
|
|
827
|
+
appendValueAsFootnote(override.ref);
|
|
828
|
+
}
|
|
829
|
+
return false;
|
|
830
|
+
}
|
|
831
|
+
buffer.append(subtle, `%c[${n}]%c`, style, '');
|
|
832
|
+
appendValueAsFootnote(String(n));
|
|
833
|
+
return true;
|
|
834
|
+
});
|
|
835
|
+
break;
|
|
836
|
+
}
|
|
837
|
+
default:
|
|
838
|
+
assertNever(fragment);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
function intoFragment(value) {
|
|
843
|
+
const fragments = intoFragments(value);
|
|
844
|
+
const [first, ...rest] = fragments;
|
|
845
|
+
if (first !== undefined && rest.length === 0) {
|
|
846
|
+
return first;
|
|
847
|
+
}
|
|
848
|
+
return new Fragment({
|
|
849
|
+
kind: 'multi',
|
|
850
|
+
value: fragments
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
function intoFragments(value) {
|
|
854
|
+
if (Array.isArray(value)) {
|
|
855
|
+
return value.flatMap(intoFragments);
|
|
856
|
+
} else if (typeof value === 'object' && value !== null) {
|
|
857
|
+
return value.leaves();
|
|
858
|
+
} else {
|
|
859
|
+
return [intoLeafFragment(value)];
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
function intoLeafFragment(value) {
|
|
863
|
+
if (value === null) {
|
|
864
|
+
return new Fragment({
|
|
865
|
+
kind: 'value',
|
|
866
|
+
value: null
|
|
867
|
+
});
|
|
868
|
+
} else if (typeof value === 'number') {
|
|
869
|
+
return new Fragment({
|
|
870
|
+
kind: 'integer',
|
|
871
|
+
value
|
|
872
|
+
});
|
|
873
|
+
} else if (typeof value === 'string') {
|
|
874
|
+
// If the string contains only whitespace and punctuation, we can treat it as a
|
|
875
|
+
// punctuation fragment.
|
|
876
|
+
if (/^[\s\p{P}\p{Sm}]*$/u.test(value)) {
|
|
877
|
+
return new Fragment({
|
|
878
|
+
kind: 'string',
|
|
879
|
+
value,
|
|
880
|
+
style: STYLES.punct
|
|
881
|
+
});
|
|
882
|
+
} else {
|
|
883
|
+
return new Fragment({
|
|
884
|
+
kind: 'string',
|
|
885
|
+
value
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
} else {
|
|
889
|
+
return value;
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
function frag(strings, ...values) {
|
|
893
|
+
const buffer = [];
|
|
894
|
+
strings.forEach((string, i) => {
|
|
895
|
+
buffer.push(...intoFragment(string).leaves());
|
|
896
|
+
const dynamic = values[i];
|
|
897
|
+
if (dynamic) {
|
|
898
|
+
buffer.push(...intoFragment(dynamic).leaves());
|
|
899
|
+
}
|
|
900
|
+
});
|
|
901
|
+
return new Fragment({
|
|
902
|
+
kind: 'multi',
|
|
903
|
+
value: buffer
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
const as = Object.fromEntries(Object.entries(STYLES).map(([k, v]) => [k, value => intoFragment(value).styleAll({
|
|
907
|
+
style: v
|
|
908
|
+
})]));
|
|
909
|
+
|
|
910
|
+
export { VM_CLOSE_ELEMENT_OP as $, isHandle as A, decodeImmediate as B, CURRIED_COMPONENT as C, VM_PRIMITIVE_REFERENCE_OP as D, VM_DUP_OP as E, VM_POP_OP as F, VM_LOAD_OP as G, VM_FETCH_OP as H, VM_BIND_DYNAMIC_SCOPE_OP as I, VM_ENTER_OP as J, VM_EXIT_OP as K, VM_PUSH_SYMBOL_TABLE_OP as L, VM_PUSH_BLOCK_SCOPE_OP as M, VM_COMPILE_BLOCK_OP as N, VM_INVOKE_YIELD_OP as O, VM_JUMP_IF_OP as P, VM_JUMP_UNLESS_OP as Q, VM_JUMP_EQ_OP as R, VM_TO_BOOLEAN_OP as S, VM_TEXT_OP as T, VM_COMMENT_OP as U, VM_MAIN_OP as V, VM_OPEN_ELEMENT_OP as W, VM_OPEN_DYNAMIC_ELEMENT_OP as X, VM_PUSH_REMOTE_ELEMENT_OP as Y, VM_POP_REMOTE_ELEMENT_OP as Z, VM_FLUSH_ELEMENT_OP as _, VM_CONTENT_TYPE_OP as a, VM_MODIFIER_OP as a0, VM_DYNAMIC_MODIFIER_OP as a1, VM_STATIC_ATTR_OP as a2, VM_DYNAMIC_ATTR_OP as a3, CURRIED_MODIFIER as a4, VM_PUSH_COMPONENT_DEFINITION_OP as a5, VM_RESOLVE_DYNAMIC_COMPONENT_OP as a6, VM_PUSH_ARGS_OP as a7, VM_PUSH_EMPTY_ARGS_OP as a8, VM_CAPTURE_ARGS_OP as a9, VM_GET_PROPERTY_OP as aA, VM_GET_BLOCK_OP as aB, VM_SPREAD_BLOCK_OP as aC, VM_HAS_BLOCK_OP as aD, VM_HAS_BLOCK_PARAMS_OP as aE, VM_CONCAT_OP as aF, VM_IF_INLINE_OP as aG, VM_NOT_OP as aH, VM_GET_DYNAMIC_VAR_OP as aI, VM_LOG_OP as aJ, VM_DYNAMIC_CONTENT_TYPE_OP as aK, VM_DEBUGGER_OP as aL, VM_ENTER_LIST_OP as aM, VM_EXIT_LIST_OP as aN, VM_ITERATE_OP as aO, encodeHandle as aP, isMachineOp as aQ, isSmallInt as aR, encodeImmediate as aS, VM_PREPARE_ARGS_OP as aa, VM_CREATE_COMPONENT_OP as ab, VM_REGISTER_COMPONENT_DESTRUCTOR_OP as ac, VM_BEGIN_COMPONENT_TRANSACTION_OP as ad, VM_PUT_COMPONENT_OPERATIONS_OP as ae, VM_COMPONENT_ATTR_OP as af, VM_STATIC_COMPONENT_ATTR_OP as ag, VM_DID_CREATE_ELEMENT_OP as ah, VM_GET_COMPONENT_SELF_OP as ai, VM_GET_COMPONENT_TAG_NAME_OP as aj, VM_GET_COMPONENT_LAYOUT_OP as ak, VM_POPULATE_LAYOUT_OP as al, VM_VIRTUAL_ROOT_SCOPE_OP as am, VM_SET_NAMED_VARIABLES_OP as an, VM_SET_BLOCKS_OP as ao, VM_INVOKE_COMPONENT_LAYOUT_OP as ap, VM_DID_RENDER_LAYOUT_OP as aq, VM_COMMIT_COMPONENT_TRANSACTION_OP as ar, VM_CURRY_OP as as, VM_DYNAMIC_HELPER_OP as at, CURRIED_HELPER as au, VM_HELPER_OP as av, VM_GET_VARIABLE_OP as aw, VM_SET_VARIABLE_OP as ax, VM_SET_BLOCK_OP as ay, VM_ROOT_SCOPE_OP as az, VM_ASSERT_SAME_OP as b, constants as c, VM_APPEND_HTML_OP as d, VM_APPEND_TEXT_OP as e, VM_RESOLVE_CURRIED_COMPONENT_OP as f, VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP as g, VM_APPEND_SAFE_HTML_OP as h, VM_APPEND_DOCUMENT_FRAGMENT_OP as i, VM_APPEND_NODE_OP as j, VM_INVOKE_STATIC_OP as k, VM_RETURN_TO_OP as l, VM_RETURN_OP as m, VM_JUMP_OP as n, VM_INVOKE_VIRTUAL_OP as o, VM_POP_FRAME_OP as p, VM_PUSH_FRAME_OP as q, VM_SYSCALL_SIZE as r, VM_CHILD_SCOPE_OP as s, VM_POP_SCOPE_OP as t, VM_PUSH_DYNAMIC_SCOPE_OP as u, VM_POP_DYNAMIC_SCOPE_OP as v, VM_CONSTANT_OP as w, decodeHandle as x, VM_CONSTANT_REFERENCE_OP as y, VM_PRIMITIVE_OP as z };
|