Matias Niemelä 8714daf276 fix(ivy): introduce host-specific styling instructions (#29292)
This patch is the first of a few patches which separates the
styling logic between template bindings (e.g. <div [style])
from host bindings (e.g. @HostBinding('style')). This patch
in particular introduces a series of host-specific styling
instructions and changes the existing set of template styling
instructions not to accept directives. The underyling code (which
communicates with the styling algorithm) still works as it did
before.

This PR also separates the styling instruction code into a separate
file and moves over all other instructions into an dedicated
instructions directory.

PR Close #29292
2019-03-19 16:33:39 -04:00

193 lines
3.8 KiB
TypeScript

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {LifecycleHooksFeature, renderComponent, whenRendered} from './component';
import {defineBase, defineComponent, defineDirective, defineNgModule, definePipe, setComponentScope} from './definition';
import {InheritDefinitionFeature} from './features/inherit_definition_feature';
import {NgOnChangesFeature} from './features/ng_onchanges_feature';
import {ProvidersFeature} from './features/providers_feature';
import {BaseDef, ComponentDef, ComponentDefWithMeta, ComponentTemplate, ComponentType, DirectiveDef, DirectiveDefFlags, DirectiveDefWithMeta, DirectiveType, PipeDef, PipeDefWithMeta} from './interfaces/definition';
import {getComponent, getDirectives, getHostElement, getRenderedText} from './util/discovery_utils';
export {ComponentFactory, ComponentFactoryResolver, ComponentRef, injectComponentFactoryResolver} from './component_ref';
export {getFactoryOf, getInheritedFactory} from './di';
export {RenderFlags} from './interfaces/definition';
export {CssSelectorList} from './interfaces/projection';
// clang-format off
export {
allocHostVars,
bind,
interpolation1,
interpolation2,
interpolation3,
interpolation4,
interpolation5,
interpolation6,
interpolation7,
interpolation8,
interpolationV,
container,
containerRefreshStart,
containerRefreshEnd,
nextContext,
element,
elementAttribute,
elementClassProp,
elementEnd,
elementProperty,
componentHostSyntheticProperty,
componentHostSyntheticListener,
elementStart,
elementContainerStart,
elementContainerEnd,
elementStyling,
elementStylingMap,
elementStyleProp,
elementStylingApply,
elementHostAttrs,
elementHostStyling,
elementHostStylingMap,
elementHostStyleProp,
elementHostClassProp,
elementHostStylingApply,
flushHooksUpTo,
listener,
store,
load,
namespaceHTML,
namespaceMathML,
namespaceSVG,
projection,
projectionDef,
text,
textBinding,
template,
reference,
embeddedViewStart,
embeddedViewEnd,
detectChanges,
markDirty,
tick,
directiveInject,
injectAttribute,
getCurrentView
} from './instructions/all';
export {
restoreView,
enableBindings,
disableBindings,
} from './state';
export {
i18n,
i18nAttributes,
i18nExp,
i18nStart,
i18nEnd,
i18nApply,
i18nPostprocess
} from './i18n';
export {NgModuleFactory, NgModuleRef, NgModuleType} from './ng_module_ref';
export {
AttributeMarker
} from './interfaces/node';
export {
setClassMetadata,
} from './metadata';
export {
pipe,
pipeBind1,
pipeBind2,
pipeBind3,
pipeBind4,
pipeBindV,
} from './pipe';
export {
queryRefresh,
viewQuery,
staticViewQuery,
loadViewQuery,
contentQuery,
loadContentQuery,
staticContentQuery
} from './query';
export {
pureFunction0,
pureFunction1,
pureFunction2,
pureFunction3,
pureFunction4,
pureFunction5,
pureFunction6,
pureFunction7,
pureFunction8,
pureFunctionV,
} from './pure_function';
export {templateRefExtractor} from './view_engine_compatibility_prebound';
export {resolveWindow, resolveDocument, resolveBody} from './util/misc_utils';
// clang-format on
export {
BaseDef,
ComponentDef,
ComponentDefWithMeta,
ComponentTemplate,
ComponentType,
DirectiveDef,
DirectiveDefFlags,
DirectiveDefWithMeta,
DirectiveType,
NgOnChangesFeature,
InheritDefinitionFeature,
ProvidersFeature,
PipeDef,
PipeDefWithMeta,
LifecycleHooksFeature,
defineComponent,
defineDirective,
defineNgModule,
defineBase,
definePipe,
getHostElement,
getComponent,
getDirectives,
getRenderedText,
renderComponent,
setComponentScope,
whenRendered,
};
export {NO_CHANGE} from './tokens';