├── pnpm-workspace.yaml ├── apps ├── lazytm-site │ ├── tsconfig.json │ ├── public │ │ ├── google649c83693a35b792.html │ │ ├── og.jpg │ │ ├── profile.jpg │ │ └── favicon │ │ │ ├── favicon.ico │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── mstile-150x150.png │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-256x256.png │ │ │ ├── browserconfig.xml │ │ │ ├── site.webmanifest │ │ │ └── safari-pinned-tab.svg │ ├── src │ │ ├── env.d.ts │ │ ├── content │ │ │ ├── codesnippets │ │ │ │ ├── basic-usage.md │ │ │ │ ├── harsh-usage.md │ │ │ │ └── lazy-usage.md │ │ │ └── config.ts │ │ ├── components │ │ │ ├── copyIcon.astro │ │ │ ├── githubIcon.astro │ │ │ ├── copyButton.astro │ │ │ └── glitch.astro │ │ └── pages │ │ │ └── index.astro │ ├── .vscode │ │ ├── extensions.json │ │ └── launch.json │ ├── CHANGELOG.md │ ├── .gitignore │ ├── astro.config.mjs │ ├── package.json │ ├── README.md │ └── tailwind.config.cjs ├── bartm-site │ ├── public │ │ ├── og.jpg │ │ ├── profile.jpg │ │ ├── favicon │ │ │ ├── favicon.ico │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── mstile-150x150.png │ │ │ ├── apple-touch-icon.png │ │ │ ├── android-chrome-192x192.png │ │ │ ├── android-chrome-256x256.png │ │ │ ├── browserconfig.xml │ │ │ ├── site.webmanifest │ │ │ └── safari-pinned-tab.svg │ │ └── fonts │ │ │ └── BerkeleyMono-Regular.woff2 │ ├── src │ │ ├── env.d.ts │ │ ├── components │ │ │ ├── copyIcon.astro │ │ │ ├── githubIcon.astro │ │ │ ├── copyButton.astro │ │ │ ├── dynamicBarWithInput.tsx │ │ │ └── glitch.astro │ │ └── pages │ │ │ └── index.astro │ ├── .vscode │ │ ├── extensions.json │ │ └── launch.json │ ├── README.md │ ├── tsconfig.json │ ├── astro.config.mjs │ ├── .gitignore │ ├── package.json │ └── tailwind.config.js └── tailwindcss-toolkit-site │ ├── public │ ├── og.jpg │ ├── profile.jpg │ ├── favicon │ │ ├── favicon.ico │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── mstile-150x150.png │ │ ├── apple-touch-icon.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-256x256.png │ │ ├── browserconfig.xml │ │ ├── site.webmanifest │ │ └── safari-pinned-tab.svg │ └── fonts │ │ └── BerkeleyMono-Regular.woff2 │ ├── src │ ├── env.d.ts │ ├── components │ │ ├── copyIcon.astro │ │ ├── githubIcon.astro │ │ ├── copyButton.astro │ │ └── glitch.astro │ └── pages │ │ └── index.astro │ ├── .vscode │ ├── extensions.json │ └── launch.json │ ├── README.md │ ├── tsconfig.json │ ├── CHANGELOG.md │ ├── astro.config.mjs │ ├── .gitignore │ ├── package.json │ └── tailwind.config.js ├── packages ├── ui │ ├── index.tsx │ ├── Button.tsx │ ├── tsconfig.json │ └── package.json ├── bartm │ ├── src │ │ ├── index.ts │ │ └── progressbar.ts │ ├── CHANGELOG.md │ ├── tsconfig.json │ ├── README.md │ ├── package.json │ └── LICENCE ├── lazytm │ ├── tsconfig.json │ ├── src │ │ ├── index.ts │ │ └── lazySplit.ts │ ├── CHANGELOG.md │ ├── package.json │ ├── LICENCE │ └── README.md ├── tsconfig │ ├── README.md │ ├── package.json │ ├── react-library.json │ ├── base.json │ └── nextjs.json ├── tailwindcss-toolkit │ ├── src │ │ ├── index.ts │ │ └── variants │ │ │ └── extendedDisabledEnabled │ │ │ └── index.ts │ ├── CHANGELOG.md │ ├── README.md │ ├── tsconfig.json │ ├── package.json │ └── LICENCE └── eslint-config-custom │ ├── index.js │ └── package.json ├── .eslintrc.js ├── .changeset ├── config.json └── README.md ├── turbo.json ├── .gitignore ├── package.json └── README.md /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - "apps/*" 3 | - "packages/*" 4 | -------------------------------------------------------------------------------- /apps/lazytm-site/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strictest" 3 | } -------------------------------------------------------------------------------- /packages/ui/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | export * from "./Button"; 3 | -------------------------------------------------------------------------------- /apps/bartm-site/public/og.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/bartm-site/public/og.jpg -------------------------------------------------------------------------------- /apps/lazytm-site/public/google649c83693a35b792.html: -------------------------------------------------------------------------------- 1 | google-site-verification: google649c83693a35b792.html -------------------------------------------------------------------------------- /packages/bartm/src/index.ts: -------------------------------------------------------------------------------- 1 | import { progressBar as bar } from "./progressbar"; 2 | 3 | export { bar }; 4 | -------------------------------------------------------------------------------- /apps/lazytm-site/public/og.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/lazytm-site/public/og.jpg -------------------------------------------------------------------------------- /packages/bartm/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @bdsqqq/bartm 2 | 3 | ## 0.0.2 4 | 5 | ### Patch Changes 6 | 7 | - launch 8 | -------------------------------------------------------------------------------- /apps/bartm-site/public/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/bartm-site/public/profile.jpg -------------------------------------------------------------------------------- /apps/lazytm-site/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// -------------------------------------------------------------------------------- /packages/lazytm/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/base.json", 3 | "exclude": ["node_modules"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/bartm-site/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /apps/lazytm-site/public/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/lazytm-site/public/profile.jpg -------------------------------------------------------------------------------- /packages/lazytm/src/index.ts: -------------------------------------------------------------------------------- 1 | import { makeLazySplitIterator } from "./lazySplit"; 2 | 3 | export { makeLazySplitIterator }; 4 | -------------------------------------------------------------------------------- /apps/bartm-site/public/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/bartm-site/public/favicon/favicon.ico -------------------------------------------------------------------------------- /apps/lazytm-site/public/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/lazytm-site/public/favicon/favicon.ico -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/og.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/tailwindcss-toolkit-site/public/og.jpg -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /packages/ui/Button.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | export const Button = () => { 3 | return ; 4 | }; 5 | -------------------------------------------------------------------------------- /apps/bartm-site/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /apps/bartm-site/README.md: -------------------------------------------------------------------------------- 1 | # bar™ website 2 | 3 | Minimal, yet overengineered, site for the @bdsqqq/bartm library. 4 | 5 | # Attributions 6 | -------------------------------------------------------------------------------- /apps/lazytm-site/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /apps/bartm-site/public/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/bartm-site/public/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /apps/bartm-site/public/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/bartm-site/public/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /apps/bartm-site/public/favicon/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/bartm-site/public/favicon/mstile-150x150.png -------------------------------------------------------------------------------- /apps/lazytm-site/public/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/lazytm-site/public/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /apps/lazytm-site/public/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/lazytm-site/public/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/tailwindcss-toolkit-site/public/profile.jpg -------------------------------------------------------------------------------- /packages/tsconfig/README.md: -------------------------------------------------------------------------------- 1 | # `tsconfig` 2 | 3 | These are base shared `tsconfig.json`s from which all other `tsconfig.json`'s inherit from. 4 | -------------------------------------------------------------------------------- /apps/bartm-site/public/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/bartm-site/public/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /apps/lazytm-site/public/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/lazytm-site/public/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /apps/lazytm-site/public/favicon/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/lazytm-site/public/favicon/mstile-150x150.png -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["astro-build.astro-vscode"], 3 | "unwantedRecommendations": [] 4 | } 5 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/README.md: -------------------------------------------------------------------------------- 1 | # bar™ website 2 | 3 | Minimal, yet overengineered, site for the @bdsqqq/bartm library. 4 | 5 | # Attributions 6 | -------------------------------------------------------------------------------- /apps/bartm-site/public/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/bartm-site/public/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /apps/bartm-site/public/favicon/android-chrome-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/bartm-site/public/favicon/android-chrome-256x256.png -------------------------------------------------------------------------------- /apps/bartm-site/public/fonts/BerkeleyMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/bartm-site/public/fonts/BerkeleyMono-Regular.woff2 -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/tailwindcss-toolkit-site/public/favicon/favicon.ico -------------------------------------------------------------------------------- /packages/ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/react-library.json", 3 | "include": ["."], 4 | "exclude": ["dist", "build", "node_modules"] 5 | } 6 | -------------------------------------------------------------------------------- /apps/lazytm-site/public/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/lazytm-site/public/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /apps/lazytm-site/public/favicon/android-chrome-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/lazytm-site/public/favicon/android-chrome-256x256.png -------------------------------------------------------------------------------- /packages/tailwindcss-toolkit/src/index.ts: -------------------------------------------------------------------------------- 1 | import { extendedDisabledEnabled } from "./variants/extendedDisabledEnabled"; 2 | 3 | export { extendedDisabledEnabled }; 4 | -------------------------------------------------------------------------------- /apps/lazytm-site/src/content/codesnippets/basic-usage.md: -------------------------------------------------------------------------------- 1 | ```ts 2 | const someString = "Hello World"; 3 | 4 | someString.split(" "); 5 | // ['Hello', 'World'] 6 | ``` 7 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/tailwindcss-toolkit-site/public/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/tailwindcss-toolkit-site/public/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /packages/tailwindcss-toolkit/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @bdsqqq/tailwindcss-toolkit 2 | 3 | ## 0.1.0 4 | 5 | ### Minor Changes 6 | 7 | - added `extendedDisabledEnabled` plugin 8 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/favicon/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/tailwindcss-toolkit-site/public/favicon/mstile-150x150.png -------------------------------------------------------------------------------- /packages/bartm/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/base.json", 3 | "exclude": ["node_modules"], 4 | "compilerOptions": { 5 | "lib": ["ES2015"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/tailwindcss-toolkit/README.md: -------------------------------------------------------------------------------- 1 | # tailwindcss toolkit™ 2 | 3 | ## Usage 4 | 5 | ``` 6 | npm install @bdsqqq/bartm 7 | ``` 8 | 9 | ```ts 10 | 11 | ``` 12 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/tailwindcss-toolkit-site/public/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /apps/bartm-site/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strictest", 3 | "compilerOptions": { 4 | "jsx": "preserve", 5 | "jsxImportSource": "solid-js" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/fonts/BerkeleyMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/tailwindcss-toolkit-site/public/fonts/BerkeleyMono-Regular.woff2 -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/tailwindcss-toolkit-site/public/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/favicon/android-chrome-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bdsqqq/things/HEAD/apps/tailwindcss-toolkit-site/public/favicon/android-chrome-256x256.png -------------------------------------------------------------------------------- /packages/tailwindcss-toolkit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tsconfig/base.json", 3 | "exclude": ["node_modules"], 4 | "compilerOptions": { 5 | "lib": ["ES2015"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strictest", 3 | "compilerOptions": { 4 | "jsx": "preserve", 5 | "jsxImportSource": "solid-js" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/bartm/README.md: -------------------------------------------------------------------------------- 1 | # bar™ 2 | 3 | ## Usage 4 | 5 | ``` 6 | npm install @bdsqqq/bartm 7 | ``` 8 | 9 | ```ts 10 | 11 | ``` 12 | 13 | ## Why does this exist? 14 | 15 | ## Why is the lib a single function? 16 | -------------------------------------------------------------------------------- /packages/tsconfig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tsconfig", 3 | "version": "0.0.0", 4 | "private": true, 5 | "files": [ 6 | "base.json", 7 | "nextjs.json", 8 | "react-library.json" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /apps/lazytm-site/src/content/config.ts: -------------------------------------------------------------------------------- 1 | import { defineCollection } from "astro:content"; 2 | 3 | const snippetsCollection = defineCollection({}); 4 | export const collections = { 5 | codesnippets: snippetsCollection, 6 | }; 7 | -------------------------------------------------------------------------------- /packages/lazytm/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @bdsqqq/lazytm 2 | 3 | ## 0.0.2 4 | 5 | ### Patch Changes 6 | 7 | - fix dumb nested object return 8 | 9 | ## 0.0.1 10 | 11 | ### Patch Changes 12 | 13 | - Initial implementation 14 | - 319ad62: Init 15 | -------------------------------------------------------------------------------- /apps/lazytm-site/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # lazytm-website 2 | 3 | ## 0.0.3 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - @bdsqqq/lazytm@0.0.2 9 | 10 | ## 0.0.2 11 | 12 | ### Patch Changes 13 | 14 | - 233a759: Fix dumb nested object return 15 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | // This tells ESLint to load the config from the package `eslint-config-custom` 4 | extends: ["custom"], 5 | settings: { 6 | next: { 7 | rootDir: ["apps/*/"], 8 | }, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # tailwindcss-toolkit-website 2 | 3 | ## 0.1.0 4 | 5 | ### Minor Changes 6 | 7 | - added `extendedDisabledEnabled` plugin 8 | 9 | ### Patch Changes 10 | 11 | - Updated dependencies 12 | - @bdsqqq/tailwindcss-toolkit@0.1.0 13 | -------------------------------------------------------------------------------- /apps/bartm-site/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /apps/bartm-site/astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "astro/config"; 2 | import tailwind from "@astrojs/tailwind"; 3 | import solid from "@astrojs/solid-js"; 4 | 5 | // https://astro.build/config 6 | export default defineConfig({ 7 | integrations: [tailwind(), solid()], 8 | }); 9 | -------------------------------------------------------------------------------- /apps/lazytm-site/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "astro/config"; 2 | import tailwind from "@astrojs/tailwind"; 3 | import solid from "@astrojs/solid-js"; 4 | 5 | // https://astro.build/config 6 | export default defineConfig({ 7 | integrations: [tailwind(), solid()], 8 | }); 9 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "command": "./node_modules/.bin/astro dev", 6 | "name": "Development server", 7 | "request": "launch", 8 | "type": "node-terminal" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["next", "turbo", "prettier"], 3 | rules: { 4 | "@next/next/no-html-link-for-pages": "off", 5 | }, 6 | parserOptions: { 7 | babelOptions: { 8 | presets: [require.resolve("next/babel")], 9 | }, 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/tsconfig/react-library.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "React Library", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "jsx": "react-jsx", 7 | "lib": ["ES2015"], 8 | "module": "ESNext", 9 | "target": "es6" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/bartm-site/public/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /apps/lazytm-site/src/content/codesnippets/harsh-usage.md: -------------------------------------------------------------------------------- 1 | ```ts 2 | import { this_could_be_a_gb_file } 3 | from "./bigassfile.csv"; 4 | 5 | const splitString = 6 | this_could_be_a_gb_file.split("\n"); 7 | // [] with possibly thousands of entries, 8 | // blocks main thread 9 | 10 | showFirstLineInUi(splitString[0]); 11 | ``` 12 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "public", 8 | "baseBranch": "main", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /apps/lazytm-site/public/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /apps/bartm-site/.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | # generated types 4 | .astro/ 5 | 6 | # dependencies 7 | node_modules/ 8 | 9 | # logs 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | 16 | # environment variables 17 | .env 18 | .env.production 19 | 20 | # macOS-specific files 21 | .DS_Store 22 | -------------------------------------------------------------------------------- /apps/lazytm-site/.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | # generated types 4 | .astro/ 5 | 6 | # dependencies 7 | node_modules/ 8 | 9 | # logs 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | 16 | # environment variables 17 | .env 18 | .env.production 19 | 20 | # macOS-specific files 21 | .DS_Store 22 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #da532c 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist/ 3 | # generated types 4 | .astro/ 5 | 6 | # dependencies 7 | node_modules/ 8 | 9 | # logs 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | pnpm-debug.log* 14 | 15 | 16 | # environment variables 17 | .env 18 | .env.production 19 | 20 | # macOS-specific files 21 | .DS_Store 22 | -------------------------------------------------------------------------------- /apps/lazytm-site/astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "astro/config"; 2 | 3 | // https://astro.build/config 4 | import tailwind from "@astrojs/tailwind"; 5 | 6 | export default defineConfig({ 7 | output: "static", 8 | markdown: { 9 | shikiConfig: { 10 | theme: "css-variables", 11 | wrap: false, 12 | }, 13 | }, 14 | integrations: [tailwind()], 15 | }); 16 | -------------------------------------------------------------------------------- /apps/lazytm-site/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lazytm-website", 3 | "type": "module", 4 | "version": "0.0.3", 5 | "scripts": { 6 | "dev": "astro dev", 7 | "start": "astro dev", 8 | "build": "astro build", 9 | "preview": "astro preview", 10 | "astro": "astro" 11 | }, 12 | "dependencies": { 13 | "@astrojs/tailwind": "^3.0.1", 14 | "astro": "^2.0.14", 15 | "clsx": "^1.2.1", 16 | "tailwindcss": "^3.2.6" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /turbo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://turbo.build/schema.json", 3 | "globalDependencies": [ 4 | "**/.env.*local" 5 | ], 6 | "tasks": { 7 | "build": { 8 | "dependsOn": [ 9 | "^build" 10 | ], 11 | "outputs": [ 12 | "dist/**", 13 | ".next/**", 14 | "!.next/cache/**" 15 | ] 16 | }, 17 | "lint": { 18 | "outputs": [] 19 | }, 20 | "dev": { 21 | "cache": false 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /apps/lazytm-site/src/content/codesnippets/lazy-usage.md: -------------------------------------------------------------------------------- 1 | ```ts 2 | import { makeLazySplitIterator } 3 | from "@bdsqqq/lazytm"; 4 | import { this_could_be_a_gb_file } 5 | from "./bigassfile.csv"; 6 | 7 | const iterator = 8 | makeLazySplitIterator(this_could_be_a_gb_file, "\n"); 9 | 10 | const { value, done } = iterator.next(); 11 | // value is the first line of the file, done will be false 12 | // This will only compute until it finds the first match. 13 | 14 | showFirstLineInUi(value); 15 | ``` 16 | -------------------------------------------------------------------------------- /packages/ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ui", 3 | "version": "0.0.0", 4 | "main": "./index.tsx", 5 | "types": "./index.tsx", 6 | "license": "MIT", 7 | "scripts": { 8 | "lint": "eslint *.ts*" 9 | }, 10 | "devDependencies": { 11 | "@types/react": "^18.0.17", 12 | "@types/react-dom": "^18.0.6", 13 | "eslint": "^7.32.0", 14 | "eslint-config-custom": "workspace:*", 15 | "react": "^18.2.0", 16 | "tsconfig": "workspace:*", 17 | "typescript": "^4.5.2" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/eslint-config-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-custom", 3 | "version": "0.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "dependencies": { 7 | "eslint": "^7.23.0", 8 | "eslint-config-next": "13.0.0", 9 | "eslint-config-prettier": "^8.3.0", 10 | "eslint-plugin-react": "7.31.8", 11 | "eslint-config-turbo": "latest" 12 | }, 13 | "devDependencies": { 14 | "typescript": "^4.7.4" 15 | }, 16 | "publishConfig": { 17 | "access": "public" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # testing 9 | coverage 10 | 11 | # next.js 12 | .next/ 13 | out/ 14 | build 15 | 16 | # misc 17 | .DS_Store 18 | *.pem 19 | 20 | # debug 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | .pnpm-debug.log* 25 | 26 | # local env files 27 | .env.local 28 | .env.development.local 29 | .env.test.local 30 | .env.production.local 31 | 32 | # turbo 33 | .turbo 34 | 35 | # local dists 36 | dist -------------------------------------------------------------------------------- /apps/bartm-site/public/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/favicon/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/favicon/android-chrome-256x256.png", 12 | "sizes": "256x256", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /apps/lazytm-site/public/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/favicon/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/favicon/android-chrome-256x256.png", 12 | "sizes": "256x256", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "short_name": "", 4 | "icons": [ 5 | { 6 | "src": "/favicon/android-chrome-192x192.png", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "/favicon/android-chrome-256x256.png", 12 | "sizes": "256x256", 13 | "type": "image/png" 14 | } 15 | ], 16 | "theme_color": "#ffffff", 17 | "background_color": "#ffffff", 18 | "display": "standalone" 19 | } 20 | -------------------------------------------------------------------------------- /packages/tsconfig/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Default", 4 | "compilerOptions": { 5 | "composite": false, 6 | "declaration": true, 7 | "declarationMap": true, 8 | "esModuleInterop": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "inlineSources": false, 11 | "isolatedModules": true, 12 | "moduleResolution": "node", 13 | "noUnusedLocals": false, 14 | "noUnusedParameters": false, 15 | "preserveWatchOutput": true, 16 | "skipLibCheck": true, 17 | "strict": true 18 | }, 19 | "exclude": ["node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "coisas", 3 | "version": "0.0.0", 4 | "private": true, 5 | "workspaces": [ 6 | "apps/*", 7 | "packages/*" 8 | ], 9 | "scripts": { 10 | "build": "turbo run build", 11 | "dev": "turbo run dev", 12 | "lint": "turbo run lint", 13 | "format": "prettier --write \"**/*.{ts,tsx,md}\"" 14 | }, 15 | "devDependencies": { 16 | "eslint-config-custom": "workspace:*", 17 | "prettier": "latest", 18 | "turbo": "^2.0.12" 19 | }, 20 | "engines": { 21 | "node": ">=14.0.0" 22 | }, 23 | "dependencies": { 24 | "@changesets/cli": "^2.26.1" 25 | }, 26 | "packageManager": "pnpm@7.28.0" 27 | } -------------------------------------------------------------------------------- /apps/lazytm-site/README.md: -------------------------------------------------------------------------------- 1 | # Try website 2 | 3 | Minimal, yet overengineered, site for the @bdsqqq/try library. 4 | 5 | https://user-images.githubusercontent.com/37847523/220816795-b243f581-161d-482f-9c55-367bd539d84b.mp4 6 | 7 | # Attributions 8 | 9 | - The lib itself is an implementation of a solution discussed in a [fireship video](https://www.youtube.com/watch?v=ITogH7lJTyE); 10 | - The site's layout is heavily inspired by [cmd k](https://cmdk.paco.me); 11 | - The version glitch animation was reverse engineered from [simple bookmarks](https://bmrks.com); 12 | - The stacking cards were adapted from a css-tricks [video](https://youtube.com/watch?v=NXtz59). 13 | -------------------------------------------------------------------------------- /packages/tsconfig/nextjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Next.js", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "target": "es5", 7 | "lib": ["dom", "dom.iterable", "esnext"], 8 | "allowJs": true, 9 | "skipLibCheck": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "noEmit": true, 13 | "incremental": true, 14 | "esModuleInterop": true, 15 | "module": "esnext", 16 | "resolveJsonModule": true, 17 | "isolatedModules": true, 18 | "jsx": "preserve" 19 | }, 20 | "include": ["src", "next-env.d.ts"], 21 | "exclude": ["node_modules"] 22 | } 23 | -------------------------------------------------------------------------------- /apps/bartm-site/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bartm-website", 3 | "type": "module", 4 | "version": "0.0.1", 5 | "scripts": { 6 | "dev": "astro dev", 7 | "start": "astro dev", 8 | "build": "astro check && astro build", 9 | "preview": "astro preview", 10 | "astro": "astro" 11 | }, 12 | "dependencies": { 13 | "@astrojs/check": "^0.4.1", 14 | "@astrojs/solid-js": "^4.0.1", 15 | "@astrojs/tailwind": "^5.1.0", 16 | "@bdsqqq/bartm": "workspace:*", 17 | "astro": "^4.2.3", 18 | "astro-font": "^0.0.77", 19 | "classnames": "^2.5.1", 20 | "solid-js": "^1.8.12", 21 | "tailwind-merge": "^2.2.1", 22 | "tailwindcss": "^3.4.1", 23 | "typescript": "^5.3.3" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tailwindcss-toolkit-website", 3 | "type": "module", 4 | "version": "0.1.0", 5 | "scripts": { 6 | "dev": "astro dev", 7 | "start": "astro dev", 8 | "build": "astro check && astro build", 9 | "preview": "astro preview", 10 | "astro": "astro" 11 | }, 12 | "dependencies": { 13 | "@astrojs/check": "^0.4.1", 14 | "@astrojs/solid-js": "^4.0.1", 15 | "@astrojs/tailwind": "^5.1.0", 16 | "@bdsqqq/tailwindcss-toolkit": "workspace:*", 17 | "astro": "^4.2.3", 18 | "astro-font": "^0.0.77", 19 | "classnames": "^2.5.1", 20 | "solid-js": "^1.8.12", 21 | "tailwind-merge": "^2.2.1", 22 | "tailwindcss": "^3.4.1", 23 | "typescript": "^5.3.3" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/bartm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@bdsqqq/bartm", 3 | "scope": "@bdsqqq/", 4 | "version": "0.0.2", 5 | "access": "public", 6 | "description": "Because text-based graphics look way too good.", 7 | "displayName": "bar™", 8 | "main": "./dist/index.js", 9 | "module": "dist/index.mjs", 10 | "types": "./dist/index.d.ts", 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1", 13 | "build": "tsup src/index.ts --format cjs,esm --dts", 14 | "dev": "npm run build -- --watch" 15 | }, 16 | "files": [ 17 | "dist/**/*" 18 | ], 19 | "keywords": [], 20 | "author": "Igor Bedesqui", 21 | "license": "MIT", 22 | "devDependencies": { 23 | "tsconfig": "workspace:*", 24 | "tsup": "^6.7.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/tailwindcss-toolkit/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@bdsqqq/tailwindcss-toolkit", 3 | "scope": "@bdsqqq/", 4 | "version": "0.1.0", 5 | "access": "public", 6 | "description": "", 7 | "displayName": "Tailwindcss Toolkit", 8 | "main": "./dist/index.js", 9 | "module": "dist/index.mjs", 10 | "types": "./dist/index.d.ts", 11 | "scripts": { 12 | "build": "tsup src/index.ts --format cjs,esm --dts", 13 | "dev": "npm run build -- --watch" 14 | }, 15 | "files": [ 16 | "dist/**/*" 17 | ], 18 | "keywords": [], 19 | "author": "Igor Bedesqui", 20 | "license": "MIT", 21 | "devDependencies": { 22 | "tsconfig": "workspace:*", 23 | "tsup": "^6.7.0" 24 | }, 25 | "dependencies": { 26 | "tailwindcss": "^3.4.9" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/lazytm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@bdsqqq/lazytm", 3 | "scope": "@bdsqqq/", 4 | "version": "0.0.2", 5 | "access": "public", 6 | "description": "Why compute something now, when you can compute it later?", 7 | "displayName": "lazy™", 8 | "main": "./dist/index.js", 9 | "module": "dist/index.mjs", 10 | "types": "./dist/index.d.ts", 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1", 13 | "build": "tsup src/index.ts --format cjs,esm --dts", 14 | "dev": "npm run build -- --watch" 15 | }, 16 | "files": [ 17 | "dist/**/*" 18 | ], 19 | "keywords": [], 20 | "author": "Igor Bedesqui", 21 | "license": "MIT", 22 | "devDependencies": { 23 | "tsconfig": "workspace:*", 24 | "tsup": "^6.7.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /apps/bartm-site/src/components/copyIcon.astro: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /apps/lazytm-site/src/components/copyIcon.astro: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/src/components/copyIcon.astro: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /apps/bartm-site/public/favicon/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.14, written by Peter Selinger 2001-2017 9 | 10 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /apps/lazytm-site/public/favicon/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.14, written by Peter Selinger 2001-2017 9 | 10 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/public/favicon/safari-pinned-tab.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by potrace 1.14, written by Peter Selinger 2001-2017 9 | 10 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/bartm/LICENCE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Igor Bedesqui 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/lazytm/LICENCE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Igor Bedesqui 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/lazytm/src/lazySplit.ts: -------------------------------------------------------------------------------- 1 | export function makeLazySplitIterator(str: string, match: string) { 2 | const strLen = str.length; 3 | let iterationCount = 0; 4 | 5 | let pointer = 0; 6 | let checkpoint = 0; 7 | let found = false; 8 | 9 | const lazySplitIterator = { 10 | next() { 11 | let result; 12 | if (pointer < strLen) { 13 | checkpoint = pointer; 14 | while (!found && pointer < strLen) { 15 | if (str[pointer] === match[0]) { 16 | found = true; 17 | for (let i = 1; i < match.length; i++) { 18 | if (str[pointer + i] !== match[i]) { 19 | found = false; 20 | break; 21 | } 22 | } 23 | } 24 | if (found) { 25 | result = { value: str.slice(checkpoint, pointer), done: false }; 26 | pointer += match.length; 27 | iterationCount++; 28 | found = false; 29 | return result; 30 | } 31 | pointer++; 32 | } 33 | } 34 | return { value: iterationCount, done: true }; 35 | }, 36 | }; 37 | return lazySplitIterator; 38 | } 39 | -------------------------------------------------------------------------------- /packages/tailwindcss-toolkit/LICENCE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Igor Bedesqui 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/lazytm/README.md: -------------------------------------------------------------------------------- 1 | # lazy™ 2 | 3 | Why compute something now, when you can compute it later? 4 | 5 | lazy™ avoids unecessary compute using lazy iterators. Inspired by Rust's iterators and motivated by me trying to get the headers of a .csv file with a million entries. 6 | 7 | ## Usage 8 | 9 | ``` 10 | npm install @bdsqqq/lazytm 11 | ``` 12 | 13 | ```ts 14 | import { makeLazySplitIterator } from "@bdsqqq/lazytm"; 15 | import { this_could_be_a_gb_file } from "./bigassfile.csv"; 16 | 17 | const iterator = makeLazySplitIterator(this_could_be_a_gb_file, "\n"); 18 | const { value, done } = iterator.next(); 19 | ``` 20 | 21 | ## Why does this exist? 22 | 23 | ```ts 24 | const absolutelly_huge_string_from_a_user_uploaded_file; 25 | const headers = 26 | absolutelly_huge_string_from_a_user_uploaded_file.split("\n")[0]; 27 | ``` 28 | 29 | blocked the main thread for a while and I only needed the first element to display some stuff in the screen. 30 | 31 | ## Why is the lib a single function? 32 | 33 | Taking inspiration from the lazy iterator itself, I'll only make these functions as I need them. But the general idea can be applied to almost all String and Array methods in JavaScript so feel free to contribute. 34 | -------------------------------------------------------------------------------- /packages/bartm/src/progressbar.ts: -------------------------------------------------------------------------------- 1 | export function progressBar( 2 | percent: number, 3 | width: number, 4 | charPalette: string[] = ["░", "▓", "█"] 5 | ) { 6 | // figure out how much % each character will represent considering 100% = width 7 | const charPercentValue = 100 / width; 8 | 9 | // figure out how much of a % each character in the palette represents 10 | // palette[0] will always mean 0% of the charPercentValue, 11 | // palette[palette.length - 1] will always mean 100% of the charPercentValue, 12 | // and the rest will be distributed evenly in between 13 | const charPalettePercentValues = charPalette.map( 14 | (_, i) => (i * charPercentValue) / (charPalette.length - 1) 15 | ); 16 | 17 | const progress = Array(width) 18 | .fill(charPalette[0]) 19 | .reduce((acc, _, i) => { 20 | const valueLeft = percent - i * charPercentValue; 21 | 22 | // could get extract this to a function but I'm lazy 23 | const closestValue = charPalettePercentValues.reduce( 24 | (acc, value) => 25 | Math.abs(value - valueLeft) < Math.abs(acc - valueLeft) ? value : acc, 26 | charPalettePercentValues[0] 27 | ); 28 | 29 | return [ 30 | ...acc, 31 | charPalette[charPalettePercentValues.indexOf(closestValue)], 32 | ]; 33 | }, [] as string[]) 34 | .join(""); 35 | 36 | return progress; 37 | } 38 | -------------------------------------------------------------------------------- /apps/bartm-site/src/components/githubIcon.astro: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /apps/lazytm-site/src/components/githubIcon.astro: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/src/components/githubIcon.astro: -------------------------------------------------------------------------------- 1 | 13 | -------------------------------------------------------------------------------- /packages/tailwindcss-toolkit/src/variants/extendedDisabledEnabled/index.ts: -------------------------------------------------------------------------------- 1 | import plugin from "tailwindcss/plugin"; 2 | 3 | /** 4 | * disabled:* applies a class if the element is :disabled, aria-disabled=true, or data-disabled=true 5 | * enabled:* applies a class if the element is NOT :disabled, aria-disabled=true, or data-disabled=true 6 | */ 7 | export const extendedDisabledEnabled = plugin(function ({ addVariant }) { 8 | // disabled selectors need to be broken into several statements because they're an "OR" selector, if any of them is true, the element is disabled. 9 | const disabledPseudoSelectors = [ 10 | ":disabled", 11 | "[aria-disabled=true]", 12 | "[data-disabled=true]", 13 | ]; 14 | addVariant( 15 | "disabled", 16 | disabledPseudoSelectors.map((selector) => `&${selector}`) 17 | ); 18 | addVariant( 19 | "group-disabled", 20 | disabledPseudoSelectors.map((selector) => `:merge(.group)${selector} &`) 21 | ); 22 | addVariant( 23 | "peer-disabled", 24 | disabledPseudoSelectors.map((selector) => `:merge(.peer)${selector} ~ &`) 25 | ); 26 | 27 | // enabled selector is a long single selector because it's an "AND" selector, only if ALL of the selectors are true, the element is enabled. 28 | const enabledPseudoSelector = disabledPseudoSelectors 29 | .map((selector) => `:not(${selector})`) 30 | .join(""); 31 | 32 | addVariant("enabled", [`&${enabledPseudoSelector}`]); 33 | addVariant("group-enabled", `:merge(.group)${enabledPseudoSelector} &`); 34 | addVariant("peer-enabled", `:merge(.peer)${enabledPseudoSelector} ~ &`); 35 | }); 36 | -------------------------------------------------------------------------------- /apps/bartm-site/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"], 4 | theme: { 5 | colors: { 6 | transparent: "transparent", 7 | current: "currentColor", 8 | // Stolen from rauno for now 9 | gray: { 10 | 0: "hsl(0 0% 4%)", 11 | 1: "hsl(0 0% 8.5%)", 12 | 2: "hsl(0 0% 11.0%)", 13 | 3: "hsl(0 0% 13.6%)", 14 | 4: "hsl(0 0% 15.8%)", 15 | 5: "hsl(0 0% 17.9%)", 16 | 6: "hsl(0 0% 20.5%)", 17 | 7: "hsl(0 0% 24.3%)", 18 | 8: "hsl(0 0% 31.2%)", 19 | 9: "hsl(0 0% 43.9%)", 20 | 10: "hsl(0 0% 49.4%)", 21 | 11: "hsl(0 0% 62.8%)", 22 | 12: "hsl(0 0% 93.0%)", 23 | A1: "hsl(0 0% 100% / 0)", 24 | A2: "hsl(0 0% 100% / 0.026)", 25 | A3: "hsl(0 0% 100% / 0.056)", 26 | A4: "hsl(0 0% 100% / 0.077)", 27 | A5: "hsl(0 0% 100% / 0.103)", 28 | A6: "hsl(0 0% 100% / 0.129)", 29 | A7: "hsl(0 0% 100% / 0.172)", 30 | A8: "hsl(0 0% 100% / 0.249)", 31 | A9: "hsl(0 0% 100% / 0.386)", 32 | A10: "hsl(0 0% 100% / 0.446)", 33 | A11: "hsl(0 0% 100% / 0.592)", 34 | A12: "hsl(0 0% 100% / 0.923)", 35 | }, 36 | white: "hsl(0 0% 100%)", 37 | black: "hsl(0 0% 0%)", 38 | }, 39 | extend: { 40 | boxShadow: { 41 | "lg-up": 42 | "0 -10px 15px -3px var(--tw-shadow-color), 0 -4px 6px -4px var(--tw-shadow-color)", 43 | }, 44 | }, 45 | }, 46 | plugins: [ 47 | function ({ addBase, theme }) { 48 | function extractColorVars(colorObj, colorGroup = "") { 49 | return Object.keys(colorObj).reduce((vars, colorKey) => { 50 | const value = colorObj[colorKey]; 51 | const cssVariable = 52 | colorKey === "DEFAULT" 53 | ? `--color${colorGroup}` 54 | : `--color${colorGroup}-${colorKey}`; 55 | 56 | const newVars = 57 | typeof value === "string" 58 | ? { [cssVariable]: value } 59 | : extractColorVars(value, `-${colorKey}`); 60 | 61 | return { ...vars, ...newVars }; 62 | }, {}); 63 | } 64 | 65 | addBase({ 66 | ":root": extractColorVars(theme("colors")), 67 | }); 68 | }, 69 | ], 70 | }; 71 | -------------------------------------------------------------------------------- /apps/lazytm-site/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"], 4 | theme: { 5 | colors: { 6 | transparent: "transparent", 7 | current: "currentColor", 8 | // Stolen from rauno for now 9 | gray: { 10 | 0: "hsl(0 0% 4%)", 11 | 1: "hsl(0 0% 8.5%)", 12 | 2: "hsl(0 0% 11.0%)", 13 | 3: "hsl(0 0% 13.6%)", 14 | 4: "hsl(0 0% 15.8%)", 15 | 5: "hsl(0 0% 17.9%)", 16 | 6: "hsl(0 0% 20.5%)", 17 | 7: "hsl(0 0% 24.3%)", 18 | 8: "hsl(0 0% 31.2%)", 19 | 9: "hsl(0 0% 43.9%)", 20 | 10: "hsl(0 0% 49.4%)", 21 | 11: "hsl(0 0% 62.8%)", 22 | 12: "hsl(0 0% 93.0%)", 23 | A1: "hsl(0 0% 100% / 0)", 24 | A2: "hsl(0 0% 100% / 0.026)", 25 | A3: "hsl(0 0% 100% / 0.056)", 26 | A4: "hsl(0 0% 100% / 0.077)", 27 | A5: "hsl(0 0% 100% / 0.103)", 28 | A6: "hsl(0 0% 100% / 0.129)", 29 | A7: "hsl(0 0% 100% / 0.172)", 30 | A8: "hsl(0 0% 100% / 0.249)", 31 | A9: "hsl(0 0% 100% / 0.386)", 32 | A10: "hsl(0 0% 100% / 0.446)", 33 | A11: "hsl(0 0% 100% / 0.592)", 34 | A12: "hsl(0 0% 100% / 0.923)", 35 | }, 36 | white: "hsl(0 0% 100%)", 37 | black: "hsl(0 0% 0%)", 38 | }, 39 | extend: { 40 | boxShadow: { 41 | "lg-up": 42 | "0 -10px 15px -3px var(--tw-shadow-color), 0 -4px 6px -4px var(--tw-shadow-color)", 43 | }, 44 | }, 45 | }, 46 | plugins: [ 47 | function ({ addBase, theme }) { 48 | function extractColorVars(colorObj, colorGroup = "") { 49 | return Object.keys(colorObj).reduce((vars, colorKey) => { 50 | const value = colorObj[colorKey]; 51 | const cssVariable = 52 | colorKey === "DEFAULT" 53 | ? `--color${colorGroup}` 54 | : `--color${colorGroup}-${colorKey}`; 55 | 56 | const newVars = 57 | typeof value === "string" 58 | ? { [cssVariable]: value } 59 | : extractColorVars(value, `-${colorKey}`); 60 | 61 | return { ...vars, ...newVars }; 62 | }, {}); 63 | } 64 | 65 | addBase({ 66 | ":root": extractColorVars(theme("colors")), 67 | }); 68 | }, 69 | ], 70 | }; 71 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/tailwind.config.js: -------------------------------------------------------------------------------- 1 | import { extendedDisabledEnabled } from "@bdsqqq/tailwindcss-toolkit"; 2 | 3 | /** @type {import('tailwindcss').Config} */ 4 | export const content = [ 5 | "./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}", 6 | ]; 7 | export const theme = { 8 | colors: { 9 | transparent: "transparent", 10 | current: "currentColor", 11 | // Stolen from rauno for now 12 | gray: { 13 | 0: "hsl(0 0% 4%)", 14 | 1: "hsl(0 0% 8.5%)", 15 | 2: "hsl(0 0% 11.0%)", 16 | 3: "hsl(0 0% 13.6%)", 17 | 4: "hsl(0 0% 15.8%)", 18 | 5: "hsl(0 0% 17.9%)", 19 | 6: "hsl(0 0% 20.5%)", 20 | 7: "hsl(0 0% 24.3%)", 21 | 8: "hsl(0 0% 31.2%)", 22 | 9: "hsl(0 0% 43.9%)", 23 | 10: "hsl(0 0% 49.4%)", 24 | 11: "hsl(0 0% 62.8%)", 25 | 12: "hsl(0 0% 93.0%)", 26 | A1: "hsl(0 0% 100% / 0)", 27 | A2: "hsl(0 0% 100% / 0.026)", 28 | A3: "hsl(0 0% 100% / 0.056)", 29 | A4: "hsl(0 0% 100% / 0.077)", 30 | A5: "hsl(0 0% 100% / 0.103)", 31 | A6: "hsl(0 0% 100% / 0.129)", 32 | A7: "hsl(0 0% 100% / 0.172)", 33 | A8: "hsl(0 0% 100% / 0.249)", 34 | A9: "hsl(0 0% 100% / 0.386)", 35 | A10: "hsl(0 0% 100% / 0.446)", 36 | A11: "hsl(0 0% 100% / 0.592)", 37 | A12: "hsl(0 0% 100% / 0.923)", 38 | }, 39 | white: "hsl(0 0% 100%)", 40 | black: "hsl(0 0% 0%)", 41 | }, 42 | extend: { 43 | boxShadow: { 44 | "lg-up": 45 | "0 -10px 15px -3px var(--tw-shadow-color), 0 -4px 6px -4px var(--tw-shadow-color)", 46 | }, 47 | }, 48 | }; 49 | export const plugins = [ 50 | function ({ addBase, theme }) { 51 | function extractColorVars(colorObj, colorGroup = "") { 52 | return Object.keys(colorObj).reduce((vars, colorKey) => { 53 | const value = colorObj[colorKey]; 54 | const cssVariable = 55 | colorKey === "DEFAULT" 56 | ? `--color${colorGroup}` 57 | : `--color${colorGroup}-${colorKey}`; 58 | 59 | const newVars = 60 | typeof value === "string" 61 | ? { [cssVariable]: value } 62 | : extractColorVars(value, `-${colorKey}`); 63 | 64 | return { ...vars, ...newVars }; 65 | }, {}); 66 | } 67 | 68 | addBase({ 69 | ":root": extractColorVars(theme("colors")), 70 | }); 71 | }, 72 | extendedDisabledEnabled, 73 | ]; 74 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Turborepo starter 2 | 3 | This is an official pnpm starter turborepo. 4 | 5 | ## What's inside? 6 | 7 | This turborepo uses [pnpm](https://pnpm.io) as a package manager. It includes the following packages/apps: 8 | 9 | ### Apps and Packages 10 | 11 | - `docs`: a [Next.js](https://nextjs.org/) app 12 | - `web`: another [Next.js](https://nextjs.org/) app 13 | - `ui`: a stub React component library shared by both `web` and `docs` applications 14 | - `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`) 15 | - `tsconfig`: `tsconfig.json`s used throughout the monorepo 16 | 17 | Each package/app is 100% [TypeScript](https://www.typescriptlang.org/). 18 | 19 | ### Utilities 20 | 21 | This turborepo has some additional tools already setup for you: 22 | 23 | - [TypeScript](https://www.typescriptlang.org/) for static type checking 24 | - [ESLint](https://eslint.org/) for code linting 25 | - [Prettier](https://prettier.io) for code formatting 26 | 27 | ### Build 28 | 29 | To build all apps and packages, run the following command: 30 | 31 | ``` 32 | cd my-turborepo 33 | pnpm run build 34 | ``` 35 | 36 | ### Develop 37 | 38 | To develop all apps and packages, run the following command: 39 | 40 | ``` 41 | cd my-turborepo 42 | pnpm run dev 43 | ``` 44 | 45 | ### Remote Caching 46 | 47 | Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines. 48 | 49 | By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands: 50 | 51 | ``` 52 | cd my-turborepo 53 | pnpm dlx turbo login 54 | ``` 55 | 56 | This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview). 57 | 58 | Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your turborepo: 59 | 60 | ``` 61 | pnpm dlx turbo link 62 | ``` 63 | 64 | ## Useful Links 65 | 66 | Learn more about the power of Turborepo: 67 | 68 | - [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks) 69 | - [Caching](https://turbo.build/repo/docs/core-concepts/caching) 70 | - [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) 71 | - [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering) 72 | - [Configuration Options](https://turbo.build/repo/docs/reference/configuration) 73 | - [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference) 74 | -------------------------------------------------------------------------------- /apps/lazytm-site/src/components/copyButton.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import CopyIcon from "./copyIcon.astro"; 3 | import { clsx } from "clsx"; 4 | 5 | import { focusStyles } from "../pages/index.astro"; 6 | 7 | const { class: classes } = Astro.props; 8 | --- 9 | 10 | 23 | 57 | -------------------------------------------------------------------------------- /apps/bartm-site/src/components/copyButton.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import CopyIcon from "./copyIcon.astro"; 3 | import { cn } from "../pages/index.astro"; 4 | 5 | import { focusStyles } from "../pages/index.astro"; 6 | 7 | const { class: classes } = Astro.props; 8 | --- 9 | 10 | 23 | 57 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/src/components/copyButton.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import CopyIcon from "./copyIcon.astro"; 3 | import { cn } from "../pages/index.astro"; 4 | 5 | import { focusStyles } from "../pages/index.astro"; 6 | 7 | const { class: classes } = Astro.props; 8 | --- 9 | 10 | 23 | 57 | -------------------------------------------------------------------------------- /apps/bartm-site/src/components/dynamicBarWithInput.tsx: -------------------------------------------------------------------------------- 1 | import { type ArgumentArray, default as classnames } from "classnames"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ArgumentArray) { 5 | return twMerge(classnames(inputs)); 6 | } 7 | import { bar } from "@bdsqqq/bartm"; 8 | import { createSignal, type ComponentProps } from "solid-js"; 9 | 10 | export const InputAndBar = () => { 11 | const [percentage, setPercentage] = createSignal("25"); 12 | const [width, setWidth] = createSignal("10"); 13 | 14 | const safePercentage = (percentage: string) => { 15 | const parsed = parseFloat(percentage); 16 | if (isNaN(parsed)) return 0; 17 | if (parsed < 0) return 0; 18 | if (parsed > 100) return 100; 19 | return parsed; 20 | }; 21 | 22 | const safeWidth = (width: string) => { 23 | const parsed = parseInt(width); 24 | if (isNaN(parsed)) return 0; 25 | if (parsed < 0) return 0; 26 | return parsed; 27 | }; 28 | 29 | return ( 30 |
31 |
32 | 33 | setPercentage(e.target.value)} 40 | /> 41 | % 42 | 43 | in 44 | setWidth(e.target.value)} 53 | /> 54 | characters 55 |
56 | {/* 3.815 rem gets us 20 chars max per row in big screens */} 57 | 58 | {bar(safePercentage(percentage()), safeWidth(width()))} 59 | 60 |
61 | ); 62 | }; 63 | 64 | const DynamicWidthInput = ({ 65 | class: className, 66 | style, 67 | onInput: propOnInput, 68 | value: propValue, 69 | ...rest 70 | }: ComponentProps<"input">) => { 71 | const styleThatIKnowIsAnObject = typeof style === "object" ? style : {}; 72 | 73 | const usesPropValue = typeof propValue !== "undefined"; 74 | const [localValue, setLocalValue] = createSignal( 75 | usesPropValue ? propValue.toString() : "" 76 | ); 77 | 78 | return ( 79 | { 82 | setLocalValue(e.target.value); 83 | 84 | if (typeof propOnInput === "function") propOnInput(e); 85 | }} 86 | class={cn(className)} 87 | style={{ 88 | ...styleThatIKnowIsAnObject, 89 | "--chars": localValue().length, 90 | width: "calc(var(--chars) * 1ch + 0.25em)", 91 | "min-width": "calc(2ch + 0.25em)", 92 | }} 93 | {...rest} 94 | /> 95 | ); 96 | }; 97 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/src/pages/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { AstroFont } from "astro-font"; 3 | 4 | import Glitch from "../components/glitch.astro"; 5 | import GithubIcon from "../components/githubIcon.astro"; 6 | import CopyButton from "../components/copyButton.astro"; 7 | 8 | export const focusStyles = ` 9 | !outline-none focus-visible:ring-1 ring-offset-8 ring-gray-A10 ring-offset-gray-0 10 | `; 11 | 12 | import { type ArgumentArray, default as classnames } from 'classnames'; 13 | import { twMerge } from 'tailwind-merge'; 14 | 15 | export function cn(...inputs: ArgumentArray) { 16 | return twMerge(classnames(inputs)); 17 | } 18 | 19 | const version = await fetch("https://registry.npmjs.org/@bdsqqq/tailwindcss-toolkit").then( 20 | (res) => res.json() 21 | ).then((res) => res["dist-tags"].latest).catch(() => "?.?.?"); 22 | --- 23 | 24 | 25 | 26 | 27 | 28 | 46 | 47 | 52 | 58 | 64 | 65 | 70 | 71 | 72 | 73 | 74 | 75 | 79 | 80 | 84 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | Tailwindcss Toolkit - WIP 95 | 96 | 97 | 98 | 99 | 102 |
105 |
108 |
109 |
110 |
111 |
112 |
113 |
114 | 115 |
116 |

