@bleedingdev/modern-js-sandpack-react 3.2.0-ultramodern.95 → 3.2.0-ultramodern.97

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.
@@ -61,8 +61,8 @@ const MWAFiles = {
61
61
  "src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family:\n PingFang SC,\n Hiragino Sans GB,\n Microsoft YaHei,\n Arial,\n sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo,\n Monaco,\n Lucida Console,\n Liberation Mono,\n DejaVu Sans Mono,\n Bitstream Vera Sans Mono,\n Courier New,\n monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
62
62
  "src/routes/layout.tsx": "import { Outlet } from '';\nimport './index.css';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
63
63
  "src/routes/[lang]/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport { useModernI18n } from \'@modern-js/plugin-i18n/runtime\';\nimport { useLocation } from \'\';\nimport { useTranslation } from \'react-i18next\';\n\nconst fallbackLanguage = \'en\';\nconst supportedLanguages = [\'en\', \'cs\'] as const;\ntype SupportedLanguage = (typeof supportedLanguages)[number];\n\nconst isSupportedLanguage = (value: string): value is SupportedLanguage =>\n supportedLanguages.includes(value as SupportedLanguage);\n\nconst stripLanguagePrefix = (pathname: string) => {\n const segments = pathname.split(\'/\').filter(Boolean);\n if (segments.length > 0 && isSupportedLanguage(segments[0] ?? \'\')) {\n segments.shift();\n }\n return `/${segments.join(\'/\')}`;\n};\n\nconst localizedPath = (pathname: string, language: SupportedLanguage) => {\n const pathWithoutLanguage = stripLanguagePrefix(pathname);\n return pathWithoutLanguage === \'/\' ? `/${language}` : `/${language}${pathWithoutLanguage}`;\n};\n\nconst absoluteUrl = (pathname: string) => {\n const origin = ULTRAMODERN_SITE_URL.replace(/\\/+$/u, \'\');\n return `${origin}${pathname}`;\n};\n\nconst locationSuffix = (location: { hash?: unknown; search?: unknown; searchStr?: unknown }) => {\n const { hash, search, searchStr } = location;\n let locationSearch = \'\';\n if (typeof searchStr === \'string\') {\n locationSearch = searchStr;\n } else if (typeof search === \'string\') {\n locationSearch = search;\n }\n const locationHash = typeof hash === \'string\' ? hash : \'\';\n return `${locationSearch}${locationHash}`;\n};\n\nconst Index = () => {\n const { t } = useTranslation();\n const { language } = useModernI18n();\n const location = useLocation();\n const currentLanguage = isSupportedLanguage(language) ? language : fallbackLanguage;\n const canonicalPath = localizedPath(location.pathname, currentLanguage);\n const suffix = locationSuffix(location);\n const languageOptions = supportedLanguages.map((code) => ({\n code,\n href: `${localizedPath(location.pathname, code)}${suffix}`,\n label: t(`home.language.${code}`),\n }));\n return (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n <link rel="canonical" href={absoluteUrl(canonicalPath)} />\n {supportedLanguages.map((code) => (\n <link\n href={absoluteUrl(localizedPath(location.pathname, code))}\n hrefLang={code}\n key={code}\n rel="alternate"\n />\n ))}\n <link\n href={absoluteUrl(localizedPath(location.pathname, fallbackLanguage))}\n hrefLang="x-default"\n rel="alternate"\n />\n </Helmet>\n <main>\n <nav className="language-switcher" aria-label={t(\'home.language.switcher\')}>\n {languageOptions.map((option) => (\n <a\n aria-current={currentLanguage === option.code ? \'page\' : undefined}\n href={option.href}\n key={option.code}\n >\n {option.label}\n </a>\n ))}\n </nav>\n <div className="title">\n {t(\'home.title\')}\n <img\n alt={t(\'home.logoAlt\')}\n className="logo"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"\n />\n <p className="name">{t(\'home.name\')}</p>\n </div>\n <p className="description">\n {t(\'home.description.intro\')}{\' \'}\n <code className="code">presetUltramodern(...)</code>{\' \'}\n {t(\'home.description.afterPreset\')}{\' \'}\n <code className="code">modern.config.ts</code>{\' \'}\n {t(\'home.description.afterConfig\')}{\' \'}\n <code className="code">pnpm run ultramodern:check</code>{\' \'}\n {t(\'home.description.end\')}\n </p>\n <div className="grid">\n <a\n href="https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.guide.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.guide.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.config.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.config.body\')}</p>\n </a>\n <a\n href="https://github.com/BleedingDev/ultramodern.js/blob/main-ultramodern/packages/toolkit/create/template/.github/workflows/ultramodern-gates.yml.handlebars"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.gates.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.gates.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/bff/effect.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.bff.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.bff.body\')}</p>\n </a>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Index;\n',
64
- "config/public/locales/en/translation.json": '{\n "home": {\n "bff": {\n "response": "Effect HttpApi response:"\n },\n "cards": {\n "bff": {\n "body": "Add server logic when a route needs typed data or mutation handling.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Tune generated defaults in modern.config.ts as the app grows.",\n "title": "Configure presetUltramodern"\n },\n "gates": {\n "body": "Run ultramodern:check, tests, typecheck, lint, and build before release.",\n "title": "Ultramodern Gates"\n },\n "guide": {\n "body": "Start with one app, then add routes, APIs, and packages when they help.",\n "title": "UltraModern.js Guide"\n }\n },\n "description": {\n "afterConfig": "as the app grows, and keep",\n "afterPreset": "profile. Tune",\n "end": "green while you add routes, APIs, and workspace packages.",\n "intro": "Start from the public"\n },\n "language": {\n "cs": "Czech",\n "en": "English",\n "switcher": "Language"\n },\n "logoAlt": "UltraModern.js Logo",\n "name": "Simple app starter",\n "title": "UltraModern.js Starter"\n }\n}\n',
65
- "config/public/locales/cs/translation.json": '{\n "home": {\n "bff": {\n "response": "Odpoved Effect HttpApi:"\n },\n "cards": {\n "bff": {\n "body": "Pridej serverovou logiku, kdyz route potrebuje typovana data nebo mutace.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Upravuj vychozi hodnoty v modern.config.ts podle rustu aplikace.",\n "title": "Konfigurace presetUltramodern"\n },\n "gates": {\n "body": "Pred releasem spust ultramodern:check, testy, typecheck, lint a build.",\n "title": "Ultramodern kontroly"\n },\n "guide": {\n "body": "Zacni jednou aplikaci a pridej routy, API nebo balicky az kdyz pomuzou.",\n "title": "UltraModern.js pruvodce"\n }\n },\n "description": {\n "afterConfig": "podle rustu aplikace a udrzuj",\n "afterPreset": "profilem. Lad",\n "end": "zelene pri pridavani rout, API a workspace balicku.",\n "intro": "Zacni s verejnym"\n },\n "language": {\n "cs": "Cestina",\n "en": "Anglictina",\n "switcher": "Jazyk"\n },\n "logoAlt": "Logo UltraModern.js",\n "name": "Jednoduchy starter aplikace",\n "title": "UltraModern.js Starter"\n }\n}\n'
64
+ "config/public/locales/cs/translation.json": '{\n "home": {\n "bff": {\n "response": "Odpoved Effect HttpApi:"\n },\n "cards": {\n "bff": {\n "body": "Pridej serverovou logiku, kdyz route potrebuje typovana data nebo mutace.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Upravuj vychozi hodnoty v modern.config.ts podle rustu aplikace.",\n "title": "Konfigurace presetUltramodern"\n },\n "gates": {\n "body": "Pred releasem spust ultramodern:check, testy, typecheck, lint a build.",\n "title": "Ultramodern kontroly"\n },\n "guide": {\n "body": "Zacni jednou aplikaci a pridej routy, API nebo balicky az kdyz pomuzou.",\n "title": "UltraModern.js pruvodce"\n }\n },\n "description": {\n "afterConfig": "podle rustu aplikace a udrzuj",\n "afterPreset": "profilem. Lad",\n "end": "zelene pri pridavani rout, API a workspace balicku.",\n "intro": "Zacni s verejnym"\n },\n "language": {\n "cs": "Cestina",\n "en": "Anglictina",\n "switcher": "Jazyk"\n },\n "logoAlt": "Logo UltraModern.js",\n "name": "Jednoduchy starter aplikace",\n "title": "UltraModern.js Starter"\n }\n}\n',
65
+ "config/public/locales/en/translation.json": '{\n "home": {\n "bff": {\n "response": "Effect HttpApi response:"\n },\n "cards": {\n "bff": {\n "body": "Add server logic when a route needs typed data or mutation handling.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Tune generated defaults in modern.config.ts as the app grows.",\n "title": "Configure presetUltramodern"\n },\n "gates": {\n "body": "Run ultramodern:check, tests, typecheck, lint, and build before release.",\n "title": "Ultramodern Gates"\n },\n "guide": {\n "body": "Start with one app, then add routes, APIs, and packages when they help.",\n "title": "UltraModern.js Guide"\n }\n },\n "description": {\n "afterConfig": "as the app grows, and keep",\n "afterPreset": "profile. Tune",\n "end": "green while you add routes, APIs, and workspace packages.",\n "intro": "Start from the public"\n },\n "language": {\n "cs": "Czech",\n "en": "English",\n "switcher": "Language"\n },\n "logoAlt": "UltraModern.js Logo",\n "name": "Simple app starter",\n "title": "UltraModern.js Starter"\n }\n}\n'
66
66
  };
67
67
  exports.MWAFiles = __webpack_exports__.MWAFiles;
68
68
  for(var __rspack_i in __webpack_exports__)if (-1 === [
@@ -33,7 +33,7 @@ const MWAFiles = {
33
33
  "src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family:\n PingFang SC,\n Hiragino Sans GB,\n Microsoft YaHei,\n Arial,\n sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo,\n Monaco,\n Lucida Console,\n Liberation Mono,\n DejaVu Sans Mono,\n Bitstream Vera Sans Mono,\n Courier New,\n monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
34
34
  "src/routes/layout.tsx": "import { Outlet } from '';\nimport './index.css';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
35
35
  "src/routes/[lang]/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport { useModernI18n } from \'@modern-js/plugin-i18n/runtime\';\nimport { useLocation } from \'\';\nimport { useTranslation } from \'react-i18next\';\n\nconst fallbackLanguage = \'en\';\nconst supportedLanguages = [\'en\', \'cs\'] as const;\ntype SupportedLanguage = (typeof supportedLanguages)[number];\n\nconst isSupportedLanguage = (value: string): value is SupportedLanguage =>\n supportedLanguages.includes(value as SupportedLanguage);\n\nconst stripLanguagePrefix = (pathname: string) => {\n const segments = pathname.split(\'/\').filter(Boolean);\n if (segments.length > 0 && isSupportedLanguage(segments[0] ?? \'\')) {\n segments.shift();\n }\n return `/${segments.join(\'/\')}`;\n};\n\nconst localizedPath = (pathname: string, language: SupportedLanguage) => {\n const pathWithoutLanguage = stripLanguagePrefix(pathname);\n return pathWithoutLanguage === \'/\' ? `/${language}` : `/${language}${pathWithoutLanguage}`;\n};\n\nconst absoluteUrl = (pathname: string) => {\n const origin = ULTRAMODERN_SITE_URL.replace(/\\/+$/u, \'\');\n return `${origin}${pathname}`;\n};\n\nconst locationSuffix = (location: { hash?: unknown; search?: unknown; searchStr?: unknown }) => {\n const { hash, search, searchStr } = location;\n let locationSearch = \'\';\n if (typeof searchStr === \'string\') {\n locationSearch = searchStr;\n } else if (typeof search === \'string\') {\n locationSearch = search;\n }\n const locationHash = typeof hash === \'string\' ? hash : \'\';\n return `${locationSearch}${locationHash}`;\n};\n\nconst Index = () => {\n const { t } = useTranslation();\n const { language } = useModernI18n();\n const location = useLocation();\n const currentLanguage = isSupportedLanguage(language) ? language : fallbackLanguage;\n const canonicalPath = localizedPath(location.pathname, currentLanguage);\n const suffix = locationSuffix(location);\n const languageOptions = supportedLanguages.map((code) => ({\n code,\n href: `${localizedPath(location.pathname, code)}${suffix}`,\n label: t(`home.language.${code}`),\n }));\n return (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n <link rel="canonical" href={absoluteUrl(canonicalPath)} />\n {supportedLanguages.map((code) => (\n <link\n href={absoluteUrl(localizedPath(location.pathname, code))}\n hrefLang={code}\n key={code}\n rel="alternate"\n />\n ))}\n <link\n href={absoluteUrl(localizedPath(location.pathname, fallbackLanguage))}\n hrefLang="x-default"\n rel="alternate"\n />\n </Helmet>\n <main>\n <nav className="language-switcher" aria-label={t(\'home.language.switcher\')}>\n {languageOptions.map((option) => (\n <a\n aria-current={currentLanguage === option.code ? \'page\' : undefined}\n href={option.href}\n key={option.code}\n >\n {option.label}\n </a>\n ))}\n </nav>\n <div className="title">\n {t(\'home.title\')}\n <img\n alt={t(\'home.logoAlt\')}\n className="logo"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"\n />\n <p className="name">{t(\'home.name\')}</p>\n </div>\n <p className="description">\n {t(\'home.description.intro\')}{\' \'}\n <code className="code">presetUltramodern(...)</code>{\' \'}\n {t(\'home.description.afterPreset\')}{\' \'}\n <code className="code">modern.config.ts</code>{\' \'}\n {t(\'home.description.afterConfig\')}{\' \'}\n <code className="code">pnpm run ultramodern:check</code>{\' \'}\n {t(\'home.description.end\')}\n </p>\n <div className="grid">\n <a\n href="https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.guide.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.guide.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.config.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.config.body\')}</p>\n </a>\n <a\n href="https://github.com/BleedingDev/ultramodern.js/blob/main-ultramodern/packages/toolkit/create/template/.github/workflows/ultramodern-gates.yml.handlebars"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.gates.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.gates.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/bff/effect.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.bff.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.bff.body\')}</p>\n </a>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Index;\n',
36
- "config/public/locales/en/translation.json": '{\n "home": {\n "bff": {\n "response": "Effect HttpApi response:"\n },\n "cards": {\n "bff": {\n "body": "Add server logic when a route needs typed data or mutation handling.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Tune generated defaults in modern.config.ts as the app grows.",\n "title": "Configure presetUltramodern"\n },\n "gates": {\n "body": "Run ultramodern:check, tests, typecheck, lint, and build before release.",\n "title": "Ultramodern Gates"\n },\n "guide": {\n "body": "Start with one app, then add routes, APIs, and packages when they help.",\n "title": "UltraModern.js Guide"\n }\n },\n "description": {\n "afterConfig": "as the app grows, and keep",\n "afterPreset": "profile. Tune",\n "end": "green while you add routes, APIs, and workspace packages.",\n "intro": "Start from the public"\n },\n "language": {\n "cs": "Czech",\n "en": "English",\n "switcher": "Language"\n },\n "logoAlt": "UltraModern.js Logo",\n "name": "Simple app starter",\n "title": "UltraModern.js Starter"\n }\n}\n',
37
- "config/public/locales/cs/translation.json": '{\n "home": {\n "bff": {\n "response": "Odpoved Effect HttpApi:"\n },\n "cards": {\n "bff": {\n "body": "Pridej serverovou logiku, kdyz route potrebuje typovana data nebo mutace.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Upravuj vychozi hodnoty v modern.config.ts podle rustu aplikace.",\n "title": "Konfigurace presetUltramodern"\n },\n "gates": {\n "body": "Pred releasem spust ultramodern:check, testy, typecheck, lint a build.",\n "title": "Ultramodern kontroly"\n },\n "guide": {\n "body": "Zacni jednou aplikaci a pridej routy, API nebo balicky az kdyz pomuzou.",\n "title": "UltraModern.js pruvodce"\n }\n },\n "description": {\n "afterConfig": "podle rustu aplikace a udrzuj",\n "afterPreset": "profilem. Lad",\n "end": "zelene pri pridavani rout, API a workspace balicku.",\n "intro": "Zacni s verejnym"\n },\n "language": {\n "cs": "Cestina",\n "en": "Anglictina",\n "switcher": "Jazyk"\n },\n "logoAlt": "Logo UltraModern.js",\n "name": "Jednoduchy starter aplikace",\n "title": "UltraModern.js Starter"\n }\n}\n'
36
+ "config/public/locales/cs/translation.json": '{\n "home": {\n "bff": {\n "response": "Odpoved Effect HttpApi:"\n },\n "cards": {\n "bff": {\n "body": "Pridej serverovou logiku, kdyz route potrebuje typovana data nebo mutace.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Upravuj vychozi hodnoty v modern.config.ts podle rustu aplikace.",\n "title": "Konfigurace presetUltramodern"\n },\n "gates": {\n "body": "Pred releasem spust ultramodern:check, testy, typecheck, lint a build.",\n "title": "Ultramodern kontroly"\n },\n "guide": {\n "body": "Zacni jednou aplikaci a pridej routy, API nebo balicky az kdyz pomuzou.",\n "title": "UltraModern.js pruvodce"\n }\n },\n "description": {\n "afterConfig": "podle rustu aplikace a udrzuj",\n "afterPreset": "profilem. Lad",\n "end": "zelene pri pridavani rout, API a workspace balicku.",\n "intro": "Zacni s verejnym"\n },\n "language": {\n "cs": "Cestina",\n "en": "Anglictina",\n "switcher": "Jazyk"\n },\n "logoAlt": "Logo UltraModern.js",\n "name": "Jednoduchy starter aplikace",\n "title": "UltraModern.js Starter"\n }\n}\n',
37
+ "config/public/locales/en/translation.json": '{\n "home": {\n "bff": {\n "response": "Effect HttpApi response:"\n },\n "cards": {\n "bff": {\n "body": "Add server logic when a route needs typed data or mutation handling.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Tune generated defaults in modern.config.ts as the app grows.",\n "title": "Configure presetUltramodern"\n },\n "gates": {\n "body": "Run ultramodern:check, tests, typecheck, lint, and build before release.",\n "title": "Ultramodern Gates"\n },\n "guide": {\n "body": "Start with one app, then add routes, APIs, and packages when they help.",\n "title": "UltraModern.js Guide"\n }\n },\n "description": {\n "afterConfig": "as the app grows, and keep",\n "afterPreset": "profile. Tune",\n "end": "green while you add routes, APIs, and workspace packages.",\n "intro": "Start from the public"\n },\n "language": {\n "cs": "Czech",\n "en": "English",\n "switcher": "Language"\n },\n "logoAlt": "UltraModern.js Logo",\n "name": "Simple app starter",\n "title": "UltraModern.js Starter"\n }\n}\n'
38
38
  };
39
39
  export { MWAFiles };
@@ -34,7 +34,7 @@ const MWAFiles = {
34
34
  "src/routes/index.css": "html,\nbody {\n padding: 0;\n margin: 0;\n font-family:\n PingFang SC,\n Hiragino Sans GB,\n Microsoft YaHei,\n Arial,\n sans-serif;\n background: linear-gradient(to bottom, transparent, #fff) #eceeef;\n}\n\np {\n margin: 0;\n}\n\n* {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-sizing: border-box;\n}\n\n.container-box {\n min-height: 100vh;\n max-width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding-top: 10px;\n}\n\nmain {\n flex: 1;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.title {\n display: flex;\n margin: 4rem 0 4rem;\n align-items: center;\n font-size: 4rem;\n font-weight: 600;\n}\n\n.logo {\n width: 6rem;\n margin: 7px 0 0 1rem;\n}\n\n.name {\n color: #4ecaff;\n}\n\n.description {\n text-align: center;\n line-height: 1.5;\n font-size: 1.3rem;\n color: #1b3a42;\n margin-bottom: 5rem;\n}\n\n.code {\n background: #fafafa;\n border-radius: 12px;\n padding: 0.6rem 0.9rem;\n font-size: 1.05rem;\n font-family:\n Menlo,\n Monaco,\n Lucida Console,\n Liberation Mono,\n DejaVu Sans Mono,\n Bitstream Vera Sans Mono,\n Courier New,\n monospace;\n}\n\n.container-box .grid {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1100px;\n margin-top: 3rem;\n}\n\n.card {\n padding: 1.5rem;\n display: flex;\n flex-direction: column;\n justify-content: center;\n height: 100px;\n color: inherit;\n text-decoration: none;\n transition: 0.15s ease;\n width: 45%;\n}\n\n.card:hover,\n.card:focus {\n transform: scale(1.05);\n}\n\n.card h2 {\n display: flex;\n align-items: center;\n font-size: 1.5rem;\n margin: 0;\n padding: 0;\n}\n\n.card p {\n opacity: 0.6;\n font-size: 0.9rem;\n line-height: 1.5;\n margin-top: 1rem;\n}\n\n.arrow-right {\n width: 1.3rem;\n margin-left: 0.5rem;\n margin-top: 3px;\n}\n",
35
35
  "src/routes/layout.tsx": "import { Outlet } from '';\nimport './index.css';\n\nexport default function Layout() {\n return (\n <div>\n <Outlet />\n </div>\n );\n}\n",
36
36
  "src/routes/[lang]/page.tsx": 'import { Helmet } from \'@modern-js/runtime/head\';\nimport { useModernI18n } from \'@modern-js/plugin-i18n/runtime\';\nimport { useLocation } from \'\';\nimport { useTranslation } from \'react-i18next\';\n\nconst fallbackLanguage = \'en\';\nconst supportedLanguages = [\'en\', \'cs\'] as const;\ntype SupportedLanguage = (typeof supportedLanguages)[number];\n\nconst isSupportedLanguage = (value: string): value is SupportedLanguage =>\n supportedLanguages.includes(value as SupportedLanguage);\n\nconst stripLanguagePrefix = (pathname: string) => {\n const segments = pathname.split(\'/\').filter(Boolean);\n if (segments.length > 0 && isSupportedLanguage(segments[0] ?? \'\')) {\n segments.shift();\n }\n return `/${segments.join(\'/\')}`;\n};\n\nconst localizedPath = (pathname: string, language: SupportedLanguage) => {\n const pathWithoutLanguage = stripLanguagePrefix(pathname);\n return pathWithoutLanguage === \'/\' ? `/${language}` : `/${language}${pathWithoutLanguage}`;\n};\n\nconst absoluteUrl = (pathname: string) => {\n const origin = ULTRAMODERN_SITE_URL.replace(/\\/+$/u, \'\');\n return `${origin}${pathname}`;\n};\n\nconst locationSuffix = (location: { hash?: unknown; search?: unknown; searchStr?: unknown }) => {\n const { hash, search, searchStr } = location;\n let locationSearch = \'\';\n if (typeof searchStr === \'string\') {\n locationSearch = searchStr;\n } else if (typeof search === \'string\') {\n locationSearch = search;\n }\n const locationHash = typeof hash === \'string\' ? hash : \'\';\n return `${locationSearch}${locationHash}`;\n};\n\nconst Index = () => {\n const { t } = useTranslation();\n const { language } = useModernI18n();\n const location = useLocation();\n const currentLanguage = isSupportedLanguage(language) ? language : fallbackLanguage;\n const canonicalPath = localizedPath(location.pathname, currentLanguage);\n const suffix = locationSuffix(location);\n const languageOptions = supportedLanguages.map((code) => ({\n code,\n href: `${localizedPath(location.pathname, code)}${suffix}`,\n label: t(`home.language.${code}`),\n }));\n return (\n <div className="container-box">\n <Helmet>\n <link\n rel="icon"\n type="image/x-icon"\n href="https://lf3-static.bytednsdoc.com/obj/eden-cn/uhbfnupenuhf/favicon.ico"\n />\n <link rel="canonical" href={absoluteUrl(canonicalPath)} />\n {supportedLanguages.map((code) => (\n <link\n href={absoluteUrl(localizedPath(location.pathname, code))}\n hrefLang={code}\n key={code}\n rel="alternate"\n />\n ))}\n <link\n href={absoluteUrl(localizedPath(location.pathname, fallbackLanguage))}\n hrefLang="x-default"\n rel="alternate"\n />\n </Helmet>\n <main>\n <nav className="language-switcher" aria-label={t(\'home.language.switcher\')}>\n {languageOptions.map((option) => (\n <a\n aria-current={currentLanguage === option.code ? \'page\' : undefined}\n href={option.href}\n key={option.code}\n >\n {option.label}\n </a>\n ))}\n </nav>\n <div className="title">\n {t(\'home.title\')}\n <img\n alt={t(\'home.logoAlt\')}\n className="logo"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/modern-js-logo.svg"\n />\n <p className="name">{t(\'home.name\')}</p>\n </div>\n <p className="description">\n {t(\'home.description.intro\')}{\' \'}\n <code className="code">presetUltramodern(...)</code>{\' \'}\n {t(\'home.description.afterPreset\')}{\' \'}\n <code className="code">modern.config.ts</code>{\' \'}\n {t(\'home.description.afterConfig\')}{\' \'}\n <code className="code">pnpm run ultramodern:check</code>{\' \'}\n {t(\'home.description.end\')}\n </p>\n <div className="grid">\n <a\n href="https://bleedingdev.github.io/ultramodern.js/guides/get-started/ultramodern.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.guide.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.guide.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/usage.html"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.config.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.config.body\')}</p>\n </a>\n <a\n href="https://github.com/BleedingDev/ultramodern.js/blob/main-ultramodern/packages/toolkit/create/template/.github/workflows/ultramodern-gates.yml.handlebars"\n target="_blank"\n className="card"\n rel="noreferrer"\n >\n <h2>\n {t(\'home.cards.gates.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.gates.body\')}</p>\n </a>\n <a\n href="https://bleedingdev.github.io/ultramodern.js/configure/app/bff/effect.html"\n target="_blank"\n rel="noopener noreferrer"\n className="card"\n >\n <h2>\n {t(\'home.cards.bff.title\')}\n <img\n alt=""\n className="arrow-right"\n src="https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/arrow-right.svg"\n />\n </h2>\n <p>{t(\'home.cards.bff.body\')}</p>\n </a>\n </div>\n </main>\n </div>\n );\n};\n\nexport default Index;\n',
37
- "config/public/locales/en/translation.json": '{\n "home": {\n "bff": {\n "response": "Effect HttpApi response:"\n },\n "cards": {\n "bff": {\n "body": "Add server logic when a route needs typed data or mutation handling.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Tune generated defaults in modern.config.ts as the app grows.",\n "title": "Configure presetUltramodern"\n },\n "gates": {\n "body": "Run ultramodern:check, tests, typecheck, lint, and build before release.",\n "title": "Ultramodern Gates"\n },\n "guide": {\n "body": "Start with one app, then add routes, APIs, and packages when they help.",\n "title": "UltraModern.js Guide"\n }\n },\n "description": {\n "afterConfig": "as the app grows, and keep",\n "afterPreset": "profile. Tune",\n "end": "green while you add routes, APIs, and workspace packages.",\n "intro": "Start from the public"\n },\n "language": {\n "cs": "Czech",\n "en": "English",\n "switcher": "Language"\n },\n "logoAlt": "UltraModern.js Logo",\n "name": "Simple app starter",\n "title": "UltraModern.js Starter"\n }\n}\n',
38
- "config/public/locales/cs/translation.json": '{\n "home": {\n "bff": {\n "response": "Odpoved Effect HttpApi:"\n },\n "cards": {\n "bff": {\n "body": "Pridej serverovou logiku, kdyz route potrebuje typovana data nebo mutace.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Upravuj vychozi hodnoty v modern.config.ts podle rustu aplikace.",\n "title": "Konfigurace presetUltramodern"\n },\n "gates": {\n "body": "Pred releasem spust ultramodern:check, testy, typecheck, lint a build.",\n "title": "Ultramodern kontroly"\n },\n "guide": {\n "body": "Zacni jednou aplikaci a pridej routy, API nebo balicky az kdyz pomuzou.",\n "title": "UltraModern.js pruvodce"\n }\n },\n "description": {\n "afterConfig": "podle rustu aplikace a udrzuj",\n "afterPreset": "profilem. Lad",\n "end": "zelene pri pridavani rout, API a workspace balicku.",\n "intro": "Zacni s verejnym"\n },\n "language": {\n "cs": "Cestina",\n "en": "Anglictina",\n "switcher": "Jazyk"\n },\n "logoAlt": "Logo UltraModern.js",\n "name": "Jednoduchy starter aplikace",\n "title": "UltraModern.js Starter"\n }\n}\n'
37
+ "config/public/locales/cs/translation.json": '{\n "home": {\n "bff": {\n "response": "Odpoved Effect HttpApi:"\n },\n "cards": {\n "bff": {\n "body": "Pridej serverovou logiku, kdyz route potrebuje typovana data nebo mutace.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Upravuj vychozi hodnoty v modern.config.ts podle rustu aplikace.",\n "title": "Konfigurace presetUltramodern"\n },\n "gates": {\n "body": "Pred releasem spust ultramodern:check, testy, typecheck, lint a build.",\n "title": "Ultramodern kontroly"\n },\n "guide": {\n "body": "Zacni jednou aplikaci a pridej routy, API nebo balicky az kdyz pomuzou.",\n "title": "UltraModern.js pruvodce"\n }\n },\n "description": {\n "afterConfig": "podle rustu aplikace a udrzuj",\n "afterPreset": "profilem. Lad",\n "end": "zelene pri pridavani rout, API a workspace balicku.",\n "intro": "Zacni s verejnym"\n },\n "language": {\n "cs": "Cestina",\n "en": "Anglictina",\n "switcher": "Jazyk"\n },\n "logoAlt": "Logo UltraModern.js",\n "name": "Jednoduchy starter aplikace",\n "title": "UltraModern.js Starter"\n }\n}\n',
38
+ "config/public/locales/en/translation.json": '{\n "home": {\n "bff": {\n "response": "Effect HttpApi response:"\n },\n "cards": {\n "bff": {\n "body": "Add server logic when a route needs typed data or mutation handling.",\n "title": "BFF + Effect"\n },\n "config": {\n "body": "Tune generated defaults in modern.config.ts as the app grows.",\n "title": "Configure presetUltramodern"\n },\n "gates": {\n "body": "Run ultramodern:check, tests, typecheck, lint, and build before release.",\n "title": "Ultramodern Gates"\n },\n "guide": {\n "body": "Start with one app, then add routes, APIs, and packages when they help.",\n "title": "UltraModern.js Guide"\n }\n },\n "description": {\n "afterConfig": "as the app grows, and keep",\n "afterPreset": "profile. Tune",\n "end": "green while you add routes, APIs, and workspace packages.",\n "intro": "Start from the public"\n },\n "language": {\n "cs": "Czech",\n "en": "English",\n "switcher": "Language"\n },\n "logoAlt": "UltraModern.js Logo",\n "name": "Simple app starter",\n "title": "UltraModern.js Starter"\n }\n}\n'
39
39
  };
40
40
  export { MWAFiles };
@@ -33,6 +33,6 @@ export declare const MWAFiles: {
33
33
  "src/routes/index.css": string;
34
34
  "src/routes/layout.tsx": string;
35
35
  "src/routes/[lang]/page.tsx": string;
36
- "config/public/locales/en/translation.json": string;
37
36
  "config/public/locales/cs/translation.json": string;
37
+ "config/public/locales/en/translation.json": string;
38
38
  };
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "modern",
18
18
  "modern.js"
19
19
  ],
20
- "version": "3.2.0-ultramodern.95",
20
+ "version": "3.2.0-ultramodern.97",
21
21
  "types": "./dist/types/index.d.ts",
22
22
  "main": "./dist/cjs/index.js",
23
23
  "module": "./dist/esm/index.mjs",
@@ -48,7 +48,7 @@
48
48
  "@types/recursive-readdir": "^2.2.4",
49
49
  "@typescript/native-preview": "7.0.0-dev.20260527.2",
50
50
  "recursive-readdir": "^2.2.3",
51
- "@modern-js/create": "npm:@bleedingdev/modern-js-create@3.2.0-ultramodern.95"
51
+ "@modern-js/create": "npm:@bleedingdev/modern-js-create@3.2.0-ultramodern.97"
52
52
  },
53
53
  "sideEffects": false,
54
54
  "publishConfig": {