The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
name: string
private: bool
version: string
type: string
scripts: struct<dev: string, build: string, preview: string, check: string>
child 0, dev: string
child 1, build: string
child 2, preview: string
child 3, check: string
devDependencies: struct<@sveltejs/vite-plugin-svelte: string, @tsconfig/svelte: string, @types/node: string, svelte: (... 63 chars omitted)
child 0, @sveltejs/vite-plugin-svelte: string
child 1, @tsconfig/svelte: string
child 2, @types/node: string
child 3, svelte: string
child 4, svelte-check: string
child 5, typescript: string
child 6, vite: string
dependencies: struct<@myriaddreamin/typst-ts-renderer: string, @myriaddreamin/typst-ts-web-compiler: string, @myri (... 27 chars omitted)
child 0, @myriaddreamin/typst-ts-renderer: string
child 1, @myriaddreamin/typst-ts-web-compiler: string
child 2, @myriaddreamin/typst.ts: string
lockfileVersion: int64
packages: struct<: struct<name: string, version: string, dependencies: struct<@myriaddreamin/typst-ts-renderer (... 19775 chars omitted)
child 0, : struct<name: string, version: string, dependencies: struct<@myriaddreamin/typst-ts-renderer: string, (... 262 chars omitted)
child 0, name: string
child 1, version: string
child 2, dependencies: struct<@myriaddreamin/typst-ts-renderer: string, @myriaddreamin/typst-ts-web-compiler: string, @myri (... 27 chars omitted)
child 0, @myriaddreamin/typst-ts-renderer: string
child 1, @myriaddreamin/typst-t
...
>
child 0, optional: bool
child 6, sass-embedded: struct<optional: bool>
child 0, optional: bool
child 7, stylus: struct<optional: bool>
child 0, optional: bool
child 8, sugarss: struct<optional: bool>
child 0, optional: bool
child 9, terser: struct<optional: bool>
child 0, optional: bool
child 10, tsx: struct<optional: bool>
child 0, optional: bool
child 11, yaml: struct<optional: bool>
child 0, optional: bool
child 83, node_modules/vitefu: struct<version: string, resolved: string, integrity: string, dev: bool, license: string, workspaces: (... 120 chars omitted)
child 0, version: string
child 1, resolved: string
child 2, integrity: string
child 3, dev: bool
child 4, license: string
child 5, workspaces: list<item: string>
child 0, item: string
child 6, peerDependencies: struct<vite: string>
child 0, vite: string
child 7, peerDependenciesMeta: struct<vite: struct<optional: bool>>
child 0, vite: struct<optional: bool>
child 0, optional: bool
child 84, node_modules/zimmerframe: struct<version: string, resolved: string, integrity: string, dev: bool, license: string>
child 0, version: string
child 1, resolved: string
child 2, integrity: string
child 3, dev: bool
child 4, license: string
requires: bool
to
{'name': Value('string'), 'version': Value('string'), 'lockfileVersion': Value('int64'), 'requires': Value('bool'), 'packages': {'': {'name': Value('string'), 'version': Value('string'), 'dependencies': {'@myriaddreamin/typst-ts-renderer': Value('string'), '@myriaddreamin/typst-ts-web-compiler': Value('string'), '@myriaddreamin/typst.ts': Value('string')}, 'devDependencies': {'@sveltejs/vite-plugin-svelte': Value('string'), '@tsconfig/svelte': Value('string'), '@types/node': Value('string'), 'svelte': Value('string'), 'svelte-check': Value('string'), 'typescript': Value('string'), 'vite': Value('string')}}, 'node_modules/@emnapi/core': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value('string'), 'dev': Value('bool'), 'license': Value('string'), 'optional': Value('bool'), 'dependencies': {'@emnapi/wasi-threads': Value('string'), 'tslib': Value('string')}}, 'node_modules/@emnapi/runtime': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value('string'), 'dev': Value('bool'), 'license': Value('string'), 'optional': Value('bool'), 'dependencies': {'tslib': Value('string')}}, 'node_modules/@emnapi/wasi-threads': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value('string'), 'dev': Value('bool'), 'license': Value('string'), 'optional': Value('bool'), 'dependencies': {'tslib': Value('string')}}, 'node_modules/@jridgewell/gen-mapping': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value
...
{'vite': Value('string')}, 'engines': {'node': Value('string')}, 'funding': {'url': Value('string')}, 'optionalDependencies': {'fsevents': Value('string')}, 'peerDependencies': {'@types/node': Value('string'), '@vitejs/devtools': Value('string'), 'esbuild': Value('string'), 'jiti': Value('string'), 'less': Value('string'), 'sass': Value('string'), 'sass-embedded': Value('string'), 'stylus': Value('string'), 'sugarss': Value('string'), 'terser': Value('string'), 'tsx': Value('string'), 'yaml': Value('string')}, 'peerDependenciesMeta': {'@types/node': {'optional': Value('bool')}, '@vitejs/devtools': {'optional': Value('bool')}, 'esbuild': {'optional': Value('bool')}, 'jiti': {'optional': Value('bool')}, 'less': {'optional': Value('bool')}, 'sass': {'optional': Value('bool')}, 'sass-embedded': {'optional': Value('bool')}, 'stylus': {'optional': Value('bool')}, 'sugarss': {'optional': Value('bool')}, 'terser': {'optional': Value('bool')}, 'tsx': {'optional': Value('bool')}, 'yaml': {'optional': Value('bool')}}}, 'node_modules/vitefu': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value('string'), 'dev': Value('bool'), 'license': Value('string'), 'workspaces': List(Value('string')), 'peerDependencies': {'vite': Value('string')}, 'peerDependenciesMeta': {'vite': {'optional': Value('bool')}}}, 'node_modules/zimmerframe': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value('string'), 'dev': Value('bool'), 'license': Value('string')}}}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 478, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2818, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2355, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2380, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 536, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 419, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
name: string
private: bool
version: string
type: string
scripts: struct<dev: string, build: string, preview: string, check: string>
child 0, dev: string
child 1, build: string
child 2, preview: string
child 3, check: string
devDependencies: struct<@sveltejs/vite-plugin-svelte: string, @tsconfig/svelte: string, @types/node: string, svelte: (... 63 chars omitted)
child 0, @sveltejs/vite-plugin-svelte: string
child 1, @tsconfig/svelte: string
child 2, @types/node: string
child 3, svelte: string
child 4, svelte-check: string
child 5, typescript: string
child 6, vite: string
dependencies: struct<@myriaddreamin/typst-ts-renderer: string, @myriaddreamin/typst-ts-web-compiler: string, @myri (... 27 chars omitted)
child 0, @myriaddreamin/typst-ts-renderer: string
child 1, @myriaddreamin/typst-ts-web-compiler: string
child 2, @myriaddreamin/typst.ts: string
lockfileVersion: int64
packages: struct<: struct<name: string, version: string, dependencies: struct<@myriaddreamin/typst-ts-renderer (... 19775 chars omitted)
child 0, : struct<name: string, version: string, dependencies: struct<@myriaddreamin/typst-ts-renderer: string, (... 262 chars omitted)
child 0, name: string
child 1, version: string
child 2, dependencies: struct<@myriaddreamin/typst-ts-renderer: string, @myriaddreamin/typst-ts-web-compiler: string, @myri (... 27 chars omitted)
child 0, @myriaddreamin/typst-ts-renderer: string
child 1, @myriaddreamin/typst-t
...
>
child 0, optional: bool
child 6, sass-embedded: struct<optional: bool>
child 0, optional: bool
child 7, stylus: struct<optional: bool>
child 0, optional: bool
child 8, sugarss: struct<optional: bool>
child 0, optional: bool
child 9, terser: struct<optional: bool>
child 0, optional: bool
child 10, tsx: struct<optional: bool>
child 0, optional: bool
child 11, yaml: struct<optional: bool>
child 0, optional: bool
child 83, node_modules/vitefu: struct<version: string, resolved: string, integrity: string, dev: bool, license: string, workspaces: (... 120 chars omitted)
child 0, version: string
child 1, resolved: string
child 2, integrity: string
child 3, dev: bool
child 4, license: string
child 5, workspaces: list<item: string>
child 0, item: string
child 6, peerDependencies: struct<vite: string>
child 0, vite: string
child 7, peerDependenciesMeta: struct<vite: struct<optional: bool>>
child 0, vite: struct<optional: bool>
child 0, optional: bool
child 84, node_modules/zimmerframe: struct<version: string, resolved: string, integrity: string, dev: bool, license: string>
child 0, version: string
child 1, resolved: string
child 2, integrity: string
child 3, dev: bool
child 4, license: string
requires: bool
to
{'name': Value('string'), 'version': Value('string'), 'lockfileVersion': Value('int64'), 'requires': Value('bool'), 'packages': {'': {'name': Value('string'), 'version': Value('string'), 'dependencies': {'@myriaddreamin/typst-ts-renderer': Value('string'), '@myriaddreamin/typst-ts-web-compiler': Value('string'), '@myriaddreamin/typst.ts': Value('string')}, 'devDependencies': {'@sveltejs/vite-plugin-svelte': Value('string'), '@tsconfig/svelte': Value('string'), '@types/node': Value('string'), 'svelte': Value('string'), 'svelte-check': Value('string'), 'typescript': Value('string'), 'vite': Value('string')}}, 'node_modules/@emnapi/core': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value('string'), 'dev': Value('bool'), 'license': Value('string'), 'optional': Value('bool'), 'dependencies': {'@emnapi/wasi-threads': Value('string'), 'tslib': Value('string')}}, 'node_modules/@emnapi/runtime': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value('string'), 'dev': Value('bool'), 'license': Value('string'), 'optional': Value('bool'), 'dependencies': {'tslib': Value('string')}}, 'node_modules/@emnapi/wasi-threads': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value('string'), 'dev': Value('bool'), 'license': Value('string'), 'optional': Value('bool'), 'dependencies': {'tslib': Value('string')}}, 'node_modules/@jridgewell/gen-mapping': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value
...
{'vite': Value('string')}, 'engines': {'node': Value('string')}, 'funding': {'url': Value('string')}, 'optionalDependencies': {'fsevents': Value('string')}, 'peerDependencies': {'@types/node': Value('string'), '@vitejs/devtools': Value('string'), 'esbuild': Value('string'), 'jiti': Value('string'), 'less': Value('string'), 'sass': Value('string'), 'sass-embedded': Value('string'), 'stylus': Value('string'), 'sugarss': Value('string'), 'terser': Value('string'), 'tsx': Value('string'), 'yaml': Value('string')}, 'peerDependenciesMeta': {'@types/node': {'optional': Value('bool')}, '@vitejs/devtools': {'optional': Value('bool')}, 'esbuild': {'optional': Value('bool')}, 'jiti': {'optional': Value('bool')}, 'less': {'optional': Value('bool')}, 'sass': {'optional': Value('bool')}, 'sass-embedded': {'optional': Value('bool')}, 'stylus': {'optional': Value('bool')}, 'sugarss': {'optional': Value('bool')}, 'terser': {'optional': Value('bool')}, 'tsx': {'optional': Value('bool')}, 'yaml': {'optional': Value('bool')}}}, 'node_modules/vitefu': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value('string'), 'dev': Value('bool'), 'license': Value('string'), 'workspaces': List(Value('string')), 'peerDependencies': {'vite': Value('string')}, 'peerDependenciesMeta': {'vite': {'optional': Value('bool')}}}, 'node_modules/zimmerframe': {'version': Value('string'), 'resolved': Value('string'), 'integrity': Value('string'), 'dev': Value('bool'), 'license': Value('string')}}}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Typst.app 核心功能复刻(Svelte)
只实现「编辑 + 预览」两件事:左侧编辑 Typst 源码,右侧实时编译并显示 SVG 预览。
本地运行
npm install
npm run dev
打开终端输出的本地地址即可。
关键实现
- 使用
@myriaddreamin/typst.ts在浏览器侧把 Typst 源码编译成 SVG 并展示(见src/lib/typst.ts与src/App.svelte)。 - 为了避免把 wasm 打进 bundle,这里按官方文档的 “lite” 方式配置:Wasm 模块从 jsdelivr 拉取,因此首次运行需要联网。
Svelte + TS + Vite
This template should help get you started developing with Svelte and TypeScript in Vite.
Recommended IDE Setup
Need an official Svelte framework?
Check out SvelteKit, which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.
Technical considerations
Why use this over SvelteKit?
- It brings its own routing solution which might not be preferable for some users.
- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other create-vite templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
Why global.d.ts instead of compilerOptions.types inside jsconfig.json or tsconfig.json?
Setting compilerOptions.types shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding svelte and vite/client type information.
Why include .vscode/extensions.json?
Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.
Why enable allowJs in the TS template?
While allowJs: false would indeed prevent the use of .js files in the project, it does not prevent the use of JavaScript syntax in .svelte files. In addition, it would force checkJs: false, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.
Why is HMR not preserving my local component state?
HMR state preservation comes with a number of gotchas! It has been disabled by default in both svelte-hmr and @sveltejs/vite-plugin-svelte due to its often surprising behavior. You can read the details here.
If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.
// store.ts
// An extremely simple external store
import { writable } from 'svelte/store'
export default writable(0)
- Downloads last month
- 168