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.
Files changed (91) hide show
  1. package/declarations/browser/cjs/eval.d.ts +9 -0
  2. package/declarations/browser/cjs/eval.d.ts.map +1 -0
  3. package/declarations/browser/cjs/index.d.ts +7 -0
  4. package/declarations/browser/cjs/index.d.ts.map +1 -0
  5. package/declarations/browser/compile/formats.d.ts +16 -0
  6. package/declarations/browser/compile/formats.d.ts.map +1 -0
  7. package/declarations/browser/compile/index.d.ts +52 -0
  8. package/declarations/browser/compile/index.d.ts.map +1 -0
  9. package/{dist → declarations}/browser/compile/markdown-to-ember.d.ts +5 -4
  10. package/declarations/browser/compile/markdown-to-ember.d.ts.map +1 -0
  11. package/declarations/browser/compile/types.d.ts +7 -0
  12. package/declarations/browser/compile/types.d.ts.map +1 -0
  13. package/declarations/browser/esm/index.d.ts +8 -0
  14. package/declarations/browser/esm/index.d.ts.map +1 -0
  15. package/{dist → declarations}/browser/eti/babel-plugin.d.ts +2 -2
  16. package/declarations/browser/eti/babel-plugin.d.ts.map +1 -0
  17. package/declarations/browser/eti/debug.d.ts +2 -0
  18. package/declarations/browser/eti/debug.d.ts.map +1 -0
  19. package/{dist → declarations}/browser/eti/parse-templates.d.ts +7 -7
  20. package/declarations/browser/eti/parse-templates.d.ts.map +1 -0
  21. package/{dist → declarations}/browser/eti/preprocess.d.ts +3 -2
  22. package/declarations/browser/eti/preprocess.d.ts.map +1 -0
  23. package/{dist → declarations}/browser/eti/template-tag-transform.d.ts +2 -2
  24. package/declarations/browser/eti/template-tag-transform.d.ts.map +1 -0
  25. package/declarations/browser/eti/util.d.ts +14 -0
  26. package/declarations/browser/eti/util.d.ts.map +1 -0
  27. package/declarations/browser/gjs.d.ts +4 -0
  28. package/declarations/browser/gjs.d.ts.map +1 -0
  29. package/{dist → declarations}/browser/hbs.d.ts +4 -3
  30. package/declarations/browser/hbs.d.ts.map +1 -0
  31. package/declarations/browser/index.d.ts +7 -0
  32. package/declarations/browser/index.d.ts.map +1 -0
  33. package/{dist → declarations}/browser/js.d.ts +3 -3
  34. package/declarations/browser/js.d.ts.map +1 -0
  35. package/{dist → declarations}/browser/known-modules.d.ts +6 -5
  36. package/declarations/browser/known-modules.d.ts.map +1 -0
  37. package/declarations/browser/types.d.ts +21 -0
  38. package/declarations/browser/types.d.ts.map +1 -0
  39. package/{dist → declarations}/browser/utils.d.ts +4 -4
  40. package/declarations/browser/utils.d.ts.map +1 -0
  41. package/declarations/test-support/index.d.ts +2 -0
  42. package/declarations/test-support/index.d.ts.map +1 -0
  43. package/dist/browser/cjs/eval.js.map +1 -1
  44. package/dist/browser/cjs/index.js.map +1 -1
  45. package/dist/browser/compile/formats.js.map +1 -1
  46. package/dist/browser/compile/index.js +18 -8
  47. package/dist/browser/compile/index.js.map +1 -1
  48. package/dist/browser/compile/markdown-to-ember.js +2 -2
  49. package/dist/browser/compile/markdown-to-ember.js.map +1 -1
  50. package/dist/browser/esm/index.js.map +1 -1
  51. package/dist/browser/eti/babel-plugin.js.map +1 -1
  52. package/dist/browser/eti/parse-templates.js.map +1 -1
  53. package/dist/browser/eti/preprocess.js +3 -167
  54. package/dist/browser/eti/preprocess.js.map +1 -1
  55. package/dist/browser/eti/template-tag-transform.js.map +1 -1
  56. package/dist/browser/eti/util.js.map +1 -1
  57. package/dist/browser/gjs.js.map +1 -1
  58. package/dist/browser/hbs.js +3 -0
  59. package/dist/browser/hbs.js.map +1 -1
  60. package/dist/browser/js.js.map +1 -1
  61. package/dist/test-support/index.js.map +1 -1
  62. package/package.json +79 -58
  63. package/src/browser/cjs/eval.ts +2 -2
  64. package/src/browser/cjs/index.ts +4 -4
  65. package/src/browser/compile/formats.ts +14 -11
  66. package/src/browser/compile/index.ts +81 -38
  67. package/src/browser/compile/markdown-to-ember.ts +5 -5
  68. package/src/browser/esm/index.ts +4 -4
  69. package/src/browser/eti/babel-plugin.ts +2 -2
  70. package/src/browser/eti/parse-templates.ts +2 -2
  71. package/src/browser/eti/preprocess.ts +3 -3
  72. package/src/browser/eti/template-tag-transform.ts +1 -1
  73. package/src/browser/eti/util.ts +1 -1
  74. package/src/browser/gjs.ts +4 -4
  75. package/src/browser/hbs.ts +2 -2
  76. package/src/browser/index.ts +5 -5
  77. package/src/browser/js.ts +3 -3
  78. package/src/test-support/index.ts +1 -1
  79. package/dist/browser/cjs/eval.d.ts +0 -10
  80. package/dist/browser/cjs/eval.d.ts.map +0 -1
  81. package/dist/browser/cjs/index.d.ts +0 -7
  82. package/dist/browser/compile/formats.d.ts +0 -16
  83. package/dist/browser/compile/index.d.ts +0 -33
  84. package/dist/browser/compile/types.d.ts +0 -7
  85. package/dist/browser/esm/index.d.ts +0 -8
  86. package/dist/browser/eti/debug.d.ts +0 -2
  87. package/dist/browser/eti/util.d.ts +0 -14
  88. package/dist/browser/gjs.d.ts +0 -4
  89. package/dist/browser/index.d.ts +0 -6
  90. package/dist/browser/types.d.ts +0 -21
  91. package/dist/test-support/index.d.ts +0 -2
@@ -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.
@@ -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,4 +1,4 @@
1
- import { CACHE } from '../browser/compile/index';
1
+ import { CACHE } from '../browser/compile/index.ts';
2
2
 
3
3
  export function clearCompileCache() {
4
4
  CACHE.clear();
@@ -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,7 +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
- export { Info, compileJS };
@@ -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,7 +0,0 @@
1
- interface EvalImportMap {
2
- [moduleName: string]: ScopeMap;
3
- }
4
- interface ScopeMap {
5
- [localName: string]: unknown;
6
- }
7
- export { EvalImportMap, ScopeMap };
@@ -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,2 +0,0 @@
1
- declare function expect<T>(value: T | null | undefined, message: string): T;
2
- export { expect };
@@ -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 };
@@ -1,4 +0,0 @@
1
- import { Babel } from "./types.js";
2
- declare function preprocess(input: string, name: string): string;
3
- declare function transform(intermediate: string, name: string, options?: any): Promise<ReturnType<Babel['transform']>>;
4
- export { preprocess, transform };
@@ -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";
@@ -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 };
@@ -1,2 +0,0 @@
1
- declare function clearCompileCache(): void;
2
- export { clearCompileCache };