create-swift-rust 0.9.6 → 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.10.8";
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,6 +1,6 @@
1
1
  {
2
2
  "name": "create-swift-rust",
3
- "version": "0.9.6",
3
+ "version": "0.9.8",
4
4
  "description": "Create a new swift-rust project from a template.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://swift-rust.dev",
@@ -17,7 +17,7 @@
17
17
  "postcss": "^8.5.15",
18
18
  "react": "^19.0.0",
19
19
  "react-dom": "^19.0.0",
20
- "swift-rust": "^1.10.8",
20
+ "swift-rust": "^1.10.10",
21
21
  "tailwindcss": "^4.3.0"
22
22
  },
23
23
  "devDependencies": {
@@ -1,5 +1,5 @@
1
1
  import { FontStudio } from "@/components/font-studio";
2
- import type { Metadata } from "swift-rust";
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 dangerouslySetInnerHTML={{ __html: localCss }} />
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 { localFontCss, Lausanne } from "swift-rust/font";
568
- import { Lausanne as LausanneFont } from "swift-rust/font";
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 dangerouslySetInnerHTML={{ __html: css }} />
577
+ <SafeHtml as="style" content={css} />
578
578
  </head>
579
579
  <body>{children}</body>
580
580
  </html>