create-swift-rust 0.9.7 → 0.9.8
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.js
CHANGED
|
@@ -465,7 +465,7 @@ async function askQuestions(flags, positional) {
|
|
|
465
465
|
// Fallback pin used when the npm registry can't be reached at scaffold time.
|
|
466
466
|
// Kept in sync with the current swift-rust release so a generated project never
|
|
467
467
|
// advertises an ancient version. `^` still lets it float forward within the major.
|
|
468
|
-
const SWIFT_RUST_FALLBACK = "^1.
|
|
468
|
+
const SWIFT_RUST_FALLBACK = "^1.11.0";
|
|
469
469
|
// Resolve the newest published swift-rust version so the scaffolded package.json
|
|
470
470
|
// reflects reality (e.g. ^1.10.5) instead of a stale literal like ^1.0.0. A caret
|
|
471
471
|
// range already installs the latest matching release, but showing the real number
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FontStudio } from "@/components/font-studio";
|
|
2
|
-
import type
|
|
2
|
+
import { SafeHtml, createTrustedHtml, type Metadata } from "swift-rust";
|
|
3
3
|
import { localFontCss } from "swift-rust/font";
|
|
4
4
|
import {
|
|
5
5
|
DxSlight,
|
|
@@ -470,7 +470,7 @@ export default function FontsPage() {
|
|
|
470
470
|
from <code className="font-mono text-xs">/_swift-rust/fonts/</code>. Use them when you
|
|
471
471
|
need exact control over weights or want to avoid a network round-trip.
|
|
472
472
|
</p>
|
|
473
|
-
<style
|
|
473
|
+
<SafeHtml as="style" content={createTrustedHtml(localCss)} />
|
|
474
474
|
|
|
475
475
|
<div className="mb-6 grid grid-cols-1 gap-3 sm:grid-cols-2">
|
|
476
476
|
{LOCAL.filter((f) => f.name !== "Zimula").map((f) => {
|
|
@@ -564,17 +564,17 @@ export { heading };`}
|
|
|
564
564
|
<CodeBlock
|
|
565
565
|
filename="app/layout.tsx"
|
|
566
566
|
caption="Local font CSS · inject @font-face declarations from the framework"
|
|
567
|
-
code={`import {
|
|
568
|
-
import { Lausanne
|
|
567
|
+
code={`import { SafeHtml, createTrustedHtml } from "swift-rust";
|
|
568
|
+
import { localFontCss, Lausanne } from "swift-rust/font";
|
|
569
569
|
|
|
570
|
-
const css = localFontCss();
|
|
570
|
+
const css = createTrustedHtml(localFontCss());
|
|
571
571
|
const lausanne = Lausanne({ variable: true });
|
|
572
572
|
|
|
573
573
|
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
574
574
|
return (
|
|
575
575
|
<html className={lausanne.variable}>
|
|
576
576
|
<head>
|
|
577
|
-
<style
|
|
577
|
+
<SafeHtml as="style" content={css} />
|
|
578
578
|
</head>
|
|
579
579
|
<body>{children}</body>
|
|
580
580
|
</html>
|