coralite 0.33.0 → 0.34.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.
Files changed (38) hide show
  1. package/README.md +49 -21
  2. package/dist/lib/client-runtime.d.ts +4 -2
  3. package/dist/lib/client-runtime.d.ts.map +1 -1
  4. package/dist/lib/coralite.d.ts +14 -16
  5. package/dist/lib/coralite.d.ts.map +1 -1
  6. package/dist/lib/errors.d.ts +16 -0
  7. package/dist/lib/errors.d.ts.map +1 -0
  8. package/dist/lib/index.d.ts +1 -0
  9. package/dist/lib/index.d.ts.map +1 -1
  10. package/dist/lib/index.js +761 -435
  11. package/dist/lib/index.js.map +4 -4
  12. package/dist/lib/script-manager.d.ts +4 -2
  13. package/dist/lib/script-manager.d.ts.map +1 -1
  14. package/dist/lib/type-helper.d.ts +3 -3
  15. package/dist/lib/utils.d.ts +59 -4
  16. package/dist/lib/utils.d.ts.map +1 -1
  17. package/dist/plugins/define-component.d.ts +11 -2
  18. package/dist/plugins/define-component.d.ts.map +1 -1
  19. package/dist/plugins/define-component.js +79 -47
  20. package/dist/plugins/metadata.js +5 -5
  21. package/dist/plugins/refs.d.ts.map +1 -1
  22. package/dist/plugins/refs.js +6 -9
  23. package/dist/plugins/static-assets.js +1 -1
  24. package/dist/types/collection.d.ts +1 -1
  25. package/dist/types/component.d.ts +2 -2
  26. package/dist/types/component.d.ts.map +1 -1
  27. package/dist/types/core.d.ts +1 -1
  28. package/dist/types/core.d.ts.map +1 -1
  29. package/dist/types/index.d.ts +2 -0
  30. package/dist/types/index.d.ts.map +1 -1
  31. package/dist/types/module.d.ts +6 -2
  32. package/dist/types/module.d.ts.map +1 -1
  33. package/dist/types/plugin.d.ts +5 -5
  34. package/dist/types/plugin.d.ts.map +1 -1
  35. package/dist/types/script.d.ts +23 -7
  36. package/dist/types/script.d.ts.map +1 -1
  37. package/llms.txt +106 -0
  38. package/package.json +3 -2
package/README.md CHANGED
@@ -113,9 +113,11 @@ Styles defined in the `<style>` block are automatically **scoped** to the compon
113
113
 
