create-coralite 1.2.0 → 1.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-coralite",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Coralite scaffolding script",
5
5
  "bin": {
6
6
  "create-coralite": "bin/index.js",
@@ -77,7 +77,21 @@ Read this file before starting any task in this project. Rules apply to every ta
77
77
 
78
78
  A component is **static** when its definition serializes zero client lifecycle code: `client: null`, `getters: {}`, no `server`, no reactive `state` mutations. This is the correct meaning of "zero-JS" in Coralite — the component module is still bundled into `dist/assets/js/` for imperative hydration, but no `client()` handler runs in the browser.
79
79
 
80
- A `<script type="module">` that exports only `attributes` (or `style`) emits 0 bytes of browser runtime lifecycle code.
80
+ Purely static components do not require a `<script>` tag at all when they only define markup and styles:
81
+
82
+ ```html
83
+ <template id="ui-card">
84
+ <div class="card">
85
+ <slot></slot>
86
+ </div>
87
+ </template>
88
+
89
+ <style>
90
+ :host { display: block }
91
+ </style>
92
+ ```
93
+
94
+ When attributes or types are needed, author a `<script type="module">` exporting `attributes` (or `style`). Both emit 0 bytes of browser runtime lifecycle code. If a `<script type="module">` is included (e.g., for authoring uniformity, comments, or module helpers), no dummy placeholder exports like `export const attributes = {}` are needed — export-free scripts natively evaluate to Zero-JS static components.
81
95
 
82
96
  ```html
83
97
  <template id="ui-button">
@@ -77,7 +77,21 @@ Read this file before starting any task in this project. Rules apply to every ta
77
77
 
78
78
  A component is **static** when its definition serializes zero client lifecycle code: `client: null`, `getters: {}`, no `server`, no reactive `state` mutations. This is the correct meaning of "zero-JS" in Coralite — the component module is still bundled into `dist/assets/js/` for imperative hydration, but no `client()` handler runs in the browser.
79
79
 
80
- A `<script type="module">` that exports only `attributes` (or `style`) emits 0 bytes of browser runtime lifecycle code.
80
+ Purely static components do not require a `<script>` tag at all when they only define markup and styles:
81
+
82
+ ```html
83
+ <template id="ui-card">
84
+ <div class="card">
85
+ <slot></slot>
86
+ </div>
87
+ </template>
88
+
89
+ <style>
90
+ :host { display: block }
91
+ </style>
92
+ ```
93
+
94
+ When attributes or types are needed, author a `<script type="module">` exporting `attributes` (or `style`). Both emit 0 bytes of browser runtime lifecycle code. If a `<script type="module">` is included (e.g., for authoring uniformity, comments, or module helpers), no dummy placeholder exports like `export const attributes = {}` are needed — export-free scripts natively evaluate to Zero-JS static components.
81
95
 
82
96
  ```html
83
97
  <template id="ui-button">
@@ -11,6 +11,6 @@
11
11
  "fix": "coralite fix"
12
12
  },
13
13
  "devDependencies": {
14
- "coralite": "^1.2.0"
14
+ "coralite": "^1.3.0"
15
15
  }
16
16
  }
@@ -77,7 +77,21 @@ Read this file before starting any task in this project. Rules apply to every ta
77
77
 
78
78
  A component is **static** when its definition serializes zero client lifecycle code: `client: null`, `getters: {}`, no `server`, no reactive `state` mutations. This is the correct meaning of "zero-JS" in Coralite — the component module is still bundled into `dist/assets/js/` for imperative hydration, but no `client()` handler runs in the browser.
79
79
 
80
- A `<script type="module">` that exports only `attributes` (or `style`) emits 0 bytes of browser runtime lifecycle code.
80
+ Purely static components do not require a `<script>` tag at all when they only define markup and styles:
81
+
82
+ ```html
83
+ <template id="ui-card">
84
+ <div class="card">
85
+ <slot></slot>
86
+ </div>
87
+ </template>
88
+
89
+ <style>
90
+ :host { display: block }
91
+ </style>
92
+ ```
93
+
94
+ When attributes or types are needed, author a `<script type="module">` exporting `attributes` (or `style`). Both emit 0 bytes of browser runtime lifecycle code. If a `<script type="module">` is included (e.g., for authoring uniformity, comments, or module helpers), no dummy placeholder exports like `export const attributes = {}` are needed — export-free scripts natively evaluate to Zero-JS static components.
81
95
 
82
96
  ```html
83
97
  <template id="ui-button">
@@ -18,6 +18,6 @@
18
18
  "node": ">=22.22.2"
19
19
  },
20
20
  "devDependencies": {
21
- "coralite": "^1.2.0"
21
+ "coralite": "^1.3.0"
22
22
  }
23
23
  }
@@ -77,7 +77,21 @@ Read this file before starting any task in this project. Rules apply to every ta
77
77
 
78
78
  A component is **static** when its definition serializes zero client lifecycle code: `client: null`, `getters: {}`, no `server`, no reactive `state` mutations. This is the correct meaning of "zero-JS" in Coralite — the component module is still bundled into `dist/assets/js/` for imperative hydration, but no `client()` handler runs in the browser.
79
79
 
80
- A `<script type="module">` that exports only `attributes` (or `style`) emits 0 bytes of browser runtime lifecycle code.
80
+ Purely static components do not require a `<script>` tag at all when they only define markup and styles:
81
+
82
+ ```html
83
+ <template id="ui-card">
84
+ <div class="card">
85
+ <slot></slot>
86
+ </div>
87
+ </template>
88
+
89
+ <style>
90
+ :host { display: block }
91
+ </style>
92
+ ```
93
+
94
+ When attributes or types are needed, author a `<script type="module">` exporting `attributes` (or `style`). Both emit 0 bytes of browser runtime lifecycle code. If a `<script type="module">` is included (e.g., for authoring uniformity, comments, or module helpers), no dummy placeholder exports like `export const attributes = {}` are needed — export-free scripts natively evaluate to Zero-JS static components.
81
95
 
82
96
  ```html
83
97
  <template id="ui-button">
@@ -11,6 +11,6 @@
11
11
  "fix": "coralite fix"
12
12
  },
13
13
  "devDependencies": {
14
- "coralite": "^1.2.0"
14
+ "coralite": "^1.3.0"
15
15
  }
16
16
  }