@rindo/core 3.2.0 → 3.2.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/cli/index.cjs +33 -11
- package/cli/index.js +33 -11
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/rindo.js +755 -739
- package/compiler/rindo.min.js +2 -2
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +5795 -268
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +1 -1
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +1 -1
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/package.json +1 -1
- package/internal/package.json +1 -1
- package/internal/rindo-private.d.ts +30 -2
- package/internal/rindo-public-compiler.d.ts +1 -9
- package/internal/testing/index.js +5 -1
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +7 -2
- package/mock-doc/index.d.ts +6 -1
- package/mock-doc/index.js +7 -2
- package/mock-doc/package.json +1 -1
- package/package.json +2 -2
- package/screenshot/package.json +1 -1
- package/sys/node/index.js +40 -37
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +5 -4
- package/testing/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rindo Client Patch Esm v3.2.
|
|
2
|
+
Rindo Client Patch Esm v3.2.1 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
var __assign=undefined&&undefined.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r);}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE;}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return "\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return {start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return {start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t);}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else {if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s);}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value;}));}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0);})),!t)return "break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return [];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove();}})).catch((function(e){console.error(e);}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window);
|
package/internal/client/dom.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rindo Client Patch Browser v3.2.
|
|
2
|
+
Rindo Client Patch Browser v3.2.1 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
(function(){
|
|
5
5
|
var aa=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function g(a){var b=aa.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return !b&&a}function l(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return !(!a||!(a.__CE_isImportDocument||a instanceof Document))}
|
package/internal/client/index.js
CHANGED
|
@@ -19,7 +19,7 @@ let renderingRef = null;
|
|
|
19
19
|
let queueCongestion = 0;
|
|
20
20
|
let queuePending = false;
|
|
21
21
|
/*
|
|
22
|
-
Rindo Client Platform v3.2.
|
|
22
|
+
Rindo Client Platform v3.2.1 | MIT Licensed | https://rindojs.web.app
|
|
23
23
|
*/
|
|
24
24
|
import { BUILD, NAMESPACE } from '@rindo/core/internal/app-data';
|
|
25
25
|
const Build = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindo/core/internal/client",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Rindo internal client platform to be imported by the Rindo Compiler and internal runtime. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rindo Client Patch Browser v3.2.
|
|
2
|
+
Rindo Client Patch Browser v3.2.1 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
import { BUILD, NAMESPACE } from '@rindo/core/internal/app-data';
|
|
5
5
|
import { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@rindo/core';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rindo Client Patch Esm v3.2.
|
|
2
|
+
Rindo Client Patch Esm v3.2.1 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
import { BUILD } from '@rindo/core/internal/app-data';
|
|
5
5
|
import { CSS, plt, win, promiseResolve } from '@rindo/core';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindo/core/internal/hydrate",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Rindo internal hydrate platform to be imported by the Rindo Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|
package/internal/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InMemoryFileSystem } from '../compiler/sys/in-memory-fs';
|
|
2
|
-
import type { BuildEvents, BuildLog, BuildResultsComponentGraph, CompilerBuildResults, CompilerBuildStart, CompilerFsStats, CompilerRequestResponse, CompilerSystem, Config, CopyResults, DevServerConfig, DevServerEditor, Diagnostic, Logger, LoggerLineUpdater, LoggerTimeSpan, OptimizeCssInput, OptimizeCssOutput, OutputTargetWww, PageReloadStrategy, PrerenderConfig, StyleDoc, TaskCommand } from './rindo-public-compiler';
|
|
2
|
+
import type { BuildEvents, BuildLog, BuildResultsComponentGraph, CompilerBuildResults, CompilerBuildStart, CompilerFsStats, CompilerRequestResponse, CompilerSystem, Config, CopyResults, DevServerConfig, DevServerEditor, Diagnostic, Logger, LoggerLineUpdater, LoggerTimeSpan, OptimizeCssInput, OptimizeCssOutput, OutputTarget, OutputTargetWww, PageReloadStrategy, PrerenderConfig, StyleDoc, TaskCommand } from './rindo-public-compiler';
|
|
3
3
|
import type { ComponentInterface, ListenOptions, ListenTargetOptions, VNode, VNodeData } from './rindo-public-runtime';
|
|
4
4
|
export interface SourceMap {
|
|
5
5
|
file: string;
|
|
@@ -187,6 +187,9 @@ export interface BuildCtx {
|
|
|
187
187
|
indexBuildCount: number;
|
|
188
188
|
indexDoc: Document;
|
|
189
189
|
isRebuild: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* A collection of Rindo's intermediate representation of components, tied to the current build
|
|
192
|
+
*/
|
|
190
193
|
moduleFiles: Module[];
|
|
191
194
|
packageJson: PackageJsonData;
|
|
192
195
|
pendingCopyTasks: Promise<CopyResults>[];
|
|
@@ -571,6 +574,9 @@ export interface CompilerCtx {
|
|
|
571
574
|
hasSuccessfulBuild: boolean;
|
|
572
575
|
isActivelyBuilding: boolean;
|
|
573
576
|
lastBuildResults: CompilerBuildResults;
|
|
577
|
+
/**
|
|
578
|
+
* A mapping of a file path to a Rindo {@link Module}
|
|
579
|
+
*/
|
|
574
580
|
moduleMap: ModuleMap;
|
|
575
581
|
nodeMap: NodeMap;
|
|
576
582
|
resolvedCollections: Set<string>;
|
|
@@ -639,6 +645,13 @@ export interface ComponentCompilerFeatures {
|
|
|
639
645
|
htmlTagNames: string[];
|
|
640
646
|
htmlParts: string[];
|
|
641
647
|
isUpdateable: boolean;
|
|
648
|
+
/**
|
|
649
|
+
* A plain component is one that doesn't have:
|
|
650
|
+
* - any members decorated with `@Prop()`, `@State()`, `@Element()`, `@Method()`
|
|
651
|
+
* - any methods decorated with `@Listen()`
|
|
652
|
+
* - any styles
|
|
653
|
+
* - any lifecycle methods, including `render()`
|
|
654
|
+
*/
|
|
642
655
|
isPlain: boolean;
|
|
643
656
|
potentialCmpRefs: string[];
|
|
644
657
|
}
|
|
@@ -1172,18 +1185,33 @@ export interface MinifyJsResult {
|
|
|
1172
1185
|
pos: number;
|
|
1173
1186
|
};
|
|
1174
1187
|
}
|
|
1188
|
+
/**
|
|
1189
|
+
* A mapping from a TypeScript or JavaScript source file path on disk, to a Rindo {@link Module}.
|
|
1190
|
+
*
|
|
1191
|
+
* It is advised that the key (path) be normalized before storing/retrieving the `Module` to avoid unnecessary lookup
|
|
1192
|
+
* failures.
|
|
1193
|
+
*/
|
|
1175
1194
|
export type ModuleMap = Map<string, Module>;
|
|
1176
1195
|
/**
|
|
1177
1196
|
* Rindo's Intermediate Representation (IR) of a module, bundling together
|
|
1178
1197
|
* various pieces of information like the classes declared within it, the path
|
|
1179
1198
|
* to the original source file, HTML tag names defined in the file, and so on.
|
|
1180
1199
|
*
|
|
1181
|
-
* Note that this gets serialized/parsed as JSON and therefore cannot
|
|
1200
|
+
* Note that this gets serialized/parsed as JSON and therefore cannot contain a
|
|
1182
1201
|
* `Map` or a `Set`.
|
|
1183
1202
|
*/
|
|
1184
1203
|
export interface Module {
|
|
1185
1204
|
cmps: ComponentCompilerMeta[];
|
|
1205
|
+
/**
|
|
1206
|
+
* A collection of modules that a component will need. The modules in this list must have import statements generated
|
|
1207
|
+
* in order for the component to function.
|
|
1208
|
+
*/
|
|
1186
1209
|
coreRuntimeApis: string[];
|
|
1210
|
+
/**
|
|
1211
|
+
* A collection of modules that a component will need for a specific output target. The modules in this list must
|
|
1212
|
+
* have import statements generated in order for the component to function, but only for a specific output target.
|
|
1213
|
+
*/
|
|
1214
|
+
outputTargetCoreRuntimeApis: Partial<Record<OutputTarget['type'], string[]>>;
|
|
1187
1215
|
collectionName: string;
|
|
1188
1216
|
dtsFilePath: string;
|
|
1189
1217
|
excludeFromCollection: boolean;
|
|
@@ -1964,14 +1964,6 @@ export interface OutputTargetDistCustomElements extends OutputTargetBaseNext {
|
|
|
1964
1964
|
*/
|
|
1965
1965
|
customElementsExportBehavior?: CustomElementsExportBehavior;
|
|
1966
1966
|
}
|
|
1967
|
-
export interface OutputTargetDistCustomElementsBundle extends OutputTargetBaseNext {
|
|
1968
|
-
type: 'dist-custom-elements-bundle';
|
|
1969
|
-
empty?: boolean;
|
|
1970
|
-
externalRuntime?: boolean;
|
|
1971
|
-
copy?: CopyTask[];
|
|
1972
|
-
includeGlobalScripts?: boolean;
|
|
1973
|
-
minify?: boolean;
|
|
1974
|
-
}
|
|
1975
1967
|
/**
|
|
1976
1968
|
* The base type for output targets. All output targets should extend this base type.
|
|
1977
1969
|
*/
|
|
@@ -2061,7 +2053,7 @@ export interface OutputTargetWww extends OutputTargetBase {
|
|
|
2061
2053
|
serviceWorker?: ServiceWorkerConfig | null | false;
|
|
2062
2054
|
appDir?: string;
|
|
2063
2055
|
}
|
|
2064
|
-
export type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetDist | OutputTargetDistCollection | OutputTargetDistCustomElements |
|
|
2056
|
+
export type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetDist | OutputTargetDistCollection | OutputTargetDistCustomElements | OutputTargetDistLazy | OutputTargetDistGlobalStyles | OutputTargetDistLazyLoader | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetWww | OutputTargetHydrate | OutputTargetStats | OutputTargetDistTypes;
|
|
2065
2057
|
export interface ServiceWorkerConfig {
|
|
2066
2058
|
unregister?: boolean;
|
|
2067
2059
|
swDest?: string;
|
|
@@ -93,7 +93,11 @@ function stopAutoApplyChanges() {
|
|
|
93
93
|
isAutoApplyingChanges = !1, autoApplyTimer && (clearTimeout(autoApplyTimer), autoApplyTimer = void 0);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
const mockDoc = require("@rindo/core/mock-doc"), appData = require("@rindo/core/internal/app-data")
|
|
96
|
+
const mockDoc = require("@rindo/core/mock-doc"), appData = require("@rindo/core/internal/app-data");
|
|
97
|
+
|
|
98
|
+
require("path");
|
|
99
|
+
|
|
100
|
+
const styles = new Map, modeResolutionChain = [], cstrs = new Map, queuedTicks = [], queuedWriteTasks = [], queuedReadTasks = [], moduleLoaded = new Map, queuedLoadModules = [], caughtErrors = [], hostRefs = new Map, getAssetPath = e => {
|
|
97
101
|
const t = new URL(e, plt.$resourcesUrl$);
|
|
98
102
|
return t.origin !== win.location.origin ? t.href : t.pathname;
|
|
99
103
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindo/core/internal/testing",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Rindo internal testing platform to be imported by the Rindo Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|
package/mock-doc/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Mock Doc (CommonJS) v3.2.
|
|
2
|
+
Rindo Mock Doc (CommonJS) v3.2.1 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
var mockDoc = (function(exports) {
|
|
5
5
|
'use strict';
|
|
@@ -3997,9 +3997,14 @@ class MockWindow {
|
|
|
3997
3997
|
this.__location = val;
|
|
3998
3998
|
}
|
|
3999
3999
|
}
|
|
4000
|
-
matchMedia() {
|
|
4000
|
+
matchMedia(media) {
|
|
4001
4001
|
return {
|
|
4002
|
+
media,
|
|
4002
4003
|
matches: false,
|
|
4004
|
+
addEventListener,
|
|
4005
|
+
dispatchEvent,
|
|
4006
|
+
removeEventListener,
|
|
4007
|
+
onchange: null,
|
|
4003
4008
|
};
|
|
4004
4009
|
}
|
|
4005
4010
|
get Node() {
|
package/mock-doc/index.d.ts
CHANGED
|
@@ -890,8 +890,13 @@ declare class MockWindow {
|
|
|
890
890
|
set localStorage(locStorage: MockStorage);
|
|
891
891
|
get location(): MockLocation;
|
|
892
892
|
set location(val: Location | string);
|
|
893
|
-
matchMedia(): {
|
|
893
|
+
matchMedia(media: string): {
|
|
894
|
+
media: string;
|
|
894
895
|
matches: boolean;
|
|
896
|
+
addEventListener: typeof addEventListener;
|
|
897
|
+
dispatchEvent: typeof dispatchEvent;
|
|
898
|
+
removeEventListener: typeof removeEventListener;
|
|
899
|
+
onchange: (this: MediaQueryList, ev: MediaQueryListEvent) => any;
|
|
895
900
|
};
|
|
896
901
|
get Node(): any;
|
|
897
902
|
get NodeList(): any;
|
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Mock Doc v3.2.
|
|
2
|
+
Rindo Mock Doc v3.2.1 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
const CONTENT_REF_ID = 'r';
|
|
5
5
|
const ORG_LOCATION_ID = 'o';
|
|
@@ -3994,9 +3994,14 @@ class MockWindow {
|
|
|
3994
3994
|
this.__location = val;
|
|
3995
3995
|
}
|
|
3996
3996
|
}
|
|
3997
|
-
matchMedia() {
|
|
3997
|
+
matchMedia(media) {
|
|
3998
3998
|
return {
|
|
3999
|
+
media,
|
|
3999
4000
|
matches: false,
|
|
4001
|
+
addEventListener,
|
|
4002
|
+
dispatchEvent,
|
|
4003
|
+
removeEventListener,
|
|
4004
|
+
onchange: null,
|
|
4000
4005
|
};
|
|
4001
4006
|
}
|
|
4002
4007
|
get Node() {
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindo/core",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./internal/rindo-core/index.cjs",
|
|
6
6
|
"module": "./internal/rindo-core/index.js",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"mime-db": "^1.46.0",
|
|
97
97
|
"minimatch": "5.1.2",
|
|
98
98
|
"node-fetch": "2.6.7",
|
|
99
|
-
"open": "^
|
|
99
|
+
"open": "^9.0.0",
|
|
100
100
|
"open-in-editor": "2.2.0",
|
|
101
101
|
"parse5": "7.1.2",
|
|
102
102
|
"path-browserify": "^1.0.1",
|
package/screenshot/package.json
CHANGED
package/sys/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Node System v3.2.
|
|
2
|
+
Rindo Node System v3.2.1 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
function _interopDefaultLegacy(e) {
|
|
5
5
|
return e && "object" == typeof e && "default" in e ? e : {
|
|
@@ -5651,16 +5651,16 @@ exports.createNodeLogger = e => {
|
|
|
5651
5651
|
return createTerminalLogger(t);
|
|
5652
5652
|
}, exports.createNodeSys = function createNodeSys(e = {}) {
|
|
5653
5653
|
var t;
|
|
5654
|
-
const r = null !== (t = null == e ? void 0 : e.process) && void 0 !== t ? t : global.process, n = new Set,
|
|
5654
|
+
const r = null !== (t = null == e ? void 0 : e.process) && void 0 !== t ? t : global.process, n = null == e ? void 0 : e.logger, i = new Set, o = [], s = require$$6.cpus(), a = s.length, l = require$$6.platform(), c = path__default.default.join(__dirname, "..", "..", "compiler", "rindo.js"), u = path__default.default.join(__dirname, "..", "..", "dev-server", "index.js"), f = () => {
|
|
5655
5655
|
const e = [];
|
|
5656
5656
|
let t;
|
|
5657
|
-
for (;"function" == typeof (t =
|
|
5657
|
+
for (;"function" == typeof (t = o.pop()); ) try {
|
|
5658
5658
|
const n = t();
|
|
5659
5659
|
(r = n) && ("object" == typeof r || "function" == typeof r) && "function" == typeof r.then && e.push(n);
|
|
5660
5660
|
} catch (e) {}
|
|
5661
5661
|
var r;
|
|
5662
5662
|
return e.length > 0 ? Promise.all(e) : null;
|
|
5663
|
-
},
|
|
5663
|
+
}, h = {
|
|
5664
5664
|
name: "node",
|
|
5665
5665
|
version: r.versions.node,
|
|
5666
5666
|
access: e => new Promise((t => {
|
|
@@ -5674,10 +5674,10 @@ exports.createNodeLogger = e => {
|
|
|
5674
5674
|
return t;
|
|
5675
5675
|
},
|
|
5676
5676
|
addDestroy(e) {
|
|
5677
|
-
|
|
5677
|
+
i.add(e);
|
|
5678
5678
|
},
|
|
5679
5679
|
removeDestroy(e) {
|
|
5680
|
-
|
|
5680
|
+
i.delete(e);
|
|
5681
5681
|
},
|
|
5682
5682
|
applyPrerenderGlobalPatch(e) {
|
|
5683
5683
|
if ("function" != typeof global.fetch) {
|
|
@@ -5748,36 +5748,36 @@ exports.createNodeLogger = e => {
|
|
|
5748
5748
|
},
|
|
5749
5749
|
async destroy() {
|
|
5750
5750
|
const e = [];
|
|
5751
|
-
|
|
5751
|
+
i.forEach((t => {
|
|
5752
5752
|
try {
|
|
5753
5753
|
const r = t();
|
|
5754
5754
|
r && r.then && e.push(r);
|
|
5755
5755
|
} catch (e) {
|
|
5756
5756
|
console.error(`node sys destroy: ${e}`);
|
|
5757
5757
|
}
|
|
5758
|
-
})), e.length > 0 && await Promise.all(e),
|
|
5758
|
+
})), e.length > 0 && await Promise.all(e), i.clear();
|
|
5759
5759
|
},
|
|
5760
5760
|
dynamicImport: e => Promise.resolve(require(e)),
|
|
5761
5761
|
encodeToBase64: e => Buffer.from(e).toString("base64"),
|
|
5762
5762
|
ensureDependencies: async () => (console.warn("ensureDependencies will be removed in a future version of Rindo."),
|
|
5763
5763
|
console.warn("To get the rindoPath, please use getCompilerExecutingPath()."), {
|
|
5764
|
-
rindoPath:
|
|
5764
|
+
rindoPath: h.getCompilerExecutingPath(),
|
|
5765
5765
|
diagnostics: []
|
|
5766
5766
|
}),
|
|
5767
5767
|
async ensureResources() {
|
|
5768
5768
|
console.warn("ensureResources is a no-op, and will be removed in a future version of Rindo");
|
|
5769
5769
|
},
|
|
5770
5770
|
exit: async e => {
|
|
5771
|
-
await
|
|
5771
|
+
await f(), exit(e);
|
|
5772
5772
|
},
|
|
5773
5773
|
getCurrentDirectory: () => normalizePath(r.cwd()),
|
|
5774
|
-
getCompilerExecutingPath: () =>
|
|
5775
|
-
getDevServerExecutingPath: () =>
|
|
5774
|
+
getCompilerExecutingPath: () => c,
|
|
5775
|
+
getDevServerExecutingPath: () => u,
|
|
5776
5776
|
getEnvironmentVar: e => process.env[e],
|
|
5777
5777
|
getLocalModulePath: () => null,
|
|
5778
5778
|
getRemoteModuleUrl: () => null,
|
|
5779
5779
|
glob: asyncGlob,
|
|
5780
|
-
hardwareConcurrency:
|
|
5780
|
+
hardwareConcurrency: a,
|
|
5781
5781
|
isSymbolicLink: e => new Promise((t => {
|
|
5782
5782
|
try {
|
|
5783
5783
|
fs__default.default.lstat(e, ((e, r) => {
|
|
@@ -5790,7 +5790,7 @@ exports.createNodeLogger = e => {
|
|
|
5790
5790
|
nextTick: r.nextTick,
|
|
5791
5791
|
normalizePath,
|
|
5792
5792
|
onProcessInterrupt: e => {
|
|
5793
|
-
|
|
5793
|
+
o.includes(e) || o.push(e);
|
|
5794
5794
|
},
|
|
5795
5795
|
platformPath: path__default.default,
|
|
5796
5796
|
readDir: e => new Promise((t => {
|
|
@@ -5936,8 +5936,8 @@ exports.createNodeLogger = e => {
|
|
|
5936
5936
|
return t;
|
|
5937
5937
|
},
|
|
5938
5938
|
setupCompiler(e) {
|
|
5939
|
-
const t = e.ts, r = t.sys.watchDirectory,
|
|
5940
|
-
|
|
5939
|
+
const t = e.ts, r = t.sys.watchDirectory, i = t.sys.watchFile;
|
|
5940
|
+
h.watchTimeout = 80, h.events = (() => {
|
|
5941
5941
|
const e = [], t = t => {
|
|
5942
5942
|
const r = e.findIndex((e => e.callback === t));
|
|
5943
5943
|
return r > -1 && (e.splice(r, 1), !0);
|
|
@@ -5976,31 +5976,34 @@ exports.createNodeLogger = e => {
|
|
|
5976
5976
|
e.length = 0;
|
|
5977
5977
|
}
|
|
5978
5978
|
};
|
|
5979
|
-
})(),
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5979
|
+
})(), h.watchDirectory = (e, t, i) => {
|
|
5980
|
+
null == n || n.debug(`NODE_SYS_DEBUG::watchDir ${e}`);
|
|
5981
|
+
const o = r(e, (r => {
|
|
5982
|
+
null == n || n.debug(`NODE_SYS_DEBUG::watchDir:callback dir=${e} changedPath=${r}`),
|
|
5983
|
+
t(normalizePath(r), "fileUpdate");
|
|
5984
|
+
}), i), s = () => {
|
|
5985
|
+
o.close();
|
|
5984
5986
|
};
|
|
5985
|
-
return
|
|
5987
|
+
return h.addDestroy(s), {
|
|
5986
5988
|
close() {
|
|
5987
|
-
|
|
5989
|
+
h.removeDestroy(s), o.close();
|
|
5988
5990
|
}
|
|
5989
5991
|
};
|
|
5990
|
-
},
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5992
|
+
}, h.watchFile = (e, r) => {
|
|
5993
|
+
null == n || n.debug(`NODE_SYS_DEBUG::watchFile ${e}`);
|
|
5994
|
+
const o = i(e, ((e, n) => {
|
|
5995
|
+
e = normalizePath(e), n === t.FileWatcherEventKind.Created ? (r(e, "fileAdd"), h.events.emit("fileAdd", e)) : n === t.FileWatcherEventKind.Changed ? (r(e, "fileUpdate"),
|
|
5996
|
+
h.events.emit("fileUpdate", e)) : n === t.FileWatcherEventKind.Deleted && (r(e, "fileDelete"),
|
|
5997
|
+
h.events.emit("fileDelete", e));
|
|
5995
5998
|
}), 250, {
|
|
5996
5999
|
watchFile: t.WatchFileKind.FixedPollingInterval,
|
|
5997
6000
|
fallbackPolling: t.PollingWatchKind.FixedInterval
|
|
5998
|
-
}),
|
|
5999
|
-
|
|
6001
|
+
}), s = () => {
|
|
6002
|
+
o.close();
|
|
6000
6003
|
};
|
|
6001
|
-
return
|
|
6004
|
+
return h.addDestroy(s), {
|
|
6002
6005
|
close() {
|
|
6003
|
-
|
|
6006
|
+
h.removeDestroy(s), o.close();
|
|
6004
6007
|
}
|
|
6005
6008
|
};
|
|
6006
6009
|
};
|
|
@@ -6080,14 +6083,14 @@ exports.createNodeLogger = e => {
|
|
|
6080
6083
|
})),
|
|
6081
6084
|
copy: nodeCopyTasks,
|
|
6082
6085
|
details: {
|
|
6083
|
-
cpuModel: (Array.isArray(
|
|
6086
|
+
cpuModel: (Array.isArray(s) && s.length > 0 ? s[0] && s[0].model : "") || "",
|
|
6084
6087
|
freemem: () => require$$6.freemem(),
|
|
6085
|
-
platform: "darwin" ===
|
|
6088
|
+
platform: "darwin" === l || "linux" === l ? l : "win32" === l ? "windows" : "",
|
|
6086
6089
|
release: require$$6.release(),
|
|
6087
6090
|
totalmem: require$$6.totalmem()
|
|
6088
6091
|
}
|
|
6089
|
-
},
|
|
6090
|
-
return
|
|
6092
|
+
}, p = new NodeResolveModule;
|
|
6093
|
+
return h.lazyRequire = new NodeLazyRequire(p, {
|
|
6091
6094
|
"@types/jest": {
|
|
6092
6095
|
minVersion: "24.9.1",
|
|
6093
6096
|
recommendedVersion: "27.0.3",
|
|
@@ -6115,7 +6118,7 @@ exports.createNodeLogger = e => {
|
|
|
6115
6118
|
minVersion: "4.3.1",
|
|
6116
6119
|
recommendedVersion: "4.3.1"
|
|
6117
6120
|
}
|
|
6118
|
-
}), r.on("SIGINT",
|
|
6121
|
+
}), r.on("SIGINT", f), r.on("exit", f), h;
|
|
6119
6122
|
}, exports.setupNodeProcess = function setupNodeProcess(e) {
|
|
6120
6123
|
e.process.on("unhandledRejection", (t => {
|
|
6121
6124
|
if (!shouldIgnoreError(t)) {
|
package/sys/node/package.json
CHANGED
package/sys/node/worker.js
CHANGED
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Testing v3.2.
|
|
2
|
+
Rindo Testing v3.2.1 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
function _lazyRequire(e) {
|
|
5
5
|
return new Proxy({}, {
|
|
@@ -1518,7 +1518,7 @@ const formatComponentRuntimeMembers = (e, t = !0) => ({
|
|
|
1518
1518
|
if (!n.includes(t.code) && (i = t.messageText, isIterable(t.next))) for (const r of t.next) i += flattenDiagnosticMessageText(e, r);
|
|
1519
1519
|
return o && (i = i.replace("type 'RindoConfig'", "Rindo Config"), i = i.replace("Object literal may only specify known properties, but ", ""),
|
|
1520
1520
|
i = i.replace("Object literal may only specify known properties, and ", "")), i.trim();
|
|
1521
|
-
}, isJest27TransformOptions = e => null != e && "object" == typeof e && e.hasOwnProperty("config");
|
|
1521
|
+
}, isOutputTargetDistLazy = e => "dist-lazy" === e.type, isOutputTargetWww = e => "www" === e.type, isJest27TransformOptions = e => null != e && "object" == typeof e && e.hasOwnProperty("config");
|
|
1522
1522
|
|
|
1523
1523
|
let _tsCompilerOptions = null, _tsCompilerOptionsKey = null;
|
|
1524
1524
|
|
|
@@ -3154,7 +3154,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3154
3154
|
d("/");
|
|
3155
3155
|
const D = {
|
|
3156
3156
|
name: "in-memory",
|
|
3157
|
-
version: "3.2.
|
|
3157
|
+
version: "3.2.1",
|
|
3158
3158
|
events: a,
|
|
3159
3159
|
access: async e => u(e),
|
|
3160
3160
|
accessSync: u,
|
|
@@ -3784,7 +3784,7 @@ class E2EElement extends index_cjs.MockHTMLElement {
|
|
|
3784
3784
|
}
|
|
3785
3785
|
}
|
|
3786
3786
|
|
|
3787
|
-
const env = process.env
|
|
3787
|
+
const env = process.env;
|
|
3788
3788
|
|
|
3789
3789
|
exports.MockHeaders = MockHeaders, exports.MockRequest = MockRequest, exports.MockResponse = MockResponse,
|
|
3790
3790
|
exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment() {
|
|
@@ -3996,6 +3996,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3996
3996
|
}), exports.mockLogger = mockLogger, exports.mockModule = (e = {}) => ({
|
|
3997
3997
|
cmps: [],
|
|
3998
3998
|
coreRuntimeApis: [],
|
|
3999
|
+
outputTargetCoreRuntimeApis: {},
|
|
3999
4000
|
collectionName: "",
|
|
4000
4001
|
dtsFilePath: "",
|
|
4001
4002
|
excludeFromCollection: !1,
|