@jay-framework/compiler-jay-html 0.15.3 → 0.15.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 (3) hide show
  1. package/dist/index.d.cts +136 -11
  2. package/dist/index.js +20724 -20624
  3. package/package.json +9 -9
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { JayType, WithValidations, PluginComponentResolution, PluginManifest, JayEnumType, RefsTree, CompilerSourceFile, SourceFileFormat, JayImportLink, MainRuntimeModes, GenerateTarget, Imports, JayObjectType } from '@jay-framework/compiler-shared';
1
+ import { JayType, WithValidations, PluginComponentResolution, PluginManifest, JayEnumType, RefsTree, CompilerSourceFile, SourceFileFormat, JayImportLink, GenerateTarget, Imports, MainRuntimeModes, JayObjectType } from '@jay-framework/compiler-shared';
2
2
  import { HTMLElement } from 'node-html-parser';
3
3
  import { ResolveTsConfigOptions } from '@jay-framework/compiler-analyze-exported-types';
4
4
  import { Coordinate } from '@jay-framework/runtime';
@@ -201,19 +201,30 @@ interface JayHtmlSourceFile extends CompilerSourceFile {
201
201
  clientTrackByMap?: Record<string, string>;
202
202
  }
203
203
 
204
+ declare function parseIsEnum(expression: string): boolean;
205
+ declare function parseEnumValues(expression: string): string[];
206
+
207
+ declare function renderRefsType(refs: RefsTree, refsType: string, generateTarget?: GenerateTarget): {
208
+ imports: Imports;
209
+ renderedRefs: string;
210
+ };
211
+
204
212
  declare function generateElementDefinitionFile(parsedFile: WithValidations<JayHtmlSourceFile>): WithValidations<string>;
205
213
  declare function generateElementFile(jayFile: JayHtmlSourceFile, importerMode: MainRuntimeModes): WithValidations<string>;
206
214
  declare function generateElementBridgeFile(jayFile: JayHtmlSourceFile): string;
207
215
  declare function generateElementHydrateFile(jayFile: JayHtmlSourceFile, importerMode: MainRuntimeModes): WithValidations<string>;
216
+ declare function generateSandboxRootFile(jayFile: JayHtmlSourceFile): string;
217
+
218
+ declare function generateElementFileReactTarget(jayFile: JayHtmlSourceFile, importerMode: MainRuntimeModes): WithValidations<string>;
219
+
220
+ /** Server element compilation target. Extracted from jay-html-compiler.ts (Design Log #118). */
221
+
208
222
  interface ServerElementOptions {
209
223
  /** Path to write debug coordinate pre-process output. When provided, the
210
224
  * serialized DOM with jay-coordinate-base attributes is returned via result. */
211
225
  debugCoordinatePreprocessPath?: string;
212
226
  }
213
227
  declare function generateServerElementFile(jayFile: JayHtmlSourceFile, _options?: ServerElementOptions): WithValidations<string>;
214
- declare function generateSandboxRootFile(jayFile: JayHtmlSourceFile): string;
215
-
216
- declare function generateElementFileReactTarget(jayFile: JayHtmlSourceFile, importerMode: MainRuntimeModes): WithValidations<string>;
217
228
 
218
229
  /**
219
230
  * Coordinate pre-processing for SSR/hydration consistency.
@@ -270,12 +281,126 @@ declare function injectHeadfullFSTemplates(html: string, sourceDir: string, impo
270
281
  declare function parseJayFile(html: string, filename: string, filePath: string, options: ResolveTsConfigOptions, linkedContractResolver: JayImportResolver, projectRoot: string): Promise<WithValidations<JayHtmlSourceFile>>;
271
282
  declare function getJayHtmlImports(html: string): string[];
272
283
 
273
- declare function parseIsEnum(expression: string): boolean;
274
- declare function parseEnumValues(expression: string): string[];
275
-
276
- declare function renderRefsType(refs: RefsTree, refsType: string, generateTarget?: GenerateTarget): {
277
- imports: Imports;
278
- renderedRefs: string;
284
+ declare const htmlElementTagNameMap: {
285
+ a: string;
286
+ abbr: string;
287
+ address: string;
288
+ applet: string;
289
+ area: string;
290
+ article: string;
291
+ aside: string;
292
+ audio: string;
293
+ b: string;
294
+ base: string;
295
+ basefont: string;
296
+ bdi: string;
297
+ bdo: string;
298
+ blockquote: string;
299
+ body: string;
300
+ br: string;
301
+ button: string;
302
+ canvas: string;
303
+ caption: string;
304
+ cite: string;
305
+ code: string;
306
+ col: string;
307
+ colgroup: string;
308
+ data: string;
309
+ datalist: string;
310
+ dd: string;
311
+ del: string;
312
+ details: string;
313
+ dfn: string;
314
+ dialog: string;
315
+ dir: string;
316
+ div: string;
317
+ dl: string;
318
+ dt: string;
319
+ em: string;
320
+ embed: string;
321
+ fieldset: string;
322
+ figcaption: string;
323
+ figure: string;
324
+ font: string;
325
+ footer: string;
326
+ form: string;
327
+ frame: string;
328
+ frameset: string;
329
+ h1: string;
330
+ h2: string;
331
+ h3: string;
332
+ h4: string;
333
+ h5: string;
334
+ h6: string;
335
+ head: string;
336
+ header: string;
337
+ hgroup: string;
338
+ hr: string;
339
+ html: string;
340
+ i: string;
341
+ iframe: string;
342
+ img: string;
343
+ input: string;
344
+ ins: string;
345
+ kbd: string;
346
+ label: string;
347
+ legend: string;
348
+ li: string;
349
+ link: string;
350
+ main: string;
351
+ map: string;
352
+ mark: string;
353
+ marquee: string;
354
+ menu: string;
355
+ meta: string;
356
+ meter: string;
357
+ nav: string;
358
+ noscript: string;
359
+ object: string;
360
+ ol: string;
361
+ optgroup: string;
362
+ option: string;
363
+ output: string;
364
+ p: string;
365
+ param: string;
366
+ picture: string;
367
+ pre: string;
368
+ progress: string;
369
+ q: string;
370
+ rp: string;
371
+ rt: string;
372
+ ruby: string;
373
+ s: string;
374
+ samp: string;
375
+ script: string;
376
+ section: string;
377
+ select: string;
378
+ slot: string;
379
+ small: string;
380
+ source: string;
381
+ span: string;
382
+ strong: string;
383
+ style: string;
384
+ sub: string;
385
+ summary: string;
386
+ sup: string;
387
+ table: string;
388
+ tbody: string;
389
+ td: string;
390
+ template: string;
391
+ textarea: string;
392
+ tfoot: string;
393
+ th: string;
394
+ thead: string;
395
+ time: string;
396
+ title: string;
397
+ tr: string;
398
+ track: string;
399
+ u: string;
400
+ ul: string;
401
+ var: string;
402
+ video: string;
403
+ wbr: string;
279
404
  };
280
405
 
281
406
  declare function generateTypes(types: JayType): string;
@@ -453,4 +578,4 @@ declare function resolveHeadlessInstances(preRenderedJayHtml: string, instanceDa
453
578
  */
