Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aurelia/runtime-html

Package Overview
Dependencies
Maintainers
1
Versions
1021
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurelia/runtime-html - npm Package Compare versions

Comparing version 2.0.1-dev.202405110109 to 2.0.1-dev.202405230048

2

dist/types/app-task.d.ts

@@ -1,2 +0,2 @@

import type { IContainer, IRegistry, Key, Resolved } from '@aurelia/kernel';
import { type IContainer, type IRegistry, type Key, type Resolved } from '@aurelia/kernel';
export type TaskSlot = 'creating' | 'hydrating' | 'hydrated' | 'activating' | 'activated' | 'deactivating' | 'deactivated';

@@ -3,0 +3,0 @@ export declare const IAppTask: import("@aurelia/kernel").InterfaceSymbol<IAppTask>;

@@ -1,3 +0,2 @@

import { Class } from '@aurelia/kernel';
import type { Constructable } from '@aurelia/kernel';
import { type Class, type Constructable } from '@aurelia/kernel';
import type { InterceptorFunc } from '@aurelia/runtime';

@@ -4,0 +3,0 @@ import { BindingMode, IComponentBindablePropDefinition } from '@aurelia/template-compiler';

@@ -0,1 +1,2 @@

import { type IServiceLocator } from '@aurelia/kernel';
import { type IObserverLocator, IObserverLocatorBasedConnectable, ISubscriber, ICollectionSubscriber } from '@aurelia/runtime';

@@ -5,3 +6,2 @@ import { type Scope } from './scope';

import type { TaskQueue } from '@aurelia/platform';
import type { IServiceLocator } from '@aurelia/kernel';
import type { INode } from '../dom';

@@ -8,0 +8,0 @@ import type { IBinding, BindingMode, IBindingController } from './interfaces-bindings';

import { IAstEvaluator } from '../ast.eval';
import type { IServiceLocator } from '@aurelia/kernel';
import { type IServiceLocator } from '@aurelia/kernel';
import type { TaskQueue } from '@aurelia/platform';

@@ -4,0 +4,0 @@ import type { ICollectionSubscriber, IObserverLocator, IObserverLocatorBasedConnectable, ISubscriber } from '@aurelia/runtime';

@@ -0,3 +1,3 @@

import { type IServiceLocator } from '@aurelia/kernel';
import { IAstEvaluator } from '../ast.eval';
import type { IServiceLocator } from '@aurelia/kernel';
import type { ITask, TaskQueue } from '@aurelia/platform';

@@ -4,0 +4,0 @@ import type { ICollectionSubscriber, IObserverLocator, IObserverLocatorBasedConnectable, ISubscriber } from '@aurelia/runtime';

@@ -1,3 +0,3 @@

import { IExpressionParser, IsBindingBehavior } from '@aurelia/expression-parser';
import { IServiceLocator, Key } from '@aurelia/kernel';
import { IExpressionParser, type IsBindingBehavior } from '@aurelia/expression-parser';
import { type IServiceLocator, type Key } from '@aurelia/kernel';
import { TaskQueue } from '@aurelia/platform';

@@ -4,0 +4,0 @@ import { IObserverLocator, IObserverLocatorBasedConnectable } from '@aurelia/runtime';

@@ -1,2 +0,2 @@