114
114
  ```html
115
115
  <template id="user-card">
116
- <div class="card">
116
+ <div class="card" ref="card">
117
117
  <h2>{{ formatName }}</h2>
118
- <p>Role: {{ userRole }}</p>
118
+ <p>{{ userMeta }}</p>
119
+ <slot>
120
+ <p class="stats">Logins: {{ loginCount }}</p>
119
121
  </div>
120
122
  </template>
121
123
 
@@ -125,41 +127,67 @@ Styles defined in the `<style>` block are automatically **scoped** to the compon
125
127
  border: 1px solid #eaeaea;
126
128
  padding: 1.5rem;
127
129
  border-radius: 8px;
130
+ cursor: pointer;
128
131
  }
129
132
  h2 {
130
133
  color: coral;
131
134
  }
135
+ .stats {
136
+ font-size: 0.85em;
137
+ color: gray;
138
+ }
132
139
  </style>
133
140
 
134
141
  <script type="module">
135
- import { defineComponent } from 'coralite/plugins'
142
+ import { defineComponent } from 'coralite'
143
+ import db from 'database'
136
144
 
137
145
  export default defineComponent({
138
- // Server-side state & data
139
- properties(context) {
140
- const { firstName, lastName, role } = context.properties
146
+ // INPUTS (Coerced from HTML string attributes)
147
+ attributes: {
148
+ firstName: { type: String, default: 'Unknown' },
149
+ lastName: { type: String, default: '' },
150
+ role: { type: String, default: 'Guest' }
151
+ },
152
+
153
+ // SERVER DATA (Async fetching, runs on build/server)
154
+ async data(context) {
155
+ // We can use the parsed attributes to fetch specific data
156
+ const stats = await db.fetchUserStats(context.attributes.firstName)
157
+
141
158
  return {
142
- formatName: `${firstName} ${lastName}`,
143
- userRole: role || 'Guest'
159
+ // These will be merged into the base state
160
+ department: stats.department || 'General',
161
+ loginCount: stats.loginCount || 0
144
162
  }
145
163
  },
146
164
 
165
+ // DERIVED STATE (Sync, pure functions, Read-Only Proxy)
166
+ getters: {
167
+ // state = attributes + data
168
+ formatName: (state) => `${state.firstName} ${state.lastName}`.trim(),
169
+ userMeta: (state) => `Role: ${state.role} | Dept: ${state.department}`
170
+ },
171
+
147
172
  // Light DOM transformations
148
173
  slots: {
149
- content(nodes, context) {
150
- return nodes.map(node => {
151
- // Perform SSR transformations on slot content
152
- return node
153
- })
174
+ default (nodes, context) {
175
+ return nodes.map(node => node)
154
176
  }
155
177
  },
156
178
 
157
- // Client-side behavior
158
- script({ properties, refs, root, page, signal }) {
159
- console.log(`Component mounted: ${properties.formatName}`)
179
+ // CLIENT CONTROLLER (Mutations, Events, Read/Write Proxy, Teardown)
180
+ script({ state, refs, root, signal }) {
181
+ console.log(`Component mounted: ${state.formatName}`)
160
182
 
161
- refs.card.addEventListener('click', () => {
162
- alert('Hello from the browser!')
183
+ // Use the refs dictionary provided by the core plugin to target the element
184
+ const cardEl = root.querySelector(`[ref="${refs.card}"]`)
185
+
186
+ cardEl.addEventListener('click', () => {
187
+ alert(`Hello from the browser, ${state.formatName}!`)
188
+
189
+ // automatically updates the DOM, and re-runs any dependent getters.
190
+ state.loginCount++
163
191
  }, { signal })
164
192
  }
165
193
  })
@@ -185,10 +213,10 @@ export default function seoPlugin(options = {}) {
185
213
  name: 'coralite-seo-plugin',
186
214
 
187
215
  // State Reducers: Patch the page context before rendering
188
- onBeforePageRender: async (context) => {
216
+ onBeforePageRender (context) {
189
217
  // Return a patch object; Coralite will safely deep-merge it for you!
190
218
  return {
191
- properties: {
219
+ state: {
192
220
  siteTitle: options.title || 'My Coralite Site',
193
221
  metaDescription: 'Generated by Coralite'
194
222
  }
@@ -196,7 +224,7 @@ export default function seoPlugin(options = {}) {
196
224
  },
197
225
 
198
226
  // Data Aggregators: Generate entirely new pages during the build
199
- onAfterPageRender: async (basePageResult) => {
227
+ onAfterPageRender (basePageResult) {
200
228
  // Access the engine instance via `this`
201
229
  // this.pages.getItem('/index.html')
202
230
 
@@ -9,10 +9,11 @@
9
9
  * @param {string} options.sharedChunkPath - The filename of the shared chunk.
10
10
  * @param {Object} options.chunkManifest - Manifest mapping component IDs to their chunk filenames.
11
11
  * @param {Object.<string, InstanceContext>} options.instances - Map of instance data.
12
- * @param {string} options.mode - Build mode ('development' or 'production').
12
+ * @param {string} options.mode - Build mode ('development' or 'development').
13
+ * @param {Object} [options.renderContext] - Build-time render context.
13
14
  * @returns {string} The generated JavaScript runtime.
14
15
  */
15
- export function generateClientRuntime({ base, sharedChunkPath, chunkManifest, instances, mode }: {
16
+ export function generateClientRuntime({ base, sharedChunkPath, chunkManifest, instances, mode, renderContext }: {
16
17
  base: string;
17
18
  sharedChunkPath: string;
18
19
  chunkManifest: any;
@@ -20,6 +21,7 @@ export function generateClientRuntime({ base, sharedChunkPath, chunkManifest, in
20
21
  [x: string]: InstanceContext;
21
22
  };
22
23
  mode: string;
24
+ renderContext?: any;
23
25
  }): string;
24
26
  import type { InstanceContext } from '../types/index.js';
25
27
  //# sourceMappingURL=client-runtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-runtime.d.ts","sourceRoot":"","sources":["../../lib/client-runtime.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,iGAPG;IAAwB,IAAI,EAApB,MAAM;IACU,eAAe,EAA/B,MAAM;IACU,aAAa;IACa,SAAS,EAAnD;YAAQ,MAAM,GAAE,eAAe;KAAC;IAChB,IAAI,EAApB,MAAM;CACd,GAAU,MAAM,CA8elB;qCA1fmC,mBAAmB"}
1
+ {"version":3,"file":"client-runtime.d.ts","sourceRoot":"","sources":["../../lib/client-runtime.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;GAWG;AACH,gHARG;IAAwB,IAAI,EAApB,MAAM;IACU,eAAe,EAA/B,MAAM;IACU,aAAa;IACa,SAAS,EAAnD;YAAQ,MAAM,GAAE,eAAe;KAAC;IAChB,IAAI,EAApB,MAAM;IACW,aAAa;CACtC,GAAU,MAAM,CAmkBlB;qCAhlBmC,mBAAmB"}
@@ -10,7 +10,6 @@
10
10
  * CoraliteComponentRoot,
11
11
  * CoraliteCollectionEventSet,
12
12
  * CoraliteComponentResult,
13
- * CoraliteProperties,
14
13
  * InstanceContext,
15
14
  * CoraliteConfig,
16
15
  * CoraliteFilePath,
@@ -47,7 +46,6 @@ export class Coralite {
47
46
  * CoraliteComponentRoot,
48
47
  * CoraliteCollectionEventSet,
49
48
  * CoraliteComponentResult,
50
- * CoraliteProperties,
51
49
  * InstanceContext,
52
50
  * CoraliteConfig,
53
51
  * CoraliteFilePath,
@@ -177,10 +175,10 @@ export class Coralite {
177
175
  * @internal
178
176
  *
179
177
  * @param {string | string[]} [path] - Path to a single page or array of page paths relative to the pages directory. If omitted, compiles all pages.
180
- * @param {Object} [properties] - Properties to be passed to the page
178
+ * @param {Object} [state] - Properties to be passed to the page
181
179
  * @returns {AsyncGenerator<CoraliteResult>}
182
180
  */
183
- _generatePages(path?: string | string[], properties?: any): AsyncGenerator<CoraliteResult>;
181
+ _generatePages(path?: string | string[], state?: any): AsyncGenerator<CoraliteResult>;
184
182
  outputFiles: {};
185
183
  /**
186
184
  * Compiles pages and collects the results with controlled concurrency.
@@ -459,14 +457,14 @@ export class Coralite {
459
457
  * @param {Object} renderContext - The current build render context.
460
458
  * @param {CoralitePage} page - The global page object
461
459
  * @param {CoraliteComponentRoot} root - The root element of the component
462
- * @param {Object} properties - The current token properties and state available
460
+ * @param {Object} state - The current token state and state available
463
461
  * @returns {Promise<void>}
464
462
  */
465
- _processDependentComponents(componentIds: string[], renderContext: any, page: CoralitePage, root: CoraliteComponentRoot, properties?: any): Promise<void>;
463
+ _processDependentComponents(componentIds: string[], renderContext: any, page: CoralitePage, root: CoraliteComponentRoot, state?: any): Promise<void>;
466
464
  /**
467
465
  * @param {Object} options
468
466
  * @param {string} options.id - id - Unique identifier for the component
469
- * @param {CoraliteModuleDefinitions} [options.properties={}] - Token properties available for replacement
467
+ * @param {CoraliteModuleDefinitions} [options.state={}] - Token state available for replacement
470
468
  * @param {CoraliteElement} [options.element] - Mapping of component IDs to their module definitions
471
469
  * @param {CoralitePage} options.page - The global page object
472
470
  * @param {CoraliteComponentRoot} options.root - The root element of the component
@@ -476,9 +474,9 @@ export class Coralite {
476
474
  * @param {boolean} [head=true] - Indicates if the current function call is for the head of the recursion
477
475
  * @returns {Promise<CoraliteElement | void>}
478
476
  */
479
- createComponentElement({ id, properties, element, page, root, contextId, index, renderContext }: {
477
+ createComponentElement({ id, state, element, page, root, contextId, index, renderContext }: {
480
478
  id: string;
481
- properties?: CoraliteModuleDefinitions;
479
+ state?: CoraliteModuleDefinitions;
482
480
  element?: CoraliteElement;
483
481
  page: CoralitePage;
484
482
  root: CoraliteComponentRoot;
@@ -508,7 +506,7 @@ export class Coralite {
508
506
  *
509
507
  * @param {Object} data
510
508
  * @param {CoraliteModule} data.module - The Coralite module to parse
511
- * @param {CoraliteModuleDefinitions} data.properties - Replacement tokens for the component
509
+ * @param {CoraliteModuleDefinitions} data.state - Replacement tokens for the component
512
510
  * @param {CoralitePage} data.page - The global page object
513
511
  * @param {CoraliteElement} data.root - The Coralite module to parse
514
512
  * @param {string} data.contextId - Context Id
@@ -516,9 +514,9 @@ export class Coralite {
516
514
  *
517
515
  * @returns {Promise<CoraliteModuleDefinitions>}
518
516
  */
519
- _evaluateDevelopment({ module, properties, page, root, contextId, renderContext }: {
517
+ _evaluateDevelopment({ module, state, page, root, contextId, renderContext }: {
520
518
  module: CoraliteModule;
521
- properties: CoraliteModuleDefinitions;
519
+ state: CoraliteModuleDefinitions;
522
520
  page: CoralitePage;
523
521
  root: CoraliteElement;
524
522
  contextId: string;
@@ -530,7 +528,7 @@ export class Coralite {
530
528
  *
531
529
  * @param {Object} data
532
530
  * @param {CoraliteModule} data.module - The Coralite module to parse
533
- * @param {CoraliteModuleDefinitions} data.properties - Replacement tokens for the component
531
+ * @param {CoraliteModuleDefinitions} data.state - Replacement tokens for the component
534
532
  * @param {CoralitePage} data.page - The global page object
535
533
  * @param {CoraliteElement} data.root - The Coralite module to parse
536
534
  * @param {string} data.contextId - Context Id
@@ -538,9 +536,9 @@ export class Coralite {
538
536
  *
539
537
  * @returns {Promise<CoraliteModuleDefinitions>}
540
538
  */
541
- _evaluateProduction({ module, properties, page, root, contextId, renderContext }: {
539
+ _evaluateProduction({ module, state, page, root, contextId, renderContext }: {
542
540
  module: CoraliteModule;
543
- properties: CoraliteModuleDefinitions;
541
+ state: CoraliteModuleDefinitions;
544
542
  page: CoralitePage;
545
543
  root: CoraliteElement;
546
544
  contextId: string;
@@ -552,7 +550,7 @@ export class Coralite {
552
550
  *
553
551
  * @param {Object} data -
554
552
  * @param {CoraliteModule} data.module - The Coralite module to parse
555
- * @param {CoraliteModuleDefinitions} data.properties - Replacement tokens for the component
553
+ * @param {CoraliteModuleDefinitions} data.state - Replacement tokens for the component
556
554
  * @param {CoralitePage} data.page - The global page object
557
555
  * @param {CoraliteElement} data.element - The Coralite module to parse
558
556
  * @param {string} data.contextId - Context Id
@@ -1 +1 @@
1
- {"version":3,"file":"coralite.d.ts","sourceRoot":"","sources":["../../lib/coralite.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;GAEG;AAEH;;;;;;;;;;;;GAYG;AACH,2IAXW,cAAc,QAgMxB;;IA1ND;;;;;;;;;;;;;;;;;;OAkBG;IAEH;;OAEG;IAEH;;;;;;;;;;;;OAYG;IACH,8HAXW,cAAc,EAgMxB;IAvJC,6DAA+B;IAG/B;;;;;;;;;;;;;;MAWC;IAED,oDAAoD;IACpD,eADW,GAAG,CAAC,MAAM,EAAE,sBAAsB,EAAE,CAAC,CAClB;IAG9B;;;;;;;;;;;;;;MAcC;IAGD,8BAAqD;IAGrD;;;;;;;;8BAu5BS,qBAAqB,GAAG,eAAe,GAAG,eAAe,EAAE,YAC3D,oBAAoB,KAClB,MAAM;;;MAr4BhB;IA6FH;;;OAGG;IACH,cAFa,OAAO,CAAC,IAAI,CAAC,CA2QzB;IAxQC,+BA2CE;IAWF;;OAEG;IACH;;MAA6C;IAC7C;;OAEG;IACH;;MAA+C;IA6L/C,0BAKE;IAWJ;;;;;;;OAOG;IACH,2CAJG;QAAqC,KAAK,EAAlC,MAAM,GAAG,KAAK,GAAG,KA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C,OAAO,CAAC,CAAC,CAAC,CA6BtB;IAED;;;;;;;OAOG;IACH,qBAHW,WAAW,GAAC,cAAc,GAAC,cAAc,GAAC,gBAAgB,GAAC,mBAAmB,GAAC,mBAAmB,GAAC,oBAAoB,GAAC,mBAAmB,GAAC,eAAe,GAAC,cAAc,4BAapL;;;wCAl5CU,cAAc,KACZ,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG;oCAzwBrB,mBAAmB;4CAAnB,mBAAmB;8BAjCC,qBAAqB;6BALT,WAAW;4BAAX,WAAW;+BAGiB,YAAY;2CAmCxE,mBAAmB;qCAAnB,mBAAmB;0CAIU,gBAAgB;+BAxBxB,iBAAiB;oCAoBtC,mBAAmB;kCAAnB,mBAAmB;+CAAnB,mBAAmB;qCAAnB,mBAAmB;sCAAnB,mBAAmB;oCAAnB,mBAAmB"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ *
3
+ */
4
+ export class CoraliteError extends Error {
5
+ /**
6
+ *
7
+ */
8
+ constructor(message: any, options?: {});
9
+ isCoraliteError: boolean;
10
+ componentId: any;
11
+ filePath: any;
12
+ instanceId: any;
13
+ pagePath: any;
14
+ cause: any;
15
+ }
16
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../lib/errors.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;IACE;;OAEG;IACH,wCAaC;IAVC,yBAA2B;IAC3B,iBAAsC;IACtC,cAAgC;IAChC,gBAAoC;IACpC,cAAgC;IAI9B,WAA0B;CAG/B"}
@@ -4,6 +4,7 @@ export * from "./utils.js";
4
4
  export * from "./plugin.js";
5
5
  export * from "./config.js";
6
6
  export * from "./type-helper.js";
7
+ export * from "./errors.js";
7
8
  export * from "./script-manager.js";
8
9
  export * from "#plugins";
9
10
  export { Coralite };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.js"],"names":[],"mappings":";;;;;;;;;;qBAAqB,eAAe"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.js"],"names":[],"mappings":";;;;;;;;;;;qBAAqB,eAAe"}