119 | Tailwindcss Toolkit 120 |

121 |
122 | 123 |
124 | 140 |
141 |
142 | 143 |
144 |
    145 |
  • 0 dependencies
  • 146 |
  • {"<1kb gzipped"}
  • 147 |
  • Fully typesafe
  • 148 |
149 |
150 | 151 |

152 | 153 | WIP 154 | 155 |

156 |
157 | 158 |
159 | 160 |
161 |
162 |
163 | 164 |
165 |
aa
166 | 167 |
168 |
169 | 170 |
171 | Made by Igor Bedesqui, in his eternal IBM Retro Summerbtw 187 |
188 |
189 | 190 | 191 | -------------------------------------------------------------------------------- /apps/bartm-site/src/pages/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import { AstroFont } from "astro-font"; 3 | 4 | import Glitch from "../components/glitch.astro"; 5 | import GithubIcon from "../components/githubIcon.astro"; 6 | import CopyButton from "../components/copyButton.astro"; 7 | import { InputAndBar } from "../components/dynamicBarWithInput" 8 | 9 | export const focusStyles = ` 10 | !outline-none focus-visible:ring-1 ring-offset-8 ring-gray-A10 ring-offset-gray-0 11 | `; 12 | 13 | import { type ArgumentArray, default as classnames } from 'classnames'; 14 | import { twMerge } from 'tailwind-merge'; 15 | 16 | export function cn(...inputs: ArgumentArray) { 17 | return twMerge(classnames(inputs)); 18 | } 19 | 20 | const version = await fetch("https://registry.npmjs.org/@bdsqqq/bartm").then( 21 | (res) => res.json() 22 | ).then((res) => res["dist-tags"].latest).catch(() => "?.?.?"); 23 | --- 24 | 25 | 26 | 27 | 28 | 29 | 47 | 48 | 53 | 59 | 65 | 66 | 71 | 72 | 73 | 74 | 75 | 76 | 80 | 81 | 85 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | Bar™ - Text-based progress bar generator 96 | 97 | 98 | 99 | 100 | 103 |
106 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | 116 |
117 |