import { IAttrMapper, IsTwoWayPredicate } from '@aurelia/template-compiler';
import { IAttrMapper, type IsTwoWayPredicate } from '@aurelia/template-compiler';
export declare class AttrMapper implements IAttrMapper {

@@ -3,0 +3,0 @@ static register: <C extends import("@aurelia/kernel").Constructable>(this: C, container: import("@aurelia/kernel").IContainer) => void;

import { IContainer } from '@aurelia/kernel';
import { ICoercionConfiguration } from '@aurelia/runtime';
import { DefaultBindingCommand, ForBindingCommand } from '@aurelia/template-compiler';
import { AtPrefixedTriggerAttributePattern, ColonPrefixedBindAttributePattern, DotSeparatedAttributePattern, RefAttributePattern, EventAttributePattern, DefaultBindingCommand, ForBindingCommand } from '@aurelia/template-compiler';
import { DebounceBindingBehavior } from './resources/binding-behaviors/debounce';

@@ -35,12 +35,3 @@ import { SignalBindingBehavior } from './resources/binding-behaviors/signals';

register(c: IContainer): void;
} | (new () => {
ref(rawName: string, rawValue: string, _parts: readonly string[]): import("@aurelia/template-compiler").AttrSyntax;
'PART.ref'(rawName: string, rawValue: string, parts: readonly string[]): import("@aurelia/template-compiler").AttrSyntax;
}) | (new () => {
'PART.PART'(rawName: string, rawValue: string, parts: readonly string[]): import("@aurelia/template-compiler").AttrSyntax;
'PART.PART.PART'(rawName: string, rawValue: string, parts: readonly string[]): import("@aurelia/template-compiler").AttrSyntax;
}) | (new () => {
'PART.trigger:PART'(rawName: string, rawValue: string, parts: readonly string[]): import("@aurelia/template-compiler").AttrSyntax;
'PART.capture:PART'(rawName: string, rawValue: string, parts: readonly string[]): import("@aurelia/template-compiler").AttrSyntax;
}))[];
} | typeof RefAttributePattern | typeof DotSeparatedAttributePattern | typeof EventAttributePattern)[];
/**

@@ -51,8 +42,3 @@ * Binding syntax for short-hand attribute name patterns:

*/
export declare const ShortHandBindingSyntax: ((new () => {
'@PART'(rawName: string, rawValue: string, parts: readonly string[]): import("@aurelia/template-compiler").AttrSyntax;
'@PART:PART'(rawName: string, rawValue: string, parts: readonly string[]): import("@aurelia/template-compiler").AttrSyntax;
}) | (new () => {
':PART'(rawName: string, rawValue: string, parts: readonly string[]): import("@aurelia/template-compiler").AttrSyntax;
}))[];
export declare const ShortHandBindingSyntax: (typeof AtPrefixedTriggerAttributePattern | typeof ColonPrefixedBindAttributePattern)[];
/**

@@ -59,0 +45,0 @@ * Default HTML-specific (but environment-agnostic) binding commands:

@@ -1,3 +0,2 @@

import { IObserver } from '@aurelia/runtime';
import type { AccessorType, IAccessor } from '@aurelia/runtime';
import { IObserver, type AccessorType, type IAccessor } from '@aurelia/runtime';
/**

@@ -4,0 +3,0 @@ * Attribute accessor for HTML elements.

@@ -1,2 +0,2 @@

import { Constructable } from '@aurelia/kernel';
import { type Constructable } from '@aurelia/kernel';
import { IHydratedController } from '../../templating/controller';

@@ -3,0 +3,0 @@ /**

@@ -0,1 +1,2 @@

import { registrableMetadataKey } from '@aurelia/kernel';
import { Scope } from '../../binding/scope';

@@ -59,10 +60,19 @@ import { INode } from '../../dom';

export declare class PromiseAttributePattern {
static [Symbol.metadata]: {
[registrableMetadataKey]: import("@aurelia/kernel").IRegistry;
};
'promise.resolve'(name: string, value: string): AttrSyntax;
}
export declare class FulfilledAttributePattern {
static [Symbol.metadata]: {
[registrableMetadataKey]: import("@aurelia/kernel").IRegistry;
};
'then'(name: string, value: string): AttrSyntax;
}
export declare class RejectedAttributePattern {
static [Symbol.metadata]: {
[registrableMetadataKey]: import("@aurelia/kernel").IRegistry;
};
'catch'(name: string, value: string): AttrSyntax;
}
//# sourceMappingURL=promise.d.ts.map

@@ -1,2 +0,2 @@

import { type Constructable, type IContainer, type AnyFunction, type FunctionPropNames } from '@aurelia/kernel';
import { type Constructable, type IContainer, type AnyFunction, type FunctionPropNames, IRegistry } from '@aurelia/kernel';
export type LifecycleHook<TViewModel, TKey extends keyof TViewModel> = TViewModel[TKey] extends (AnyFunction | undefined) ? (vm: TViewModel, ...args: Parameters<NonNullable<TViewModel[TKey]>>) => ReturnType<NonNullable<TViewModel[TKey]>> : never;

@@ -33,3 +33,3 @@ export type ILifecycleHooks<TViewModel = {}, TKey extends keyof TViewModel = keyof TViewModel> = {

*/
define<T extends Constructable>(def: {}, Type: T): T;
define<T extends Constructable>(def: {}, Type: T): IRegistry;
/**

@@ -36,0 +36,0 @@ * @param ctx - The container where the resolution starts

@@ -0,3 +1,3 @@

import { type IContainer } from '@aurelia/kernel';
import { CustomElementDefinition } from '../resources/custom-element';
import type { IContainer } from '@aurelia/kernel';
import type { ICustomAttributeController, ICustomElementController, ISyntheticView } from './controller';

@@ -4,0 +4,0 @@ export interface IViewFactory {

@@ -0,3 +1,3 @@

import { type IServiceLocator } from '@aurelia/kernel';
import { type Scope } from '../binding/scope';
import type { IServiceLocator } from '@aurelia/kernel';
import type { ICollectionSubscriber, IConnectable, IObservable, IObserverLocator, IObserverLocatorBasedConnectable, ISubscriber } from '@aurelia/runtime';

@@ -4,0 +4,0 @@ import type { IWatcherCallback } from '../watch';

{
"name": "@aurelia/runtime-html",
"version": "2.0.1-dev.202405110109",
"version": "2.0.1-dev.202405230048",
"main": "dist/cjs/index.cjs",

@@ -57,9 +57,9 @@ "module": "dist/esm/index.mjs",

"dependencies": {
"@aurelia/kernel": "2.0.1-dev.202405110109",
"@aurelia/metadata": "2.0.1-dev.202405110109",
"@aurelia/platform": "2.0.1-dev.202405110109",
"@aurelia/platform-browser": "2.0.1-dev.202405110109",
"@aurelia/runtime": "2.0.1-dev.202405110109",
"@aurelia/expression-parser": "2.0.1-dev.202405110109",
"@aurelia/template-compiler": "2.0.1-dev.202405110109"
"@aurelia/kernel": "2.0.1-dev.202405230048",
"@aurelia/metadata": "2.0.1-dev.202405230048",
"@aurelia/platform": "2.0.1-dev.202405230048",
"@aurelia/platform-browser": "2.0.1-dev.202405230048",
"@aurelia/runtime": "2.0.1-dev.202405230048",
"@aurelia/expression-parser": "2.0.1-dev.202405230048",
"@aurelia/template-compiler": "2.0.1-dev.202405230048"
},

@@ -66,0 +66,0 @@ "devDependencies": {

import { BrowserPlatform } from '@aurelia/platform-browser';
import { InstanceProvider, onResolve, onResolveAll } from '@aurelia/kernel';
import { InstanceProvider, onResolve, onResolveAll, isFunction } from '@aurelia/kernel';
import { IAppTask } from './app-task';

@@ -13,3 +13,2 @@ import { CustomElementDefinition, generateElementName } from './resources/custom-element';

import { IEventTarget, registerHostNode } from './dom';
import { isFunction } from './utilities';
import { ErrorNames, createMappedError } from './errors';

@@ -16,0 +15,0 @@

@@ -1,4 +0,4 @@

import { isFunction, objectFreeze } from './utilities';
import { objectFreeze } from './utilities';
import { createInterface, instanceRegistration } from './utilities-di';
import type { IContainer, IRegistry, Key, Resolved } from '@aurelia/kernel';
import { isFunction, type IContainer, type IRegistry, type Key, type Resolved } from '@aurelia/kernel';

@@ -5,0 +5,0 @@ export type TaskSlot =

@@ -10,7 +10,7 @@ /* eslint-disable no-fallthrough */

} from '@aurelia/expression-parser';
import { AnyFunction, IIndexable, isArrayIndex } from '@aurelia/kernel';
import { AnyFunction, IIndexable, isArrayIndex, isArray, isFunction, isObject } from '@aurelia/kernel';
import { IConnectable, IObservable, ISubscriber } from '@aurelia/runtime';
import { Scope, type IBindingContext, IOverrideContext } from './binding/scope';
import { ErrorNames, createMappedError } from './errors';
import { isArray, isFunction, isObject, safeString } from './utilities';
import { safeString } from './utilities';
import { ISignaler } from './signaler';

