@inkdropapp/theme-dev-helpers 0.3.11 → 0.4.0

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 CHANGED
@@ -4,14 +4,14 @@ A helper module for creating themes for Inkdrop.
4
4
 
5
5
  ## Requirements
6
6
 
7
- - [Bun](https://bun.sh/)
7
+ - [Node.js](https://nodejs.org/) >= 24
8
8
 
9
9
  ## Installation
10
10
 
11
11
  You can install the `@inkdropapp/theme-dev-helpers` in your theme project:
12
12
 
13
13
  ```bash
14
- bun i -D @inkdropapp/theme-dev-helpers
14
+ npm install --save-dev @inkdropapp/theme-dev-helpers
15
15
  ```
16
16
 
17
17
  ## Generate Palette
@@ -47,12 +47,13 @@ dev-server
47
47
 
48
48
  ## Development
49
49
 
50
- Dependencies are managed with [pnpm](https://pnpm.io/), and [Bun](https://bun.sh/) is the runtime used to run the CLIs and tests.
50
+ Dependencies are managed with [pnpm](https://pnpm.io/) and the runtime is [Node.js](https://nodejs.org/) (>= 24). The `generate-palette` CLI is bundled to plain JS in `dist/` with [tsdown](https://tsdown.dev/) (Node can't run a dependency's `.ts` files from `node_modules`); `pnpm install` builds it automatically via the `prepare` script. The `dev-server` CLI is served straight from source by Vite.
51
51
 
52
52
  ```sh
53
- pnpm install # install dependencies
53
+ pnpm install # install dependencies (also builds dist/ via prepare)
54
+ pnpm build # bundle the generate-palette CLI to dist/ with tsdown
54
55
  pnpm format # format with oxfmt
55
56
  pnpm lint # lint with oxlint
56
57
  pnpm typecheck # type-check with tsc
57
- pnpm test # run unit tests (bun test)
58
+ pnpm test # run unit tests (Vitest)
58
59
  ```
package/bin/dev-server CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env bun
1
+ #!/usr/bin/env node
2
2
 
3
3
  import { dirname, join } from 'path';
4
4
  import { fileURLToPath } from 'url';
@@ -1,2 +1,2 @@
1
- #!/usr/bin/env bun
2
- import '../src/generate-palette.ts'
1
+ #!/usr/bin/env node
2
+ import '../dist/generate-palette.mjs'
@@ -0,0 +1,160 @@
1
+ import puppeteer from "puppeteer";
2
+ import { writeFile } from "fs/promises";
3
+ import path from "path";
4
+ import { pathToFileURL } from "url";
5
+ import { Command } from "commander";
6
+ //#region package.json
7
+ var version = "0.4.0";
8
+ //#endregion
9
+ //#region src/palette.ts
10
+ /**
11
+ * Derives a theme's appearance the way Inkdrop's desktop app does (see
12
+ * `ThemePackage#getAppearance`): dark when the package name contains "dark" or
13
+ * `themeAppearance` is "dark", otherwise light. Used to pick which branch of a
14
+ * `light-dark()` value to keep.
15
+ *
16
+ * @param theme - The theme package's metadata.
17
+ * @returns The resolved appearance.
18
+ */
19
+ function deriveAppearance(theme) {
20
+ return theme.name?.includes("dark") || theme.themeAppearance === "dark" ? "dark" : "light";
21
+ }
22
+ /**
23
+ * Builds the standalone HTML document that is loaded into a headless browser to
24
+ * compute a theme's CSS custom properties.
25
+ *
26
+ * It pulls in Inkdrop's base CSS plus the theme's own stylesheets so that the
27
+ * computed style of `<body>` resolves every themed variable. Inkdrop's base
28
+ * stylesheets are passed in as already-resolved absolute URLs (they live in
29
+ * this package's own dependencies, not the theme's), while the theme's own
30
+ * `styles/` links stay relative and resolve against the `<base href>` — i.e.
31
+ * the theme project root.
32
+ *
33
+ * @param theme - The theme package's metadata (`name`, `styleSheets`).
34
+ * @param baseUrl - File URL used as the document `<base href>`; the theme's own
35
+ * `styles/` links resolve against it.
36
+ * @param baseStyleSheetURLs - Absolute URLs of Inkdrop's base stylesheets,
37
+ * resolved from this package's dependency graph by the caller.
38
+ * @param appearance - Optional forced appearance; adds a `<appearance>-mode`
39
+ * body class when provided.
40
+ * @returns The full HTML document as a string.
41
+ */
42
+ function buildPreviewHTML(theme, baseUrl, baseStyleSheetURLs, appearance) {
43
+ return `<!DOCTYPE html>
44
+ <html>
45
+ <head>
46
+ <base href="${baseUrl}" />
47
+ ${baseStyleSheetURLs.map((href) => `<link rel="stylesheet" href="${href}" />`).join("\n")}
48
+ ${(theme.styleSheets ?? []).map((filePath) => `<link rel="stylesheet" href="styles/${filePath}" />`).join("\n")}
49
+ </head>
50
+ <body class="${[theme.name, appearance && `${appearance}-mode`].filter(Boolean).join(" ")}">
51
+ <h1>Hello</h1>
52
+ </body>
53
+ </html>
54
+ `;
55
+ }
56
+ /**
57
+ * Projects the raw computed CSS variables onto the theme's declared variable
58
+ * names, preserving their declaration order. Names absent from `computed` map
59
+ * to `undefined` (and are therefore dropped by `JSON.stringify`).
60
+ *
61
+ * @param variableNames - The theme's declared CSS variable names.
62
+ * @param computed - All `--*` custom properties read from the rendered body.
63
+ * @returns A record of `variableName -> computed value`.
64
+ */
65
+ function mapThemeVariables(variableNames, computed) {
66
+ return variableNames.reduce((acc, name) => {
67
+ acc[name] = computed[name];
68
+ return acc;
69
+ }, {});
70
+ }
71
+ /** Index of the `)` matching the `(` at `openIndex`, or -1 when unbalanced. */
72
+ function matchingParen(value, openIndex) {
73
+ let depth = 0;
74
+ for (let i = openIndex; i < value.length; i++) if (value[i] === "(") depth++;
75
+ else if (value[i] === ")" && --depth === 0) return i;
76
+ return -1;
77
+ }
78
+ /**
79
+ * Splits `value` at its first top-level (paren-depth-zero) comma into
80
+ * `[before, after]`. Commas inside nested function calls (e.g. `hsl(…)`) are
81
+ * ignored. Returns `[value, '']` when there is no top-level comma.
82
+ */
83
+ function splitTopLevelComma(value) {
84
+ let depth = 0;
85
+ for (let i = 0; i < value.length; i++) {
86
+ const ch = value[i];
87
+ if (ch === "(") depth++;
88
+ else if (ch === ")") depth--;
89
+ else if (ch === "," && depth === 0) return [value.slice(0, i), value.slice(i + 1)];
90
+ }
91
+ return [value, ""];
92
+ }
93
+ /**
94
+ * Replaces every `light-dark(<light>, <dark>)` in a CSS value with the branch
95
+ * matching `appearance`, recursively and in place.
96
+ *
97
+ * Inkdrop's mobile app (React Native) can't evaluate the CSS `light-dark()`
98
+ * function, so the generated palette must carry already-resolved raw values.
99
+ * The browser leaves `light-dark()` unresolved inside custom properties, so we
100
+ * pick the branch ourselves — mirroring how the desktop app selects light/dark
101
+ * via the body's `color-scheme`. Nested calls (the kept branch may itself
102
+ * contain `light-dark()`) and calls embedded in larger values (shadows,
103
+ * gradients, borders) are handled.
104
+ *
105
+ * @param value - A CSS value that may contain one or more `light-dark()` calls.
106
+ * @param appearance - Which branch to keep (`light` → first, `dark` → second).
107
+ * @returns The value with all `light-dark()` calls resolved.
108
+ */
109
+ function resolveLightDark(value, appearance) {
110
+ const start = value.indexOf("light-dark(");
111
+ if (start === -1) return value;
112
+ const open = start + 11 - 1;
113
+ const close = matchingParen(value, open);
114
+ if (close === -1) return value;
115
+ const [light, dark] = splitTopLevelComma(value.slice(open + 1, close));
116
+ const chosen = (appearance === "dark" ? dark : light).trim();
117
+ return value.slice(0, start) + resolveLightDark(chosen, appearance) + resolveLightDark(value.slice(close + 1), appearance);
118
+ }
119
+ //#endregion
120
+ //#region src/generate-palette.ts
121
+ const program = new Command();
122
+ program.name("generate-palette").description("CLI tool for extracting CSS variables from a theme package for Inkdrop").version(version).option("-a, --appearance <light/dark>", "Force the UI appearance (\"light\" or \"dark\"); defaults to the theme's declared appearance").option("-o, --output <path>", "Output file path (default: ./palette.json)", "./palette.json").parse(process.argv);
123
+ const options = program.opts();
124
+ const outputPath = options.output;
125
+ const appearance = options.appearance;
126
+ const baseStyleSheetSpecifiers = [
127
+ "@inkdropapp/css/reset.css",
128
+ "@inkdropapp/css/tokens.css",
129
+ "@inkdropapp/css/ui.css",
130
+ "@inkdropapp/css/tags.css",
131
+ "@inkdropapp/css/status.css",
132
+ "@inkdropapp/css/task-progress.css",
133
+ "@inkdropapp/base-ui-theme/styles/theme.css"
134
+ ];
135
+ async function extractPalette(outputPath) {
136
+ const themePackageJson = (await import(path.join(process.cwd(), "package.json"), { with: { type: "json" } })).default;
137
+ const themeVariableNames = (await import(`@inkdropapp/css/variables.json`, { with: { type: "json" } })).default;
138
+ const browser = await puppeteer.launch();
139
+ const page = await browser.newPage();
140
+ page.on("console", (message) => {
141
+ if (message.type() === "error") console.error(`${message.type().substr(0, 3).toUpperCase()} ${message.text()}`);
142
+ }).on("pageerror", (error) => console.error(error instanceof Error ? error.message : error));
143
+ const resolvedAppearance = appearance ?? deriveAppearance(themePackageJson);
144
+ const baseUrl = pathToFileURL(process.cwd()).toString() + "/";
145
+ const content = buildPreviewHTML(themePackageJson, baseUrl, baseStyleSheetSpecifiers.map((spec) => import.meta.resolve(spec)), resolvedAppearance);
146
+ await page.goto(baseUrl);
147
+ await page.setContent(content);
148
+ const themeCSSVariables = mapThemeVariables(themeVariableNames, await page.$eval("body", (body) => {
149
+ const computedStyles = body.computedStyleMap();
150
+ const variables = {};
151
+ for (const [prop, val] of computedStyles) if (prop.startsWith("--")) variables[prop] = val.toString();
152
+ return variables;
153
+ }));
154
+ const resolvedVariables = Object.fromEntries(Object.entries(themeCSSVariables).map(([name, value]) => [name, typeof value === "string" ? resolveLightDark(value, resolvedAppearance) : value]));
155
+ await writeFile(path.resolve(outputPath), JSON.stringify(resolvedVariables, null, 2));
156
+ await browser.close();
157
+ }
158
+ extractPalette(outputPath).then(() => console.log("Palette extraction complete!")).catch((err) => console.error("Error extracting palette:", err));
159
+ //#endregion
160
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkdropapp/theme-dev-helpers",
3
- "version": "0.3.11",
3
+ "version": "0.4.0",
4
4
  "description": "A helper module for creating themes for Inkdrop",
5
5
  "keywords": [
6
6
  "inkdrop",
@@ -16,12 +16,22 @@
16
16
  "dev-server": "./bin/dev-server",
17
17
  "generate-palette": "./bin/generate-palette"
18
18
  },
19
+ "files": [
20
+ "bin",
21
+ "dist",
22
+ "src",
23
+ "index.html",
24
+ "vite.config.ts",
25
+ "tsconfig.json"
26
+ ],
19
27
  "type": "module",
20
28
  "scripts": {
29
+ "build": "tsdown",
21
30
  "format": "oxfmt",
22
31
  "lint": "oxlint",
23
32
  "typecheck": "tsc --noEmit",
24
- "test": "bun test"
33
+ "test": "vitest run",
34
+ "prepare": "pnpm run build"
25
35
  },
26
36
  "dependencies": {
27
37
  "@inkdropapp/base-ui-theme": "^0.7.5",
@@ -36,10 +46,15 @@
36
46
  "vite": "^8.0.16"
37
47
  },
38
48
  "devDependencies": {
39
- "@types/bun": "1.3.14",
49
+ "@types/node": "^25.9.3",
40
50
  "@types/react": "^19.2.17",
41
51
  "@types/react-dom": "^19.2.3",
42
52
  "oxfmt": "0.55.0",
43
- "oxlint": "1.70.0"
53
+ "oxlint": "1.70.0",
54
+ "tsdown": "^0.22.3",
55
+ "vitest": "^4.1.9"
56
+ },
57
+ "engines": {
58
+ "node": ">=24"
44
59
  }
45
60
  }
@@ -3,8 +3,13 @@ import { writeFile } from 'fs/promises'
3
3
  import path from 'path'
4
4
  import { pathToFileURL } from 'url'
5
5
  import { Command } from 'commander'
6
- import packageJson from '../package.json'
7
- import { buildPreviewHTML, deriveAppearance, mapThemeVariables, resolveLightDark } from './palette'
6
+ import packageJson from '../package.json' with { type: 'json' }
7
+ import {
8
+ buildPreviewHTML,
9
+ deriveAppearance,
10
+ mapThemeVariables,
11
+ resolveLightDark
12
+ } from './palette.ts'
8
13
 
9
14
  const program = new Command()
10
15
 
@@ -37,8 +42,12 @@ const baseStyleSheetSpecifiers = [
37
42
 
38
43
  // Function to extract theme CSS variables
39
44
  async function extractPalette(outputPath: string) {
40
- const themePackageJson = await import(path.join(process.cwd(), 'package.json'))
41
- const themeVariableNames: string[] = (await import(`@inkdropapp/css/variables.json`)).default
45
+ const themePackageJson = (
46
+ await import(path.join(process.cwd(), 'package.json'), { with: { type: 'json' } })
47
+ ).default
48
+ const themeVariableNames: string[] = (
49
+ await import(`@inkdropapp/css/variables.json`, { with: { type: 'json' } })
50
+ ).default
42
51
 
43
52
  const browser = await puppeteer.launch()
44
53
  const page = await browser.newPage()
@@ -1,4 +1,4 @@
1
- import { describe, expect, test } from 'bun:test'
1
+ import { describe, expect, test } from 'vitest'
2
2
  import { buildPreviewHTML, deriveAppearance, mapThemeVariables, resolveLightDark } from './palette'
3
3
 
4
4
  describe('buildPreviewHTML', () => {
package/tsconfig.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "moduleDetection": "force",
13
13
  "noEmit": true,
14
14
  "jsx": "react-jsx",
15
- "types": ["bun"],
15
+ "types": ["node"],
16
16
  /* Linting */
17
17
  "strict": true,
18
18
  "noUnusedLocals": true,
@@ -1,27 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- pull_request:
5
- push:
6
-
7
- jobs:
8
- test:
9
- name: Run tests
10
- runs-on: ubuntu-latest
11
- steps:
12
- - name: Checkout 🛎️
13
- uses: actions/checkout@v6
14
-
15
- - name: Use Bun 🥟
16
- uses: oven-sh/setup-bun@v2
17
- with:
18
- registry-url: 'https://registry.npmjs.org'
19
- scope: '@inkdropapp'
20
-
21
- - name: Install 🔧
22
- env:
23
- BUN_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
24
- run: bun install
25
-
26
- - name: Generate Palette 🏗️
27
- run: ./bin/generate-palette
package/.oxfmtrc.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "./node_modules/oxfmt/configuration_schema.json",
3
- "semi": false,
4
- "singleQuote": true,
5
- "trailingComma": "none",
6
- "sortImports": false,
7
- "sortPackageJson": true
8
- }
package/.oxlintrc.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "$schema": "./node_modules/oxlint/configuration_schema.json",
3
- "plugins": ["typescript", "unicorn", "oxc", "react"],
4
- "settings": {
5
- "react": {
6
- "version": "19.2.7"
7
- }
8
- },
9
- "categories": {
10
- "correctness": "error"
11
- },
12
- "rules": {
13
- "typescript/no-explicit-any": "off",
14
- "typescript/ban-ts-comment": "off",
15
- "typescript/no-this-alias": "off",
16
- "typescript/no-unused-vars": [
17
- "warn",
18
- {
19
- "argsIgnorePattern": "^_",
20
- "varsIgnorePattern": "^_",
21
- "caughtErrorsIgnorePattern": "^_"
22
- }
23
- ],
24
- "no-useless-escape": "off",
25
- "prefer-const": "error",
26
- "no-unused-vars": "off"
27
- },
28
- "ignorePatterns": ["node_modules/**"]
29
- }
package/Session.vim DELETED
@@ -1,249 +0,0 @@
1
- let SessionLoad = 1
2
- let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
3
- let v:this_session=expand("<sfile>:p")
4
- silent only
5
- silent tabonly
6
- cd ~/Developments/inkdrop/theme-dev-helpers
7
- if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
8
- let s:wipebuf = bufnr('%')
9
- endif
10
- let s:shortmess_save = &shortmess
11
- if &shortmess =~ 'A'
12
- set shortmess=aoOA
13
- else
14
- set shortmess=aoO
15
- endif
16
- badd +24 package.json
17
- badd +2 src/dev-server.tsx
18
- badd +18 tsconfig.json
19
- badd +31 src/dev-server.css
20
- badd +9 ~/Developments/inkdrop/theme-dev-helpers/src/dev-server/index.tsx
21
- badd +9 ~/Developments/inkdrop/theme-dev-helpers/src/dev-server/color-tokens.tsx
22
- badd +63 src/generate-palette.ts
23
- badd +3 src/dev-server/css-variables.ts
24
- argglobal
25
- %argdel
26
- $argadd package.json
27
- edit package.json
28
- let s:save_splitbelow = &splitbelow
29
- let s:save_splitright = &splitright
30
- set splitbelow splitright
31
- wincmd _ | wincmd |
32
- vsplit
33
- wincmd _ | wincmd |
34
- vsplit
35
- wincmd _ | wincmd |
36
- vsplit
37
- wincmd _ | wincmd |
38
- vsplit
39
- wincmd _ | wincmd |
40
- vsplit
41
- 5wincmd h
42
- wincmd w
43
- wincmd w
44
- wincmd w
45
- wincmd _ | wincmd |
46
- split
47
- 1wincmd k
48
- wincmd w
49
- wincmd w
50
- wincmd w
51
- let &splitbelow = s:save_splitbelow
52
- let &splitright = s:save_splitright
53
- wincmd t
54
- let s:save_winminheight = &winminheight
55
- let s:save_winminwidth = &winminwidth
56
- set winminheight=0
57
- set winheight=1
58
- set winminwidth=0
59
- set winwidth=1
60
- wincmd =
61
- argglobal
62
- setlocal fdm=expr
63
- setlocal fde=v:lua.require'lazyvim.util'.ui.foldexpr()
64
- setlocal fmr={{{,}}}
65
- setlocal fdi=#
66
- setlocal fdl=99
67
- setlocal fml=1
68
- setlocal fdn=20
69
- setlocal fen
70
- let s:l = 2 - ((1 * winheight(0) + 36) / 73)
71
- if s:l < 1 | let s:l = 1 | endif
72
- keepjumps exe s:l
73
- normal! zt
74
- keepjumps 2
75
- normal! 03|
76
- wincmd w
77
- argglobal
78
- if bufexists(fnamemodify("tsconfig.json", ":p")) | buffer tsconfig.json | else | edit tsconfig.json | endif
79
- if &buftype ==# 'terminal'
80
- silent file tsconfig.json
81
- endif
82
- balt package.json
83
- setlocal fdm=expr
84
- setlocal fde=v:lua.require'lazyvim.util'.ui.foldexpr()
85
- setlocal fmr={{{,}}}
86
- setlocal fdi=#
87
- setlocal fdl=99
88
- setlocal fml=1
89
- setlocal fdn=20
90
- setlocal fen
91
- 1
92
- normal! zo
93
- 2
94
- normal! zo
95
- let s:l = 14 - ((13 * winheight(0) + 36) / 73)
96
- if s:l < 1 | let s:l = 1 | endif
97
- keepjumps exe s:l
98
- normal! zt
99
- keepjumps 14
100
- normal! 06|
101
- wincmd w
102
- argglobal
103
- if bufexists(fnamemodify("src/dev-server.tsx", ":p")) | buffer src/dev-server.tsx | else | edit src/dev-server.tsx | endif
104
- if &buftype ==# 'terminal'
105
- silent file src/dev-server.tsx
106
- endif
107
- balt package.json
108
- setlocal fdm=expr
109
- setlocal fde=v:lua.require'lazyvim.util'.ui.foldexpr()
110
- setlocal fmr={{{,}}}
111
- setlocal fdi=#
112
- setlocal fdl=99
113
- setlocal fml=1
114
- setlocal fdn=20
115
- setlocal fen
116
- 23
117
- normal! zo
118
- 31
119
- normal! zo
120
- let s:l = 28 - ((27 * winheight(0) + 36) / 73)
121
- if s:l < 1 | let s:l = 1 | endif
122
- keepjumps exe s:l
123
- normal! zt
124
- keepjumps 28
125
- normal! 049|
126
- wincmd w
127
- argglobal
128
- if bufexists(fnamemodify("~/Developments/inkdrop/theme-dev-helpers/src/dev-server/index.tsx", ":p")) | buffer ~/Developments/inkdrop/theme-dev-helpers/src/dev-server/index.tsx | else | edit ~/Developments/inkdrop/theme-dev-helpers/src/dev-server/index.tsx | endif
129
- if &buftype ==# 'terminal'
130
- silent file ~/Developments/inkdrop/theme-dev-helpers/src/dev-server/index.tsx
131
- endif
132
- setlocal fdm=expr
133
- setlocal fde=v:lua.require'lazyvim.util'.ui.foldexpr()
134
- setlocal fmr={{{,}}}
135
- setlocal fdi=#
136
- setlocal fdl=99
137
- setlocal fml=1
138
- setlocal fdn=20
139
- setlocal fen
140
- 4
141
- normal! zo
142
- 6
143
- normal! zo
144
- 8
145
- normal! zo
146
- 9
147
- normal! zo
148
- let s:l = 13 - ((12 * winheight(0) + 18) / 36)
149
- if s:l < 1 | let s:l = 1 | endif
150
- keepjumps exe s:l
151
- normal! zt
152
- keepjumps 13
153
- normal! 027|
154
- wincmd w
155
- argglobal
156
- if bufexists(fnamemodify("~/Developments/inkdrop/theme-dev-helpers/src/dev-server/color-tokens.tsx", ":p")) | buffer ~/Developments/inkdrop/theme-dev-helpers/src/dev-server/color-tokens.tsx | else | edit ~/Developments/inkdrop/theme-dev-helpers/src/dev-server/color-tokens.tsx | endif
157
- if &buftype ==# 'terminal'
158
- silent file ~/Developments/inkdrop/theme-dev-helpers/src/dev-server/color-tokens.tsx
159
- endif
160
- setlocal fdm=expr
161
- setlocal fde=v:lua.require'lazyvim.util'.ui.foldexpr()
162
- setlocal fmr={{{,}}}
163
- setlocal fdi=#
164
- setlocal fdl=99
165
- setlocal fml=1
166
- setlocal fdn=20
167
- setlocal fen
168
- let s:l = 9 - ((8 * winheight(0) + 18) / 36)
169
- if s:l < 1 | let s:l = 1 | endif
170
- keepjumps exe s:l
171
- normal! zt
172
- keepjumps 9
173
- normal! 0
174
- wincmd w
175
- argglobal
176
- if bufexists(fnamemodify("src/dev-server.css", ":p")) | buffer src/dev-server.css | else | edit src/dev-server.css | endif
177
- if &buftype ==# 'terminal'
178
- silent file src/dev-server.css
179
- endif
180
- balt src/dev-server.tsx
181
- setlocal fdm=expr
182
- setlocal fde=v:lua.require'lazyvim.util'.ui.foldexpr()
183
- setlocal fmr={{{,}}}
184
- setlocal fdi=#
185
- setlocal fdl=99
186
- setlocal fml=1
187
- setlocal fdn=20
188
- setlocal fen
189
- 14
190
- normal! zo
191
- 20
192
- normal! zo
193
- let s:l = 31 - ((30 * winheight(0) + 36) / 73)
194
- if s:l < 1 | let s:l = 1 | endif
195
- keepjumps exe s:l
196
- normal! zt
197
- keepjumps 31
198
- normal! 0
199
- wincmd w
200
- argglobal
201
- if bufexists(fnamemodify("src/generate-palette.ts", ":p")) | buffer src/generate-palette.ts | else | edit src/generate-palette.ts | endif
202
- if &buftype ==# 'terminal'
203
- silent file src/generate-palette.ts
204
- endif
205
- balt package.json
206
- setlocal fdm=expr
207
- setlocal fde=v:lua.require'lazyvim.util'.ui.foldexpr()
208
- setlocal fmr={{{,}}}
209
- setlocal fdi=#
210
- setlocal fdl=99
211
- setlocal fml=1
212
- setlocal fdn=20
213
- setlocal fen
214
- 25
215
- normal! zo
216
- 33
217
- normal! zo
218
- 62
219
- normal! zo
220
- 65
221
- normal! zo
222
- let s:l = 63 - ((48 * winheight(0) + 36) / 73)
223
- if s:l < 1 | let s:l = 1 | endif
224
- keepjumps exe s:l
225
- normal! zt
226
- keepjumps 63
227
- normal! 0
228
- wincmd w
229
- 5wincmd w
230
- wincmd =
231
- tabnext 1
232
- if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
233
- silent exe 'bwipe ' . s:wipebuf
234
- endif
235
- unlet! s:wipebuf
236
- set winheight=1 winwidth=20
237
- let &shortmess = s:shortmess_save
238
- let &winminheight = s:save_winminheight
239
- let &winminwidth = s:save_winminwidth
240
- let s:sx = expand("<sfile>:p:r")."x.vim"
241
- if filereadable(s:sx)
242
- exe "source " . fnameescape(s:sx)
243
- endif
244
- let &g:so = s:so_save | let &g:siso = s:siso_save
245
- set hlsearch
246
- nohlsearch
247
- doautoall SessionLoadPost
248
- unlet SessionLoad
249
- " vim: set ft=vim :
@@ -1,6 +0,0 @@
1
- allowBuilds:
2
- esbuild: true
3
- puppeteer: true
4
- minimumReleaseAgeExclude:
5
- - '@inkdropapp/base-ui-theme'
6
- - '@inkdropapp/css'