454
579
  declare function hasSlowPhaseProperties(contract: Contract | undefined): boolean;
455
580
 
456
- export { type ActionDefinition, type AssignCoordinatesOptions, type AssignCoordinatesResult, type Contract, type ContractImportInfo, type ContractParam, type ContractParamKind, type ContractProp, type ContractResolver, type ContractTag, ContractTagType, type DiscoveredHeadlessInstance, type EnumToImport, type ForEachHeadlessInstance, type HeadlessContractInfo, type HeadlessInstanceDiscoveryResult, type HeadlessInstanceResolvedData, JAY_IMPORT_RESOLVER, type JayContractImportLink, type JayHtmlSourceFile, type JayImportResolver, type PhaseViewStates, type RenderingPhase, type ServerElementOptions, type SlowRenderInput, type SlowRenderOutput, assignCoordinates, assignCoordinatesToJayHtml, buildInstanceCoordinateKey, compileAction, compileContract, contractToAllPhaseViewStates, contractToImportsViewStateAndRefs, contractToPhaseViewState, createPhaseContract, defaultContractResolver, discoverHeadlessInstances, filterTagsByPhase, generateElementBridgeFile, generateElementDefinitionFile, generateElementFile, generateElementFileReactTarget, generateElementHydrateFile, generateSandboxRootFile, generateServerElementFile, generateTypes, getEffectivePhase, getJayHtmlImports, getLinkedContractDir, hasSlowPhaseProperties, injectHeadfullFSTemplates, isTagInPhase, loadLinkedContract, parseAction, parseContract, parseEnumValues, parseIsEnum, parseJayFile, renderRefsType, resolveHeadlessInstances, slowRenderTransform, validateContractPhases };
581
+ export { type ActionDefinition, type AssignCoordinatesOptions, type AssignCoordinatesResult, type Contract, type ContractImportInfo, type ContractParam, type ContractParamKind, type ContractProp, type ContractResolver, type ContractTag, ContractTagType, type DiscoveredHeadlessInstance, type EnumToImport, type ForEachHeadlessInstance, type HeadlessContractInfo, type HeadlessInstanceDiscoveryResult, type HeadlessInstanceResolvedData, JAY_IMPORT_RESOLVER, type JayContractImportLink, type JayHtmlSourceFile, type JayImportResolver, type PhaseViewStates, type RenderingPhase, type ServerElementOptions, type SlowRenderInput, type SlowRenderOutput, assignCoordinates, assignCoordinatesToJayHtml, buildInstanceCoordinateKey, compileAction, compileContract, contractToAllPhaseViewStates, contractToImportsViewStateAndRefs, contractToPhaseViewState, createPhaseContract, defaultContractResolver, discoverHeadlessInstances, filterTagsByPhase, generateElementBridgeFile, generateElementDefinitionFile, generateElementFile, generateElementFileReactTarget, generateElementHydrateFile, generateSandboxRootFile, generateServerElementFile, generateTypes, getEffectivePhase, getJayHtmlImports, getLinkedContractDir, hasSlowPhaseProperties, htmlElementTagNameMap, injectHeadfullFSTemplates, isTagInPhase, loadLinkedContract, parseAction, parseContract, parseEnumValues, parseIsEnum, parseJayFile, renderRefsType, resolveHeadlessInstances, slowRenderTransform, validateContractPhases };