ember-source 7.3.0-alpha.5 → 7.4.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/build-metadata.json +3 -3
- package/dist/dev/packages/@ember/-internals/deprecations/index.js +9 -0
- package/dist/dev/packages/@ember/-internals/glimmer/index.js +7 -7
- package/dist/dev/packages/@ember/-internals/routing/index.js +2 -2
- package/dist/dev/packages/@ember/-internals/runtime/index.js +1 -1
- package/dist/dev/packages/@ember/-internals/runtime/lib/ext/rsvp.js +1 -1
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +4 -0
- package/dist/dev/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -0
- package/dist/dev/packages/@ember/-internals/views/lib/mixins/action_support.js +2 -0
- package/dist/dev/packages/@ember/application/index.js +3 -3
- package/dist/dev/packages/@ember/application/instance.js +9 -9
- package/dist/dev/packages/@ember/component/helper.js +2 -2
- package/dist/dev/packages/@ember/component/index.js +3 -3
- package/dist/dev/packages/@ember/engine/index.js +3 -3
- package/dist/dev/packages/@ember/engine/instance.js +1 -1
- package/dist/dev/packages/@ember/helper/index.js +1132 -79
- package/dist/dev/packages/@ember/modifier/on.js +1 -1
- package/dist/dev/packages/@ember/object/compat.js +0 -32
- package/dist/dev/packages/@ember/renderer/index.js +1 -1
- package/dist/dev/packages/@ember/routing/-internals.js +2 -2
- package/dist/dev/packages/@ember/routing/index.js +11 -28
- package/dist/dev/packages/@ember/routing/lib/utils.js +2 -2
- package/dist/dev/packages/@ember/routing/route.js +2 -2
- package/dist/dev/packages/@ember/routing/router-service.js +9 -9
- package/dist/dev/packages/@ember/routing/router.js +2 -2
- package/dist/dev/packages/@ember/template-compiler/lib/compile-options.js +3 -3
- package/dist/dev/packages/@ember/template-compiler/lib/template.js +2 -2
- package/dist/dev/packages/@ember/template-factory/index.js +1 -1
- package/dist/dev/packages/@glimmer/opcode-compiler/index.js +2 -2
- package/dist/dev/packages/@glimmer/program/index.js +3 -3
- package/dist/dev/packages/@glimmer/runtime/index.js +7 -7
- package/dist/dev/packages/@glimmer/wire-format/index.js +2 -5
- package/dist/dev/packages/ember/version.js +1 -1
- package/dist/dev/packages/ember-template-compiler/index.js +2 -2
- package/dist/dev/packages/router_js/index.js +2 -2
- package/dist/dev/packages/rsvp/index.js +1 -2281
- package/dist/dev/packages/shared-chunks/{arguments-CDkbOqTS.js → arguments-DniR8eF2.js} +5 -18
- package/dist/dev/packages/shared-chunks/{compiler-QUSl_urU.js → compiler-BHFFl-fv.js} +1 -1
- package/dist/dev/packages/shared-chunks/{curly-BbL6STF2.js → curly-BCD_vyHq.js} +1 -1
- package/dist/dev/packages/shared-chunks/{element-BYLB-q7a.js → element-Cgoi4ldD.js} +0 -24
- package/dist/dev/packages/shared-chunks/get-zsePWrJL.js +40 -0
- package/dist/dev/packages/shared-chunks/hash-BFu91gtE.js +57 -0
- package/dist/dev/packages/shared-chunks/{index-DaFzpTIE.js → index-BYUSIu_W.js} +3 -3
- package/dist/dev/packages/shared-chunks/{index-Czn34wUZ.js → index-Bv9SQpEx.js} +218 -78
- package/dist/dev/packages/shared-chunks/{invoke-d9sqa50M.js → invoke-CgF42joE.js} +1 -1
- package/dist/dev/packages/shared-chunks/{not-DYh6AY9Z.js → not-0cVb-rLf.js} +1 -1
- package/dist/dev/packages/shared-chunks/{on-DlF0Wy7P.js → on-CVIjn2C-.js} +22 -11
- package/dist/dev/packages/shared-chunks/{opcodes-CplRyHl_.js → opcodes-DDajoGhq.js} +0 -4
- package/dist/dev/packages/shared-chunks/{outlet-B4qORyui.js → outlet-BO5-QFmm.js} +3 -3
- package/dist/dev/packages/shared-chunks/{program-context-Dq8xN2HI.js → program-context-BBB1Ga5h.js} +2 -2
- package/dist/dev/packages/shared-chunks/{render-CtH73XOv.js → render-D_Rawf-r.js} +2 -2
- package/dist/{prod/packages/shared-chunks/rsvp.es-DR7yS7qg.js → dev/packages/shared-chunks/rsvp-aLN_pQtn.js} +152 -148
- package/dist/dev/packages/shared-chunks/{setup-registry-h519ZsHS.js → setup-registry-Ci8Af2Bz.js} +35 -13
- package/dist/{prod/packages/shared-chunks/syscall-ops-CN7STuUn.js → dev/packages/shared-chunks/syscall-ops-CkPT1Kfx.js} +1 -2
- package/dist/dev/packages/shared-chunks/{textarea-DEvw4ezm.js → textarea-DvS6Xmdh.js} +3 -23
- package/dist/dev/packages/shared-chunks/{unique-id-DQOhouG1.js → unique-id-Csxuh1I7.js} +0 -4
- package/dist/dev/packages/shared-chunks/{unrecognized-url-error-B8loxkay.js → unrecognized-url-error-cXUp-SK3.js} +1 -1
- package/dist/prod/packages/@ember/-internals/deprecations/index.js +9 -0
- package/dist/prod/packages/@ember/-internals/glimmer/index.js +7 -7
- package/dist/prod/packages/@ember/-internals/routing/index.js +2 -2
- package/dist/prod/packages/@ember/-internals/runtime/index.js +1 -1
- package/dist/prod/packages/@ember/-internals/runtime/lib/ext/rsvp.js +1 -1
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/action_handler.js +4 -0
- package/dist/prod/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -0
- package/dist/prod/packages/@ember/-internals/views/lib/mixins/action_support.js +2 -0
- package/dist/prod/packages/@ember/application/index.js +3 -3
- package/dist/prod/packages/@ember/application/instance.js +9 -9
- package/dist/prod/packages/@ember/component/helper.js +2 -2
- package/dist/prod/packages/@ember/component/index.js +3 -3
- package/dist/prod/packages/@ember/engine/index.js +3 -3
- package/dist/prod/packages/@ember/engine/instance.js +1 -1
- package/dist/prod/packages/@ember/helper/index.js +1132 -79
- package/dist/prod/packages/@ember/modifier/on.js +1 -1
- package/dist/prod/packages/@ember/object/compat.js +0 -32
- package/dist/prod/packages/@ember/renderer/index.js +1 -1
- package/dist/prod/packages/@ember/routing/index.js +10 -27
- package/dist/prod/packages/@ember/routing/lib/utils.js +2 -2
- package/dist/prod/packages/@ember/routing/route.js +2 -2
- package/dist/prod/packages/@ember/routing/router-service.js +9 -9
- package/dist/prod/packages/@ember/routing/router.js +2 -2
- package/dist/prod/packages/@ember/template-compiler/lib/compile-options.js +3 -3
- package/dist/prod/packages/@ember/template-compiler/lib/template.js +2 -2
- package/dist/prod/packages/@ember/template-factory/index.js +1 -1
- package/dist/prod/packages/@glimmer/opcode-compiler/index.js +2 -2
- package/dist/prod/packages/@glimmer/program/index.js +3 -3
- package/dist/prod/packages/@glimmer/runtime/index.js +7 -7
- package/dist/prod/packages/@glimmer/wire-format/index.js +2 -5
- package/dist/prod/packages/ember/version.js +1 -1
- package/dist/prod/packages/ember-template-compiler/index.js +2 -2
- package/dist/prod/packages/router_js/index.js +2 -2
- package/dist/prod/packages/rsvp/index.js +1 -2281
- package/dist/prod/packages/shared-chunks/{arguments-BzAkZVBa.js → arguments-CCYATlEH.js} +1 -18
- package/dist/prod/packages/shared-chunks/{compiler-lBSssiWp.js → compiler-Wt5SWcrF.js} +1 -1
- package/dist/prod/packages/shared-chunks/{curly-CU2jYOtm.js → curly-CdvJuTyW.js} +1 -1
- package/dist/prod/packages/shared-chunks/{element-DgHdPZ8u.js → element-BmBjPjkQ.js} +0 -24
- package/dist/prod/packages/shared-chunks/get-CEjFJzGs.js +40 -0
- package/dist/prod/packages/shared-chunks/hash-BitfXhCx.js +57 -0
- package/dist/prod/packages/shared-chunks/{index-XmtQRWbX.js → index-D8cl-pfl.js} +218 -78
- package/dist/prod/packages/shared-chunks/{index-Bf53M8eS.js → index-kwuZeaNz.js} +3 -3
- package/dist/prod/packages/shared-chunks/{invoke-DhQ5QRp2.js → invoke-4JGJYH7Z.js} +1 -1
- package/dist/prod/packages/shared-chunks/{not-BOIVROuv.js → not-Dn5s9qVZ.js} +1 -1
- package/dist/prod/packages/shared-chunks/{on-BZHAxzdq.js → on-ov4KAucw.js} +22 -11
- package/dist/prod/packages/shared-chunks/{opcodes-CplRyHl_.js → opcodes-DDajoGhq.js} +0 -4
- package/dist/prod/packages/shared-chunks/{outlet-CsNMfeOj.js → outlet-BWnaVOrA.js} +3 -3
- package/dist/prod/packages/shared-chunks/{program-context-COSioH46.js → program-context-WVlzpPdi.js} +2 -2
- package/dist/prod/packages/shared-chunks/{render-Bf7GviCY.js → render-BAVl5E6X.js} +2 -2
- package/dist/{dev/packages/shared-chunks/rsvp.es-DR7yS7qg.js → prod/packages/shared-chunks/rsvp-aLN_pQtn.js} +152 -148
- package/dist/prod/packages/shared-chunks/{setup-registry-DFSQHIUs.js → setup-registry-DeyoFe6Q.js} +35 -13
- package/dist/{dev/packages/shared-chunks/syscall-ops-CN7STuUn.js → prod/packages/shared-chunks/syscall-ops-CkPT1Kfx.js} +1 -2
- package/dist/prod/packages/shared-chunks/{textarea-DMmdvgk2.js → textarea-B-sssXGa.js} +3 -23
- package/dist/prod/packages/shared-chunks/{unique-id-o2pS74go.js → unique-id-BJb1p8EG.js} +0 -4
- package/dist/prod/packages/shared-chunks/{unrecognized-url-error-jjQ-FqKB.js → unrecognized-url-error-xC654tCo.js} +1 -1
- package/docs/data.json +1237 -1395
- package/package.json +52 -47
- package/types/stable/@ember/-internals/deprecations/index.d.ts +6 -0
- package/types/stable/@ember/-internals/glimmer/index.d.ts +7 -380
- package/types/stable/@ember/-internals/glimmer/lib/component.d.ts +1 -1
- package/types/stable/@ember/-internals/glimmer/lib/helper.d.ts +2 -2
- package/types/stable/@ember/-internals/glimmer/lib/helpers/each-in.d.ts +196 -63
- package/types/stable/@ember/-internals/glimmer/lib/helpers/element.d.ts +0 -24
- package/types/stable/@ember/-internals/glimmer/lib/helpers/mut.d.ts +3 -2
- package/types/stable/@ember/-internals/glimmer/lib/helpers/readonly.d.ts +3 -1
- package/types/stable/@ember/-internals/glimmer/lib/helpers/unbound.d.ts +6 -2
- package/types/stable/@ember/-internals/glimmer/lib/helpers/unique-id.d.ts +0 -3
- package/types/stable/@ember/-internals/glimmer/lib/syntax/mount.d.ts +4 -2
- package/types/stable/@ember/-internals/glimmer/lib/syntax/outlet.d.ts +7 -2
- package/types/stable/@ember/helper/index.d.ts +1113 -73
- package/types/stable/@ember/object/compat.d.ts +0 -32
- package/types/stable/@ember/object/core.d.ts +1 -1
- package/types/stable/@ember/routing/router-service.d.ts +9 -9
- package/types/stable/@glimmer/interfaces/lib/compile/wire-format/api.d.ts +1 -9
- package/types/stable/@glimmer/interfaces/lib/compile/wire-format/opcodes.d.ts +0 -4
- package/types/stable/@glimmer/interfaces/lib/vm-opcodes.d.ts +0 -4
- package/types/stable/@glimmer/opcode-compiler/lib/opcode-builder/helpers/conditional.d.ts +1 -1
- package/types/stable/@glimmer/opcode-compiler/lib/syntax/statements.d.ts +1 -1
- package/types/stable/@glimmer/runtime/lib/helpers/array.d.ts +0 -33
- package/types/stable/@glimmer/runtime/lib/helpers/concat.d.ts +0 -25
- package/types/stable/@glimmer/runtime/lib/helpers/fn.d.ts +0 -70
- package/types/stable/@glimmer/runtime/lib/helpers/get.d.ts +0 -69
- package/types/stable/@glimmer/runtime/lib/helpers/hash.d.ts +0 -36
- package/types/stable/index.d.ts +0 -14
- package/dist/dev/packages/shared-chunks/get-6I3sjd-I.js +0 -135
- package/dist/dev/packages/shared-chunks/hash-6NDs_5_f.js +0 -198
- package/dist/prod/packages/shared-chunks/get-Dago5uGl.js +0 -135
- package/dist/prod/packages/shared-chunks/hash-gEXIsSO4.js +0 -198
- package/types/stable/@ember/-internals/glimmer/lib/helpers/array.d.ts +0 -43
- package/types/stable/@ember/-internals/glimmer/lib/helpers/component.d.ts +0 -93
- package/types/stable/@ember/-internals/glimmer/lib/helpers/concat.d.ts +0 -32
- package/types/stable/@ember/-internals/glimmer/lib/helpers/fn.d.ts +0 -77
- package/types/stable/@ember/-internals/glimmer/lib/helpers/get.d.ts +0 -94
- package/types/stable/@ember/-internals/glimmer/lib/helpers/hash.d.ts +0 -46
- package/types/stable/@ember/-internals/glimmer/lib/helpers/helper.d.ts +0 -43
- package/types/stable/@ember/-internals/glimmer/lib/helpers/if-unless.d.ts +0 -228
- package/types/stable/@ember/-internals/glimmer/lib/helpers/log.d.ts +0 -19
- package/types/stable/@ember/-internals/glimmer/lib/helpers/modifier.d.ts +0 -42
- package/types/stable/@ember/-internals/glimmer/lib/helpers/page-title.d.ts +0 -24
- package/types/stable/@ember/-internals/glimmer/lib/modifiers/on.d.ts +0 -95
- package/types/stable/@ember/-internals/glimmer/lib/syntax/in-element.d.ts +0 -49
- package/types/stable/@ember/-internals/glimmer/lib/syntax/let.d.ts +0 -43
|
@@ -5,16 +5,16 @@ import { c as createComputeRef, v as valueForRef, a as createConstRef, e as crea
|
|
|
5
5
|
import { b as EMPTY_STRING_ARRAY, e as enumerate, c as emptyArray } from './array-utils-CZQxrdD3.js';
|
|
6
6
|
import { C as CONSTANT_TAG, I as INITIAL, v as validateTag, c as consumeTag, a as valueForTag, o as beginTrackFrame, s as endTrackFrame, k as CURRENT_TAG } from './cache-DGDPVCpC.js';
|
|
7
7
|
import { C as CURRIED_MODIFIER, a as CURRIED_COMPONENT } from './curried-BZnYakIg.js';
|
|
8
|
-
import { j as VM_SYSCALL_SIZE, k as VM_CHILD_SCOPE_OP, l as VM_POP_SCOPE_OP, m as VM_PUSH_DYNAMIC_SCOPE_OP, n as VM_POP_DYNAMIC_SCOPE_OP, o as VM_CONSTANT_OP, p as decodeHandle, q as VM_CONSTANT_REFERENCE_OP, r as VM_PRIMITIVE_OP, s as isHandle, t as decodeImmediate, u as VM_PRIMITIVE_REFERENCE_OP, v as VM_DUP_OP, w as VM_POP_OP, x as VM_LOAD_OP, y as VM_FETCH_OP, z as VM_BIND_DYNAMIC_SCOPE_OP, A as VM_ENTER_OP, B as VM_EXIT_OP, C as VM_PUSH_SYMBOL_TABLE_OP, D as VM_PUSH_BLOCK_SCOPE_OP, E as VM_COMPILE_BLOCK_OP, F as VM_INVOKE_YIELD_OP, G as
|
|
8
|
+
import { j as VM_SYSCALL_SIZE, k as VM_CHILD_SCOPE_OP, l as VM_POP_SCOPE_OP, m as VM_PUSH_DYNAMIC_SCOPE_OP, n as VM_POP_DYNAMIC_SCOPE_OP, o as VM_CONSTANT_OP, p as decodeHandle, q as VM_CONSTANT_REFERENCE_OP, r as VM_PRIMITIVE_OP, s as isHandle, t as decodeImmediate, u as VM_PRIMITIVE_REFERENCE_OP, v as VM_DUP_OP, w as VM_POP_OP, x as VM_LOAD_OP, y as VM_FETCH_OP, z as VM_BIND_DYNAMIC_SCOPE_OP, A as VM_ENTER_OP, B as VM_EXIT_OP, C as VM_PUSH_SYMBOL_TABLE_OP, D as VM_PUSH_BLOCK_SCOPE_OP, E as VM_COMPILE_BLOCK_OP, F as VM_INVOKE_YIELD_OP, G as VM_JUMP_UNLESS_OP, H as VM_JUMP_EQ_OP, b as VM_ASSERT_SAME_OP, I as VM_TO_BOOLEAN_OP, J as VM_TEXT_OP, K as VM_COMMENT_OP, L as VM_OPEN_ELEMENT_OP, M as VM_OPEN_DYNAMIC_ELEMENT_OP, N as VM_PUSH_REMOTE_ELEMENT_OP, O as VM_POP_REMOTE_ELEMENT_OP, P as VM_FLUSH_ELEMENT_OP, Q as VM_CLOSE_ELEMENT_OP, R as VM_MODIFIER_OP, S as VM_DYNAMIC_MODIFIER_OP, T as VM_STATIC_ATTR_OP, U as VM_DYNAMIC_ATTR_OP, W as VM_PUSH_COMPONENT_DEFINITION_OP, X as VM_RESOLVE_DYNAMIC_COMPONENT_OP, e as VM_RESOLVE_CURRIED_COMPONENT_OP, f as VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP, Y as VM_PUSH_ARGS_OP, Z as VM_PUSH_EMPTY_ARGS_OP, _ as VM_CAPTURE_ARGS_OP, $ as VM_PREPARE_ARGS_OP, a0 as VM_CREATE_COMPONENT_OP, a1 as VM_REGISTER_COMPONENT_DESTRUCTOR_OP, a2 as VM_BEGIN_COMPONENT_TRANSACTION_OP, a3 as VM_PUT_COMPONENT_OPERATIONS_OP, a4 as VM_COMPONENT_ATTR_OP, a5 as VM_STATIC_COMPONENT_ATTR_OP, a6 as VM_DID_CREATE_ELEMENT_OP, a7 as VM_GET_COMPONENT_SELF_OP, a8 as VM_GET_COMPONENT_TAG_NAME_OP, a9 as VM_GET_COMPONENT_LAYOUT_OP, V as VM_MAIN_OP, aa as VM_POPULATE_LAYOUT_OP, ab as VM_VIRTUAL_ROOT_SCOPE_OP, ac as VM_SET_NAMED_VARIABLES_OP, ad as VM_SET_BLOCKS_OP, ae as VM_INVOKE_COMPONENT_LAYOUT_OP, af as VM_DID_RENDER_LAYOUT_OP, ag as VM_COMMIT_COMPONENT_TRANSACTION_OP } from './syscall-ops-CkPT1Kfx.js';
|
|
9
9
|
import { d as debugToString } from './debug-to-string-C6LsA_qz.js';
|
|
10
10
|
import { a as assert } from './assert-Zqc4wiAV.js';
|
|
11
11
|
import { u as unwrapTemplate } from './template-BRrQR6KS.js';
|
|
12
12
|
import { registerDestructor, destroy, associateDestroyableChild } from '../@glimmer/destroyable/index.js';
|
|
13
|
+
import { b as getInternalModifierManager, c as hasInternalComponentManager } from './api-DuLOZMO_.js';
|
|
13
14
|
import { m as managerHasCapability } from './capabilities-CajW4QjE.js';
|
|
14
15
|
import { a as assign } from './object-utils-AijlD-JH.js';
|
|
15
16
|
import { I as InternalComponentCapabilities } from './flags-BZxHQ0yn.js';
|
|
16
17
|
import { n as normalizeStringValue, C as ConcreteBounds } from './normalize-CKySQVU7.js';
|
|
17
|
-
import { b as getInternalModifierManager } from './api-DuLOZMO_.js';
|
|
18
18
|
import { toBool } from '../@glimmer/global-context/index.js';
|
|
19
19
|
|
|
20
20
|
function CheckInstanceof(Class) {
|
|
@@ -498,22 +498,6 @@ APPEND_OPCODES.add(VM_INVOKE_YIELD_OP, vm => {
|
|
|
498
498
|
vm.pushScope(invokingScope);
|
|
499
499
|
vm.call(handle);
|
|
500
500
|
});
|
|
501
|
-
APPEND_OPCODES.add(VM_JUMP_IF_OP, (vm, {
|
|
502
|
-
op1: target
|
|
503
|
-
}) => {
|
|
504
|
-
let reference = check(vm.stack.pop());
|
|
505
|
-
let value = Boolean(valueForRef(reference));
|
|
506
|
-
if (isConstRef(reference)) {
|
|
507
|
-
if (value) {
|
|
508
|
-
vm.lowlevel.goto(target);
|
|
509
|
-
}
|
|
510
|
-
} else {
|
|
511
|
-
if (value) {
|
|
512
|
-
vm.lowlevel.goto(target);
|
|
513
|
-
}
|
|
514
|
-
vm.updateWith(new Assert(reference));
|
|
515
|
-
}
|
|
516
|
-
});
|
|
517
501
|
APPEND_OPCODES.add(VM_JUMP_UNLESS_OP, (vm, {
|
|
518
502
|
op1: target
|
|
519
503
|
}) => {
|
|
@@ -972,6 +956,9 @@ APPEND_OPCODES.add(VM_RESOLVE_DYNAMIC_COMPONENT_OP, (vm, {
|
|
|
972
956
|
let isStrict = constants.getValue(_isStrict);
|
|
973
957
|
vm.loadValue($t1, null); // Clear the temp register
|
|
974
958
|
|
|
959
|
+
{
|
|
960
|
+
assert(component === null || component === undefined || typeof component === 'string' || isCurriedValue(component) || (typeof component === 'object' || typeof component === 'function') && hasInternalComponentManager(component));
|
|
961
|
+
}
|
|
975
962
|
let definition;
|
|
976
963
|
if (typeof component === 'string') {
|
|
977
964
|
if (isStrict) {
|
|
@@ -5,7 +5,7 @@ import { s as setLocalDebugType } from './debug-brand-B1TWjOCH.js';
|
|
|
5
5
|
import { a as assign } from './object-utils-AijlD-JH.js';
|
|
6
6
|
import { i as isVoidTag, b as build, v as voidMap, P as Printer } from './transform-resolutions-h1ik8gqW.js';
|
|
7
7
|
import { u as unwrap, e as expect, d as dict, b as exhausted } from './collections-DPkjqeA3.js';
|
|
8
|
-
import { o as opcodes } from './opcodes-
|
|
8
|
+
import { o as opcodes } from './opcodes-DDajoGhq.js';
|
|
9
9
|
import { C as CURRIED_MODIFIER, b as CURRIED_HELPER, a as CURRIED_COMPONENT } from './curried-BZnYakIg.js';
|
|
10
10
|
import { a as WellKnownTagNames, W as WellKnownAttrNames } from './well-known-_EVO9RaV.js';
|
|
11
11
|
|
|
@@ -4,7 +4,7 @@ import { getViewElement, clearElementView, clearViewElement, addChildView, setVi
|
|
|
4
4
|
import { debugFreeze } from '../@ember/debug/index.js';
|
|
5
5
|
import { _instrumentStart } from '../@ember/instrumentation/index.js';
|
|
6
6
|
import { c as createComputeRef, v as valueForRef, e as createPrimitiveRef, f as childRefFor, g as childRefFromParts, a as createConstRef, d as isUpdatableRef, u as updateRef } from './reference-BqOLhKFy.js';
|
|
7
|
-
import { f as reifyPositional } from './arguments-
|
|
7
|
+
import { f as reifyPositional } from './arguments-DniR8eF2.js';
|
|
8
8
|
import { E as EMPTY_ARRAY } from './array-utils-CZQxrdD3.js';
|
|
9
9
|
import { a as valueForTag, p as beginUntrackFrame, w as endUntrackFrame, o as beginTrackFrame, s as endTrackFrame, c as consumeTag, v as validateTag } from './cache-DGDPVCpC.js';
|
|
10
10
|
import { g as get } from './property_get-DXwpgTe7.js';
|
|
@@ -67,30 +67,6 @@ function getElementDefinition(tagName) {
|
|
|
67
67
|
|
|
68
68
|
// ============ Element Helper ============
|
|
69
69
|
|
|
70
|
-
/**
|
|
71
|
-
The `element` helper lets you dynamically set the tag name of an element.
|
|
72
|
-
|
|
73
|
-
```handlebars
|
|
74
|
-
{{#let (element @tagName) as |Tag|}}
|
|
75
|
-
<Tag class="my-element">Hello</Tag>
|
|
76
|
-
{{/let}}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
When `@tagName` is `"h1"`, this renders `<h1 class="my-element">Hello</h1>`.
|
|
80
|
-
|
|
81
|
-
When `@tagName` is an empty string `""`, the block content is rendered without
|
|
82
|
-
a wrapping element.
|
|
83
|
-
|
|
84
|
-
Passing `null`, `undefined`, or non-string values will throw an assertion error.
|
|
85
|
-
|
|
86
|
-
Changing the tag name will tear down and recreate the element and its contents.
|
|
87
|
-
|
|
88
|
-
The `element` helper is built-in and does not need to be imported.
|
|
89
|
-
|
|
90
|
-
@method element
|
|
91
|
-
@for Ember.Templates.helpers
|
|
92
|
-
@public
|
|
93
|
-
*/
|
|
94
70
|
const element = internalHelper(({
|
|
95
71
|
positional,
|
|
96
72
|
named
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { c as createComputeRef, U as UNDEFINED_REFERENCE, v as valueForRef } from './reference-BqOLhKFy.js';
|
|
2
|
+
import { f as reifyPositional } from './arguments-DniR8eF2.js';
|
|
3
|
+
import { i as internalHelper } from './hash-BFu91gtE.js';
|
|
4
|
+
import { setPath, getPath } from '../@glimmer/global-context/index.js';
|
|
5
|
+
import { i as isDict } from './collections-DPkjqeA3.js';
|
|
6
|
+
|
|
7
|
+
const isEmpty = value => {
|
|
8
|
+
return value === null || value === undefined || typeof value.toString !== 'function';
|
|
9
|
+
};
|
|
10
|
+
const normalizeTextValue = value => {
|
|
11
|
+
if (isEmpty(value)) {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
return String(value);
|
|
15
|
+
};
|
|
16
|
+
const concat = internalHelper(({
|
|
17
|
+
positional
|
|
18
|
+
}) => {
|
|
19
|
+
return createComputeRef(() => reifyPositional(positional).map(normalizeTextValue).join(''), null, 'concat');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const get = internalHelper(({
|
|
23
|
+
positional
|
|
24
|
+
}) => {
|
|
25
|
+
let sourceRef = positional[0] ?? UNDEFINED_REFERENCE;
|
|
26
|
+
let pathRef = positional[1] ?? UNDEFINED_REFERENCE;
|
|
27
|
+
return createComputeRef(() => {
|
|
28
|
+
let source = valueForRef(sourceRef);
|
|
29
|
+
if (isDict(source)) {
|
|
30
|
+
return getPath(source, String(valueForRef(pathRef)));
|
|
31
|
+
}
|
|
32
|
+
}, value => {
|
|
33
|
+
let source = valueForRef(sourceRef);
|
|
34
|
+
if (isDict(source)) {
|
|
35
|
+
return setPath(source, String(valueForRef(pathRef)), value);
|
|
36
|
+
}
|
|
37
|
+
}, 'get');
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export { concat as c, get as g };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { c as createComputeRef, b as isInvokableRef, u as updateRef, v as valueForRef } from './reference-BqOLhKFy.js';
|
|
2
|
+
import { f as reifyPositional, g as buildUntouchableThis, h as check, e as reifyNamed } from './arguments-DniR8eF2.js';
|
|
3
|
+
import { j as setInternalHelperManager } from './api-DuLOZMO_.js';
|
|
4
|
+
|
|
5
|
+
function internalHelper(helper) {
|
|
6
|
+
return setInternalHelperManager(helper, {});
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const array = internalHelper(({
|
|
10
|
+
positional
|
|
11
|
+
}) => {
|
|
12
|
+
return createComputeRef(() => reifyPositional(positional), null, 'array');
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const context = buildUntouchableThis('`fn` helper');
|
|
16
|
+
const fn = internalHelper(({
|
|
17
|
+
positional
|
|
18
|
+
}) => {
|
|
19
|
+
let callbackRef = check(positional[0]);
|
|
20
|
+
return createComputeRef(() => {
|
|
21
|
+
return (...invocationArgs) => {
|
|
22
|
+
let [fn, ...args] = reifyPositional(positional);
|
|
23
|
+
assertCallbackIsFn(callbackRef);
|
|
24
|
+
if (isInvokableRef(callbackRef)) {
|
|
25
|
+
let value = args.length > 0 ? args[0] : invocationArgs[0];
|
|
26
|
+
return void updateRef(callbackRef, value);
|
|
27
|
+
} else {
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return -- @fixme
|
|
29
|
+
return fn.call(context, ...args, ...invocationArgs);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
}, null, 'fn');
|
|
33
|
+
});
|
|
34
|
+
function assertCallbackIsFn(callbackRef) {
|
|
35
|
+
if (!(callbackRef && (isInvokableRef(callbackRef) || typeof valueForRef(callbackRef) === 'function'))) {
|
|
36
|
+
throw new Error(`You must pass a function as the \`fn\` helper's first argument, you passed ${callbackRef ? valueForRef(callbackRef) : callbackRef}. While rendering:\n\n${callbackRef?.debugLabel}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const hash = internalHelper(({
|
|
41
|
+
named
|
|
42
|
+
}) => {
|
|
43
|
+
let ref = createComputeRef(() => {
|
|
44
|
+
return reifyNamed(named);
|
|
45
|
+
}, null, 'hash');
|
|
46
|
+
|
|
47
|
+
// Setup the children so that templates can bypass getting the value of
|
|
48
|
+
// the reference and treat children lazily
|
|
49
|
+
let children = new Map();
|
|
50
|
+
for (let name in named) {
|
|
51
|
+
children.set(name, named[name]);
|
|
52
|
+
}
|
|
53
|
+
ref.children = children;
|
|
54
|
+
return ref;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export { array as a, fn as f, hash as h, internalHelper as i };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as assign } from './object-utils-AijlD-JH.js';
|
|
2
2
|
import { b as EMPTY_STRING_ARRAY, E as EMPTY_ARRAY, e as enumerate, r as reverse } from './array-utils-CZQxrdD3.js';
|
|
3
|
-
import { r as VM_PRIMITIVE_OP,
|
|
3
|
+
import { r as VM_PRIMITIVE_OP, aD as encodeHandle, at as VM_CONCAT_OP, ak as VM_GET_VARIABLE_OP, q as VM_CONSTANT_REFERENCE_OP, ao as VM_GET_PROPERTY_OP, ar as VM_HAS_BLOCK_OP, aq as VM_SPREAD_BLOCK_OP, E as VM_COMPILE_BLOCK_OP, as as VM_HAS_BLOCK_PARAMS_OP, au as VM_IF_INLINE_OP, av as VM_NOT_OP, aw as VM_GET_DYNAMIC_VAR_OP, ax as VM_LOG_OP, y as VM_FETCH_OP, u as VM_PRIMITIVE_REFERENCE_OP, aj as VM_HELPER_OP, v as VM_DUP_OP, ai as VM_DYNAMIC_HELPER_OP, w as VM_POP_OP, _ as VM_CAPTURE_ARGS_OP, ah as VM_CURRY_OP, aE as isSmallInt, aF as encodeImmediate, m as VM_PUSH_DYNAMIC_SCOPE_OP, z as VM_BIND_DYNAMIC_SCOPE_OP, n as VM_POP_DYNAMIC_SCOPE_OP, ap as VM_GET_BLOCK_OP, F as VM_INVOKE_YIELD_OP, l as VM_POP_SCOPE_OP, k as VM_CHILD_SCOPE_OP, al as VM_SET_VARIABLE_OP, o as VM_CONSTANT_OP, D as VM_PUSH_BLOCK_SCOPE_OP, C as VM_PUSH_SYMBOL_TABLE_OP, Z as VM_PUSH_EMPTY_ARGS_OP, Y as VM_PUSH_ARGS_OP, A as VM_ENTER_OP, H as VM_JUMP_EQ_OP, B as VM_EXIT_OP, G as VM_JUMP_UNLESS_OP, W as VM_PUSH_COMPONENT_DEFINITION_OP, x as VM_LOAD_OP, a2 as VM_BEGIN_COMPONENT_TRANSACTION_OP, a0 as VM_CREATE_COMPONENT_OP, a1 as VM_REGISTER_COMPONENT_DESTRUCTOR_OP, a7 as VM_GET_COMPONENT_SELF_OP, an as VM_ROOT_SCOPE_OP, am as VM_SET_BLOCK_OP, af as VM_DID_RENDER_LAYOUT_OP, ag as VM_COMMIT_COMPONENT_TRANSACTION_OP, $ as VM_PREPARE_ARGS_OP, ab as VM_VIRTUAL_ROOT_SCOPE_OP, ac as VM_SET_NAMED_VARIABLES_OP, ad as VM_SET_BLOCKS_OP, ae as VM_INVOKE_COMPONENT_LAYOUT_OP, a3 as VM_PUT_COMPONENT_OPERATIONS_OP, M as VM_OPEN_DYNAMIC_ELEMENT_OP, a6 as VM_DID_CREATE_ELEMENT_OP, P as VM_FLUSH_ELEMENT_OP, Q as VM_CLOSE_ELEMENT_OP, e as VM_RESOLVE_CURRIED_COMPONENT_OP, X as VM_RESOLVE_DYNAMIC_COMPONENT_OP, f as VM_PUSH_DYNAMIC_COMPONENT_INSTANCE_OP, a9 as VM_GET_COMPONENT_LAYOUT_OP, aa as VM_POPULATE_LAYOUT_OP, a8 as VM_GET_COMPONENT_TAG_NAME_OP, K as VM_COMMENT_OP, R as VM_MODIFIER_OP, S as VM_DYNAMIC_MODIFIER_OP, T as VM_STATIC_ATTR_OP, a5 as VM_STATIC_COMPONENT_ATTR_OP, U as VM_DYNAMIC_ATTR_OP, a4 as VM_COMPONENT_ATTR_OP, L as VM_OPEN_ELEMENT_OP, az as VM_DEBUGGER_OP, J as VM_TEXT_OP, b as VM_ASSERT_SAME_OP, ay as VM_DYNAMIC_CONTENT_TYPE_OP, N as VM_PUSH_REMOTE_ELEMENT_OP, O as VM_POP_REMOTE_ELEMENT_OP, I as VM_TO_BOOLEAN_OP, aA as VM_ENTER_LIST_OP, aC as VM_ITERATE_OP, aB as VM_EXIT_LIST_OP } from './syscall-ops-CkPT1Kfx.js';
|
|
4
4
|
import { b as VM_RETURN_OP, i as isMachineOp, f as VM_PUSH_FRAME_OP, e as VM_POP_FRAME_OP, d as VM_INVOKE_VIRTUAL_OP, c as VM_JUMP_OP, a as VM_RETURN_TO_OP, V as VM_INVOKE_STATIC_OP } from './vm-ops-ImHv0Wtg.js';
|
|
5
5
|
import { e as expect, u as unwrap, S as StackImpl, d as dict } from './collections-DPkjqeA3.js';
|
|
6
6
|
import { i as isPresentArray } from './present-B1rrjAVM.js';
|
|
@@ -8,7 +8,7 @@ import { a as assert } from './assert-Zqc4wiAV.js';
|
|
|
8
8
|
import { InstructionEncoderImpl } from '../@glimmer/encoder/index.js';
|
|
9
9
|
import { a as TYPE_SIZE, A as ARG_SHIFT, M as MACHINE_MASK, I as InternalComponentCapabilities } from './flags-BZxHQ0yn.js';
|
|
10
10
|
import { d as debugToString } from './debug-to-string-C6LsA_qz.js';
|
|
11
|
-
import { o as opcodes } from './opcodes-
|
|
11
|
+
import { o as opcodes } from './opcodes-DDajoGhq.js';
|
|
12
12
|
import { a as $v0, f as $fp, $ as $s0, g as $sp, h as $s1 } from './registers-C_W2qYHJ.js';
|
|
13
13
|
import { ContentType } from '../@glimmer/vm/index.js';
|
|
14
14
|
import { h as hasCapability } from './capabilities-CajW4QjE.js';
|
|
@@ -1054,7 +1054,7 @@ function SwitchCases(op, bootstrap, matcher) {
|
|
|
1054
1054
|
* # Updating Execution
|
|
1055
1055
|
*
|
|
1056
1056
|
* Updating execution for this `replayable` occurs if the `body` added an
|
|
1057
|
-
* assertion, via one of the `
|
|
1057
|
+
* assertion, via one of the `JumpUnless`, `JumpEq` or `AssertSame` opcodes.
|
|
1058
1058
|
*
|
|
1059
1059
|
* If, during updating executon, the assertion fails, the initial VM is
|
|
1060
1060
|
* restored, and the stored arguments are pushed onto the stack. The DOM
|