@jay-framework/compiler-shared 0.22.1 → 0.23.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 +12 -1
- package/dist/index.js +18 -0
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -629,6 +629,10 @@ interface PluginManifest {
|
|
|
629
629
|
component: string;
|
|
630
630
|
/** Human-readable description */
|
|
631
631
|
description?: string;
|
|
632
|
+
/** When true, route is dev-server tooling only (e.g. plugin settings UI).
|
|
633
|
+
* Exposed in RouteInfo for consumers like AIditor to filter from page pickers.
|
|
634
|
+
* Future: excluded from production builds. See Design Log #171. */
|
|
635
|
+
devOnly?: boolean;
|
|
632
636
|
}>;
|
|
633
637
|
/** CLI commands exposed by this plugin (Design Log #142).
|
|
634
638
|
* Run via `jay-stack run <plugin>/<command>`. */
|
|
@@ -869,4 +873,11 @@ declare function compileForEachInstanceKeyExpr(coordinateSuffix: string, trackBy
|
|
|
869
873
|
*/
|
|
870
874
|
declare function computeForEachInstanceKey(trackByValue: string, coordinateSuffix: string): string;
|
|
871
875
|
|
|
872
|
-
|
|
876
|
+
/**
|
|
877
|
+
* camelCase that preserves leading underscores.
|
|
878
|
+
* The standard camelCase from 'change-case' strips them
|
|
879
|
+
* (e.g., '_id' becomes 'id'), which breaks contract tag names.
|
|
880
|
+
*/
|
|
881
|
+
declare function camelCase(str: string): string;
|
|
882
|
+
|
|
883
|
+
export { type ActionManifestEntry, CSS_EXTENSION, type CompilerSourceFile, type DataScope, 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, type JayHtmlHeadMeta, JayHtmlString, type JayHtmlValidationContext, type JayHtmlValidationFinding, type JayHtmlValidatorFn, 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_STACK_COMPONENT, MAKE_JAY_TSX_COMPONENT, type MainRuntimeModes, type ParsedJayModuleSpecifier, type PluginComponentResolution, type PluginInitConfig, type PluginManifest, REACT, type RecursiveRegion, type Ref, type RefsTree, RenderFragment, type ResolvedBinding, RuntimeMode, SourceFileFormat, TSX_EXTENSION, TS_EXTENSION, type TemplatePart, WithValidations, addBuildEnvironment, camelCase, 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, resolveBinding, resolvePluginComponent, resolvePluginManifest, resolvePrimitiveType, walkElements, withOriginalTrace, withoutExtension };
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import fs from "fs";
|
|
|
10
10
|
import path from "path";
|
|
11
11
|
import YAML from "yaml";
|
|
12
12
|
import { createRequire } from "module";
|
|
13
|
+
import { camelCase as camelCase$1 } from "change-case";
|
|
13
14
|
const JAY_EXTENSION = ".jay-html";
|
|
14
15
|
const CSS_EXTENSION = ".css";
|
|
15
16
|
const JAY_CONTRACT_EXTENSION = ".jay-contract";
|
|
@@ -1709,6 +1710,22 @@ function compileForEachInstanceKeyExpr(coordinateSuffix, trackByExpr) {
|
|
|
1709
1710
|
function computeForEachInstanceKey(trackByValue, coordinateSuffix) {
|
|
1710
1711
|
return [trackByValue, coordinateSuffix].toString();
|
|
1711
1712
|
}
|
|
1713
|
+
function camelCase(str) {
|
|
1714
|
+
let leadingUnderscores = 0;
|
|
1715
|
+
for (const char of str) {
|
|
1716
|
+
if (char === "_") {
|
|
1717
|
+
leadingUnderscores++;
|
|
1718
|
+
} else {
|
|
1719
|
+
break;
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
if (leadingUnderscores === 0) {
|
|
1723
|
+
return camelCase$1(str);
|
|
1724
|
+
}
|
|
1725
|
+
const withoutLeadingUnderscores = str.slice(leadingUnderscores);
|
|
1726
|
+
const camelCased = camelCase$1(withoutLeadingUnderscores);
|
|
1727
|
+
return "_".repeat(leadingUnderscores) + camelCased;
|
|
1728
|
+
}
|
|
1712
1729
|
const s = createRequire(import.meta.url), e = s("typescript"), u = e, c = new Proxy(e, {
|
|
1713
1730
|
get(t, r) {
|
|
1714
1731
|
return t[r];
|
|
@@ -1786,6 +1803,7 @@ export {
|
|
|
1786
1803
|
TS_EXTENSION,
|
|
1787
1804
|
WithValidations,
|
|
1788
1805
|
addBuildEnvironment,
|
|
1806
|
+
camelCase,
|
|
1789
1807
|
checkValidationErrors,
|
|
1790
1808
|
compileCoordinateExpr,
|
|
1791
1809
|
compileForEachInstanceKeyExpr,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jay-framework/compiler-shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.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.
|
|
29
|
-
"@jay-framework/runtime": "^0.
|
|
30
|
-
"@jay-framework/secure": "^0.
|
|
31
|
-
"@jay-framework/typescript-bridge": "^0.
|
|
28
|
+
"@jay-framework/component": "^0.23.0",
|
|
29
|
+
"@jay-framework/runtime": "^0.23.0",
|
|
30
|
+
"@jay-framework/secure": "^0.23.0",
|
|
31
|
+
"@jay-framework/typescript-bridge": "^0.23.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.
|
|
44
|
+
"@jay-framework/dev-environment": "^0.23.0",
|
|
45
45
|
"@testing-library/jest-dom": "^6.2.0",
|
|
46
46
|
"@types/js-beautify": "^1",
|
|
47
47
|
"@types/node": "^20.11.5",
|