ember-repl 3.0.0-beta.3 → 3.0.0-beta.5
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/declarations/browser/cjs/eval.d.ts +9 -0
- package/declarations/browser/cjs/eval.d.ts.map +1 -0
- package/declarations/browser/cjs/index.d.ts +7 -0
- package/declarations/browser/cjs/index.d.ts.map +1 -0
- package/declarations/browser/compile/formats.d.ts +16 -0
- package/declarations/browser/compile/formats.d.ts.map +1 -0
- package/declarations/browser/compile/index.d.ts +52 -0
- package/declarations/browser/compile/index.d.ts.map +1 -0
- package/{dist → declarations}/browser/compile/markdown-to-ember.d.ts +5 -4
- package/declarations/browser/compile/markdown-to-ember.d.ts.map +1 -0
- package/declarations/browser/compile/types.d.ts +7 -0
- package/declarations/browser/compile/types.d.ts.map +1 -0
- package/declarations/browser/esm/index.d.ts +8 -0
- package/declarations/browser/esm/index.d.ts.map +1 -0
- package/{dist → declarations}/browser/eti/babel-plugin.d.ts +2 -2
- package/declarations/browser/eti/babel-plugin.d.ts.map +1 -0
- package/declarations/browser/eti/debug.d.ts +2 -0
- package/declarations/browser/eti/debug.d.ts.map +1 -0
- package/{dist → declarations}/browser/eti/parse-templates.d.ts +7 -7
- package/declarations/browser/eti/parse-templates.d.ts.map +1 -0
- package/{dist → declarations}/browser/eti/preprocess.d.ts +3 -2
- package/declarations/browser/eti/preprocess.d.ts.map +1 -0
- package/{dist → declarations}/browser/eti/template-tag-transform.d.ts +2 -2
- package/declarations/browser/eti/template-tag-transform.d.ts.map +1 -0
- package/declarations/browser/eti/util.d.ts +14 -0
- package/declarations/browser/eti/util.d.ts.map +1 -0
- package/declarations/browser/gjs.d.ts +4 -0
- package/declarations/browser/gjs.d.ts.map +1 -0
- package/{dist → declarations}/browser/hbs.d.ts +4 -3
- package/declarations/browser/hbs.d.ts.map +1 -0
- package/declarations/browser/index.d.ts +7 -0
- package/declarations/browser/index.d.ts.map +1 -0
- package/{dist → declarations}/browser/js.d.ts +3 -3
- package/declarations/browser/js.d.ts.map +1 -0
- package/{dist → declarations}/browser/known-modules.d.ts +6 -5
- package/declarations/browser/known-modules.d.ts.map +1 -0
- package/declarations/browser/types.d.ts +21 -0
- package/declarations/browser/types.d.ts.map +1 -0
- package/{dist → declarations}/browser/utils.d.ts +4 -4
- package/declarations/browser/utils.d.ts.map +1 -0
- package/declarations/test-support/index.d.ts +2 -0
- package/declarations/test-support/index.d.ts.map +1 -0
- package/dist/browser/cjs/eval.js.map +1 -1
- package/dist/browser/cjs/index.js.map +1 -1
- package/dist/browser/compile/formats.js.map +1 -1
- package/dist/browser/compile/index.js +18 -8
- package/dist/browser/compile/index.js.map +1 -1
- package/dist/browser/compile/markdown-to-ember.js +2 -2
- package/dist/browser/compile/markdown-to-ember.js.map +1 -1
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/eti/babel-plugin.js.map +1 -1
- package/dist/browser/eti/parse-templates.js.map +1 -1
- package/dist/browser/eti/preprocess.js +3 -167
- package/dist/browser/eti/preprocess.js.map +1 -1
- package/dist/browser/eti/template-tag-transform.js.map +1 -1
- package/dist/browser/eti/util.js.map +1 -1
- package/dist/browser/gjs.js.map +1 -1
- package/dist/browser/hbs.js +3 -0
- package/dist/browser/hbs.js.map +1 -1
- package/dist/browser/js.js.map +1 -1
- package/dist/test-support/index.js.map +1 -1
- package/package.json +79 -58
- package/src/browser/cjs/eval.ts +2 -2
- package/src/browser/cjs/index.ts +4 -4
- package/src/browser/compile/formats.ts +14 -11
- package/src/browser/compile/index.ts +81 -38
- package/src/browser/compile/markdown-to-ember.ts +5 -5
- package/src/browser/esm/index.ts +4 -4
- package/src/browser/eti/babel-plugin.ts +2 -2
- package/src/browser/eti/parse-templates.ts +2 -2
- package/src/browser/eti/preprocess.ts +3 -3
- package/src/browser/eti/template-tag-transform.ts +1 -1
- package/src/browser/eti/util.ts +1 -1
- package/src/browser/gjs.ts +4 -4
- package/src/browser/hbs.ts +2 -2
- package/src/browser/index.ts +5 -5
- package/src/browser/js.ts +3 -3
- package/src/test-support/index.ts +1 -1
- package/dist/browser/cjs/eval.d.ts +0 -10
- package/dist/browser/cjs/eval.d.ts.map +0 -1
- package/dist/browser/cjs/index.d.ts +0 -7
- package/dist/browser/compile/formats.d.ts +0 -16
- package/dist/browser/compile/index.d.ts +0 -33
- package/dist/browser/compile/types.d.ts +0 -7
- package/dist/browser/esm/index.d.ts +0 -8
- package/dist/browser/eti/debug.d.ts +0 -2
- package/dist/browser/eti/util.d.ts +0 -14
- package/dist/browser/gjs.d.ts +0 -4
- package/dist/browser/index.d.ts +0 -6
- package/dist/browser/types.d.ts +0 -21
- package/dist/test-support/index.d.ts +0 -2
package/src/browser/hbs.ts
CHANGED
|
@@ -11,9 +11,9 @@ import { on } from '@ember/modifier';
|
|
|
11
11
|
import { createTemplateFactory } from '@ember/template-factory';
|
|
12
12
|
import { importSync } from '@embroider/macros';
|
|
13
13
|
|
|
14
|
-
import { nameFor } from './utils';
|
|
14
|
+
import { nameFor } from './utils.ts';
|
|
15
15
|
|
|
16
|
-
import type { CompileResult } from './types';
|
|
16
|
+
import type { CompileResult } from './types.ts';
|
|
17
17
|
import type { ComponentLike } from '@glint/template';
|
|
18
18
|
|
|
19
19
|
// These things are pre-bundled in the old system.
|
package/src/browser/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { compile, Compiled } from './compile';
|
|
2
|
-
export { compileHBS } from './hbs';
|
|
3
|
-
export { compileJS } from './js';
|
|
4
|
-
export { modules as frameworkModules } from './known-modules';
|
|
5
|
-
export { invocationName, invocationOf, nameFor } from './utils';
|
|
1
|
+
export { compile, Compiled } from './compile/index.ts';
|
|
2
|
+
export { compileHBS } from './hbs.ts';
|
|
3
|
+
export { compileJS } from './js.ts';
|
|
4
|
+
export { modules as frameworkModules } from './known-modules.ts';
|
|
5
|
+
export { invocationName, invocationOf, nameFor } from './utils.ts';
|
|
6
6
|
|
|
7
7
|
// Public Types
|
|
8
8
|
export type { CompileResult } from './types';
|
package/src/browser/js.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { compileJS as compileAMD } from './cjs';
|
|
2
|
-
import { compileJS as compileESM } from './esm';
|
|
1
|
+
import { compileJS as compileAMD } from './cjs/index.ts';
|
|
2
|
+
import { compileJS as compileESM } from './esm/index.ts';
|
|
3
3
|
|
|
4
|
-
import type { CompileResult, ExtraModules, Options } from './types';
|
|
4
|
+
import type { CompileResult, ExtraModules, Options } from './types.ts';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ExtraModules } from "../types.js";
|
|
2
|
-
import Component from '@glimmer/component';
|
|
3
|
-
declare function evalSnippet(compiled: string, extraModules?: ExtraModules): {
|
|
4
|
-
default: Component;
|
|
5
|
-
services?: {
|
|
6
|
-
[key: string]: unknown;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export { evalSnippet };
|
|
10
|
-
//# sourceMappingURL=browser/cjs/eval.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser/cjs/eval.d.ts","sourceRoot":"","sources":["../src/browser/cjs/eval.ts"],"names":[],"mappings":"AAGA,OAAO,gBAAqB,oBAAiB;AAC7C,OAAO,SAAc,MAAM,oBAAoB,CAAC;AAEhD,iBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,YAAY,GAAE,YAAiB,GAC9B;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACvC,CAmBA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CompileResult } from "../types.js";
|
|
2
|
-
import { EvalImportMap, ScopeMap } from "./types.js";
|
|
3
|
-
declare function compileGJS(gjsInput: string, importMap?: EvalImportMap): Promise<CompileResult>;
|
|
4
|
-
declare function compileHBS(hbsInput: string, options?: {
|
|
5
|
-
moduleName?: string;
|
|
6
|
-
scope?: Record<string, unknown>;
|
|
7
|
-
}): Promise<CompileResult>;
|
|
8
|
-
declare function compileMD(glimdownInput: string, options?: {
|
|
9
|
-
importMap?: EvalImportMap;
|
|
10
|
-
topLevelScope?: ScopeMap;
|
|
11
|
-
CopyComponent?: string;
|
|
12
|
-
ShadowComponent?: string;
|
|
13
|
-
}): Promise<CompileResult & {
|
|
14
|
-
rootTemplate?: string;
|
|
15
|
-
}>;
|
|
16
|
-
export { compileGJS, compileHBS, compileMD };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { EvalImportMap, ScopeMap } from "./types.js";
|
|
2
|
-
import { ComponentLike } from '@glint/template';
|
|
3
|
-
type Format = 'glimdown' | 'gjs' | 'hbs';
|
|
4
|
-
declare const CACHE: Map<string, ComponentLike>;
|
|
5
|
-
/**
|
|
6
|
-
* This compileMD is a more robust version of the raw compiling used in "formats".
|
|
7
|
-
* This function manages cache, and has events for folks building UIs to hook in to
|
|
8
|
-
*/
|
|
9
|
-
declare function compile(text: string, { format, onSuccess, onError, onCompileStart, ...options }: {
|
|
10
|
-
format: Format;
|
|
11
|
-
onSuccess: (component: ComponentLike) => Promise<unknown> | unknown;
|
|
12
|
-
onError: (error: string) => Promise<unknown> | unknown;
|
|
13
|
-
onCompileStart: () => Promise<unknown> | unknown;
|
|
14
|
-
importMap?: EvalImportMap;
|
|
15
|
-
CopyComponent?: string;
|
|
16
|
-
ShadowComponent?: string;
|
|
17
|
-
topLevelScope?: ScopeMap;
|
|
18
|
-
}): Promise<void>;
|
|
19
|
-
type Input = string | undefined | null;
|
|
20
|
-
/**
|
|
21
|
-
* By default, this compiles to `glimdown`. A Markdown format which
|
|
22
|
-
* extracts `live` tagged code snippets and compiles them to components.
|
|
23
|
-
*/
|
|
24
|
-
declare const Compiled: ((markdownText: Input | (() => Input), format?: Format | (() => Format) | undefined) => {
|
|
25
|
-
isReady: boolean;
|
|
26
|
-
error: unknown;
|
|
27
|
-
component: ComponentLike;
|
|
28
|
-
}) | (() => {
|
|
29
|
-
isReady: boolean;
|
|
30
|
-
error: unknown;
|
|
31
|
-
component: ComponentLike;
|
|
32
|
-
});
|
|
33
|
-
export { CACHE, compile, Compiled };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CompileResult, ExtraModules } from "../types.js";
|
|
2
|
-
interface Info {
|
|
3
|
-
code: string;
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
declare function compileJS(code: string, extraModules?: ExtraModules): Promise<CompileResult>;
|
|
7
|
-
declare function proxyToSkypack(code: string, extraModules?: ExtraModules): string;
|
|
8
|
-
export { Info, compileJS, proxyToSkypack };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TemplateMatch } from "./parse-templates.js";
|
|
2
|
-
import { NodePath } from '@babel/traverse';
|
|
3
|
-
import { CallExpression } from '@babel/types';
|
|
4
|
-
import { ImportUtil } from 'babel-import-util';
|
|
5
|
-
declare const TEMPLATE_TAG_NAME = "template";
|
|
6
|
-
declare const TEMPLATE_TAG_PLACEHOLDER = "__GLIMMER_TEMPLATE";
|
|
7
|
-
declare function isTemplateTag(callExpressionPath: NodePath<CallExpression>): boolean;
|
|
8
|
-
declare function buildPrecompileTemplateCall(t: any, callExpressionPath: NodePath<CallExpression>, state: {
|
|
9
|
-
importUtil: ImportUtil;
|
|
10
|
-
}): CallExpression;
|
|
11
|
-
declare function registerRefs(newPath: string | string[], getRefPaths: (path: string) => NodePath[]): void;
|
|
12
|
-
declare function isSupportedScriptFileExtension(filePath: string): boolean;
|
|
13
|
-
declare function isStrictMode(templateInfo: TemplateMatch): boolean;
|
|
14
|
-
export { TEMPLATE_TAG_NAME, TEMPLATE_TAG_PLACEHOLDER, isTemplateTag, buildPrecompileTemplateCall, registerRefs, isSupportedScriptFileExtension, isStrictMode };
|
package/dist/browser/gjs.d.ts
DELETED
package/dist/browser/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { compile, Compiled } from "./compile/index.js";
|
|
2
|
-
export { compileHBS } from "./hbs.js";
|
|
3
|
-
export { compileJS } from "./js.js";
|
|
4
|
-
export { modules as frameworkModules } from "./known-modules.js";
|
|
5
|
-
export { invocationName, invocationOf, nameFor } from "./utils.js";
|
|
6
|
-
export type { CompileResult } from "./types.js";
|
package/dist/browser/types.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { availablePlugins, availablePresets, transform } from '@babel/standalone';
|
|
2
|
-
import { ComponentLike } from '@glint/template';
|
|
3
|
-
interface CompileResult {
|
|
4
|
-
component?: ComponentLike;
|
|
5
|
-
error?: Error;
|
|
6
|
-
name: string;
|
|
7
|
-
}
|
|
8
|
-
interface Babel {
|
|
9
|
-
availablePlugins: typeof availablePlugins;
|
|
10
|
-
availablePresets: typeof availablePresets;
|
|
11
|
-
transform: typeof transform;
|
|
12
|
-
}
|
|
13
|
-
type Options = {
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
* @deprecated do not use - not under semver
|
|
17
|
-
*/
|
|
18
|
-
skypack?: boolean;
|
|
19
|
-
};
|
|
20
|
-
type ExtraModules = Record<string, unknown>;
|
|
21
|
-
export { CompileResult, Babel, Options, ExtraModules };
|