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 +1 -1
- package/templates/agent/AGENTS.md +15 -1
- package/templates/css/AGENTS.md +15 -1
- package/templates/css/package.json +1 -1
- package/templates/plugin/AGENTS.md +15 -1
- package/templates/plugin/package.json +1 -1
- package/templates/scss/AGENTS.md +15 -1
- package/templates/scss/package.json +1 -1
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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">
|
package/templates/css/AGENTS.md
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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">
|
package/templates/scss/AGENTS.md
CHANGED
|
@@ -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
|
-
|
|
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">
|