@@ -17,0 +17,0 @@ import { BindingBehaviorInstance } from './resources/binding-behavior';

@@ -1,4 +0,3 @@

import { DI, InstanceProvider, onResolve } from '@aurelia/kernel';
import { isPromise, DI, InstanceProvider, onResolve } from '@aurelia/kernel';
import { AppRoot, IAppRoot } from './app-root';
import { isPromise } from './utilities';
import { createInterface, registerResolver } from './utilities-di';

@@ -88,4 +87,3 @@

const platform = this.root.platform;
await platform.domWriteQueue.yield();
await platform.domReadQueue.yield();
await platform.domQueue.yield();
await platform.taskQueue.yield();

@@ -92,0 +90,0 @@ }

@@ -1,8 +0,7 @@

import { kebabCase, getPrototypeChain, noop, Class } from '@aurelia/kernel';
import { kebabCase, getPrototypeChain, noop, type Class, createLookup, isString, type Constructable } from '@aurelia/kernel';
import { ICoercionConfiguration } from '@aurelia/runtime';
import { defaultMode, toView, twoWay } from './binding/interfaces-bindings';
import { defineMetadata, getAnnotationKeyFor, getMetadata } from './utilities-metadata';
import { createLookup, isString, objectFreeze, objectKeys } from './utilities';
import { objectFreeze, objectKeys } from './utilities';
import type { Constructable } from '@aurelia/kernel';
import type { InterceptorFunc } from '@aurelia/runtime';

@@ -9,0 +8,0 @@ import { ErrorNames, createMappedError } from './errors';

@@ -0,1 +1,2 @@

import { type IServiceLocator, isString } from '@aurelia/kernel';
import {

@@ -24,6 +25,5 @@ connectable,

} from '@aurelia/platform';
import type { IServiceLocator } from '@aurelia/kernel';
import type { INode } from '../dom';
import type { IBinding, BindingMode, IBindingController } from './interfaces-bindings';
import { isString, safeString } from '../utilities';
import { safeString } from '../utilities';
import { ForOfStatement, IsBindingBehavior } from '@aurelia/expression-parser';

@@ -30,0 +30,0 @@

