@jay-framework/fullstack-component 0.16.3 → 0.16.4

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
@@ -134,8 +134,10 @@ interface JayStackComponentDefinition<Refs extends object, SlowVS extends object
134
134
  slowlyRender: RenderSlowly<Services, PropsT, SlowVS, any>;
135
135
  fastRender: RenderFast<Services, PropsT, FastVS, any>;
136
136
  comp: ComponentConstructor<PropsT, Refs, InteractiveVS, Contexts, CompCore>;
137
- /** Client-side defaults for when server fast ViewState is not available
138
- * (e.g., new forEach items created on the client). Client-only. */
137
+ /** Initial ViewState for headless instances created dynamically on the client
138
+ * (e.g., new forEach items added via "Add Item" button). Only needed when the
139
+ * component is used inside forEach with client-side item creation. Not needed
140
+ * for components outside forEach — use withFastRender for SSR initial state. */
139
141
  clientDefaults?: (props: PropsT) => {
140
142
  viewState: FastVS;
141
143
  carryForward?: any;
@@ -159,8 +161,8 @@ type AnyJayStackComponentDefinition = JayStackComponentDefinition<object, object
159
161
  * ```
160
162
  */
161
163
  interface GeneratedContractYaml {
162
- /** Contract name (PascalCase, e.g., "BlogPostsList") */
163
- name: string;
164
+ /** Contract name (PascalCase, e.g., "BlogPostsList"). Optional for single-contract generators — omit to use the prefix as the contract name. */
165
+ name?: string;
164
166
  /** Contract definition in YAML format */
165
167
  yaml: string;
166
168
  /** Optional description for the contract */
package/dist/index.js CHANGED
@@ -91,6 +91,9 @@ class BuilderImplementation {
91
91
  this.fastRender = fastRender;
92
92
  return this;
93
93
  }
94
+ /** Provide initial ViewState for headless instances created dynamically on the client
95
+ * (e.g., new forEach items). Only needed when used inside forEach with client-side
96
+ * item creation. Not needed for components outside forEach. */
94
97
  withClientDefaults(fn) {
95
98
  this.clientDefaults = fn;
96
99
  return this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jay-framework/fullstack-component",
3
- "version": "0.16.3",
3
+ "version": "0.16.4",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -26,12 +26,12 @@
26
26
  "test:watch": "vitest"
27
27
  },
28
28
  "dependencies": {
29
- "@jay-framework/component": "^0.16.3",
30
- "@jay-framework/runtime": "^0.16.3"
29
+ "@jay-framework/component": "^0.16.4",
30
+ "@jay-framework/runtime": "^0.16.4"
31
31
  },
32
32
  "devDependencies": {
33
- "@jay-framework/dev-environment": "^0.16.3",
34
- "@jay-framework/jay-cli": "^0.16.3",
33
+ "@jay-framework/dev-environment": "^0.16.4",
34
+ "@jay-framework/jay-cli": "^0.16.4",
35
35
  "@types/express": "^5.0.2",
36
36
  "@types/node": "^22.15.21",
37
37
  "nodemon": "^3.0.3",