UNPKG

@difizen/mana-core

Version:

58 lines (55 loc) 2.42 kB
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } /* eslint-disable @typescript-eslint/no-explicit-any */ import { Syringe } from '@difizen/mana-syringe'; export var ViewPriority = /*#__PURE__*/function (ViewPriority) { ViewPriority[ViewPriority["PRIOR"] = 1000] = "PRIOR"; ViewPriority[ViewPriority["DEFAULT"] = 100] = "DEFAULT"; ViewPriority[ViewPriority["IDLE"] = -1] = "IDLE"; return ViewPriority; }({}); export var OriginViewComponent = Symbol('OriginViewComponent'); export var ViewComponent = Symbol('ViewComponent'); export var View; (function (_View) { function is(data) { return !!data && _typeof(data) === 'object' && 'id' in data && 'view' in data && typeof data['view'] === 'function'; } _View.is = is; })(View || (View = {})); export var RootViewId = '__ROOT_VIEW__'; export var ViewFactory = Syringe.defineToken('ViewFactory'); export var ViewOption = Symbol('ViewOption'); export var ViewInstance = Symbol('ViewInstance'); export var ViewDefineToken = Symbol('ViewDefineToken'); /** * The default behavior configuration of the view */ export var ViewPreferenceContribution = Syringe.defineToken('ViewPreferenceContribution'); export var StatefulView; (function (_StatefulView) { function is(arg) { return arg !== undefined && typeof arg.storeState === 'function' && typeof arg.restoreState === 'function'; } _StatefulView.is = is; })(StatefulView || (StatefulView = {})); export var SlotViewOption; (function (_SlotViewOption) { function is(data) { return !!data && _typeof(data) === 'object' && 'area' in data; } _SlotViewOption.is = is; })(SlotViewOption || (SlotViewOption = {})); export var RootSlotId = '__mana_root_slot__'; export var PortalSlotId = '__mana_portal_slot__'; export var SlotView; (function (_SlotView) { function is(data) { return !!data && _typeof(data) === 'object' && 'addView' in data; } _SlotView.is = is; })(SlotView || (SlotView = {})); /** * The default behavior configuration of the view */ export var SlotPreferenceContribution = Syringe.defineToken('SlotPreferenceContribution'); export var ViewContextMetaKey = Symbol('ViewContextMetaKey');