120 | bar™ 121 |

122 |
123 | 124 |
125 |
126 | 129 | 136 |
137 | 138 |
bdsqqq/bartm 139 |
140 |
141 |
142 |
143 | 144 |
145 |
    146 |
  • 0 dependencies
  • 147 |
  • {"<1kb gzipped"}
  • 148 |
  • Fully typesafe
  • 149 |
150 |
151 | 152 |

153 | 154 | Because text-based graphics look way too good. 155 | 156 |

157 |
158 | 159 |
160 | 161 |
162 |
163 |
164 | 165 |
166 | 167 | 168 | 169 |
170 |
171 | 172 |
173 | Made by Igor Bedesqui, in his eternal IBM Retro Summerbtw 189 |
190 |
191 | 192 | 193 | -------------------------------------------------------------------------------- /apps/lazytm-site/src/pages/index.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Glitch from "../components/glitch.astro"; 3 | import GithubIcon from "../components/githubIcon.astro"; 4 | import CopyButton from "../components/copyButton.astro"; 5 | 6 | import { clsx } from "clsx"; 7 | import { getEntryBySlug } from "astro:content"; 8 | 9 | export const focusStyles = ` 10 | !outline-none focus-visible:ring-1 ring-offset-8 ring-gray-A10 ring-offset-gray-0 11 | `; 12 | 13 | const basicUsage = await getEntryBySlug("codesnippets", "basic-usage"); 14 | const harshUsage = await getEntryBySlug("codesnippets", "harsh-usage"); 15 | const lazyUsage = await getEntryBySlug("codesnippets", "lazy-usage"); 16 | 17 | const { Content: BasicUsage } = await basicUsage.render(); 18 | const { Content: HarshUsage } = await harshUsage.render(); 19 | const { Content: LazyUsage } = await lazyUsage.render(); 20 | --- 21 | 22 | 23 | 24 | 25 | 26 | 31 | 37 | 43 | 44 | 49 | 50 | 51 | 52 | 53 | 54 | 58 | 59 | 63 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | Lazy™ — Delayed compute for JavaScript Iterators. 74 | 75 | 76 | 77 | 78 | 81 |
84 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | 94 |
95 |

