Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Upstream manager infrastructure #19267

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@
},
"devDependencies": {
"@babel/preset-env": "^7.9.5",
"@glimmer/compiler": "0.64.0",
"@glimmer/compiler": "0.65.0",
"@glimmer/env": "^0.1.7",
"@glimmer/global-context": "0.64.0",
"@glimmer/interfaces": "0.64.0",
"@glimmer/node": "0.64.0",
"@glimmer/opcode-compiler": "0.64.0",
"@glimmer/program": "0.64.0",
"@glimmer/reference": "0.64.0",
"@glimmer/runtime": "0.64.0",
"@glimmer/validator": "0.64.0",
"@glimmer/global-context": "0.65.0",
"@glimmer/interfaces": "0.65.0",
"@glimmer/node": "0.65.0",
"@glimmer/opcode-compiler": "0.65.0",
"@glimmer/program": "0.65.0",
"@glimmer/reference": "0.65.0",
"@glimmer/runtime": "0.65.0",
"@glimmer/validator": "0.65.0",
"@simple-dom/document": "^1.4.0",
"@types/qunit": "^2.9.1",
"@types/rsvp": "^4.0.3",
Expand Down
5 changes: 2 additions & 3 deletions packages/@ember/-internals/glimmer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ export {
registerMacros as _registerMacros,
experimentalMacros as _experimentalMacros,
} from './lib/syntax';
export { default as AbstractComponentManager } from './lib/component-managers/abstract';

// needed for test
// TODO just test these through public API
Expand All @@ -400,8 +399,8 @@ export { default as AbstractComponentManager } from './lib/component-managers/ab
export { INVOKE } from './lib/helpers/action';
export { default as OutletView } from './lib/views/outlet';
export { OutletState } from './lib/utils/outlet';
export { setComponentManager, setModifierManager, setHelperManager } from './lib/utils/managers';
export { setComponentManager } from './lib/utils/managers';
export { capabilities } from './lib/component-managers/custom';
export { capabilities as modifierCapabilities } from './lib/modifiers/custom';
export { helperCapabilities, HelperManager, invokeHelper } from './lib/helpers/custom';
export { helperCapabilities, invokeHelper } from './lib/helpers/custom';
export { isSerializationFirstNode } from './lib/utils/serialization-first-node-helpers';
10 changes: 5 additions & 5 deletions packages/@ember/-internals/glimmer/lib/compile-time-lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { Owner } from '@ember/-internals/owner';
import {
CompileTimeComponent,
CompileTimeResolver,
ComponentCapabilities,
ComponentDefinition,
ComponentManager,
InternalComponentCapabilities,
InternalComponentManager,
Option,
WithStaticLayout,
} from '@glimmer/interfaces';
Expand All @@ -13,11 +13,11 @@ import RuntimeResolver from './resolver';

interface StaticComponentManager
extends WithStaticLayout<unknown, unknown>,
ComponentManager<unknown, unknown> {}
InternalComponentManager<unknown, unknown> {}

function isStaticComponentManager(
_manager: ComponentManager,
capabilities: ComponentCapabilities
_manager: InternalComponentManager,
capabilities: InternalComponentCapabilities
): _manager is StaticComponentManager {
return !capabilities.dynamicLayout;
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { assign } from '@ember/polyfills';
import { DEBUG } from '@glimmer/env';
import {
Bounds,
ComponentCapabilities,
ComponentDefinition,
Destroyable,
ElementOperations,
Environment,
InternalComponentCapabilities,
Option,
PreparedArguments,
Template,
Expand All @@ -29,7 +29,7 @@ import {
Reference,
valueForRef,
} from '@glimmer/reference';
import { reifyPositional } from '@glimmer/runtime';
import { BaseInternalComponentManager, reifyPositional } from '@glimmer/runtime';
import { EMPTY_ARRAY } from '@glimmer/util';
import {
beginTrackFrame,
Expand All @@ -55,7 +55,6 @@ import {

import ComponentStateBucket, { Component } from '../utils/curly-component-state-bucket';
import { processComponentArgs } from '../utils/process-args';
import AbstractManager from './abstract';
import DefinitionState from './definition-state';

const EMBER_VIEW_REF = createPrimitiveRef('ember-view');
Expand Down Expand Up @@ -116,7 +115,7 @@ const EMPTY_POSITIONAL_ARGS: Reference[] = [];
debugFreeze(EMPTY_POSITIONAL_ARGS);

export default class CurlyComponentManager
extends AbstractManager<ComponentStateBucket, DefinitionState>
extends BaseInternalComponentManager<ComponentStateBucket, DefinitionState>
implements
WithDynamicLayout<ComponentStateBucket, RuntimeResolver>,
WithDynamicTagName<ComponentStateBucket> {
Expand Down Expand Up @@ -158,7 +157,7 @@ export default class CurlyComponentManager
return (component && component.tagName) || 'div';
}

getCapabilities(state: DefinitionState): ComponentCapabilities {
getCapabilities(state: DefinitionState): InternalComponentCapabilities {
return state.capabilities;
}

Expand Down Expand Up @@ -575,7 +574,7 @@ interface CurriedArgs {
named: any;
}

export const CURLY_CAPABILITIES: ComponentCapabilities = {
export const CURLY_CAPABILITIES: InternalComponentCapabilities = {
dynamicLayout: true,
dynamicTag: true,
prepareArgs: true,
Expand Down
Loading