vite-plugin-ember 0.2.0 → 0.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/README.md +1 -0
- package/package.json +1 -1
- package/src/vitepress/code-preview.vue +26 -1
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ Write `.gjs` / `.gts` code fences in markdown and see them rendered on the page
|
|
|
12
12
|
## Features
|
|
13
13
|
|
|
14
14
|
- **Inline code fences** — use ` ```gjs live ` in markdown for instant interactive previews
|
|
15
|
+
- **Preview mode** — add `preview` to show a collapsible source code panel alongside the rendered component
|
|
15
16
|
- **Full Ember support** — class components, `@tracked` state, `{{on}}` modifier, and TypeScript via `.gts`
|
|
16
17
|
- **Zero-config compilation** — content-tag preprocessing, Babel template compilation, decorator transforms, and `@ember/*` / `@glimmer/*` module resolution handled automatically
|
|
17
18
|
- **`@embroider/macros` shim** — runtime stubs so `ember-source` ESM imports just work
|
package/package.json
CHANGED
|
@@ -57,7 +57,10 @@ onBeforeUnmount(() => {
|
|
|
57
57
|
<div class="ember-playground">
|
|
58
58
|
<div v-if="error" class="ember-playground__error">{{ error }}</div>
|
|
59
59
|
<div ref="mountEl"></div>
|
|
60
|
-
<
|
|
60
|
+
<details v-if="$slots.default" class="ember-playground__source">
|
|
61
|
+
<summary>Show code</summary>
|
|
62
|
+
<slot />
|
|
63
|
+
</details>
|
|
61
64
|
</div>
|
|
62
65
|
</template>
|
|
63
66
|
|
|
@@ -79,4 +82,26 @@ onBeforeUnmount(() => {
|
|
|
79
82
|
white-space: pre-wrap;
|
|
80
83
|
word-break: break-word;
|
|
81
84
|
}
|
|
85
|
+
|
|
86
|
+
.ember-playground__source {
|
|
87
|
+
margin-top: 12px;
|
|
88
|
+
border-top: 1px solid var(--vp-c-divider);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ember-playground__source summary {
|
|
92
|
+
padding: 8px 0 4px;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
font-size: 13px;
|
|
95
|
+
color: var(--vp-c-text-2);
|
|
96
|
+
user-select: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ember-playground__source summary:hover {
|
|
100
|
+
color: var(--vp-c-text-1);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ember-playground__source :deep(div[class*='language-']) {
|
|
104
|
+
margin: 0;
|
|
105
|
+
border-radius: 0 0 8px 8px;
|
|
106
|
+
}
|
|
82
107
|
</style>
|