98 | lazy™ 99 |

100 |
101 | 102 |
103 |
104 | 107 | 114 |
115 | 116 |
bdsqqq/lazytm 117 |
118 |
119 |
120 |
121 | 122 |
123 |
    124 |
  • 0 dependencies
  • 125 |
  • {"<1kb gzipped"}
  • 126 |
  • Fully typesafe
  • 127 |
128 |
129 | 130 |

131 | 132 | Why compute something now, when you can compute it later? 133 | 134 |

135 |
136 | 137 |
138 | 139 |
140 |
141 |
142 | 143 |
144 |
145 |
146 |

147 | String.split() is an useful API, 150 | 151 | until you realise it computes EVERYTHING eagarly, even if you 152 | only need a single entry. 154 | Lazy™ allows you to compute only what you need, when you need 156 | it. 158 |

159 |
160 |
163 |
164 |
165 | 166 |
167 |
168 |
175 | 176 |
177 | 178 |
185 | 186 |
187 | 188 |
195 | 196 |
197 |
198 |
199 |
200 |
201 | 219 |
220 | 221 | 222 | 263 | 289 | -------------------------------------------------------------------------------- /apps/bartm-site/src/components/glitch.astro: -------------------------------------------------------------------------------- 1 | --- 2 | export interface Props { 3 | text: string; 4 | } 5 | 6 | const { text } = Astro.props; 7 | --- 8 | 9 | 568 |
569 | 573 | {text} 574 | 575 |
576 | -------------------------------------------------------------------------------- /apps/lazytm-site/src/components/glitch.astro: -------------------------------------------------------------------------------- 1 | --- 2 | export interface Props { 3 | text: string; 4 | } 5 | 6 | const { text } = Astro.props; 7 | --- 8 | 9 | 568 |
569 | 573 | {text} 574 | 575 |
576 | -------------------------------------------------------------------------------- /apps/tailwindcss-toolkit-site/src/components/glitch.astro: -------------------------------------------------------------------------------- 1 | --- 2 | export interface Props { 3 | text: string; 4 | } 5 | 6 | const { text } = Astro.props; 7 | --- 8 | 9 | 568 |
569 | 573 | {text} 574 | 575 |
576 | --------------------------------------------------------------------------------