tools.equationzone 0.0.1

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 ADDED
@@ -0,0 +1,65 @@
1
+ # Svelte library
2
+
3
+ Everything you need to build a Svelte library, powered by [`sv`](https://npmjs.com/package/sv).
4
+
5
+ Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).
6
+
7
+ ## Creating a project
8
+
9
+ If you're seeing this, you've probably already done this step. Congrats!
10
+
11
+ ```sh
12
+ # create a new project in the current directory
13
+ npx sv create
14
+
15
+ # create a new project in my-app
16
+ npx sv create my-app
17
+ ```
18
+
19
+ To recreate this project with the same configuration:
20
+
21
+ ```sh
22
+ # recreate this project
23
+ pnpm dlx sv@0.12.5 create --template library --types ts --add prettier eslint tailwindcss="plugins:typography" devtools-json --install pnpm .
24
+ ```
25
+
26
+ ## Developing
27
+
28
+ Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
29
+
30
+ ```sh
31
+ npm run dev
32
+
33
+ # or start the server and open the app in a new browser tab
34
+ npm run dev -- --open
35
+ ```
36
+
37
+ Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
38
+
39
+ ## Building
40
+
41
+ To build your library:
42
+
43
+ ```sh
44
+ npm pack
45
+ ```
46
+
47
+ To create a production version of your showcase app:
48
+
49
+ ```sh
50
+ npm run build
51
+ ```
52
+
53
+ You can preview the production build with `npm run preview`.
54
+
55
+ > To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
56
+
57
+ ## Publishing
58
+
59
+ Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
60
+
61
+ To publish your library to [npm](https://www.npmjs.com):
62
+
63
+ ```sh
64
+ npm publish
65
+ ```
package/dist/H1.svelte ADDED
@@ -0,0 +1 @@
1
+ H1
@@ -0,0 +1,26 @@
1
+ export default H1;
2
+ type H1 = SvelteComponent<{
3
+ [x: string]: never;
4
+ }, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const H1: $$__sveltets_2_IsomorphicComponent<{
10
+ [x: string]: never;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}, {}, string>;
14
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
15
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
16
+ $$bindings?: Bindings;
17
+ } & Exports;
18
+ (internal: unknown, props: {
19
+ $$events?: Events;
20
+ $$slots?: Slots;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
25
+ z_$$bindings?: Bindings;
26
+ }
@@ -0,0 +1 @@
1
+ export { note } from './note.js';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // Reexport your entry components here
2
+ export { note } from './note.js';
package/dist/note.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ *
3
+ * @returns
4
+ */
5
+ export function note(): {
6
+ name: string;
7
+ validate: (params: string) => boolean;
8
+ openRender: (tokens: {
9
+ [x: string]: {
10
+ info: string;
11
+ };
12
+ }, index: string | number) => string;
13
+ closeRender: () => string;
14
+ };
package/dist/note.js ADDED
@@ -0,0 +1,43 @@
1
+
2
+
3
+
4
+ /**
5
+ *
6
+ * @returns
7
+ */
8
+ export function note() {
9
+ let name = 'note'
10
+ return {
11
+ name,
12
+ validate: (/** @type {string} */ params) =>
13
+ new RegExp(`^${name}(\\[(.+?)\\])?$`).test(params.trim()),
14
+
15
+ openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index) => {
16
+ const info = tokens[index].info.trim();
17
+ const match = info.match(new RegExp(`^${name}\\[(.+?)\\]$`));
18
+ const title = match ? match[1] : 'Note';
19
+
20
+ return `
21
+ <div class="not-prose my-2 md:my-8 rounded-l-md rounded-r-2xl border-b-4 border-r-4 border-blue-500 bg-linear-to-br from-blue-50/80 to-blue-100/40 p-0shadow-md dark:border-blue-400 dark:from-blue-900/30 dark:to-blue-950/20" role="alert" data-callout="${name}">
22
+ <div class="p-5">
23
+ <div class="mb-4 flex items-center">
24
+ <div class="mr-3 shrink-0">
25
+ <span class="inline-flex justify-center items-center size-8 rounded-full border-4 border-blue-100 bg-blue-200 text-blue-800 dark:border-blue-900 dark:bg-blue-800 dark:text-blue-400">
26
+ <svg class="shrink-0 size-4" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>
27
+
28
+ </span>
29
+ </div>
30
+ <h3 class="font-extrabold tracking-tight text-blue-950 dark:text-blue-100">${title}</h3>
31
+ </div>
32
+
33
+ <div class="md:pl-6 space-y-4 text-blue-900/90 dark:text-blue-100/80 prose dark:prose-invert max-w-none prose-sm md:prose-base">
34
+ `;
35
+ },
36
+
37
+ closeRender: () => `
38
+ </div>
39
+ </div>
40
+ </div>`
41
+ };
42
+ }
43
+
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "tools.equationzone",
3
+ "version": "0.0.1",
4
+ "files": [
5
+ "dist",
6
+ "!dist/**/*.test.*",
7
+ "!dist/**/*.spec.*"
8
+ ],
9
+ "sideEffects": [
10
+ "**/*.css"
11
+ ],
12
+ "svelte": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "type": "module",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "svelte": "./dist/index.js",
19
+ "default": "./dist/index.js"
20
+ }
21
+ },
22
+ "peerDependencies": {
23
+ "svelte": "^5.0.0"
24
+ },
25
+ "devDependencies": {
26
+ "@eslint/compat": "^2.0.2",
27
+ "@eslint/js": "^9.39.2",
28
+ "@sveltejs/adapter-auto": "^7.0.0",
29
+ "@sveltejs/kit": "^2.50.2",
30
+ "@sveltejs/package": "^2.5.7",
31
+ "@sveltejs/vite-plugin-svelte": "^6.2.4",
32
+ "@tailwindcss/typography": "^0.5.19",
33
+ "@tailwindcss/vite": "^4.1.18",
34
+ "@types/node": "^22",
35
+ "eslint": "^9.39.2",
36
+ "eslint-config-prettier": "^10.1.8",
37
+ "eslint-plugin-svelte": "^3.14.0",
38
+ "globals": "^17.3.0",
39
+ "prettier": "^3.8.1",
40
+ "prettier-plugin-svelte": "^3.4.1",
41
+ "prettier-plugin-tailwindcss": "^0.7.2",
42
+ "publint": "^0.3.17",
43
+ "svelte": "^5.51.0",
44
+ "svelte-check": "^4.4.2",
45
+ "tailwindcss": "^4.1.18",
46
+ "typescript": "^5.9.3",
47
+ "typescript-eslint": "^8.54.0",
48
+ "vite": "^7.3.1",
49
+ "vite-plugin-devtools-json": "^1.0.0"
50
+ },
51
+ "keywords": [
52
+ "s"
53
+ ],
54
+ "scripts": {
55
+ "dev": "vite dev",
56
+ "build": "vite build && npm run prepack",
57
+ "preview": "vite preview",
58
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
59
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
60
+ "lint": "prettier --check . && eslint .",
61
+ "format": "prettier --write ."
62
+ }
63
+ }