@@ -12,3 +12,3 @@ import {

import { toView } from './interfaces-bindings';
import type { IServiceLocator } from '@aurelia/kernel';
import { type IServiceLocator, isArray } from '@aurelia/kernel';
import type { ITask, QueueTaskOptions, TaskQueue } from '@aurelia/platform';

@@ -23,3 +23,3 @@ import type {

import type { IPlatform } from '../platform';
import { isArray, safeString } from '../utilities';
import { safeString } from '../utilities';
import type { BindingMode, IBinding, IBindingController } from './interfaces-bindings';

@@ -26,0 +26,0 @@ import { mixinUseScope, mixingBindingLimited, mixinAstEvaluator, createPrototypeMixer } from './binding-utils';

@@ -0,1 +1,2 @@

import { type IServiceLocator, isArray } from '@aurelia/kernel';
import {

@@ -14,3 +15,2 @@ connectable,

import type { IServiceLocator } from '@aurelia/kernel';
import type { ITask, QueueTaskOptions, TaskQueue } from '@aurelia/platform';

@@ -25,3 +25,3 @@ import type {

import { type Scope } from './scope';
import { atLayout, isArray } from '../utilities';
import { atLayout } from '../utilities';
import type { IBinding, BindingMode, IBindingController } from './interfaces-bindings';

@@ -28,0 +28,0 @@ import { type Interpolation, IsExpression } from '@aurelia/expression-parser';

import { type IsBindingBehavior } from '@aurelia/expression-parser';
import { isArray, isFunction, isString, objectFreeze } from '../utilities';
import { isArray, isFunction, isString, resolve, type IServiceLocator, all, IContainer } from '@aurelia/kernel';
import { objectFreeze } from '../utilities';
import { createInterface, singletonRegistration } from '../utilities-di';
import { createPrototypeMixer, mixinAstEvaluator, mixinUseScope, mixingBindingLimited } from './binding-utils';
import { resolve, type IServiceLocator, all, IContainer } from '@aurelia/kernel';
import { ICollectionSubscriber, IObserverLocatorBasedConnectable, ISubscriber, } from '@aurelia/runtime';

@@ -8,0 +8,0 @@ import { type Scope } from './scope';

@@ -1,3 +0,3 @@

import { AccessScopeExpression, IExpressionParser, IsBindingBehavior } from '@aurelia/expression-parser';
import { IServiceLocator, Key, emptyArray } from '@aurelia/kernel';
import { AccessScopeExpression, IExpressionParser, type IsBindingBehavior } from '@aurelia/expression-parser';
import { isObject, type IServiceLocator, type Key, emptyArray } from '@aurelia/kernel';
import { TaskQueue } from '@aurelia/platform';

@@ -17,3 +17,2 @@ import { IObserverLocator, IObserverLocatorBasedConnectable, connectable } from '@aurelia/runtime';

import { Scope } from './scope';
import { isObject } from '../utilities';

@@ -258,2 +257,4 @@ /**

}
/* istanbul ignore next */
this.unbind();
}

@@ -292,21 +293,16 @@ this.isBound = true;

private _createBindings(value: Record<string, unknown> | null, unbind: boolean) {
if (value == null) {
value = {};
let key: string;
if (!isObject(value)) {
/* istanbul ignore if */
if (__DEV__) {
// eslint-disable-next-line no-console
console.warn(`[DEV:aurelia] $bindable spread is given a null/undefined value for properties: "${this.targetKeys.join(', ')}"`);
console.warn(`[DEV:aurelia] $bindable spread is given a non object for properties: "${this.targetKeys.join(', ')}" of ${this.target.constructor.name}`);
}
} else if (!isObject(value)) {
value = {};
/* istanbul ignore if */
if (__DEV__) {
// eslint-disable-next-line no-console
console.warn(`[DEV:aurelia] $bindable spread is given a non-object value for properties: "${this.targetKeys.join(', ')}"`);
for (key in this._bindingCache) {
this._bindingCache[key]?.unbind();
}
return;
}
let key: string;
let binding: PropertyBinding;
// use a cache as we don't wanna cause bindings to "move" (bind/unbind)

@@ -313,0 +309,0 @@ // whenever there's a new evaluation

@@ -1,6 +0,6 @@

import { createLookup, isDataAttribute } from '../utilities';
import { isDataAttribute } from '../utilities';
import { ISVGAnalyzer } from '../observation/svg-analyzer';
import { createImplementationRegister, resolve } from '@aurelia/kernel';
import { createLookup, createImplementationRegister, resolve } from '@aurelia/kernel';
import { ErrorNames, createMappedError } from '../errors';
import { IAttrMapper, IsTwoWayPredicate } from '@aurelia/template-compiler';
import { IAttrMapper, type IsTwoWayPredicate } from '@aurelia/template-compiler';

@@ -7,0 +7,0 @@ export class AttrMapper implements IAttrMapper {

@@ -1,8 +0,3 @@

import { BindableDefinition } from '../bindable';
import { defaultMode } from '../binding/interfaces-bindings';
import { CustomAttribute } from '../resources/custom-attribute';
import { CustomElement, CustomElementDefinition } from '../resources/custom-element';
import { createLookup } from '../utilities';
import {
createLookup,
createImplementationRegister,

@@ -18,2 +13,7 @@ type IContainer,

} from '@aurelia/template-compiler';
import { BindableDefinition } from '../bindable';
import { defaultMode } from '../binding/interfaces-bindings';
import { CustomAttribute } from '../resources/custom-attribute';
import { CustomElement, CustomElementDefinition } from '../resources/custom-element';
import { ErrorNames, createMappedError } from '../errors';

@@ -20,0 +20,0 @@ import type { CustomAttributeDefinition } from '../resources/custom-attribute';

@@ -68,3 +68,2 @@ import { IContainer, noop } from '@aurelia/kernel';

RejectedTemplateController,
// TODO: activate after the attribute parser and/or interpreter such that for `t`, `then` is not picked up.
PromiseAttributePattern,

@@ -113,3 +112,3 @@ FulfilledAttributePattern,

AtPrefixedTriggerAttributePattern,
ColonPrefixedBindAttributePattern
ColonPrefixedBindAttributePattern,
];

@@ -167,3 +166,2 @@

RejectedTemplateController,
// TODO: activate after the attribute parser and/or interpreter such that for `t`, `then` is not picked up.
PromiseAttributePattern,

@@ -170,0 +168,0 @@ FulfilledAttributePattern,

@@ -1,2 +0,3 @@

import { atLayout, atNode, createLookup } from '../utilities';
import { createLookup } from '@aurelia/kernel';
import { atLayout, atNode } from '../utilities';

@@ -3,0 +4,0 @@ import type { AccessorType, IAccessor } from '@aurelia/runtime';

@@ -11,3 +11,3 @@ import {

import { getCollectionObserver, INodeObserver, INodeObserverConfigBase } from './observer-locator';
import { atLayout, atNode, atObserver, hasOwnProperty, isArray } from '../utilities';
import { atLayout, atNode, atObserver, hasOwnProperty } from '../utilities';

@@ -17,2 +17,3 @@ import type { INode } from '../dom';

import { mixinNodeObserverUseConfig } from './observation-utils';
import { isArray } from '@aurelia/kernel';

@@ -19,0 +20,0 @@ export interface IInputElement extends HTMLInputElement {

@@ -1,3 +0,3 @@

import { emptyArray } from '@aurelia/kernel';
import { atLayout, atNode, isArray, isString } from '../utilities';
import { emptyArray, isArray, isString } from '@aurelia/kernel';
import { atLayout, atNode } from '../utilities';

@@ -4,0 +4,0 @@ import type { AccessorType, IAccessor } from '@aurelia/runtime';

@@ -1,5 +0,3 @@

import { IObserver } from '@aurelia/runtime';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import type { AccessorType, IAccessor, PropertyAccessor } from '@aurelia/runtime';
import { IObserver, type AccessorType, type IAccessor, type PropertyAccessor } from '@aurelia/runtime';
import { mixinNoopSubscribable } from './observation-utils';

@@ -6,0 +4,0 @@ import { atLayout, atNode } from '../utilities';

@@ -1,2 +0,2 @@

import { createImplementationRegister, emptyObject, IServiceLocator, resolve } from '@aurelia/kernel';
import { createImplementationRegister, createLookup, emptyObject, IServiceLocator, isString, resolve } from '@aurelia/kernel';
import {

@@ -19,3 +19,3 @@ getObserverLookup,

import { ValueAttributeObserver } from './value-attribute-observer';
import { atLayout, atNode, createLookup, isDataAttribute, isString, objectAssign } from '../utilities';
import { atLayout, atNode, isDataAttribute, objectAssign } from '../utilities';

@@ -22,0 +22,0 @@ import type { IIndexable } from '@aurelia/kernel';

@@ -10,6 +10,8 @@ import {

import type { INode } from '../dom';
import { atLayout, atNode, atObserver, createError, hasOwnProperty, isArray } from '../utilities';
import { atLayout, atNode, atObserver, hasOwnProperty } from '../utilities';
import { INodeObserver, INodeObserverConfigBase } from './observer-locator';
import { mixinNodeObserverUseConfig } from './observation-utils';
import { createMutationObserver } from '../utilities-dom';
import { ErrorNames, createMappedError } from '../errors';
import { isArray } from '@aurelia/kernel';

@@ -289,6 +291,3 @@ export interface ISelectElement extends HTMLSelectElement {

if (!this._el.multiple) {
if (__DEV__)
throw createError(`AUR0654: array values can only be bound to a multi-select.`);
else
throw createError(`AUR0654`);
throw createMappedError(ErrorNames.select_observer_array_on_non_multi_select);
}

@@ -295,0 +294,0 @@ (this._arrayObserver = this._observerLocator.getArrayObserver(array)).subscribe(this);

@@ -1,3 +0,3 @@

import { emptyArray, kebabCase } from '@aurelia/kernel';
import { atLayout, atNode, hasOwnProperty, isFunction, isString } from '../utilities';
import { emptyArray, kebabCase, isFunction, isString } from '@aurelia/kernel';
import { atLayout, atNode, hasOwnProperty } from '../utilities';
import type { AccessorType, IAccessor } from '@aurelia/runtime';

@@ -4,0 +4,0 @@ import { mixinNoopSubscribable } from './observation-utils';

import { IPlatform } from '../platform';
import { createLookup, isString, objectAssign } from '../utilities';
import { objectAssign } from '../utilities';
import { aliasRegistration, createInterface, singletonRegistration } from '../utilities-di';
import { resolve, type IContainer } from '@aurelia/kernel';
import { createLookup, isString, resolve, type IContainer } from '@aurelia/kernel';
import type { INode } from '../dom';

@@ -7,0 +7,0 @@

@@ -0,6 +1,6 @@

import { type IIndexable, areEqual } from '@aurelia/kernel';
import { subscriberCollection } from '@aurelia/runtime';
import { mixinNodeObserverUseConfig } from './observation-utils';
import { areEqual, atLayout, atNode, atObserver } from '../utilities';
import { atLayout, atNode, atObserver } from '../utilities';
import type { IIndexable } from '@aurelia/kernel';
import type { AccessorType, ISubscriberCollection } from '@aurelia/runtime';

@@ -7,0 +7,0 @@ import type { INode } from '../dom';

@@ -8,3 +8,4 @@ import {

resolve,
Registrable,
isString,
registrableMetadataKey,
} from '@aurelia/kernel';

@@ -35,3 +36,3 @@ import {

import { IRendering } from './templating/rendering';
import { objectKeys, isString, etIsProperty, etInterpolation, etIsIterator, etIsFunction } from './utilities';
import { objectKeys, etIsProperty, etInterpolation, etIsIterator, etIsFunction } from './utilities';
import { createInterface, registerResolver, singletonRegistration } from './utilities-di';

@@ -90,5 +91,9 @@ import { IAuSlotsInfo, AuSlotsInfo } from './templating/controller.projection';

export function renderer<T extends IRenderer, C extends Constructable<T>>(target: C, context: ClassDecoratorContext): C {
return Registrable.define(target, function (this: typeof target, container: IContainer): void {
singletonRegistration(IRenderer, this).register(container);
});
const metadata = context?.metadata ?? (target[Symbol.metadata] ??= Object.create(null));
metadata[registrableMetadataKey] = {
register(container: IContainer): void {
singletonRegistration(IRenderer, target).register(container);
}
};
return target;
}

@@ -452,3 +457,3 @@

observerLocator,
platform.domWriteQueue,
platform.domQueue,
ensureExpression(exprParser, instruction.from, etInterpolation),

@@ -479,3 +484,3 @@ getTarget(target),

observerLocator,
platform.domWriteQueue,
platform.domQueue,
ensureExpression(exprParser, instruction.from, etIsProperty),

@@ -506,3 +511,3 @@ getTarget(target),

observerLocator,
platform.domWriteQueue,
platform.domQueue,
ensureExpression(exprParser, instruction.forOf, etIsIterator),

@@ -533,3 +538,3 @@ getTarget(target),

observerLocator,
platform.domWriteQueue,
platform.domQueue,
platform,

@@ -663,3 +668,3 @@ ensureExpression(exprParser, instruction.from, etIsProperty),

observerLocator,
platform.domWriteQueue,
platform.domQueue,
ensureExpression(exprParser, instruction.from, etIsProperty),

@@ -677,3 +682,3 @@ target.style,

observerLocator,
platform.domWriteQueue,
platform.domQueue,
ensureExpression(exprParser, instruction.from, etIsProperty),

@@ -720,3 +725,3 @@ target.style,

observerLocator,
platform.domWriteQueue,
platform.domQueue,
ensureExpression(exprParser, instruction.from, etIsProperty),

@@ -784,3 +789,3 @@ target,

renderingCtrl.container,
platform.domWriteQueue
platform.domQueue
));

@@ -787,0 +792,0 @@ } else {

@@ -1,4 +0,4 @@

import { firstDefined, getResourceKeyFor, mergeArrays, resource, resourceBaseName, ResourceType } from '@aurelia/kernel';
import { firstDefined, getResourceKeyFor, mergeArrays, resource, resourceBaseName, ResourceType, isFunction, isString } from '@aurelia/kernel';
import { type Scope } from '../binding/scope';
import { isFunction, isString, objectFreeze } from '../utilities';
import { objectFreeze } from '../utilities';
import { aliasRegistration, singletonRegistration } from '../utilities-di';

@@ -5,0 +5,0 @@ import { defineMetadata, getAnnotationKeyFor, getMetadata, hasMetadata } from '../utilities-metadata';

@@ -1,6 +0,5 @@

import { IDisposable, IPlatform, emptyArray, resolve } from '@aurelia/kernel';
import { isString, type IDisposable, IPlatform, emptyArray, resolve } from '@aurelia/kernel';
import { type BindingBehaviorInstance, BindingBehaviorStaticAuDefinition, behaviorTypeName } from '../binding-behavior';
import { type Scope } from '../../binding/scope';
import { isString } from '../../utilities';
import { type IBinding, type IRateLimitOptions } from '../../binding/interfaces-bindings';

@@ -7,0 +6,0 @@

@@ -1,6 +0,5 @@

import { IPlatform, type IDisposable, emptyArray, resolve } from '@aurelia/kernel';
import { isString, IPlatform, type IDisposable, emptyArray, resolve } from '@aurelia/kernel';
import { TaskQueue } from '@aurelia/platform';
import { type Scope } from '../../binding/scope';
import { type BindingBehaviorInstance, BindingBehaviorStaticAuDefinition, behaviorTypeName } from '../binding-behavior';
import { isString } from '../../utilities';
import { type IBinding, type IRateLimitOptions } from '../../binding/interfaces-bindings';

@@ -7,0 +6,0 @@

@@ -1,2 +0,2 @@

import { mergeArrays, firstDefined, Key, resourceBaseName, getResourceKeyFor } from '@aurelia/kernel';
import { mergeArrays, firstDefined, Key, resourceBaseName, getResourceKeyFor, isFunction, isString } from '@aurelia/kernel';
import { Bindable } from '../bindable';

@@ -6,3 +6,3 @@ import { Watch } from '../watch';

import { defineMetadata, getAnnotationKeyFor, getMetadata, hasMetadata } from '../utilities-metadata';
import { isFunction, isString, objectFreeze } from '../utilities';
import { objectFreeze } from '../utilities';
import { aliasRegistration, singletonRegistration } from '../utilities-di';

@@ -9,0 +9,0 @@ import { defaultMode, toView, BindingMode } from '../binding/interfaces-bindings';

@@ -49,3 +49,3 @@ import { INode } from '../../dom';

if (this._isActive && this._task === null) {
this._task = this.p.domWriteQueue.queueTask(this.update);
this._task = this.p.domQueue.queueTask(this.update);
}

@@ -52,0 +52,0 @@ }

@@ -10,2 +10,5 @@ import {

getResourceKeyFor,
isFunction,
isString,
isSymbol,
} from '@aurelia/kernel';

@@ -16,3 +19,3 @@ import { Bindable } from '../bindable';

import { defineMetadata, getAnnotationKeyFor, getMetadata, hasMetadata } from '../utilities-metadata';
import { def, isFunction, isString, isSymbol, objectAssign, objectFreeze } from '../utilities';
import { def, objectAssign, objectFreeze } from '../utilities';
import { aliasRegistration, singletonRegistration } from '../utilities-di';

@@ -19,0 +22,0 @@

@@ -1,2 +0,2 @@

import { Constructable, IContainer, InstanceProvider, MaybePromise, emptyArray, onResolve, resolve, transient } from '@aurelia/kernel';
import { isFunction, isPromise, type Constructable, IContainer, InstanceProvider, type MaybePromise, emptyArray, onResolve, resolve, transient } from '@aurelia/kernel';
import { IObserverLocator } from '@aurelia/runtime';

@@ -8,3 +8,2 @@ import { Scope } from '../../binding/scope';

import { IRendering } from '../../templating/rendering';
import { isFunction, isPromise } from '../../utilities';
import { registerResolver } from '../../utilities-di';

@@ -11,0 +10,0 @@ import { CustomElement, CustomElementDefinition, CustomElementStaticAuDefinition, elementTypeName } from '../custom-element';

@@ -1,2 +0,2 @@

import { onResolve, resolve } from '@aurelia/kernel';
import { onResolve, resolve, isPromise, isString } from '@aurelia/kernel';
import { IRenderLocation, setEffectiveParentNode } from '../../dom';

@@ -6,3 +6,3 @@ import { IPlatform } from '../../platform';

import { CustomAttributeStaticAuDefinition, attrTypeName } from '../custom-attribute';
import { isPromise, isString, rethrow } from '../../utilities';
import { rethrow } from '../../utilities';
import { createLocation, insertManyBefore } from '../../utilities-dom';

@@ -9,0 +9,0 @@ import type { ControllerVisitor, ICustomAttributeController, ICustomAttributeViewModel, IHydratedController, ISyntheticView } from '../../templating/controller';

import { Task, TaskAbortError } from '@aurelia/platform';
import { ILogger, onResolve, onResolveAll, resolve } from '@aurelia/kernel';
import { ILogger, onResolve, onResolveAll, resolve, isPromise, registrableMetadataKey } from '@aurelia/kernel';
import { Scope } from '../../binding/scope';

@@ -19,3 +19,3 @@ import { INode, IRenderLocation } from '../../dom';

import { CustomAttributeStaticAuDefinition, attrTypeName } from '../custom-attribute';
import { isPromise, safeString, tsRunning } from '../../utilities';
import { safeString, tsRunning } from '../../utilities';
import { ErrorNames, createMappedError } from '../../errors';

@@ -83,3 +83,3 @@

}
const q = this._platform.domWriteQueue;
const q = this._platform.domQueue;
const fulfilled = this.fulfilled;

@@ -340,2 +340,5 @@ const rejected = this.rejected;

export class PromiseAttributePattern {
public static [Symbol.metadata] = {
[registrableMetadataKey]: AttributePattern.create([{ pattern: 'promise.resolve', symbols: '' }], PromiseAttributePattern)
};
public 'promise.resolve'(name: string, value: string): AttrSyntax {

@@ -345,5 +348,7 @@ return new AttrSyntax(name, value, 'promise', 'bind');

}
AttributePattern.define([{ pattern: 'promise.resolve', symbols: '' }], PromiseAttributePattern);
export class FulfilledAttributePattern {
public static [Symbol.metadata] = {
[registrableMetadataKey]: AttributePattern.create([{ pattern: 'then', symbols: '' }], FulfilledAttributePattern)
};
public 'then'(name: string, value: string): AttrSyntax {

@@ -353,5 +358,7 @@ return new AttrSyntax(name, value, 'then', 'from-view');

}
AttributePattern.define([{ pattern: 'then', symbols: '' }], FulfilledAttributePattern);
export class RejectedAttributePattern {
public static [Symbol.metadata] = {
[registrableMetadataKey]: AttributePattern.create([{ pattern: 'catch', symbols: '' }], RejectedAttributePattern)
};
public 'catch'(name: string, value: string): AttrSyntax {

@@ -361,2 +368,1 @@ return new AttrSyntax(name, value, 'catch', 'from-view');

}
AttributePattern.define([{ pattern: 'catch', symbols: '' }], RejectedAttributePattern);

@@ -1,3 +0,17 @@

import { type IDisposable, onResolve, IIndexable, resolve, all, emptyArray, IContainer } from '@aurelia/kernel';
import {
areEqual,
isArray,
isPromise,
isMap,
isSet,
isNumber,
type IDisposable,
onResolve,
type IIndexable,
resolve,
all,
emptyArray,
IContainer,
} from '@aurelia/kernel';
import {
BindingBehaviorExpression,

@@ -30,3 +44,3 @@ DestructuringAssignmentExpression,

import { IController } from '../../templating/controller';
import { areEqual, isArray, isPromise, isMap, isSet, isNumber, rethrow, etIsProperty } from '../../utilities';
import { rethrow, etIsProperty } from '../../utilities';
import { HydrateTemplateController, IInstruction, IteratorBindingInstruction } from '@aurelia/template-compiler';

@@ -33,0 +47,0 @@

import {
isArray,
ILogger,

@@ -17,3 +18,2 @@ onResolve,

import { oneTime } from '../../binding/interfaces-bindings';
import { isArray } from '../../utilities';

@@ -20,0 +20,0 @@ import type { Controller, ICustomAttributeController, ICustomAttributeViewModel, IHydratedController, IHydratedParentController, IHydratableController, ISyntheticView, ControllerVisitor } from '../../templating/controller';

@@ -7,5 +7,7 @@ import {

resource,
isFunction,
isString,
} from '@aurelia/kernel';
import { aliasRegistration, singletonRegistration } from '../utilities-di';
import { isFunction, isString, objectFreeze } from '../utilities';
import { objectFreeze } from '../utilities';
import { defineMetadata, getAnnotationKeyFor, getMetadata, hasMetadata } from '../utilities-metadata';

@@ -12,0 +14,0 @@

@@ -0,3 +1,3 @@

import { createLookup } from '@aurelia/kernel';
import type { ISubscriber } from '@aurelia/runtime';
import { createLookup } from './utilities';
import { createInterface } from './utilities-di';

@@ -4,0 +4,0 @@

@@ -1,6 +0,6 @@

import { emptyArray, type IContainer, type IServiceLocator, Key , IIndexable } from '@aurelia/kernel';
import { emptyArray, isString, type IContainer, type IServiceLocator, Key, IIndexable } from '@aurelia/kernel';
import { subscriberCollection , type ISubscriberCollection } from '@aurelia/runtime';
import { findElementControllerFor } from '../resources/custom-element';
import { ILifecycleHooks, lifecycleHooks } from './lifecycle-hooks';
import { def, isString, objectAssign, safeString } from '../utilities';
import { def, objectAssign, safeString } from '../utilities';
import { instanceRegistration } from '../utilities-di';

@@ -7,0 +7,0 @@ import { type ICustomElementViewModel, type ICustomElementController } from './controller';

import { createInterface, singletonRegistration } from '../utilities-di';
import { getOwnPropertyNames, objectFreeze, baseObjectPrototype } from '../utilities';
import { type Constructable, type IContainer, type AnyFunction, type FunctionPropNames, Registrable } from '@aurelia/kernel';
import { type Constructable, type IContainer, type AnyFunction, type FunctionPropNames, IRegistry, registrableMetadataKey } from '@aurelia/kernel';

@@ -66,3 +66,3 @@ export type LifecycleHook<TViewModel, TKey extends keyof TViewModel> =

*/
define<T extends Constructable>(def: {}, Type: T): T {
define<T extends Constructable>(def: {}, Type: T): IRegistry {
const definition = LifecycleHooksDefinition.create(def, Type);

@@ -73,5 +73,7 @@ const $Type = definition.Type;

return Registrable.define($Type, container => {
singletonRegistration(ILifecycleHooks, $Type).register(container);
});
return {
register(container: IContainer): void {
singletonRegistration(ILifecycleHooks, $Type).register(container);
}
};
},

@@ -128,5 +130,7 @@ /**

function decorator<T extends Constructable>(target: T, context: ClassDecoratorContext): T {
return LifecycleHooks.define({}, target);
const metadata = context?.metadata ?? (target[Symbol.metadata] ??= Object.create(null));
metadata[registrableMetadataKey] = LifecycleHooks.define({}, target);
return target;
}
return target == null ? decorator : decorator(target, context!);
}

@@ -1,2 +0,2 @@

import { IContainer, resolve } from '@aurelia/kernel';
import { createLookup, isString, IContainer, resolve } from '@aurelia/kernel';
import { IExpressionParser } from '@aurelia/expression-parser';

@@ -9,3 +9,2 @@ import { IObserverLocator } from '@aurelia/runtime';

import { CustomElementDefinition, PartialCustomElementDefinition } from '../resources/custom-element';
import { createLookup, isString } from '../utilities';
import { IViewFactory, ViewFactory } from './view';

@@ -12,0 +11,0 @@ import type { IHydratableController } from './controller';

@@ -0,7 +1,6 @@

import { isString, type IContainer } from '@aurelia/kernel';
import { CustomElementDefinition } from '../resources/custom-element';
import { isString } from '../utilities';
import { createInterface } from '../utilities-di';
import { Controller } from './controller';
import type { IContainer } from '@aurelia/kernel';
import type { ICustomAttributeController, ICustomElementController, ISyntheticView } from './controller';

@@ -8,0 +7,0 @@

@@ -0,1 +1,2 @@

import { areEqual, type IServiceLocator } from '@aurelia/kernel';
import {

@@ -12,3 +13,2 @@ connectable,

import type { IServiceLocator } from '@aurelia/kernel';
import type {

@@ -23,3 +23,2 @@ ICollectionSubscriber,

import type { IWatcherCallback } from '../watch';
import { areEqual } from '../utilities';
import { IsBindingBehavior } from '@aurelia/expression-parser';

@@ -26,0 +25,0 @@ import { IBinding } from '../binding/interfaces-bindings';

import { AccessorType, type ISubscriber } from '@aurelia/runtime';
import { type ISVGAnalyzer } from './observation/svg-analyzer';
import { type ISignaler } from './signaler';
import { createLookup, isString } from '@aurelia/kernel';

@@ -11,6 +12,2 @@ const O = Object;

/** @internal */ export const createLookup = <T = unknown>() => O.create(null) as Record<string, T>;
/** @internal */ export const createError = (message: string) => new Error(message);
/** @internal */ export const hasOwnProperty = baseObjectPrototype.hasOwnProperty;

@@ -44,16 +41,3 @@

/** @internal */ export const isPromise = <T>(v: unknown): v is Promise<T> => v instanceof Promise;
/** @internal */ export const isArray = <T>(v: unknown): v is T[] => v instanceof Array;
/** @internal */ export const isSet = <T>(v: unknown): v is Set<T> => v instanceof Set;
/** @internal */ export const isMap = <T, K>(v: unknown): v is Map<T, K> => v instanceof Map;
// eslint-disable-next-line @typescript-eslint/ban-types
/** @internal */ export const isFunction = <K extends Function>(v: unknown): v is K => typeof v === 'function';
/** @internal */ export const isObject = (v: unknown): v is object => v instanceof O;
/** @internal */ export const isString = (v: unknown): v is string => typeof v === 'string';
/** @internal */ export const isSymbol = (v: unknown): v is string => typeof v === 'symbol';
/** @internal */ export const isNumber = (v: unknown): v is number => typeof v === 'number';
/** @internal */ export const rethrow = (err: unknown) => { throw err; };
/** @internal */ export const areEqual = O.is;

@@ -60,0 +44,0 @@ /** @internal */

@@ -1,5 +0,5 @@

import { emptyArray } from '@aurelia/kernel';
import { emptyArray, isFunction } from '@aurelia/kernel';
import { getAttributeDefinition, isAttributeType } from './resources/custom-attribute';
import { getElementDefinition, isElementType } from './resources/custom-element';
import { isFunction, objectFreeze, safeString } from './utilities';
import { objectFreeze, safeString } from './utilities';

@@ -6,0 +6,0 @@ import type { Constructable } from '@aurelia/kernel';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc