@jay-framework/compiler-shared 0.17.4 → 0.18.0

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/dist/index.d.ts CHANGED
@@ -32,7 +32,6 @@ declare const Import: {
32
32
  svgDynamicElement: ImportName;
33
33
  mathMLDynamicElement: ImportName;
34
34
  forEach: ImportName;
35
- slowForEachItem: ImportName;
36
35
  resolved: ImportName;
37
36
  pending: ImportName;
38
37
  rejected: ImportName;
@@ -621,6 +620,14 @@ interface PluginManifest {
621
620
  /** Human-readable description */
622
621
  description?: string;
623
622
  }>;
623
+ /** CLI commands exposed by this plugin (Design Log #142).
624
+ * Run via `jay-stack run <plugin>/<command>`. */
625
+ commands?: Array<{
626
+ /** Command name (e.g., "upload-public") */
627
+ name: string;
628
+ /** Path to .jay-command metadata file (for input schema and description) */
629
+ command?: string;
630
+ }>;
624
631
  /** Plugin setup configuration (Design Log #87) */
625
632
  setup?: {
626
633
  /** Export name (NPM) or relative path (local) to setup handler function */
@@ -738,20 +745,7 @@ declare function isStaticCoordinate(template: string): boolean;
738
745
  * The key format differs by context:
739
746
  * - **Static**: `"product-card:0"` (just the coordinate suffix)
740
747
  * - **forEach**: `"trackByValue,product-card:0"` (comma-separated, matching Array.toString())
741
- * - **slowForEach**: `"p1/product-card:0"` (slash-separated, same as DOM coordinate)
742
- *
743
- * This function is used by both:
744
- * - Server runtime (dev-server) when storing data in `__headlessInstances`
745
- * - Client compiler when generating the key lookup in `makeHeadlessInstanceComponent`
746
- *
747
- * @param coordinateSuffix - The instance's coordinate suffix, e.g. "product-card:0"
748
- * @param context - The context in which the instance appears
749
- * @param prefix - For slowForEach: the jayTrackBy value (e.g. "p1").
750
- * For forEach: not used (key is computed at runtime from trackBy values).
751
- * @returns For static/slowForEach: a literal key string.
752
- * For forEach: undefined (key must be computed at runtime).
753
748
  */
754
- declare function computeInstanceKey(coordinateSuffix: string, context: 'static' | 'forEach' | 'slowForEach', prefix?: string): string | undefined;
755
749
  /**
756
750
  * Compile a forEach instance key expression for generated code.
757
751
  *
@@ -783,4 +777,4 @@ declare function compileForEachInstanceKeyExpr(coordinateSuffix: string, trackBy
783
777
  */
784
778
  declare function computeForEachInstanceKey(trackByValue: string, coordinateSuffix: string): string;
785
779
 
786
- export { type ActionManifestEntry, CSS_EXTENSION, type CompilerSourceFile, type DynamicContractConfig, GenerateTarget, type GenericTypescriptSourceFile, Import, type ImportName, type ImportedRefsTree, Imports, ImportsFor, JAY_4_REACT, JAY_ACTION_DTS_EXTENSION, JAY_ACTION_EXTENSION, JAY_COMPONENT, JAY_CONTRACT_DTS_EXTENSION, JAY_CONTRACT_EXTENSION, JAY_DTS_EXTENSION, JAY_EXTENSION, JAY_FULLSTACK_COMPONENTS, JAY_QUERY_CLIENT, JAY_QUERY_HYDRATE, JAY_QUERY_MAIN_SANDBOX, JAY_QUERY_MAIN_SANDBOX_TS, JAY_QUERY_PREFIX, JAY_QUERY_SERVER, JAY_QUERY_WORKER_SANDBOX, JAY_QUERY_WORKER_SANDBOX_TS, JAY_QUERY_WORKER_TRUSTED, JAY_QUERY_WORKER_TRUSTED_TS, JAY_RUNTIME, JAY_SECURE, JAY_SSR_RUNTIME, JAY_STACK_CLIENT_RUNTIME, JAY_TS_EXTENSION, JayArrayType, JayAtomicType, JayBoolean, JayBuildEnvironment, JayComponentApiMember, JayComponentType, JayDate, JayElementConstructorType, JayElementType, JayEnumType, type JayEnvironment, JayErrorType, JayFileType, JayHTMLType, JayHtmlString, type JayImportLink, type JayImportName, JayImportedType, JayNumber, JayObjectType, JayOptionalType, JayPromiseType, JayRecordType, JayRecursiveType, JayString, type JayType, JayTypeAlias, JayTypeKind, JayUnionType, JayUnknown, type JayValidations, type JsonSchemaProperty, LOCAL_PLUGIN_PATH, MAKE_JAY_4_REACT_COMPONENT, MAKE_JAY_COMPONENT, MAKE_JAY_TSX_COMPONENT, type MainRuntimeModes, type ParsedJayModuleSpecifier, type PluginComponentResolution, type PluginInitConfig, type PluginManifest, REACT, type RecursiveRegion, type Ref, type RefsTree, RenderFragment, RuntimeMode, SourceFileFormat, TSX_EXTENSION, TS_EXTENSION, WithValidations, addBuildEnvironment, checkValidationErrors, compileCoordinateExpr, compileForEachInstanceKeyExpr, computeForEachInstanceKey, computeInstanceKey, equalJayTypes, findDynamicContract, getBasePath, getBuildEnvironment, getJayTsFileSourcePath, getMode, getModeFileExtension, getModeFromExtension, hasBuildEnvironment, hasExtension, hasJayExtension, hasJayModeExtension, hasRefs, isArrayType, isAtomicType, isComponentType, isCurrencyType, isDateWithTimezoneType, isElementConstructorType, isElementType, isEnumType, isHTMLType, isHtmlStringType, isImportedType, isLocalModule, isObjectType, isOptionalType, isPromiseType, isRecordType, isRecursiveType, isStaticCoordinate, isTypeAliasType, isUnionType, jayTypeToJsonSchema, loadPluginManifest, mergeRefsTrees, mkRef, mkRefsTree, nestRefs, normalizeActionEntry, parseJayModuleSpecifier, prettify, prettifyHtml, removeComments, resolvePluginComponent, resolvePluginManifest, resolvePrimitiveType, withOriginalTrace, withoutExtension };
780
+ export { type ActionManifestEntry, CSS_EXTENSION, type CompilerSourceFile, type DynamicContractConfig, GenerateTarget, type GenericTypescriptSourceFile, Import, type ImportName, type ImportedRefsTree, Imports, ImportsFor, JAY_4_REACT, JAY_ACTION_DTS_EXTENSION, JAY_ACTION_EXTENSION, JAY_COMPONENT, JAY_CONTRACT_DTS_EXTENSION, JAY_CONTRACT_EXTENSION, JAY_DTS_EXTENSION, JAY_EXTENSION, JAY_FULLSTACK_COMPONENTS, JAY_QUERY_CLIENT, JAY_QUERY_HYDRATE, JAY_QUERY_MAIN_SANDBOX, JAY_QUERY_MAIN_SANDBOX_TS, JAY_QUERY_PREFIX, JAY_QUERY_SERVER, JAY_QUERY_WORKER_SANDBOX, JAY_QUERY_WORKER_SANDBOX_TS, JAY_QUERY_WORKER_TRUSTED, JAY_QUERY_WORKER_TRUSTED_TS, JAY_RUNTIME, JAY_SECURE, JAY_SSR_RUNTIME, JAY_STACK_CLIENT_RUNTIME, JAY_TS_EXTENSION, JayArrayType, JayAtomicType, JayBoolean, JayBuildEnvironment, JayComponentApiMember, JayComponentType, JayDate, JayElementConstructorType, JayElementType, JayEnumType, type JayEnvironment, JayErrorType, JayFileType, JayHTMLType, JayHtmlString, type JayImportLink, type JayImportName, JayImportedType, JayNumber, JayObjectType, JayOptionalType, JayPromiseType, JayRecordType, JayRecursiveType, JayString, type JayType, JayTypeAlias, JayTypeKind, JayUnionType, JayUnknown, type JayValidations, type JsonSchemaProperty, LOCAL_PLUGIN_PATH, MAKE_JAY_4_REACT_COMPONENT, MAKE_JAY_COMPONENT, MAKE_JAY_TSX_COMPONENT, type MainRuntimeModes, type ParsedJayModuleSpecifier, type PluginComponentResolution, type PluginInitConfig, type PluginManifest, REACT, type RecursiveRegion, type Ref, type RefsTree, RenderFragment, RuntimeMode, SourceFileFormat, TSX_EXTENSION, TS_EXTENSION, WithValidations, addBuildEnvironment, checkValidationErrors, compileCoordinateExpr, compileForEachInstanceKeyExpr, computeForEachInstanceKey, equalJayTypes, findDynamicContract, getBasePath, getBuildEnvironment, getJayTsFileSourcePath, getMode, getModeFileExtension, getModeFromExtension, hasBuildEnvironment, hasExtension, hasJayExtension, hasJayModeExtension, hasRefs, isArrayType, isAtomicType, isComponentType, isCurrencyType, isDateWithTimezoneType, isElementConstructorType, isElementType, isEnumType, isHTMLType, isHtmlStringType, isImportedType, isLocalModule, isObjectType, isOptionalType, isPromiseType, isRecordType, isRecursiveType, isStaticCoordinate, isTypeAliasType, isUnionType, jayTypeToJsonSchema, loadPluginManifest, mergeRefsTrees, mkRef, mkRefsTree, nestRefs, normalizeActionEntry, parseJayModuleSpecifier, prettify, prettifyHtml, removeComments, resolvePluginComponent, resolvePluginManifest, resolvePrimitiveType, withOriginalTrace, withoutExtension };
package/dist/index.js CHANGED
@@ -165,12 +165,6 @@ const Import = {
165
165
  1
166
166
  /* implementation */
167
167
  ),
168
- slowForEachItem: importStatementFragment(
169
- JAY_RUNTIME,
170
- "slowForEachItem",
171
- 1
172
- /* implementation */
173
- ),
174
168
  resolved: importStatementFragment(
175
169
  JAY_RUNTIME,
176
170
  "resolved",
@@ -1632,16 +1626,6 @@ function compileCoordinateExpr(template, varMappings) {
1632
1626
  function isStaticCoordinate(template) {
1633
1627
  return !template.includes("$");
1634
1628
  }
1635
- function computeInstanceKey(coordinateSuffix, context, prefix) {
1636
- switch (context) {
1637
- case "static":
1638
- return coordinateSuffix;
1639
- case "slowForEach":
1640
- return `${prefix}/${coordinateSuffix}`;
1641
- case "forEach":
1642
- return void 0;
1643
- }
1644
- }
1645
1629
  function compileForEachInstanceKeyExpr(coordinateSuffix, trackByExpr) {
1646
1630
  return `String(${trackByExpr}) + ',${coordinateSuffix}'`;
1647
1631
  }
@@ -1728,7 +1712,6 @@ export {
1728
1712
  compileCoordinateExpr,
1729
1713
  compileForEachInstanceKeyExpr,
1730
1714
  computeForEachInstanceKey,
1731
- computeInstanceKey,
1732
1715
  equalJayTypes,
1733
1716
  findDynamicContract,
1734
1717
  getBasePath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jay-framework/compiler-shared",
3
- "version": "0.17.4",
3
+ "version": "0.18.0",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "license": "Apache-2.0",
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "author": "",
27
27
  "dependencies": {
28
- "@jay-framework/component": "^0.17.4",
29
- "@jay-framework/runtime": "^0.17.4",
30
- "@jay-framework/secure": "^0.17.4",
31
- "@jay-framework/typescript-bridge": "^0.17.4",
28
+ "@jay-framework/component": "^0.18.0",
29
+ "@jay-framework/runtime": "^0.18.0",
30
+ "@jay-framework/secure": "^0.18.0",
31
+ "@jay-framework/typescript-bridge": "^0.18.0",
32
32
  "@types/js-yaml": "^4.0.9",
33
33
  "change-case": "^4.1.2",
34
34
  "js-beautify": "^1.14.11",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@caiogondim/strip-margin": "^1.0.0",
44
- "@jay-framework/dev-environment": "^0.17.4",
44
+ "@jay-framework/dev-environment": "^0.18.0",
45
45
  "@testing-library/jest-dom": "^6.2.0",
46
46
  "@types/js-beautify": "^1",
47
47
  "@types/node": "^20.11.5",