diff --git a/.changeset/persistent-note-icons.md b/.changeset/persistent-note-icons.md index 25cb0ffc..021d4e8e 100644 --- a/.changeset/persistent-note-icons.md +++ b/.changeset/persistent-note-icons.md @@ -1,6 +1,5 @@ --- -"pastebar-app-ui": patch +'pastebar-app-ui': patch --- Added persistent note icons for clips with descriptions - diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 9c84718d..3a6a4ac7 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,5 +1,5 @@ name: Build Test and Version Bump -on: +on: workflow_dispatch: # push: # branches: [ "main" ] @@ -29,40 +29,40 @@ jobs: echo "changes_detected=false" >> $GITHUB_ENV echo "CHANGESET UPDATE NOT DETECTED" fi - + - name: Create Pull Request env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CHANGES_DETECTED: ${{ env.changes_detected }} - + run: | if [ "${CHANGES_DETECTED}" != "true" ]; then echo "No changesets detected. Skipping version bump and PR creation." exit 0 fi - + git config user.name github-actions git config user.email github-actions@github.com - + # Create a new branch git checkout -b version-bump-${{ github.sha }} - + # Run version bump npm run version - + # Check if there are changes to commit if [ -z "$(git status --porcelain)" ]; then echo "No changes to commit after version bump. Exiting." exit 0 fi - + # Commit changes git add . git commit -m "Version bump, changelog update" - + # Push the branch git push origin version-bump-${{ github.sha }} - + # Create Pull Request gh pr create --title "Version Bump and Changelog Update" --body "Automated version bump, changelog update, and package-lock.json synchronization" --base main --head version-bump-${{ github.sha }} @@ -71,23 +71,23 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v4 - + - name: Setup node uses: actions/setup-node@v4 with: node-version: lts/* - + - name: Install Rust stable uses: dtolnay/rust-toolchain@stable with: targets: aarch64-apple-darwin - + - name: Install packages run: npm install - + - name: Build Tauri App uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - args: "--target aarch64-apple-darwin --bundles app" + args: '--target aarch64-apple-darwin --bundles app' diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index ecd27d0a..e9ebc818 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -17,14 +17,14 @@ jobs: # github.event.pull_request.user.login == 'external-contributor' || # github.event.pull_request.user.login == 'new-developer' || # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' - + runs-on: ubuntu-latest permissions: contents: read pull-requests: read issues: read id-token: write - + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -36,10 +36,10 @@ jobs: uses: anthropics/claude-code-action@beta with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - + # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) # model: "claude-opus-4-20250514" - + # Direct prompt for automated review (no @claude mention needed) direct_prompt: | Please review this pull request and provide feedback on: @@ -48,9 +48,9 @@ jobs: - Performance considerations - Security concerns - Test coverage - + Be constructive and helpful in your feedback. - + # Optional: Customize review based on file types # direct_prompt: | # Review this PR focusing on: @@ -58,18 +58,17 @@ jobs: # - For API endpoints: Security, input validation, and error handling # - For React components: Performance, accessibility, and best practices # - For tests: Coverage, edge cases, and test quality - + # Optional: Different prompts for different authors # direct_prompt: | - # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && + # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' || # 'Please provide a thorough code review focusing on our coding standards and best practices.' }} - + # Optional: Add specific tools for running tests or linting # allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)" - + # Optional: Skip review for certain conditions # if: | # !contains(github.event.pull_request.title, '[skip-review]') && # !contains(github.event.pull_request.title, '[WIP]') - diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index 58d0fa2e..8658b58d 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -34,26 +34,25 @@ jobs: uses: anthropics/claude-code-action@beta with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - + # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) # model: "claude-opus-4-20250514" - + # Optional: Customize the trigger phrase (default: @claude) # trigger_phrase: "/claude" - + # Optional: Trigger when specific user is assigned to an issue # assignee_trigger: "claude-bot" - + # Optional: Allow Claude to run specific commands # allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)" - + # Optional: Add custom instructions for Claude to customize its behavior for your project # custom_instructions: | # Follow our coding standards # Ensure all new code has tests # Use TypeScript for new files - + # Optional: Custom environment variables for Claude # claude_env: | # NODE_ENV: test - diff --git a/CLAUDE.md b/CLAUDE.md index 89f7f962..0bea0c35 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,6 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co PasteBar is a cross-platform clipboard manager built with Tauri (Rust + TypeScript/React). It provides unlimited clipboard history, custom clip management, collections, and advanced features like programming language detection and web scraping. **Technology Stack:** + - **Backend**: Rust with Tauri framework, Diesel ORM (SQLite), Reqwest, Serde, Tokio - **Frontend**: TypeScript, React, React Query, Vite, TailwindCSS, Jotai, Zustand - **Platforms**: macOS and Windows (including Apple Silicon M1, Intel, AMD, and ARM) @@ -14,12 +15,15 @@ PasteBar is a cross-platform clipboard manager built with Tauri (Rust + TypeScri ## Development Commands ### Prerequisites + First install the Diesel CLI: + ```bash cargo install diesel_cli --no-default-features --features sqlite ``` ### Main Development Commands + ```bash # Development (starts both frontend and backend in dev mode) npm start @@ -48,7 +52,9 @@ npm run version:sync ``` ### Frontend Development (packages/pastebar-app-ui/) + The frontend is a workspace package that builds separately: + ```bash cd packages/pastebar-app-ui npm run dev # Development server on port 4422 @@ -56,6 +62,7 @@ npm run build # Build to dist-ui/ ``` ### Rust/Tauri Development (src-tauri/) + ```bash cd src-tauri cargo run --no-default-features # Development mode @@ -67,6 +74,7 @@ cargo build --release # Production build ### High-Level Structure **Tauri Architecture**: The app uses Tauri's hybrid architecture where: + - Rust backend handles core functionality (clipboard monitoring, database operations, system integration) - TypeScript/React frontend provides the UI - Communication happens via Tauri commands and events @@ -74,17 +82,20 @@ cargo build --release # Production build **Core Components:** 1. **Clipboard Monitoring** (`src-tauri/src/clipboard/mod.rs`) + - Real-time clipboard monitoring using `clipboard-master` - Automatic image capture and text processing - Language detection for code snippets - Configurable exclusion lists and masking 2. **Database Layer** (`src-tauri/src/db.rs` + Diesel) + - SQLite database with migrations in `migrations/` - Custom data location support with path transformation - Connection pooling with r2d2 3. **System Integration** (`src-tauri/src/main.rs`) + - System tray menu with dynamic content - Global hotkeys and window management - Platform-specific features (macOS accessibility, Windows compatibility) @@ -96,17 +107,20 @@ cargo build --release # Production build ### Key Patterns -**Path Transformation System**: +**Path Transformation System**: + - Images are stored with `{{base_folder}}` placeholders for relative paths - `to_relative_image_path()` and `to_absolute_image_path()` handle conversion - Enables custom database locations without breaking image references **Event-Driven Communication**: + - Tauri events for real-time updates between backend and frontend - Settings synchronization across multiple windows - Menu rebuilding on state changes **Multi-Window Architecture**: + - Main window (primary interface) - History window (clipboard history view) - QuickPaste window (contextual paste menu) @@ -114,8 +128,9 @@ cargo build --release # Production build ### Database Schema Main entities: + - `items` - Custom clips and menu items -- `clipboard_history` - Automatic clipboard captures +- `clipboard_history` - Automatic clipboard captures - `collections` - Organization containers - `tabs` - Sub-organization within collections - `link_metadata` - Web scraping and link preview data @@ -150,35 +165,42 @@ src-tauri/src/ ## Important Development Notes ### Settings Management + - Settings are stored as generic key-value pairs in the database - Frontend uses `settingsStore.ts` with automatic synchronization - Use `updateSetting()` function and include `invoke('build_system_menu')` for settings that affect the system tray ### Custom Data Locations + - The app supports custom database locations via user settings - All file operations must use `get_data_dir()`, `get_clip_images_dir()`, etc. - Path transformation ensures image references work across location changes ### Image Handling + - Images are stored in both thumbnail and full resolution - Use path transformation helpers when storing/retrieving image paths - Images support relative paths with `{{base_folder}}` placeholders ### Internationalization + - Backend translations in `src-tauri/src/services/translations/translations.yaml` - Frontend translations in `packages/pastebar-app-ui/src/locales/lang/` - Use `t()` function in React components and `Translations::get()` in Rust ### Debug Logging + - Use `debug_output(|| { println!("message") })` in Rust for debug-only logging - Debug messages only appear in debug builds, keeping release builds clean ### System Tray Menu + - Dynamic menu built from database items and settings - Rebuild required when items or relevant settings change - Use `invoke('build_system_menu')` after operations that affect menu content ### Database Migrations + - Use Diesel migrations for schema changes - Place migration files in `migrations/` directory -- Run migrations with `npm run diesel:migration:run` \ No newline at end of file +- Run migrations with `npm run diesel:migration:run` diff --git a/README.md b/README.md index 99daf27e..fdf01ca9 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,12 @@ # PasteBar - Limitless, Free Clipboard Manager for Mac and Windows. + Screenshot 2024-07-25 at 14 11 09 ![pastebar-screenshot-main-split](https://github.com/user-attachments/assets/c3024edb-67ae-4e92-a02f-a0957fb153a2) - - Effortless Management Of Everything You Copy and Paste. Free and open-source. -Key features are: +Key features are: - Unlimited clipboard history - Searchable copy history @@ -30,8 +29,9 @@ Key features are: https://www.pastebar.app ### Stack -* **Rust**: Tauri Apps, Diesel ORM, Reqwest, Anyhow, Serde, Tokio. -* **Javascript**: Typescript, React, React Query, Vite, TailwindCSS, Signals, Jotai, Zustand. + +- **Rust**: Tauri Apps, Diesel ORM, Reqwest, Anyhow, Serde, Tokio. +- **Javascript**: Typescript, React, React Query, Vite, TailwindCSS, Signals, Jotai, Zustand. # Build Local PasteBar App @@ -43,6 +43,7 @@ $ npm run build # Development Start After cloning run: + ``` $ cargo install diesel_cli --no-default-features --features sqlite ``` @@ -51,5 +52,3 @@ $ cargo install diesel_cli --no-default-features --features sqlite $ npm install $ npm start ``` - - diff --git a/custom_db_location_plan.md b/custom_db_location_plan.md index 6b975434..a4718c00 100644 --- a/custom_db_location_plan.md +++ b/custom_db_location_plan.md @@ -4,65 +4,66 @@ This document outlines the plan to implement the feature allowing users to speci ## 1. Goals -* Allow users to specify a custom parent directory for application data via the settings UI. -* The application will create and manage a `pastebar-data` subdirectory within the user-specified location. -* This `pastebar-data` directory will contain the database file (`pastebar-db.data`), the `clip-images` folder, and the `clipboard-images` folder. -* Provide options to either **move** the existing data, **copy** it, or **use the new location without moving/copying**. -* Ensure the application uses the data from the new location after a restart. -* Handle potential errors gracefully and inform the user. -* Update the application state and backend configuration accordingly. +- Allow users to specify a custom parent directory for application data via the settings UI. +- The application will create and manage a `pastebar-data` subdirectory within the user-specified location. +- This `pastebar-data` directory will contain the database file (`pastebar-db.data`), the `clip-images` folder, and the `clipboard-images` folder. +- Provide options to either **move** the existing data, **copy** it, or **use the new location without moving/copying**. +- Ensure the application uses the data from the new location after a restart. +- Handle potential errors gracefully and inform the user. +- Update the application state and backend configuration accordingly. ## 2. Backend (Rust - `src-tauri`) ### 2.1. Configuration (`user_settings_service.rs`) -* The `UserConfig` struct's `custom_db_path: Option` will now be repurposed to store the path to the **user-selected parent directory**. The application logic will handle appending the `/pastebar-data/` segment. This requires no change to the struct itself, only to how the path is interpreted. +- The `UserConfig` struct's `custom_db_path: Option` will now be repurposed to store the path to the **user-selected parent directory**. The application logic will handle appending the `/pastebar-data/` segment. This requires no change to the struct itself, only to how the path is interpreted. ### 2.2. Path Logic (`db.rs` and new helpers) -* We will introduce new helper functions to consistently resolve data paths, whether default or custom. - * `get_data_dir() -> PathBuf`: This will be the core helper. It checks for a `custom_db_path` in the settings. - * If present, it returns `PathBuf::from(custom_path)`. - * If `None`, it returns the default application data directory. - * `get_db_path()`: This function will be refactored to use `get_data_dir().join("pastebar-db.data")`. - * `get_clip_images_dir()`: A new helper that returns `get_data_dir().join("clip-images")`. - * `get_clipboard_images_dir()`: A new helper that returns `get_data_dir().join("clipboard-images")`. +- We will introduce new helper functions to consistently resolve data paths, whether default or custom. + - `get_data_dir() -> PathBuf`: This will be the core helper. It checks for a `custom_db_path` in the settings. + - If present, it returns `PathBuf::from(custom_path)`. + - If `None`, it returns the default application data directory. + - `get_db_path()`: This function will be refactored to use `get_data_dir().join("pastebar-db.data")`. + - `get_clip_images_dir()`: A new helper that returns `get_data_dir().join("clip-images")`. + - `get_clipboard_images_dir()`: A new helper that returns `get_data_dir().join("clipboard-images")`. ### 2.3. New & Updated Tauri Commands (`user_settings_command.rs`) -* **`cmd_validate_custom_db_path(path: String) -> Result`** - * **No change in purpose.** This command will still check if the user-selected directory is valid and writable. -* **`cmd_check_custom_data_path(path: String) -> Result`** - * A new command to check the status of a selected directory. It returns one of the following statuses: `Empty`, `NotEmpty`, `IsPastebarDataAndNotEmpty`. -* **`cmd_set_and_relocate_data(new_parent_dir_path: String, operation: String) -> Result`** (renamed from `set_and_relocate_db`) - * `new_parent_dir_path`: The new directory path selected by the user. - * `operation`: Either "move", "copy", or "none". - * **Updated Steps:** - 1. Get the source paths: - * Current DB file path. - * Current `clip-images` directory path. - * Current `clipboard-images` directory path. - 2. Define the new data directory: `let new_data_dir = Path::new(&new_parent_dir_path);` - 3. Create the new data directory: `fs::create_dir_all(&new_data_dir)`. - 4. Perform file/directory operations for each item (DB file, `clip-images` dir, `clipboard-images` dir): - * If "move": `fs::rename(source, destination)`. - * If "copy": `fs::copy` for the file, and a recursive copy function for the directories. - * If "none", do nothing. - * Handle cases where source items might not exist (e.g., `clip-images` folder hasn't been created yet) by skipping them gracefully. - 5. If successful, call `user_settings_service::set_custom_db_path(&new_parent_dir_path)`. - 6. Return a success or error message. +- **`cmd_validate_custom_db_path(path: String) -> Result`** + - **No change in purpose.** This command will still check if the user-selected directory is valid and writable. +- **`cmd_check_custom_data_path(path: String) -> Result`** + - A new command to check the status of a selected directory. It returns one of the following statuses: `Empty`, `NotEmpty`, `IsPastebarDataAndNotEmpty`. +- **`cmd_set_and_relocate_data(new_parent_dir_path: String, operation: String) -> Result`** (renamed from `set_and_relocate_db`) -* **`cmd_revert_to_default_data_location() -> Result`** (renamed and simplified) - * **Updated Steps:** - 1. Call `user_settings_service::remove_custom_db_path()` to clear the custom data path setting. - 2. Return a success message indicating the setting has been removed. + - `new_parent_dir_path`: The new directory path selected by the user. + - `operation`: Either "move", "copy", or "none". + - **Updated Steps:** + 1. Get the source paths: + - Current DB file path. + - Current `clip-images` directory path. + - Current `clipboard-images` directory path. + 2. Define the new data directory: `let new_data_dir = Path::new(&new_parent_dir_path);` + 3. Create the new data directory: `fs::create_dir_all(&new_data_dir)`. + 4. Perform file/directory operations for each item (DB file, `clip-images` dir, `clipboard-images` dir): + - If "move": `fs::rename(source, destination)`. + - If "copy": `fs::copy` for the file, and a recursive copy function for the directories. + - If "none", do nothing. + - Handle cases where source items might not exist (e.g., `clip-images` folder hasn't been created yet) by skipping them gracefully. + 5. If successful, call `user_settings_service::set_custom_db_path(&new_parent_dir_path)`. + 6. Return a success or error message. + +- **`cmd_revert_to_default_data_location() -> Result`** (renamed and simplified) + - **Updated Steps:** + 1. Call `user_settings_service::remove_custom_db_path()` to clear the custom data path setting. + 2. Return a success message indicating the setting has been removed. ## 3. Frontend (React) -* The UI has been updated to refer to "Custom Application Data Location" instead of "Custom Database Location". -* A third radio button option, "Use new location", has been added. -* The `handleBrowse` function now calls the `cmd_check_custom_data_path` command to analyze the selected directory and prompts the user accordingly. -* The `settingsStore.ts` has been updated to support the "none" operation. +- The UI has been updated to refer to "Custom Application Data Location" instead of "Custom Database Location". +- A third radio button option, "Use new location", has been added. +- The `handleBrowse` function now calls the `cmd_check_custom_data_path` command to analyze the selected directory and prompts the user accordingly. +- The `settingsStore.ts` has been updated to support the "none" operation. ## 4. User Interaction Flow (Mermaid Diagram) @@ -109,23 +110,23 @@ graph TD The following changes have been implemented: -* **`packages/pastebar-app-ui/src/pages/settings/UserPreferences.tsx`**: - * Renamed "Custom Database Location" to "Custom Application Data Location". - * Added a third radio button for the "Use new location" option. - * Updated the `handleBrowse` function to call the new `cmd_check_custom_data_path` command and handle the different path statuses with user prompts. -* **`packages/pastebar-app-ui/src/store/settingsStore.ts`**: - * Updated the `applyCustomDbPath` function to accept the "none" operation. - * Updated the `revertToDefaultDbPath` function to call the renamed backend command. -* **`src-tauri/src/commands/user_settings_command.rs`**: - * Added the `cmd_check_custom_data_path` command. - * Renamed `cmd_set_and_relocate_db` to `cmd_set_and_relocate_data` and updated its logic to handle the "none" operation and the new data directory structure. - * Renamed `cmd_revert_to_default_db_location` to `cmd_revert_to_default_data_location` and updated its logic. -* **`src-tauri/src/db.rs`**: - * Refactored the `get_data_dir` function to no longer automatically append `pastebar-data`. - * Added `get_clip_images_dir` and `get_clipboard_images_dir` helper functions. -* **`src-tauri/src/main.rs`**: - * Registered the new and renamed commands in the `invoke_handler`. -* **`src-tauri/Cargo.toml`**: - * Added the `fs_extra` dependency for recursive directory copying. -* **`src-tauri/src/services/items_service.rs`** and **`src-tauri/src/services/history_service.rs`**: - * Updated to use the new `get_clip_images_dir` and `get_clipboard_images_dir` helper functions. +- **`packages/pastebar-app-ui/src/pages/settings/UserPreferences.tsx`**: + - Renamed "Custom Database Location" to "Custom Application Data Location". + - Added a third radio button for the "Use new location" option. + - Updated the `handleBrowse` function to call the new `cmd_check_custom_data_path` command and handle the different path statuses with user prompts. +- **`packages/pastebar-app-ui/src/store/settingsStore.ts`**: + - Updated the `applyCustomDbPath` function to accept the "none" operation. + - Updated the `revertToDefaultDbPath` function to call the renamed backend command. +- **`src-tauri/src/commands/user_settings_command.rs`**: + - Added the `cmd_check_custom_data_path` command. + - Renamed `cmd_set_and_relocate_db` to `cmd_set_and_relocate_data` and updated its logic to handle the "none" operation and the new data directory structure. + - Renamed `cmd_revert_to_default_db_location` to `cmd_revert_to_default_data_location` and updated its logic. +- **`src-tauri/src/db.rs`**: + - Refactored the `get_data_dir` function to no longer automatically append `pastebar-data`. + - Added `get_clip_images_dir` and `get_clipboard_images_dir` helper functions. +- **`src-tauri/src/main.rs`**: + - Registered the new and renamed commands in the `invoke_handler`. +- **`src-tauri/Cargo.toml`**: + - Added the `fs_extra` dependency for recursive directory copying. +- **`src-tauri/src/services/items_service.rs`** and **`src-tauri/src/services/history_service.rs`**: + - Updated to use the new `get_clip_images_dir` and `get_clipboard_images_dir` helper functions. diff --git a/packages/pastebar-app-ui/assets/markdown/markdown.d.ts b/packages/pastebar-app-ui/assets/markdown/markdown.d.ts index 638fd826..2917caed 100644 --- a/packages/pastebar-app-ui/assets/markdown/markdown.d.ts +++ b/packages/pastebar-app-ui/assets/markdown/markdown.d.ts @@ -2,8 +2,8 @@ * parse reads markdown source at s and converts it to HTML. * When output is a byte array, it will be a reference. */ -export function parse(s :Source, o? :ParseOptions & { bytes? :never|false }) :string -export function parse(s :Source, o? :ParseOptions & { bytes :true }) :Uint8Array +export function parse(s: Source, o?: ParseOptions & { bytes?: never | false }): string +export function parse(s: Source, o?: ParseOptions & { bytes: true }): Uint8Array /** Markdown source code can be provided as a JavaScript string or UTF8 encoded data */ type Source = string | ArrayLike @@ -11,10 +11,10 @@ type Source = string | ArrayLike /** Options for the parse function */ export interface ParseOptions { /** Customize parsing. Defaults to ParseFlags.DEFAULT */ - parseFlags? :ParseFlags + parseFlags?: ParseFlags /** Select output format. Defaults to "html" */ - format? : "html" | "xhtml" + format?: 'html' | 'xhtml' /** * bytes=true causes parse() to return the result as a Uint8Array instead of a string. @@ -26,10 +26,10 @@ export interface ParseOptions { * This only provides a performance benefit when you never need to convert the output * to a string. In most cases you're better off leaving this unset or false. */ - bytes? :boolean + bytes?: boolean /** Allow "javascript:" in links */ - allowJSURIs? :boolean + allowJSURIs?: boolean /** * Optional callback which if provided is called for each code block. @@ -44,34 +44,37 @@ export interface ParseOptions { * Note that use of this callback has an adverse impact on performance as it casues * calls and data to be bridged between WASM and JS on every invocation. */ - onCodeBlock? :(langname :string, body :UTF8Bytes) => Uint8Array|string|null|undefined + onCodeBlock?: ( + langname: string, + body: UTF8Bytes + ) => Uint8Array | string | null | undefined /** @depreceated use "bytes" instead (v1.1.1) */ - asMemoryView? :boolean + asMemoryView?: boolean } /** UTF8Bytes is a Uint8Array representing UTF8 text */ export interface UTF8Bytes extends Uint8Array { /** toString returns a UTF8 decoded string (lazily decoded and cached) */ - toString() :string + toString(): string } /** Flags that customize Markdown parsing */ export enum ParseFlags { /** In TEXT, collapse non-trivial whitespace into single ' ' */ COLLAPSE_WHITESPACE, - /** Enable $ and $$ containing LaTeX equations. */ LATEX_MATH_SPANS, - /** Disable raw HTML blocks. */ NO_HTML_BLOCKS, - /** Disable raw HTML (inline). */ NO_HTML_SPANS, - /** Disable indented code blocks. (Only fenced code works.) */ NO_INDENTED_CODE_BLOCKS, - /** Do not require space in ATX headers ( ###header ) */ PERMISSIVE_ATX_HEADERS, - /** Recognize e-mails as links even without <...> */ PERMISSIVE_EMAIL_AUTO_LINKS, - /** Recognize URLs as links even without <...> */ PERMISSIVE_URL_AUTO_LINKS, - /** Enable WWW autolinks (without proto; just 'www.') */ PERMISSIVE_WWW_AUTOLINKS, - /** Enable strikethrough extension. */ STRIKETHROUGH, - /** Enable tables extension. */ TABLES, - /** Enable task list extension. */ TASK_LISTS, - /** Enable wiki links extension. */ WIKI_LINKS, - /** Enable underline extension (disables '_' for emphasis) */ UNDERLINE, + /** Enable $ and $$ containing LaTeX equations. */ LATEX_MATH_SPANS, + /** Disable raw HTML blocks. */ NO_HTML_BLOCKS, + /** Disable raw HTML (inline). */ NO_HTML_SPANS, + /** Disable indented code blocks. (Only fenced code works.) */ NO_INDENTED_CODE_BLOCKS, + /** Do not require space in ATX headers ( ###header ) */ PERMISSIVE_ATX_HEADERS, + /** Recognize e-mails as links even without <...> */ PERMISSIVE_EMAIL_AUTO_LINKS, + /** Recognize URLs as links even without <...> */ PERMISSIVE_URL_AUTO_LINKS, + /** Enable WWW autolinks (without proto; just 'www.') */ PERMISSIVE_WWW_AUTOLINKS, + /** Enable strikethrough extension. */ STRIKETHROUGH, + /** Enable tables extension. */ TABLES, + /** Enable task list extension. */ TASK_LISTS, + /** Enable wiki links extension. */ WIKI_LINKS, + /** Enable underline extension (disables '_' for emphasis) */ UNDERLINE, /** Default flags are: * COLLAPSE_WHITESPACE | diff --git a/packages/pastebar-app-ui/assets/markdown/markdown.js b/packages/pastebar-app-ui/assets/markdown/markdown.js index 9544cc77..eba970ae 100644 --- a/packages/pastebar-app-ui/assets/markdown/markdown.js +++ b/packages/pastebar-app-ui/assets/markdown/markdown.js @@ -1,4 +1,613 @@ -(function(exports){"use strict"; +;(function (exports) { + 'use strict' -var e,n,t,r,o,i,u,a,s,f,c,l,p,d,y,m,h,w,g,A,b,E,_,R,S,v,I,T,U,W,L,M,P,F,O,H,x,k,B,N,C="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&"function"==typeof require;let j;if(C)try{j=require("path")}catch(e){}function q(e){throw new Error("wasm abort"+(e?": "+(e.stack||e):""))}"undefined"!=typeof module&&(e=module,module=void 0),(n={preRun:[],postRun:[],print:console.log.bind(console),printErr:console.error.bind(console)}).ready=new Promise(e=>{n.onRuntimeInitialized=(()=>{let n=exports;"function"==typeof define&&define("markdown",n),e(n)})}),C&&j&&(n.locateFile=function(e){return j.join(__dirname,e)}),n.print;let D=n.printErr;for(r in t={},n=void 0!==n?n:{})n.hasOwnProperty(r)&&(t[r]=n[r]);for(r in o=[],i="object"==typeof window,u="function"==typeof importScripts,a="","object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node?(a=u?require("path").dirname(a)+"/":__dirname+"/",s=function(e,n){return l||(l=require("fs")),p||(p=require("path")),e=p.normalize(e),l.readFileSync(e,n?null:"utf8")},c=function(e){var n=s(e,!0);return n.buffer||(n=new Uint8Array(n)),n.buffer,n},f=function(e,n,t){l||(l=require("fs")),p||(p=require("path")),e=p.normalize(e),l.readFile(e,function(e,r){e?t(e):n(r.buffer)})},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),o=process.argv.slice(2),"undefined"!=typeof module&&(module.exports=n),n.inspect=function(){return"[Emscripten Module object]"}):(i||u)&&(u?a=self.location.href:"undefined"!=typeof document&&document.currentScript&&(a=document.currentScript.src),a=0!==a.indexOf("blob:")?a.substr(0,a.lastIndexOf("/")+1):"",s=function(e){var n=new XMLHttpRequest;return n.open("GET",e,!1),n.send(null),n.responseText},u&&(c=function(e){var n=new XMLHttpRequest;return n.open("GET",e,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)}),f=function(e,n,t){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){200==r.status||0==r.status&&r.response?n(r.response):t()},r.onerror=t,r.send(null)}),t)t.hasOwnProperty(r)&&(n[r]=t[r]);function G(e){y.delete(_.get(e)),d.push(e)}function K(e,n){return function(e,n){var t,r,o,i;if(!y)for(y=new WeakMap,t=0;t<_.length;t++)(r=_.get(t))&&y.set(r,t);if(y.has(e))return y.get(e);o=function(){if(d.length)return d.pop();try{_.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return _.length-1}();try{_.set(o,e)}catch(t){if(!(t instanceof TypeError))throw t;i=function(e,n){var t,r,o,i,u,a,s,f,c;if("function"==typeof WebAssembly.Function){for(t={i:"i32",j:"i64",f:"f32",d:"f64"},r={parameters:[],results:"v"==n[0]?[]:[t[n[0]]]},o=1;o0;)"function"!=typeof(t=e.shift())?"number"==typeof(r=t.func)?void 0===t.arg?_.get(r)():_.get(r)(t.arg):r(void 0===t.arg?null:t.arg):t(n)}function Y(e){try{return h.grow(e-g.byteLength+65535>>>16),z(h.buffer),1}catch(e){}}function Q(e){function t(){B||(B=!0,n.calledRun=!0,w||(J(S),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)e=n.postRun.shift(),v.unshift(e);var e;J(v)}()))}e=e||o,I>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)e=n.preRun.shift(),R.unshift(e);var e;J(R)}(),I>0||(n.setStatus?(n.setStatus("Running..."),setTimeout(function(){setTimeout(function(){n.setStatus("")},1),t()},1)):t()))}if(t=null,n.arguments&&(o=n.arguments),n.thisProgram&&n.thisProgram,n.quit&&n.quit,d=[],n.wasmBinary&&(m=n.wasmBinary),n.noExitRuntime||!0,"object"!=typeof WebAssembly&&q("no native wasm support detected"),w=!1,n.INITIAL_MEMORY,R=[],S=[],v=[],0,I=0,T=null,U=null,n.preloadedImages={},n.preloadedAudios={},W="data:application/octet-stream;base64,",V(L="markdown.wasm")||(N=L,L=n.locateFile?n.locateFile(N,a):a+N),M={a:function(e){var n,t,r,o,i=A.length;if((e>>>=0)>2147483648)return!1;for(n=1;n<=4;n*=2)if(t=i*(1+.2/n),t=Math.min(t,e+100663296),Y(Math.min(2147483648,((r=Math.max(e,t))%(o=65536)>0&&(r+=o-r%o),r))))return!0;return!1}},function(){var e={a:M};function t(e,t){var r,o=e.exports;n.asm=o,z((h=n.asm.b).buffer),_=n.asm.i,r=n.asm.c,S.unshift(r),function(e){if(I--,n.monitorRunDependencies&&n.monitorRunDependencies(I),0==I&&(null!==T&&(clearInterval(T),T=null),U)){var t=U;U=null,t()}}()}function r(e){t(e.instance)}function o(n){return function(){if(!m&&(i||u)){if("function"==typeof fetch&&!X(L))return fetch(L,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+L+"'";return e.arrayBuffer()}).catch(function(){return $(L)});if(f)return new Promise(function(e,n){f(L,function(n){e(new Uint8Array(n))},n)})}return Promise.resolve().then(function(){return $(L)})}().then(function(n){return WebAssembly.instantiate(n,e)}).then(n,function(e){D("failed to asynchronously prepare wasm: "+e),q(e)})}if(I++,n.monitorRunDependencies&&n.monitorRunDependencies(I),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){return D("Module.instantiateWasm callback failed with error: "+e),!1}m||"function"!=typeof WebAssembly.instantiateStreaming||V(L)||X(L)||"function"!=typeof fetch?o(r):fetch(L,{credentials:"same-origin"}).then(function(n){return WebAssembly.instantiateStreaming(n,e).then(r,function(e){return D("wasm streaming compile failed: "+e),D("falling back to ArrayBuffer instantiation"),o(r)})})}(),n.___wasm_call_ctors=function(){return(n.___wasm_call_ctors=n.asm.c).apply(null,arguments)},P=n._wrealloc=function(){return(P=n._wrealloc=n.asm.d).apply(null,arguments)},F=n._wfree=function(){return(F=n._wfree=n.asm.e).apply(null,arguments)},O=n._WErrGetCode=function(){return(O=n._WErrGetCode=n.asm.f).apply(null,arguments)},H=n._WErrGetMsg=function(){return(H=n._WErrGetMsg=n.asm.g).apply(null,arguments)},x=n._WErrClear=function(){return(x=n._WErrClear=n.asm.h).apply(null,arguments)},k=n._parseUTF8=function(){return(k=n._parseUTF8=n.asm.j).apply(null,arguments)},n.addFunction=K,n.removeFunction=G,U=function e(){B||Q(),B||(U=e)},n.run=Q,n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();Q(),n.inspect=(()=>"[asm]"),void 0!==e&&(module=e,e=void 0),Object.defineProperty(exports,"__esModule",{value:!0});class WError extends Error{constructor(e,n,t,r){super(n,t||"wasm",r||0),this.name="WError",this.code=e}}function Z(e,n){const t=P(0,n);return A.set(e,t),t}let ee=0;n.postRun.push(()=>{ee=P(0,4)});const ne="undefined"!=typeof TextEncoder?(()=>{const e=new TextEncoder("utf-8"),n=new TextDecoder("utf-8");return{encode:n=>e.encode(n),decode:e=>n.decode(e)}})():"undefined"!=typeof Buffer?{encode:e=>new Uint8Array(Buffer.from(e,"utf-8")),decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}:{encode:e=>{let n=[];for(let t=0,r=e.length;t!=r;++t)n[t]=255&e.charCodeAt(t);return new Uint8Array(n)},decode:e=>String(e)},te=n.ready,re={COLLAPSE_WHITESPACE:1,PERMISSIVE_ATX_HEADERS:2,PERMISSIVE_URL_AUTO_LINKS:4,PERMISSIVE_EMAIL_AUTO_LINKS:8,NO_INDENTED_CODE_BLOCKS:16,NO_HTML_BLOCKS:32,NO_HTML_SPANS:64,TABLES:256,STRIKETHROUGH:512,PERMISSIVE_WWW_AUTOLINKS:1024,TASK_LISTS:2048,LATEX_MATH_SPANS:4096,WIKI_LINKS:8192,UNDERLINE:16384,DEFAULT:2823,NO_HTML:96},oe=1,ie=2,ue=4;function ae(e){return"string"==typeof e?ne.encode(e):e instanceof Uint8Array?e:new Uint8Array(e)}exports.ready=te,exports.ParseFlags=re,exports.parse=function(e,n){let t=void 0===(n=n||{}).parseFlags?re.DEFAULT:n.parseFlags,r=n.allowJSURIs?ue:0;switch(n.format){case"xhtml":r|=oe|ie;break;case"html":case void 0:case null:case"":r|=oe;break;default:throw new Error(`invalid format "${n.format}"`)}let o=n.onCodeBlock?(i=n.onCodeBlock,K(function(e,n,t,r,o){try{const u=n>0?ne.decode(A.subarray(e,e+n)):"",a=A.subarray(t,t+r);let s=void 0;a.toString=(()=>s||(s=ne.decode(a)));let f=null;if(null===(f=i(u,a))||void 0===f)return-1;let c=ae(f);if(c.length>0){const e=Z(c,c.length);E[o>>2]=e}return c.length}catch(e){return console.error(`error in markdown onCodeBlock callback: ${e.stack||e}`),-1}},"iiiiii")):0;var i;let u=ae(e),a=function(e){let n=e(ee),t=b[ee>>2];if(0==t)return null;let r=A.subarray(t,t+n);return r.heapAddr=t,r}(e=>(function(e,n){const t=function(e){return e instanceof Uint8Array?e:new Uint8Array(e)}(e),r=t.length,o=Z(t,r),i=n(o,r);return function(e){F(e)}(o),i})(u,(n,i)=>k(n,i,t,r,e,o)));return n.onCodeBlock&&G(o),function(){let e=function(){let e=O();if(0!=e){let n=H(),t=0!=n?UTF8ArrayToString(A,n):"";return x(),new WError(e,t)}}();if(e)throw e}(),n.bytes||n.asMemoryView?a:ne.decode(a)};})(typeof exports!='undefined'?exports:this["markdown"]={}) + var e, + n, + t, + r, + o, + i, + u, + a, + s, + f, + c, + l, + p, + d, + y, + m, + h, + w, + g, + A, + b, + E, + _, + R, + S, + v, + I, + T, + U, + W, + L, + M, + P, + F, + O, + H, + x, + k, + B, + N, + C = + 'object' == typeof process && + 'object' == typeof process.versions && + 'string' == typeof process.versions.node && + 'function' == typeof require + let j + if (C) + try { + j = require('path') + } catch (e) {} + function q(e) { + throw new Error('wasm abort' + (e ? ': ' + (e.stack || e) : '')) + } + 'undefined' != typeof module && ((e = module), (module = void 0)), + ((n = { + preRun: [], + postRun: [], + print: console.log.bind(console), + printErr: console.error.bind(console), + }).ready = new Promise(e => { + n.onRuntimeInitialized = () => { + let n = exports + 'function' == typeof define && define('markdown', n), e(n) + } + })), + C && + j && + (n.locateFile = function (e) { + return j.join(__dirname, e) + }), + n.print + let D = n.printErr + for (r in ((t = {}), (n = void 0 !== n ? n : {}))) n.hasOwnProperty(r) && (t[r] = n[r]) + for (r in ((o = []), + (i = 'object' == typeof window), + (u = 'function' == typeof importScripts), + (a = ''), + 'object' == typeof process && + 'object' == typeof process.versions && + 'string' == typeof process.versions.node + ? ((a = u ? require('path').dirname(a) + '/' : __dirname + '/'), + (s = function (e, n) { + return ( + l || (l = require('fs')), + p || (p = require('path')), + (e = p.normalize(e)), + l.readFileSync(e, n ? null : 'utf8') + ) + }), + (c = function (e) { + var n = s(e, !0) + return n.buffer || (n = new Uint8Array(n)), n.buffer, n + }), + (f = function (e, n, t) { + l || (l = require('fs')), + p || (p = require('path')), + (e = p.normalize(e)), + l.readFile(e, function (e, r) { + e ? t(e) : n(r.buffer) + }) + }), + process.argv.length > 1 && process.argv[1].replace(/\\/g, '/'), + (o = process.argv.slice(2)), + 'undefined' != typeof module && (module.exports = n), + (n.inspect = function () { + return '[Emscripten Module object]' + })) + : (i || u) && + (u + ? (a = self.location.href) + : 'undefined' != typeof document && + document.currentScript && + (a = document.currentScript.src), + (a = 0 !== a.indexOf('blob:') ? a.substr(0, a.lastIndexOf('/') + 1) : ''), + (s = function (e) { + var n = new XMLHttpRequest() + return n.open('GET', e, !1), n.send(null), n.responseText + }), + u && + (c = function (e) { + var n = new XMLHttpRequest() + return ( + n.open('GET', e, !1), + (n.responseType = 'arraybuffer'), + n.send(null), + new Uint8Array(n.response) + ) + }), + (f = function (e, n, t) { + var r = new XMLHttpRequest() + r.open('GET', e, !0), + (r.responseType = 'arraybuffer'), + (r.onload = function () { + 200 == r.status || (0 == r.status && r.response) ? n(r.response) : t() + }), + (r.onerror = t), + r.send(null) + })), + t)) + t.hasOwnProperty(r) && (n[r] = t[r]) + function G(e) { + y.delete(_.get(e)), d.push(e) + } + function K(e, n) { + return (function (e, n) { + var t, r, o, i + if (!y) + for (y = new WeakMap(), t = 0; t < _.length; t++) (r = _.get(t)) && y.set(r, t) + if (y.has(e)) return y.get(e) + o = (function () { + if (d.length) return d.pop() + try { + _.grow(1) + } catch (e) { + if (!(e instanceof RangeError)) throw e + throw 'Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.' + } + return _.length - 1 + })() + try { + _.set(o, e) + } catch (t) { + if (!(t instanceof TypeError)) throw t + ;(i = (function (e, n) { + var t, r, o, i, u, a, s, f, c + if ('function' == typeof WebAssembly.Function) { + for ( + t = { i: 'i32', j: 'i64', f: 'f32', d: 'f64' }, + r = { parameters: [], results: 'v' == n[0] ? [] : [t[n[0]]] }, + o = 1; + o < n.length; + ++o + ) + r.parameters.push(t[n[o]]) + return new WebAssembly.Function(r, e) + } + for ( + i = [1, 0, 1, 96], + u = n.slice(0, 1), + a = n.slice(1), + s = { i: 127, j: 126, f: 125, d: 124 }, + i.push(a.length), + o = 0; + o < a.length; + ++o + ) + i.push(s[a[o]]) + return ( + 'v' == u ? i.push(0) : (i = i.concat([1, s[u]])), + (i[1] = i.length - 2), + (f = new Uint8Array( + [0, 97, 115, 109, 1, 0, 0, 0].concat( + i, + [2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0] + ) + )), + (c = new WebAssembly.Module(f)), + new WebAssembly.Instance(c, { e: { f: e } }).exports.f + ) + })(e, n)), + _.set(o, i) + } + return y.set(e, o), o + })(e, n) + } + function z(e) { + ;(g = e), + (n.HEAP8 = new Int8Array(e)), + (n.HEAP16 = new Int16Array(e)), + (n.HEAP32 = b = new Int32Array(e)), + (n.HEAPU8 = A = new Uint8Array(e)), + (n.HEAPU16 = new Uint16Array(e)), + (n.HEAPU32 = E = new Uint32Array(e)), + (n.HEAPF32 = new Float32Array(e)), + (n.HEAPF64 = new Float64Array(e)) + } + function V(e) { + return e.startsWith(W) + } + function X(e) { + return e.startsWith('file://') + } + function $(e) { + try { + if (e == L && m) return new Uint8Array(m) + if (c) return c(e) + throw 'both async and sync fetching of the wasm failed' + } catch (e) { + q(e) + } + } + function J(e) { + for (var t, r; e.length > 0; ) + 'function' != typeof (t = e.shift()) + ? 'number' == typeof (r = t.func) + ? void 0 === t.arg + ? _.get(r)() + : _.get(r)(t.arg) + : r(void 0 === t.arg ? null : t.arg) + : t(n) + } + function Y(e) { + try { + return h.grow((e - g.byteLength + 65535) >>> 16), z(h.buffer), 1 + } catch (e) {} + } + function Q(e) { + function t() { + B || + ((B = !0), + (n.calledRun = !0), + w || + (J(S), + n.onRuntimeInitialized && n.onRuntimeInitialized(), + (function () { + if (n.postRun) + for ( + 'function' == typeof n.postRun && (n.postRun = [n.postRun]); + n.postRun.length; + + ) + (e = n.postRun.shift()), v.unshift(e) + var e + J(v) + })())) + } + ;(e = e || o), + I > 0 || + ((function () { + if (n.preRun) + for ( + 'function' == typeof n.preRun && (n.preRun = [n.preRun]); + n.preRun.length; + + ) + (e = n.preRun.shift()), R.unshift(e) + var e + J(R) + })(), + I > 0 || + (n.setStatus + ? (n.setStatus('Running...'), + setTimeout(function () { + setTimeout(function () { + n.setStatus('') + }, 1), + t() + }, 1)) + : t())) + } + if ( + ((t = null), + n.arguments && (o = n.arguments), + n.thisProgram && n.thisProgram, + n.quit && n.quit, + (d = []), + n.wasmBinary && (m = n.wasmBinary), + n.noExitRuntime || !0, + 'object' != typeof WebAssembly && q('no native wasm support detected'), + (w = !1), + n.INITIAL_MEMORY, + (R = []), + (S = []), + (v = []), + 0, + (I = 0), + (T = null), + (U = null), + (n.preloadedImages = {}), + (n.preloadedAudios = {}), + (W = 'data:application/octet-stream;base64,'), + V((L = 'markdown.wasm')) || + ((N = L), (L = n.locateFile ? n.locateFile(N, a) : a + N)), + (M = { + a: function (e) { + var n, + t, + r, + o, + i = A.length + if ((e >>>= 0) > 2147483648) return !1 + for (n = 1; n <= 4; n *= 2) + if ( + ((t = i * (1 + 0.2 / n)), + (t = Math.min(t, e + 100663296)), + Y( + Math.min( + 2147483648, + ((r = Math.max(e, t)) % (o = 65536) > 0 && (r += o - (r % o)), r) + ) + )) + ) + return !0 + return !1 + }, + }), + (function () { + var e = { a: M } + function t(e, t) { + var r, + o = e.exports + ;(n.asm = o), + z((h = n.asm.b).buffer), + (_ = n.asm.i), + (r = n.asm.c), + S.unshift(r), + (function (e) { + if ( + (I--, + n.monitorRunDependencies && n.monitorRunDependencies(I), + 0 == I && (null !== T && (clearInterval(T), (T = null)), U)) + ) { + var t = U + ;(U = null), t() + } + })() + } + function r(e) { + t(e.instance) + } + function o(n) { + return (function () { + if (!m && (i || u)) { + if ('function' == typeof fetch && !X(L)) + return fetch(L, { credentials: 'same-origin' }) + .then(function (e) { + if (!e.ok) throw "failed to load wasm binary file at '" + L + "'" + return e.arrayBuffer() + }) + .catch(function () { + return $(L) + }) + if (f) + return new Promise(function (e, n) { + f( + L, + function (n) { + e(new Uint8Array(n)) + }, + n + ) + }) + } + return Promise.resolve().then(function () { + return $(L) + }) + })() + .then(function (n) { + return WebAssembly.instantiate(n, e) + }) + .then(n, function (e) { + D('failed to asynchronously prepare wasm: ' + e), q(e) + }) + } + if ( + (I++, n.monitorRunDependencies && n.monitorRunDependencies(I), n.instantiateWasm) + ) + try { + return n.instantiateWasm(e, t) + } catch (e) { + return D('Module.instantiateWasm callback failed with error: ' + e), !1 + } + m || + 'function' != typeof WebAssembly.instantiateStreaming || + V(L) || + X(L) || + 'function' != typeof fetch + ? o(r) + : fetch(L, { credentials: 'same-origin' }).then(function (n) { + return WebAssembly.instantiateStreaming(n, e).then(r, function (e) { + return ( + D('wasm streaming compile failed: ' + e), + D('falling back to ArrayBuffer instantiation'), + o(r) + ) + }) + }) + })(), + (n.___wasm_call_ctors = function () { + return (n.___wasm_call_ctors = n.asm.c).apply(null, arguments) + }), + (P = n._wrealloc = + function () { + return (P = n._wrealloc = n.asm.d).apply(null, arguments) + }), + (F = n._wfree = + function () { + return (F = n._wfree = n.asm.e).apply(null, arguments) + }), + (O = n._WErrGetCode = + function () { + return (O = n._WErrGetCode = n.asm.f).apply(null, arguments) + }), + (H = n._WErrGetMsg = + function () { + return (H = n._WErrGetMsg = n.asm.g).apply(null, arguments) + }), + (x = n._WErrClear = + function () { + return (x = n._WErrClear = n.asm.h).apply(null, arguments) + }), + (k = n._parseUTF8 = + function () { + return (k = n._parseUTF8 = n.asm.j).apply(null, arguments) + }), + (n.addFunction = K), + (n.removeFunction = G), + (U = function e() { + B || Q(), B || (U = e) + }), + (n.run = Q), + n.preInit) + ) + for ( + 'function' == typeof n.preInit && (n.preInit = [n.preInit]); + n.preInit.length > 0; + + ) + n.preInit.pop()() + Q(), + (n.inspect = () => '[asm]'), + void 0 !== e && ((module = e), (e = void 0)), + Object.defineProperty(exports, '__esModule', { value: !0 }) + class WError extends Error { + constructor(e, n, t, r) { + super(n, t || 'wasm', r || 0), (this.name = 'WError'), (this.code = e) + } + } + function Z(e, n) { + const t = P(0, n) + return A.set(e, t), t + } + let ee = 0 + n.postRun.push(() => { + ee = P(0, 4) + }) + const ne = + 'undefined' != typeof TextEncoder + ? (() => { + const e = new TextEncoder('utf-8'), + n = new TextDecoder('utf-8') + return { encode: n => e.encode(n), decode: e => n.decode(e) } + })() + : 'undefined' != typeof Buffer + ? { + encode: e => new Uint8Array(Buffer.from(e, 'utf-8')), + decode: e => + Buffer.from(e.buffer, e.byteOffset, e.byteLength).toString('utf8'), + } + : { + encode: e => { + let n = [] + for (let t = 0, r = e.length; t != r; ++t) n[t] = 255 & e.charCodeAt(t) + return new Uint8Array(n) + }, + decode: e => String(e), + }, + te = n.ready, + re = { + COLLAPSE_WHITESPACE: 1, + PERMISSIVE_ATX_HEADERS: 2, + PERMISSIVE_URL_AUTO_LINKS: 4, + PERMISSIVE_EMAIL_AUTO_LINKS: 8, + NO_INDENTED_CODE_BLOCKS: 16, + NO_HTML_BLOCKS: 32, + NO_HTML_SPANS: 64, + TABLES: 256, + STRIKETHROUGH: 512, + PERMISSIVE_WWW_AUTOLINKS: 1024, + TASK_LISTS: 2048, + LATEX_MATH_SPANS: 4096, + WIKI_LINKS: 8192, + UNDERLINE: 16384, + DEFAULT: 2823, + NO_HTML: 96, + }, + oe = 1, + ie = 2, + ue = 4 + function ae(e) { + return 'string' == typeof e + ? ne.encode(e) + : e instanceof Uint8Array + ? e + : new Uint8Array(e) + } + ;(exports.ready = te), + (exports.ParseFlags = re), + (exports.parse = function (e, n) { + let t = void 0 === (n = n || {}).parseFlags ? re.DEFAULT : n.parseFlags, + r = n.allowJSURIs ? ue : 0 + switch (n.format) { + case 'xhtml': + r |= oe | ie + break + case 'html': + case void 0: + case null: + case '': + r |= oe + break + default: + throw new Error(`invalid format "${n.format}"`) + } + let o = n.onCodeBlock + ? ((i = n.onCodeBlock), + K(function (e, n, t, r, o) { + try { + const u = n > 0 ? ne.decode(A.subarray(e, e + n)) : '', + a = A.subarray(t, t + r) + let s = void 0 + a.toString = () => s || (s = ne.decode(a)) + let f = null + if (null === (f = i(u, a)) || void 0 === f) return -1 + let c = ae(f) + if (c.length > 0) { + const e = Z(c, c.length) + E[o >> 2] = e + } + return c.length + } catch (e) { + return ( + console.error(`error in markdown onCodeBlock callback: ${e.stack || e}`), + -1 + ) + } + }, 'iiiiii')) + : 0 + var i + let u = ae(e), + a = (function (e) { + let n = e(ee), + t = b[ee >> 2] + if (0 == t) return null + let r = A.subarray(t, t + n) + return (r.heapAddr = t), r + })(e => + (function (e, n) { + const t = (function (e) { + return e instanceof Uint8Array ? e : new Uint8Array(e) + })(e), + r = t.length, + o = Z(t, r), + i = n(o, r) + return ( + (function (e) { + F(e) + })(o), + i + ) + })(u, (n, i) => k(n, i, t, r, e, o)) + ) + return ( + n.onCodeBlock && G(o), + (function () { + let e = (function () { + let e = O() + if (0 != e) { + let n = H(), + t = 0 != n ? UTF8ArrayToString(A, n) : '' + return x(), new WError(e, t) + } + })() + if (e) throw e + })(), + n.bytes || n.asMemoryView ? a : ne.decode(a) + ) + }) +})(typeof exports != 'undefined' ? exports : (this['markdown'] = {})) //# sourceMappingURL=markdown.js.map diff --git a/packages/pastebar-app-ui/drop-image.html b/packages/pastebar-app-ui/drop-image.html index 6ed9fb4f..ded48c57 100644 --- a/packages/pastebar-app-ui/drop-image.html +++ b/packages/pastebar-app-ui/drop-image.html @@ -1,85 +1,86 @@ - + - - - - PasteBar Drop Zone - - - -
-
Drag and drop image file here
-
- - - + body { + overscroll-behavior: none; + overflow: hidden; + user-select: none; + font-family: + Inter, + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + 'Roboto', + 'Oxygen', + 'Ubuntu', + 'Cantarell', + 'Fira Sans', + 'Droid Sans', + 'Helvetica Neue', + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-feature-settings: + 'rlig' 1, + 'calt' 1; + } + + .drop-zone.hover { + background-color: #e0e0e0; /* Light gray background when hovering */ + border-color: #0088cc; /* Change border color */ + color: #0088cc; /* Change text color */ + } + + .drop-zone { + display: flex; + align-items: center; + justify-content: center; + margin: 12px; + padding: 12px; + border: 2px dashed #cccccc; + border-radius: 12px; + height: calc(100% - 24px); + width: calc(100% - 24px); + text-align: center; + box-sizing: border-box; + color: #555555; + } + + .drop-zone-text { + font-size: 24px; + pointer-events: none; + font-weight: bold; + } + + + +
+
Drag and drop image file here
+
+ + + diff --git a/packages/pastebar-app-ui/drop-path.html b/packages/pastebar-app-ui/drop-path.html index 05d38899..e9ff942a 100644 --- a/packages/pastebar-app-ui/drop-path.html +++ b/packages/pastebar-app-ui/drop-path.html @@ -1,85 +1,86 @@ - + - - - - PasteBar Drop Zone - - - -
-
Drag and drop an app, file or folder
-
- - - + body { + overscroll-behavior: none; + overflow: hidden; + user-select: none; + font-family: + Inter, + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + 'Roboto', + 'Oxygen', + 'Ubuntu', + 'Cantarell', + 'Fira Sans', + 'Droid Sans', + 'Helvetica Neue', + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + font-feature-settings: + 'rlig' 1, + 'calt' 1; + } + + .drop-zone.hover { + background-color: #e0e0e0; /* Light gray background when hovering */ + border-color: #0088cc; /* Change border color */ + color: #0088cc; /* Change text color */ + } + + .drop-zone { + display: flex; + align-items: center; + justify-content: center; + margin: 12px; + padding: 12px; + border: 2px dashed #cccccc; + border-radius: 12px; + height: calc(100% - 24px); + width: calc(100% - 24px); + text-align: center; + box-sizing: border-box; + color: #555555; + } + + .drop-zone-text { + font-size: 24px; + pointer-events: none; + font-weight: bold; + } + + + +
+
Drag and drop an app, file or folder
+
+ + + diff --git a/packages/pastebar-app-ui/history-index.html b/packages/pastebar-app-ui/history-index.html index 6be51b01..5b7b080a 100644 --- a/packages/pastebar-app-ui/history-index.html +++ b/packages/pastebar-app-ui/history-index.html @@ -1,40 +1,76 @@ - + - - - - - + + + + + - + PasteBar App
diff --git a/packages/pastebar-app-ui/index.html b/packages/pastebar-app-ui/index.html index 17f08652..7a4dc392 100644 --- a/packages/pastebar-app-ui/index.html +++ b/packages/pastebar-app-ui/index.html @@ -1,41 +1,77 @@ - + - - - - - + + + + + - + PasteBar App
diff --git a/packages/pastebar-app-ui/quickpaste-index.html b/packages/pastebar-app-ui/quickpaste-index.html index 587f38d6..60a83f54 100644 --- a/packages/pastebar-app-ui/quickpaste-index.html +++ b/packages/pastebar-app-ui/quickpaste-index.html @@ -1,28 +1,34 @@ - + - + PasteBar App
diff --git a/packages/pastebar-app-ui/scripts/react-compiler-runtime/package.json b/packages/pastebar-app-ui/scripts/react-compiler-runtime/package.json index f4871bdf..11f1dbbe 100644 --- a/packages/pastebar-app-ui/scripts/react-compiler-runtime/package.json +++ b/packages/pastebar-app-ui/scripts/react-compiler-runtime/package.json @@ -6,4 +6,4 @@ "dependencies": { "react": "^18.2.0" } -} \ No newline at end of file +} diff --git a/packages/pastebar-app-ui/scripts/twSafelistGenerator/generator.js b/packages/pastebar-app-ui/scripts/twSafelistGenerator/generator.js index b8b4eb24..a42e1418 100644 --- a/packages/pastebar-app-ui/scripts/twSafelistGenerator/generator.js +++ b/packages/pastebar-app-ui/scripts/twSafelistGenerator/generator.js @@ -1,55 +1,51 @@ function cartesian(array) { - function* cartesian(head, ...tail) { - let remainder = tail.length ? cartesian(...tail) : [[]] - for (let r of remainder) for (let h of head) yield [h, ...r] - } + function* cartesian(head, ...tail) { + let remainder = tail.length ? cartesian(...tail) : [[]] + for (let r of remainder) for (let h of head) yield [h, ...r] + } - return [...cartesian(...array)] + return [...cartesian(...array)] } function deepKeys(object, separator = '.', prefix = '') { - return Object.keys(object).reduce((result, key) => { - if (Array.isArray(object[key])) { - return [...result, prefix + key]; - } else if (typeof object[key] === 'object' && object[key] !== null) { - return [...result, ...deepKeys(object[key], separator, prefix + key + separator)]; - } + return Object.keys(object).reduce((result, key) => { + if (Array.isArray(object[key])) { + return [...result, prefix + key] + } else if (typeof object[key] === 'object' && object[key] !== null) { + return [...result, ...deepKeys(object[key], separator, prefix + key + separator)] + } - return [...result, prefix + key]; - }, []); + return [...result, prefix + key] + }, []) } -const extractTokens = pattern => - pattern.split(/(?={[^}]+})|(?<={[^}]+})/) +const extractTokens = pattern => pattern.split(/(?={[^}]+})|(?<={[^}]+})/) const expandTokens = theme => tokens => { - return tokens.map(token => { - if(token.startsWith('{')) { - const cleanToken = token.replace(/{|}/g, '') - if(cleanToken.includes('.')) { - const color = cleanToken.split('.')[1] - const colorToken = { - [color]: theme(cleanToken, {}) - } - return deepKeys(colorToken, '-') - } - return deepKeys(theme(cleanToken, {}), '-') - } else { - return [token] + return tokens.map(token => { + if (token.startsWith('{')) { + const cleanToken = token.replace(/{|}/g, '') + if (cleanToken.includes('.')) { + const color = cleanToken.split('.')[1] + const colorToken = { + [color]: theme(cleanToken, {}), } - }) + return deepKeys(colorToken, '-') + } + return deepKeys(theme(cleanToken, {}), '-') + } else { + return [token] + } + }) } - const mapToClasses = expanded => - expanded.map(values => - values.join('').replace('-DEFAULT', '')) + expanded.map(values => values.join('').replace('-DEFAULT', '')) module.exports = theme => patterns => { - return patterns // ["text-{gray}", …] - .map(extractTokens) // [["text", "{gray}"], …] - .map(expandTokens(theme)) // [[["text"], ["gray-100", "gray-200",…]], …] - .map(cartesian) // [[["text", "gray-100"], ["text", "gray-200"], …], …] - .flatMap(mapToClasses) // ["text-gray-100", "text-gray-200",…] + return patterns // ["text-{gray}", …] + .map(extractTokens) // [["text", "{gray}"], …] + .map(expandTokens(theme)) // [[["text"], ["gray-100", "gray-200",…]], …] + .map(cartesian) // [[["text", "gray-100"], ["text", "gray-200"], …], …] + .flatMap(mapToClasses) // ["text-gray-100", "text-gray-200",…] } - diff --git a/packages/pastebar-app-ui/src/App.tsx b/packages/pastebar-app-ui/src/App.tsx index b8308ecf..2e53b73e 100644 --- a/packages/pastebar-app-ui/src/App.tsx +++ b/packages/pastebar-app-ui/src/App.tsx @@ -190,7 +190,8 @@ function App() { settings.isShowDisabledCollectionsOnNavBarMenu?.valueBool, userSelectedLanguage: settings.userSelectedLanguage?.valueText, isNoteIconsEnabled: settings.isNoteIconsEnabled?.valueBool ?? true, - defaultNoteIconType: settings.defaultNoteIconType?.valueText ?? 'MessageSquareText', + defaultNoteIconType: + settings.defaultNoteIconType?.valueText ?? 'MessageSquareText', isAppReady: true, }) settingsStore.initConstants({ diff --git a/packages/pastebar-app-ui/src/components/atoms/date-picker/custom-header.tsx b/packages/pastebar-app-ui/src/components/atoms/date-picker/custom-header.tsx index fd7ffcd9..15b86142 100644 --- a/packages/pastebar-app-ui/src/components/atoms/date-picker/custom-header.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/date-picker/custom-header.tsx @@ -1,6 +1,7 @@ -import { ReactDatePickerCustomHeaderProps } from "react-datepicker" -import NativeSelect from "../../molecules/native-select" -import { getYearRange, monthNames } from "./utils" +import { ReactDatePickerCustomHeaderProps } from 'react-datepicker' + +import NativeSelect from '../../molecules/native-select' +import { getYearRange, monthNames } from './utils' const CustomHeader = ({ date, @@ -16,9 +17,9 @@ const CustomHeader = ({
changeMonth(monthNames.indexOf(v))} + onValueChange={v => changeMonth(monthNames.indexOf(v))} > - {monthNames.map((month) => ( + {monthNames.map(month => ( {month} @@ -28,9 +29,9 @@ const CustomHeader = ({
changeYear(parseInt(v, 10))} + onValueChange={v => changeYear(parseInt(v, 10))} > - {getYearRange().map((year) => ( + {getYearRange().map(year => ( {year.toString()} diff --git a/packages/pastebar-app-ui/src/components/atoms/date-picker/utils.ts b/packages/pastebar-app-ui/src/components/atoms/date-picker/utils.ts index d4674661..f3813904 100644 --- a/packages/pastebar-app-ui/src/components/atoms/date-picker/utils.ts +++ b/packages/pastebar-app-ui/src/components/atoms/date-picker/utils.ts @@ -10,16 +10,16 @@ export const getYearRange = (step = 20) => range(new Date().getFullYear() - step, new Date().getFullYear() + step) export const monthNames = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December", + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', ] diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/adjustments-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/adjustments-icon.tsx index 533f1407..17efaa53 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/adjustments-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/adjustments-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const AdjustmentsIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-down-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-down-icon.tsx index 4590e3ee..f99ed3db 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-down-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-down-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const ArrowDownIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-left-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-left-icon/index.tsx index 18bb2a16..6ae30b49 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-left-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-left-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const ArrowLeftIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( @@ -15,12 +16,7 @@ const ArrowLeftIcon: React.FC = ({ xmlns="http://www.w3.org/2000/svg" {...attributes} > - + = ({ - size = "16", - color = "currentColor", + size = '16', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-top-right-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-top-right-icon/index.tsx index 3ced3262..f5dbc18f 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-top-right-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-top-right-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const ArrowTopRightIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-up-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-up-icon.tsx index bee38736..c94ee7a7 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-up-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/arrow-up-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const ArrowUpIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/back-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/back-icon/index.tsx index 9892c086..8fd58941 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/back-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/back-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const BackIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/backspace-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/backspace-icon/index.tsx index 8b870181..3e698443 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/backspace-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/backspace-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const BackspaceIcon: React.FC = ({ - size = "16", - color = "currentColor", + size = '16', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-icon/index.tsx index 39d31683..d680a7f0 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const BellIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-noti-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-noti-icon/index.tsx index 70af40f1..4d7832f0 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-noti-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-noti-icon/index.tsx @@ -1,14 +1,15 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' type IBellNotiIconProps = IconProps & { accentColor?: string } const BellNotiIcon: React.FC = ({ - size = "24px", - color = "currentColor", - accentColor = "#F43F5E", + size = '24px', + color = 'currentColor', + accentColor = '#F43F5E', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-off-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-off-icon/index.tsx index 17a30b5a..95c84521 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-off-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/bell-off-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const BellOffIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/building-tax-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/building-tax-icon.tsx index 29fc41bd..4c067fc1 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/building-tax-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/building-tax-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const IconBuildingTax: React.FC = ({ - size = "20px", - color = "currentColor", + size = '20px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/buildings-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/buildings-icon/index.tsx index 53f32fe1..cd958081 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/buildings-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/buildings-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const BuildingsIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/calendar-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/calendar-icon.tsx index e0b976d4..dd8ccb99 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/calendar-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/calendar-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const CalendarIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cancel-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cancel-icon/index.tsx index bfd88088..31461fed 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cancel-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cancel-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const CancelIcon: React.FC = ({ - size = "16", - color = "currentColor", + size = '16', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cart-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cart-icon/index.tsx index 3e8b98f9..b3aa5b8b 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cart-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cart-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const CartIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cash-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cash-icon/index.tsx index ffe380bf..c7b1dcd9 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cash-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cash-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const CashIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/channels-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/channels-icon.tsx index 37fc735d..67634d3b 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/channels-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/channels-icon.tsx @@ -1,10 +1,10 @@ -import React from "react" +import React from 'react' -import IconProps from "./types/icon-type" +import IconProps from './types/icon-type' const ChannelsIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-circle-fill-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-circle-fill-icon/index.tsx index 61d22685..02f9409a 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-circle-fill-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-circle-fill-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const CheckCircleFillIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-circle-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-circle-icon/index.tsx index 05fd4dcf..ca846f4d 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-circle-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-circle-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const CheckCircleIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-icon.tsx index 7e7ccb30..27d53a03 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/check-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const CheckIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-down.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-down.tsx index 5af31d7d..c839dfe5 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-down.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-down.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const ChevronDownIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-left-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-left-icon/index.tsx index 469065c6..9d266eed 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-left-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-left-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const ChevronLeftIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-right-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-right-icon/index.tsx index fad3f027..09867a3e 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-right-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-right-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const ChevronRightIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-up.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-up.tsx index 750baa77..d968a196 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-up.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/chevron-up.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const ChevronUpIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/circle-quarter-solid/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/circle-quarter-solid/index.tsx index 5bbcc6ef..97a0d0f0 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/circle-quarter-solid/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/circle-quarter-solid/index.tsx @@ -1,9 +1,10 @@ -import IconProps from "../types/icon-type" -import React from "react" +import React from 'react' + +import IconProps from '../types/icon-type' const CircleQuarterSolid: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/clipboard-copy-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/clipboard-copy-icon/index.tsx index c2ad4311..a5be29ca 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/clipboard-copy-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/clipboard-copy-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const ClipboardCopyIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/clock-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/clock-icon/index.tsx index 14996231..53b95097 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/clock-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/clock-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const ClockIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/coins-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/coins-icon/index.tsx index 02225c60..b5fb3cfe 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/coins-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/coins-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const CoinsIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/corner-down-right-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/corner-down-right-icon/index.tsx index 7ad7aecc..e0624859 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/corner-down-right-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/corner-down-right-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const CornerDownRightIcon: React.FC = ({ - size = "16", - color = "currentColor", + size = '16', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cross-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cross-icon/index.tsx index aaeda63a..32b58809 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cross-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/cross-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const CrossIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/crosshair-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/crosshair-icon/index.tsx index 77c14e9c..5225db44 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/crosshair-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/crosshair-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const CrosshairIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/customer-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/customer-icon/index.tsx index 6c1cdd49..7dc71559 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/customer-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/customer-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const CustomerIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/details-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/details-icon.tsx index d0905c07..aa0241e2 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/details-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/details-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const DetailsIcon: React.FC = ({ - size = "16", - color = "currentColor", + size = '16', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/discord-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/discord-icon.tsx index ee6fa5d3..34eba4cc 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/discord-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/discord-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const DiscordIcon: React.FC = ({ - size = "16", - color = "currentColor", + size = '16', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/dollar-sign-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/dollar-sign-icon/index.tsx index 7174e441..5667279e 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/dollar-sign-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/dollar-sign-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const DollarSignIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/down-left/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/down-left/index.tsx index 657b3944..003f0419 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/down-left/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/down-left/index.tsx @@ -1,10 +1,8 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' -const DownLeftIcon: React.FC = ({ - size = "16", - color = "#9CA3AF", -}) => { +import IconProps from '../types/icon-type' + +const DownLeftIcon: React.FC = ({ size = '16', color = '#9CA3AF' }) => { return ( = (props) => { +import IconProps from './types/icon-type' + +const DownloadIcon: FC = props => { const { fill, size, ...attributes } = props - const line = fill || "#111827" + const line = fill || '#111827' return ( = ({ - size = "20px", - color = "currentColor", + size = '20px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/edit-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/edit-icon.tsx index 55a5ff10..f8ac6419 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/edit-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/edit-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const EditIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/edit-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/edit-icon/index.tsx index bad0f3bb..0e179a76 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/edit-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/edit-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const EditIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/ellipsis-vertical-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/ellipsis-vertical-icon/index.tsx index cd24be98..73067ac9 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/ellipsis-vertical-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/ellipsis-vertical-icon/index.tsx @@ -1,8 +1,8 @@ -import IconProps from "../types/icon-type" +import IconProps from '../types/icon-type' const EllipsisVerticalIcon = ({ size = 20, - color = "currentColor", + color = 'currentColor', ...attributes }: IconProps) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/export-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/export-icon/index.tsx index ee097067..0d369a2a 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/export-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/export-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const ExportIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/eye-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/eye-icon/index.tsx index 4c9707aa..dfabb3f3 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/eye-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/eye-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const EyeIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/eye-off-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/eye-off-icon/index.tsx index 7f5e19f3..f92e3edd 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/eye-off-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/eye-off-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const EyeOffIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/fast-delivery-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/fast-delivery-icon/index.tsx index 91a5386f..e6e0eb19 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/fast-delivery-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/fast-delivery-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const FastDeliveryIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/file-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/file-icon.tsx index beeab98c..c51a5e25 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/file-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/file-icon.tsx @@ -1,9 +1,10 @@ -import { FC } from "react" -import IconProps from "./types/icon-type" +import { FC } from 'react' -const FileIcon: FC = (props) => { +import IconProps from './types/icon-type' + +const FileIcon: FC = props => { const { fill, size, ...attributes } = props - const line = fill || "#2DD4BF" + const line = fill || '#2DD4BF' return ( = ({ - size = "20px", - color = "currentColor", + size = '20px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/gear-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/gear-icon/index.tsx index b44072f9..03553548 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/gear-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/gear-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const GearIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/gift-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/gift-icon/index.tsx index dcbdcb16..191bc4bf 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/gift-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/gift-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const GiftIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/grip-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/grip-icon.tsx index 59ec878f..d5b56c95 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/grip-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/grip-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const GripIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/happy-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/happy-icon/index.tsx index 37b8ac55..d246ed2a 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/happy-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/happy-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const HappyIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/help-circle.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/help-circle.tsx index 3d8246e2..cb560089 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/help-circle.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/help-circle.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const HelpCircleIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/image-placeholder-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/image-placeholder-icon/index.tsx index c63780bf..f3a8309d 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/image-placeholder-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/image-placeholder-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const ImagePlaceholderIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/info-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/info-icon/index.tsx index 723aca57..b2fd02fd 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/info-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/info-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const InfoIcon: React.FC = ({ - size = "16", - color = "currentColor", + size = '16', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/key-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/key-icon.tsx index c70ad483..07af8d7f 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/key-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/key-icon.tsx @@ -1,10 +1,10 @@ -import React from "react" +import React from 'react' -import IconProps from "./types/icon-type" +import IconProps from './types/icon-type' const KeyIcon: React.FC = ({ - size = "32px", - color = "currentColor", + size = '32px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/list-arrow-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/list-arrow-icon/index.tsx index 03a2f295..e14edcbc 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/list-arrow-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/list-arrow-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const ListArrowIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/list-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/list-icon.tsx index f9eb3849..2ab99ccb 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/list-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/list-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const ListIcon: React.FC = ({ - size = "20px", - color = "currentColor", + size = '20px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/lock-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/lock-icon/index.tsx index 16f15eae..0871472c 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/lock-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/lock-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const LockIcon: React.FC = ({ - size = "16", - color = "currentColor", + size = '16', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/log-out-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/log-out-icon/index.tsx index 0f7038ac..6d358e4c 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/log-out-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/log-out-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const SignOutIcon: React.FC = ({ - size = "16", - color = "currentColor", + size = '16', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/long-arrow-right-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/long-arrow-right-icon/index.tsx index 4d486d3e..7f74cc9a 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/long-arrow-right-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/long-arrow-right-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const LongArrowRightIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { const width = +size * 2 diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/mail-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/mail-icon/index.tsx index 8f87867f..98162fec 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/mail-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/mail-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const MailIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/map-pin-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/map-pin-icon/index.tsx index 33edfff8..a34e3efb 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/map-pin-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/map-pin-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const MapPinIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/package-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/package-icon/index.tsx index dcbfbe5a..e35869b7 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/package-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/package-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const PackageIcon: React.FC = ({ - size = "16", - color = "currentColor", + size = '16', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/percent-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/percent-icon/index.tsx index 3fab474b..001aa906 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/percent-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/percent-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const PercentIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/plus-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/plus-icon/index.tsx index f62578a3..9e03bc53 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/plus-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/plus-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const PlusIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/pointer-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/pointer-icon/index.tsx index 2eb7885f..a0eae24b 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/pointer-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/pointer-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const PointerIcon: React.FC = ({ - size = "16", - color = "#9CA3AF", + size = '16', + color = '#9CA3AF', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/publish-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/publish-icon/index.tsx index 39b9537b..072fa414 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/publish-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/publish-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const PublishIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/refresh-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/refresh-icon.tsx index a6d2e052..421ba0ef 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/refresh-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/refresh-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const RefreshIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/refund.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/refund.tsx index bc9127e6..300c9327 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/refund.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/refund.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const RefundIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/reorder-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/reorder-icon/index.tsx index 6c281168..ba787a51 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/reorder-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/reorder-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const ReorderIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sad-face-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sad-face-icon/index.tsx index fc506291..02ae9fa0 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sad-face-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sad-face-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const SadFaceIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sale-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sale-icon/index.tsx index 9eebba0b..74930861 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sale-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sale-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const SaleIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/search-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/search-icon/index.tsx index 1c88da42..2b855124 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/search-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/search-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const SearchIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/send-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/send-icon/index.tsx index 50a48367..90314ea6 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/send-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/send-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const SendIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sided-mouth-face/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sided-mouth-face/index.tsx index e426d962..62f2a618 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sided-mouth-face/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sided-mouth-face/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const SidedMouthFaceIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sorting-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sorting-icon/index.tsx index ba6912b2..ada3c9ce 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sorting-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sorting-icon/index.tsx @@ -1,16 +1,17 @@ -import clsx from "clsx" -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' +import clsx from 'clsx' + +import IconProps from '../types/icon-type' type SortingIconProps = { ascendingColor?: string descendingColor?: string - isSorted?: "asc" | "desc" | false + isSorted?: 'asc' | 'desc' | false } & IconProps const SortingIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ascendingColor, descendingColor, isSorted = false, @@ -28,8 +29,8 @@ const SortingIcon: React.FC = ({ = ({ d="M4.66602 6.00008L7.99935 2.66675L11.3327 6.00008" stroke={ascendingColor || color} className={clsx({ - "stroke-grey-40": isSorted !== "asc", - "stroke-current": isSorted === "asc", + 'stroke-grey-40': isSorted !== 'asc', + 'stroke-current': isSorted === 'asc', })} strokeWidth="1.5" strokeLinecap="round" diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sparkles-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sparkles-icon/index.tsx index 5b33d75e..f988cd10 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sparkles-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/sparkles-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const SparklesIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/stop-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/stop-icon.tsx index 90f790a8..328dcd7e 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/stop-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/stop-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const StopIcon: React.FC = ({ - size = "20px", - color = "currentColor", + size = '20px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/swatch-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/swatch-icon/index.tsx index ac893245..d3e7e75f 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/swatch-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/swatch-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const SwatchIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tag-dot-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tag-dot-icon/index.tsx index ee9b095c..faef2ee9 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tag-dot-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tag-dot-icon/index.tsx @@ -1,14 +1,15 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' type TagDotIconProps = IconProps & { outerColor: string } const TagDotIcon: React.FC = ({ - size = "24px", - color = "#E5484D", - outerColor = "transparent", + size = '24px', + color = '#E5484D', + outerColor = 'transparent', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tag-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tag-icon/index.tsx index 7cbfd29a..27c7907f 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tag-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tag-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const TagIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/taxes-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/taxes-icon.tsx index 13bd2a3d..7be5ca91 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/taxes-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/taxes-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const TaxesIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tile-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tile-icon.tsx index 2fd60da8..1ecee909 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tile-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/tile-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const TileIcon: React.FC = ({ - size = "20px", - color = "currentColor", + size = '20px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/trash-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/trash-icon.tsx index ac951b00..a871309c 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/trash-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/trash-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const TrashIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/triangle-mini-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/triangle-mini-icon/index.tsx index f0a4c509..c3710553 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/triangle-mini-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/triangle-mini-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const TriangleDownIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/triangle-right-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/triangle-right-icon/index.tsx index a77d54b4..d267c2a4 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/triangle-right-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/triangle-right-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const TriangleRightIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/truck-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/truck-icon/index.tsx index 880efb91..dabd6cca 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/truck-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/truck-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const TruckIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/types/icon-type.ts b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/types/icon-type.ts index 782681a4..19d70bb5 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/types/icon-type.ts +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/types/icon-type.ts @@ -1,4 +1,4 @@ -import React from "react" +import React from 'react' type IconProps = { color?: string diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/u-turn-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/u-turn-icon.tsx index 57a9ce98..e3b5b4cb 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/u-turn-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/u-turn-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const UTurnIcon: React.FC = ({ - size = "20px", - color = "currentColor", + size = '20px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/unpublish-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/unpublish-icon/index.tsx index c33da151..a8e590e3 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/unpublish-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/unpublish-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const UnpublishIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/upload-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/upload-icon/index.tsx index 5557b92c..827d43d0 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/upload-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/upload-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const UploadIcon: React.FC = ({ - size = "20", - color = "currentColor", + size = '20', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/users-icon/index.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/users-icon/index.tsx index 9665bb52..8fd0d5ce 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/users-icon/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/users-icon/index.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "../types/icon-type" +import React from 'react' + +import IconProps from '../types/icon-type' const UsersIcon: React.FC = ({ - size = "24", - color = "currentColor", + size = '24', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/x-circle-icon.tsx b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/x-circle-icon.tsx index 318327a7..ede7ca59 100644 --- a/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/x-circle-icon.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/fundamentals/icons/x-circle-icon.tsx @@ -1,9 +1,10 @@ -import React from "react" -import IconProps from "./types/icon-type" +import React from 'react' + +import IconProps from './types/icon-type' const XCircleIcon: React.FC = ({ - size = "24px", - color = "currentColor", + size = '24px', + color = 'currentColor', ...attributes }) => { return ( diff --git a/packages/pastebar-app-ui/src/components/atoms/page-description/index.tsx b/packages/pastebar-app-ui/src/components/atoms/page-description/index.tsx index 899bc836..7ee25e0e 100644 --- a/packages/pastebar-app-ui/src/components/atoms/page-description/index.tsx +++ b/packages/pastebar-app-ui/src/components/atoms/page-description/index.tsx @@ -1,14 +1,11 @@ -import React from "react" +import React from 'react' type PageDescriptionProps = { title?: string subtitle?: string } -const PageDescription: React.FC = ({ - title, - subtitle, -}) => { +const PageDescription: React.FC = ({ title, subtitle }) => { return (

{title}

diff --git a/packages/pastebar-app-ui/src/components/card-value-viewer/index.tsx b/packages/pastebar-app-ui/src/components/card-value-viewer/index.tsx index 0557c754..20e2424b 100644 --- a/packages/pastebar-app-ui/src/components/card-value-viewer/index.tsx +++ b/packages/pastebar-app-ui/src/components/card-value-viewer/index.tsx @@ -162,9 +162,7 @@ export const CardValueViewer: FC = ({ const valueParsed = useMemo(() => { if (!isImageData && !isCode && !isImage && textValue) { - return isMasked - ? maskValue(bbCode.remove(textValue)) - : bbCode.parse(textValue) + return isMasked ? maskValue(bbCode.remove(textValue)) : bbCode.parse(textValue) } }, [textValue]) diff --git a/packages/pastebar-app-ui/src/components/libs/react-resizable-panels/CHANGELOG.md b/packages/pastebar-app-ui/src/components/libs/react-resizable-panels/CHANGELOG.md index 3dfe0366..a31605f2 100644 --- a/packages/pastebar-app-ui/src/components/libs/react-resizable-panels/CHANGELOG.md +++ b/packages/pastebar-app-ui/src/components/libs/react-resizable-panels/CHANGELOG.md @@ -1,215 +1,275 @@ # Changelog ## 0.0.55 -* New `units` prop added to `PanelGroup` to support pixel-based panel size constraints. + +- New `units` prop added to `PanelGroup` to support pixel-based panel size constraints. This prop defaults to "percentage" but can be set to "pixels" for static, pixel based layout constraints. This can be used to add enable pixel-based min/max and default size values, e.g.: + ```tsx - - {/* Will be constrained to 100-200 pixels (assuming group is large enough to permit this) */} - - - - - - + + {/* Will be constrained to 100-200 pixels (assuming group is large enough to permit this) */} + + + + + + ``` Imperative API methods are also able to work with either pixels or percentages now. They default to whatever units the group has been configured to use, but can be overridden with an additional, optional parameter, e.g. + ```ts -panelRef.resize(100, "pixels"); -panelGroupRef.setLayout([25, 50, 25], "percentages"); +panelRef.resize(100, 'pixels') +panelGroupRef.setLayout([25, 50, 25], 'percentages') // Works for getters too, e.g. -const percentage = panelRef.getSize("percentages"); -const pixels = panelRef.getSize("pixels"); +const percentage = panelRef.getSize('percentages') +const pixels = panelRef.getSize('pixels') -const layout = panelGroupRef.getLayout("pixels"); +const layout = panelGroupRef.getLayout('pixels') ``` ## 0.0.54 -* [172](https://github.com/bvaughn/react-resizable-panels/issues/172): Development warning added to `PanelGroup` for conditionally-rendered `Panel`(s) that don't have `id` and `order` props -* [156](https://github.com/bvaughn/react-resizable-panels/pull/156): Package exports now used to select between node (server-rendering) and browser (client-rendering) bundles + +- [172](https://github.com/bvaughn/react-resizable-panels/issues/172): Development warning added to `PanelGroup` for conditionally-rendered `Panel`(s) that don't have `id` and `order` props +- [156](https://github.com/bvaughn/react-resizable-panels/pull/156): Package exports now used to select between node (server-rendering) and browser (client-rendering) bundles ## 0.0.53 -* Fix edge case race condition for `onResize` callbacks during initial mount + +- Fix edge case race condition for `onResize` callbacks during initial mount ## 0.0.52 -* [162](https://github.com/bvaughn/react-resizable-panels/issues/162): Add `Panel.collapsedSize` property to allow panels to be collapsed to custom, non-0 sizes -* [161](https://github.com/bvaughn/react-resizable-panels/pull/161): Bug fix: `onResize` should be called for the initial `Panel` size regardless of the `onLayout` prop + +- [162](https://github.com/bvaughn/react-resizable-panels/issues/162): Add `Panel.collapsedSize` property to allow panels to be collapsed to custom, non-0 sizes +- [161](https://github.com/bvaughn/react-resizable-panels/pull/161): Bug fix: `onResize` should be called for the initial `Panel` size regardless of the `onLayout` prop ## 0.0.51 -* [154](https://github.com/bvaughn/react-resizable-panels/issues/154): `onResize` and `onCollapse` props are called in response to `PanelGroup.setLayout` -* [123](https://github.com/bvaughn/react-resizable-panels/issues/123): `onResize` called when number of panels in a group change due to conditional rendering + +- [154](https://github.com/bvaughn/react-resizable-panels/issues/154): `onResize` and `onCollapse` props are called in response to `PanelGroup.setLayout` +- [123](https://github.com/bvaughn/react-resizable-panels/issues/123): `onResize` called when number of panels in a group change due to conditional rendering ## 0.0.50 -* Improved panel size validation in `PanelGroup`. + +- Improved panel size validation in `PanelGroup`. ## 0.0.49 -* Improved development warnings and props validation checks in `PanelGroup`. + +- Improved development warnings and props validation checks in `PanelGroup`. ## 0.0.48 -* [148](https://github.com/bvaughn/react-resizable-panels/pull/148): Build release bundle with Preconstruct + +- [148](https://github.com/bvaughn/react-resizable-panels/pull/148): Build release bundle with Preconstruct ## 0.0.47 -* Mimic VS COde behavior; collapse a panel if it's smaller than half of its min-size + +- Mimic VS COde behavior; collapse a panel if it's smaller than half of its min-size ## 0.0.46 -* SSR: Avoid accessing default storage (`localStorage`) during initialization; avoid throwing error in browsers that have 3rd party cookies/storage disabled. + +- SSR: Avoid accessing default storage (`localStorage`) during initialization; avoid throwing error in browsers that have 3rd party cookies/storage disabled. ## 0.0.45 -* SSR: Avoid layout shift by using `defaultSize` to set initial `flex-grow` style -* SSR: Warn if `Panel` is server-rendered without a `defaultSize` prop -* [#135](https://github.com/bvaughn/react-resizable-panels/issues/135): Support RTL layouts + +- SSR: Avoid layout shift by using `defaultSize` to set initial `flex-grow` style +- SSR: Warn if `Panel` is server-rendered without a `defaultSize` prop +- [#135](https://github.com/bvaughn/react-resizable-panels/issues/135): Support RTL layouts ## 0.0.44 -* [#142](https://github.com/bvaughn/react-resizable-panels/pull/142): Avoid re-registering Panel when props change; this should reduce the number of scenarios requiring the `order` prop + +- [#142](https://github.com/bvaughn/react-resizable-panels/pull/142): Avoid re-registering Panel when props change; this should reduce the number of scenarios requiring the `order` prop ## 0.0.43 -* Add imperative `getLayout` API to `PanelGroup` -* [#139](https://github.com/bvaughn/react-resizable-panels/pull/139): Fix edge case bug where simultaneous `localStorage` updates to multiple saved groups would drop some values + +- Add imperative `getLayout` API to `PanelGroup` +- [#139](https://github.com/bvaughn/react-resizable-panels/pull/139): Fix edge case bug where simultaneous `localStorage` updates to multiple saved groups would drop some values ## 0.0.42 -* Change cursor style from `col-resize`/`row-resize` to `ew-resize`/`ns-resize` to better match cursor style at edges of a panel. + +- Change cursor style from `col-resize`/`row-resize` to `ew-resize`/`ns-resize` to better match cursor style at edges of a panel. ## 0.0.41 -* Add imperative `setLayout` API for `PanelGroup`. + +- Add imperative `setLayout` API for `PanelGroup`. ## 0.0.40 -* README changes + +- README changes ## 0.0.39 -* [#118](https://github.com/bvaughn/react-resizable-panels/issues/118): Fix import regression from 0.0.38. + +- [#118](https://github.com/bvaughn/react-resizable-panels/issues/118): Fix import regression from 0.0.38. ## 0.0.38 -* [#117](https://github.com/bvaughn/react-resizable-panels/issues/117): `Panel` collapse behavior works better near viewport edges. -* [#115](https://github.com/bvaughn/react-resizable-panels/pull/115): `PanelResizeHandle` logic calls `event.preventDefault` for events it handles. -* [#82](https://github.com/bvaughn/react-resizable-panels/issues/82): `useId` import changed to avoid triggering errors with older versions of React. (Note this may have an impact on tree-shaking though it is presumed to be minimal, given the small `"react"` package size.) + +- [#117](https://github.com/bvaughn/react-resizable-panels/issues/117): `Panel` collapse behavior works better near viewport edges. +- [#115](https://github.com/bvaughn/react-resizable-panels/pull/115): `PanelResizeHandle` logic calls `event.preventDefault` for events it handles. +- [#82](https://github.com/bvaughn/react-resizable-panels/issues/82): `useId` import changed to avoid triggering errors with older versions of React. (Note this may have an impact on tree-shaking though it is presumed to be minimal, given the small `"react"` package size.) ## 0.0.37 -* [#94](https://github.com/bvaughn/react-resizable-panels/issues/94): Add `onDragging` prop to `PanelResizeHandle` to be notified of when dragging starts/stops. + +- [#94](https://github.com/bvaughn/react-resizable-panels/issues/94): Add `onDragging` prop to `PanelResizeHandle` to be notified of when dragging starts/stops. ## 0.0.36 -* [#96](https://github.com/bvaughn/react-resizable-panels/issues/96): No longer disable `pointer-events` during resize by default. This behavior can be re-enabled using the newly added `PanelGroup` prop `disablePointerEventsDuringResize`. + +- [#96](https://github.com/bvaughn/react-resizable-panels/issues/96): No longer disable `pointer-events` during resize by default. This behavior can be re-enabled using the newly added `PanelGroup` prop `disablePointerEventsDuringResize`. ## 0.0.35 -* [#92](https://github.com/bvaughn/react-resizable-panels/pull/92): Change `browserslist` so compiled module works with CRA 4.0.3 Babel config out of the box. + +- [#92](https://github.com/bvaughn/react-resizable-panels/pull/92): Change `browserslist` so compiled module works with CRA 4.0.3 Babel config out of the box. + ## 0.0.34 -* [#85](https://github.com/bvaughn/react-resizable-panels/issues/85): Add optional `storage` prop to `PanelGroup` to make it easier to persist layouts somewhere other than `localStorage` (e.g. like a Cookie). -* [#70](https://github.com/bvaughn/react-resizable-panels/issues/70): When resizing is done via mouse/touch event– some initial state is stored so that any panels that contract will also expand if drag direction is reversed. -* [#86](https://github.com/bvaughn/react-resizable-panels/issues/86): Layout changes triggered by keyboard no longer affect the global cursor. -* Fixed small cursor regression introduced in 0.0.33. + +- [#85](https://github.com/bvaughn/react-resizable-panels/issues/85): Add optional `storage` prop to `PanelGroup` to make it easier to persist layouts somewhere other than `localStorage` (e.g. like a Cookie). +- [#70](https://github.com/bvaughn/react-resizable-panels/issues/70): When resizing is done via mouse/touch event– some initial state is stored so that any panels that contract will also expand if drag direction is reversed. +- [#86](https://github.com/bvaughn/react-resizable-panels/issues/86): Layout changes triggered by keyboard no longer affect the global cursor. +- Fixed small cursor regression introduced in 0.0.33. ## 0.0.33 -* Collapsible `Panel`s will always call `onCollapse` on-mount regardless of their collapsed state. -* Fixed regression in b5d3ec1 where arrow keys may fail to expand a collapsed panel. + +- Collapsible `Panel`s will always call `onCollapse` on-mount regardless of their collapsed state. +- Fixed regression in b5d3ec1 where arrow keys may fail to expand a collapsed panel. ## 0.0.32 -* [#75](https://github.com/bvaughn/react-resizable-panels/issues/75): Ensure `Panel` and `PanelGroup` callbacks are always called after mounting. + +- [#75](https://github.com/bvaughn/react-resizable-panels/issues/75): Ensure `Panel` and `PanelGroup` callbacks are always called after mounting. ## 0.0.31 -* [#71](https://github.com/bvaughn/react-resizable-panels/issues/71): Added `getSize` and `getCollapsed` to imperative API exposed by `Panel`. -* [#67](https://github.com/bvaughn/react-resizable-panels/issues/67), [#72](https://github.com/bvaughn/react-resizable-panels/issues/72): Removed nullish coalescing operator (`??`) because it caused problems with default create-react-app configuration. -* Fix edge case when expanding a panel via imperative API that was collapsed by user drag + +- [#71](https://github.com/bvaughn/react-resizable-panels/issues/71): Added `getSize` and `getCollapsed` to imperative API exposed by `Panel`. +- [#67](https://github.com/bvaughn/react-resizable-panels/issues/67), [#72](https://github.com/bvaughn/react-resizable-panels/issues/72): Removed nullish coalescing operator (`??`) because it caused problems with default create-react-app configuration. +- Fix edge case when expanding a panel via imperative API that was collapsed by user drag ## 0.0.30 -* [#68](https://github.com/bvaughn/react-resizable-panels/pull/68): Reduce volume/frequency of local storage writes for `PanelGroup`s configured to _auto-save_. -* Added `onLayout` prop to `PanelGroup` to be called when group layout changes. Note that some form of debouncing is recommended before processing these values (e.g. saving to a database). + +- [#68](https://github.com/bvaughn/react-resizable-panels/pull/68): Reduce volume/frequency of local storage writes for `PanelGroup`s configured to _auto-save_. +- Added `onLayout` prop to `PanelGroup` to be called when group layout changes. Note that some form of debouncing is recommended before processing these values (e.g. saving to a database). ## 0.0.29 -* [#58](https://github.com/bvaughn/react-resizable-panels/pull/58): Add imperative `collapse`, `expand`, and `resize` methods to `Panel`. -* [#64](https://github.com/bvaughn/react-resizable-panels/pull/64): Disable `pointer-events` inside of `Panel`s during resize. This avoid edge cases like nested iframes. -* [#57](https://github.com/bvaughn/react-resizable-panels/pull/57): Improve server rendering check to include `window.document`. This more closely matches React's own check and avoids false positives for environments that alias `window` to some global object. + +- [#58](https://github.com/bvaughn/react-resizable-panels/pull/58): Add imperative `collapse`, `expand`, and `resize` methods to `Panel`. +- [#64](https://github.com/bvaughn/react-resizable-panels/pull/64): Disable `pointer-events` inside of `Panel`s during resize. This avoid edge cases like nested iframes. +- [#57](https://github.com/bvaughn/react-resizable-panels/pull/57): Improve server rendering check to include `window.document`. This more closely matches React's own check and avoids false positives for environments that alias `window` to some global object. ## 0.0.28 -* [#53](https://github.com/bvaughn/react-resizable-panels/issues/53): Avoid `useLayoutEffect` warning when server rendering. Render panels with default style of `flex: 1 1 auto` during initial render. + +- [#53](https://github.com/bvaughn/react-resizable-panels/issues/53): Avoid `useLayoutEffect` warning when server rendering. Render panels with default style of `flex: 1 1 auto` during initial render. ## 0.0.27 -* [#4](https://github.com/bvaughn/react-resizable-panels/issues/4): Add `collapsible` and `onCollapse` props to `Panel` to support auto-collapsing panels that resize beyond their `minSize` value (similar to VS Code's panel UX). + +- [#4](https://github.com/bvaughn/react-resizable-panels/issues/4): Add `collapsible` and `onCollapse` props to `Panel` to support auto-collapsing panels that resize beyond their `minSize` value (similar to VS Code's panel UX). ## 0.0.26 -* Reduce style re-calc from resize-in-progress cursor style. + +- Reduce style re-calc from resize-in-progress cursor style. ## 0.0.25 -* While a resize is active, the global cursor style now reliably overrides per-element styles (to avoid flickering if you drag over e.g. an anchor element). + +- While a resize is active, the global cursor style now reliably overrides per-element styles (to avoid flickering if you drag over e.g. an anchor element). ## 0.0.24 -* [#49](https://github.com/bvaughn/react-resizable-panels/issues/49): Change cursor based on min/max boundaries. + +- [#49](https://github.com/bvaughn/react-resizable-panels/issues/49): Change cursor based on min/max boundaries. ## 0.0.23 -* [#40](https://github.com/bvaughn/react-resizable-panels/issues/40): Add optional `maxSize` prop to `Panel`. -* [#41](https://github.com/bvaughn/react-resizable-panels/issues/41): Add optional `onResize` prop to `Panel`. This prop can be used (along with `defaultSize`) to persistence layouts somewhere externally. -* [#42](https://github.com/bvaughn/react-resizable-panels/issues/42): Don't cancel resize operations when exiting the window. Only cancel when a `"mouseup"` (or `"touchend"`) event is fired. + +- [#40](https://github.com/bvaughn/react-resizable-panels/issues/40): Add optional `maxSize` prop to `Panel`. +- [#41](https://github.com/bvaughn/react-resizable-panels/issues/41): Add optional `onResize` prop to `Panel`. This prop can be used (along with `defaultSize`) to persistence layouts somewhere externally. +- [#42](https://github.com/bvaughn/react-resizable-panels/issues/42): Don't cancel resize operations when exiting the window. Only cancel when a `"mouseup"` (or `"touchend"`) event is fired. ## 0.0.22 -* Replaced the `"ew-resize"` and `"ns-resize"` cursor style with `"col-resize"` and `"row-resize"`. + +- Replaced the `"ew-resize"` and `"ns-resize"` cursor style with `"col-resize"` and `"row-resize"`. ## 0.0.21 -* [#39](https://github.com/bvaughn/react-resizable-panels/issues/39): Fixed regression in TypeScript defs introduced in `0.0.20` + +- [#39](https://github.com/bvaughn/react-resizable-panels/issues/39): Fixed regression in TypeScript defs introduced in `0.0.20` ## 0.0.20 -* Add `displayName` to `Panel`, `PanelGroup`, `PanelGroupContext`, and `PanelResizeHandle` to work around ParcelJS scope hoisting renaming. + +- Add `displayName` to `Panel`, `PanelGroup`, `PanelGroupContext`, and `PanelResizeHandle` to work around ParcelJS scope hoisting renaming. ## 0.0.19 -* Add optional `style` and `tagName` props to `Panel`, `PanelGroup`, and `PanelResizeHandle` to simplify custom styling. -* Add `data-panel-group-direction` attribute to `PanelGroup` and `PanelResizeHandle` to simplify custom drag handle styling. + +- Add optional `style` and `tagName` props to `Panel`, `PanelGroup`, and `PanelResizeHandle` to simplify custom styling. +- Add `data-panel-group-direction` attribute to `PanelGroup` and `PanelResizeHandle` to simplify custom drag handle styling. ## 0.0.18 -* `Panel` and `PanelGroup` now use `overflow: hidden` style by default to avoid potential scrollbar flickers while resizing. + +- `Panel` and `PanelGroup` now use `overflow: hidden` style by default to avoid potential scrollbar flickers while resizing. ## 0.0.17 -* Bug fix: `Panel` styles include `flex-basis`, `flex-shrink`, and `overflow` so that their sizes are not unintentionally impacted by their content. + +- Bug fix: `Panel` styles include `flex-basis`, `flex-shrink`, and `overflow` so that their sizes are not unintentionally impacted by their content. ## 0.0.16 -* Bug fix: Resize handle ARIA attributes now rendering proper min/max/now values for Window Splitter. -* Bug fix: Up/down arrows are ignored for _horizontal_ layouts and left/right arrows are ignored for _vertical_ layouts as per Window Splitter spec. -* [#36](https://github.com/bvaughn/react-resizable-panels/issues/36): Removed `PanelContext` in favor of adding `data-resize-handle-active` attribute to active resize handles. This attribute can be used to update the style for active handles. + +- Bug fix: Resize handle ARIA attributes now rendering proper min/max/now values for Window Splitter. +- Bug fix: Up/down arrows are ignored for _horizontal_ layouts and left/right arrows are ignored for _vertical_ layouts as per Window Splitter spec. +- [#36](https://github.com/bvaughn/react-resizable-panels/issues/36): Removed `PanelContext` in favor of adding `data-resize-handle-active` attribute to active resize handles. This attribute can be used to update the style for active handles. ## 0.0.15 -* [#30](https://github.com/bvaughn/react-resizable-panels/issues/30): `PanelGroup` uses `display: flex` rather than absolute positioning. This provides several benefits: (a) more responsive resizing for nested groups, (b) no explicit `width`/`height` props, and (c) `PanelResizeHandle` components can now be rendered directly within `PanelGroup` (rather than as children of `Panel`s). + +- [#30](https://github.com/bvaughn/react-resizable-panels/issues/30): `PanelGroup` uses `display: flex` rather than absolute positioning. This provides several benefits: (a) more responsive resizing for nested groups, (b) no explicit `width`/`height` props, and (c) `PanelResizeHandle` components can now be rendered directly within `PanelGroup` (rather than as children of `Panel`s). ## 0.0.14 -* [#23](https://github.com/bvaughn/react-resizable-panels/issues/23): Fix small regression with `autoSaveId` that was introduced with non-deterministic `useId` ids. + +- [#23](https://github.com/bvaughn/react-resizable-panels/issues/23): Fix small regression with `autoSaveId` that was introduced with non-deterministic `useId` ids. ## 0.0.13 -* [#18](https://github.com/bvaughn/react-resizable-panels/issues/18): Support server-side rendering (e.g. Next JS) by using `useId` (when available). `Panel` components no longer _require_ a user-provided `id` prop and will also fall back to using `useId` when none is provided. -* `PanelGroup` component now sets `position: relative` style by default, as well as an explicit `height` and `width` style. + +- [#18](https://github.com/bvaughn/react-resizable-panels/issues/18): Support server-side rendering (e.g. Next JS) by using `useId` (when available). `Panel` components no longer _require_ a user-provided `id` prop and will also fall back to using `useId` when none is provided. +- `PanelGroup` component now sets `position: relative` style by default, as well as an explicit `height` and `width` style. ## 0.0.12 -* Bug fix: [#19](https://github.com/bvaughn/react-resizable-panels/issues/19): Fix initial "jump" that could occur when dragging started. -* Bug fix: [#20](https://github.com/bvaughn/react-resizable-panels/issues/20): Stop resize/drag operation on "contextmenu" event. -* Bug fix: [#21](https://github.com/bvaughn/react-resizable-panels/issues/21): Disable text selection while dragging active (Firefox only) + +- Bug fix: [#19](https://github.com/bvaughn/react-resizable-panels/issues/19): Fix initial "jump" that could occur when dragging started. +- Bug fix: [#20](https://github.com/bvaughn/react-resizable-panels/issues/20): Stop resize/drag operation on "contextmenu" event. +- Bug fix: [#21](https://github.com/bvaughn/react-resizable-panels/issues/21): Disable text selection while dragging active (Firefox only) ## 0.0.11 -* Drag UX change: Reversing drag after dragging past the min/max size of a panel will no longer have an effect until the pointer overlaps with the resize handle. (Thanks @davidkpiano for the suggestion!) -* Bug fix: Resize handles are no longer left in a "focused" state after a touch/mouse event. + +- Drag UX change: Reversing drag after dragging past the min/max size of a panel will no longer have an effect until the pointer overlaps with the resize handle. (Thanks @davidkpiano for the suggestion!) +- Bug fix: Resize handles are no longer left in a "focused" state after a touch/mouse event. ## 0.0.10 -* Corrupt build artifact. Don't use this version. + +- Corrupt build artifact. Don't use this version. ## 0.0.9 -* [#13](https://github.com/bvaughn/react-resizable-panels/issues/13): `PanelResizeHandle` should declare "separator" role and implement the recommended ["Window Splitter" pattern](https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/) + +- [#13](https://github.com/bvaughn/react-resizable-panels/issues/13): `PanelResizeHandle` should declare "separator" role and implement the recommended ["Window Splitter" pattern](https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter/) ## 0.0.8 -* [#7](https://github.com/bvaughn/react-resizable-panels/issues/7): Support "touch" events for mobile compatibility. + +- [#7](https://github.com/bvaughn/react-resizable-panels/issues/7): Support "touch" events for mobile compatibility. ## 0.0.7 -* Add `PanelContext` with `activeHandleId` property identifying the resize handle currently being dragged (or `null`). This enables more customized UI/UX when resizing is in progress. + +- Add `PanelContext` with `activeHandleId` property identifying the resize handle currently being dragged (or `null`). This enables more customized UI/UX when resizing is in progress. + ## 0.0.6 -* [#5](https://github.com/bvaughn/react-resizable-panels/issues/5): Removed `panelBefore` and `panelAfter` props from `PanelResizeHandle`. `PanelGroup` now infers this based on position within the group. + +- [#5](https://github.com/bvaughn/react-resizable-panels/issues/5): Removed `panelBefore` and `panelAfter` props from `PanelResizeHandle`. `PanelGroup` now infers this based on position within the group. + ## 0.0.5 -* TypeScript props type fix for `PanelGroup`'s `children` prop. + +- TypeScript props type fix for `PanelGroup`'s `children` prop. ## 0.0.4 -* [#8](https://github.com/bvaughn/react-resizable-panels/issues/8): Added optional `order` prop to `Panel` to improve conditional rendering. + +- [#8](https://github.com/bvaughn/react-resizable-panels/issues/8): Added optional `order` prop to `Panel` to improve conditional rendering. ## 0.0.3 -* [#3](https://github.com/bvaughn/react-resizable-panels/issues/3): `Panel`s can be conditionally rendered within a group. `PanelGroup` will persist separate layouts for each combination of visible panels. + +- [#3](https://github.com/bvaughn/react-resizable-panels/issues/3): `Panel`s can be conditionally rendered within a group. `PanelGroup` will persist separate layouts for each combination of visible panels. ## 0.0.2 -* Documentation-only update. + +- Documentation-only update. ## 0.0.1 -* Initial release. + +- Initial release. diff --git a/packages/pastebar-app-ui/src/components/libs/react-resizable-panels/README.md b/packages/pastebar-app-ui/src/components/libs/react-resizable-panels/README.md index d54576fa..7c04144a 100644 --- a/packages/pastebar-app-ui/src/components/libs/react-resizable-panels/README.md +++ b/packages/pastebar-app-ui/src/components/libs/react-resizable-panels/README.md @@ -1,10 +1,11 @@ # react-resizable-panels + React components for resizable panel groups/layouts ```jsx -import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels"; +import { Panel, PanelGroup, PanelResizeHandle } from 'react-resizable-panels' - +; @@ -24,68 +25,73 @@ import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels"; ## Props ### `PanelGroup` -| prop | type | description -| :--------------------------------- | :--------------------------- | :--- -| `autoSaveId` | `?string` | Unique id used to auto-save group arrangement via `localStorage` -| `children` | `ReactNode` | Arbitrary React element(s) -| `className` | `?string` | Class name to attach to root element -| `direction` | `"horizontal" \| "vertical"` | Group orientation -| `disablePointerEventsDuringResize` | `?boolean = false` | Disable pointer events inside `Panel`s during resize 2 -| `id` | `?string` | Group id; falls back to `useId` when not provided -| `onLayout` | `?(sizes: number[]) => void` | Called when group layout changes -| `storage` | `?PanelGroupStorage` | Custom storage API; defaults to `localStorage` 1 -| `style` | `?CSSProperties` | CSS style to attach to root element -| `tagName` | `?string = "div"` | HTML element tag name for root element + +| prop | type | description | +| :--------------------------------- | :--------------------------- | :---------------------------------------------------------------- | +| `autoSaveId` | `?string` | Unique id used to auto-save group arrangement via `localStorage` | +| `children` | `ReactNode` | Arbitrary React element(s) | +| `className` | `?string` | Class name to attach to root element | +| `direction` | `"horizontal" \| "vertical"` | Group orientation | +| `disablePointerEventsDuringResize` | `?boolean = false` | Disable pointer events inside `Panel`s during resize 2 | +| `id` | `?string` | Group id; falls back to `useId` when not provided | +| `onLayout` | `?(sizes: number[]) => void` | Called when group layout changes | +| `storage` | `?PanelGroupStorage` | Custom storage API; defaults to `localStorage` 1 | +| `style` | `?CSSProperties` | CSS style to attach to root element | +| `tagName` | `?string = "div"` | HTML element tag name for root element | 1: Storage API must define the following _synchronous_ methods: -* `getItem: (name:string) => string` -* `setItem: (name: string, value: string) => void` - 2: This behavior is disabled by default because it can interfere with scrollbar styles, but it can be useful in the edge case where a `Panel` contains an ` {!ready && !placeholderDisabled && placeholder}
- ); -}; + ) +} diff --git a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/PinterestEmbed.tsx b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/PinterestEmbed.tsx index fc0b419c..83091b85 100644 --- a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/PinterestEmbed.tsx +++ b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/PinterestEmbed.tsx @@ -1,26 +1,27 @@ -import classNames from 'classnames'; -import * as React from 'react'; -import { DivProps } from 'react-html-props'; -import { PlaceholderEmbed, PlaceholderEmbedProps } from '../placeholder/PlaceholderEmbed'; -import { EmbedStyle } from './EmbedStyle'; +import * as React from 'react' +import classNames from 'classnames' +import { DivProps } from 'react-html-props' -const minPlaceholderWidth = 250; -const maxPlaceholderWidth = 550; -const defaultPlaceholderHeight = 550; -const borderRadius = 8; +import { PlaceholderEmbed, PlaceholderEmbedProps } from '../placeholder/PlaceholderEmbed' +import { EmbedStyle } from './EmbedStyle' + +const minPlaceholderWidth = 250 +const maxPlaceholderWidth = 550 +const defaultPlaceholderHeight = 550 +const borderRadius = 8 export interface PinterestEmbedProps extends DivProps { - url: string; - postUrl?: string; - width?: string | number; - height?: string | number; - linkText?: string; - placeholderImageUrl?: string; - placeholderSpinner?: React.ReactNode; - placeholderSpinnerDisabled?: boolean; - placeholderProps?: PlaceholderEmbedProps; - embedPlaceholder?: React.ReactNode; - placeholderDisabled?: boolean; + url: string + postUrl?: string + width?: string | number + height?: string | number + linkText?: string + placeholderImageUrl?: string + placeholderSpinner?: React.ReactNode + placeholderSpinnerDisabled?: boolean + placeholderProps?: PlaceholderEmbedProps + embedPlaceholder?: React.ReactNode + placeholderDisabled?: boolean } export const PinterestEmbed = ({ @@ -37,7 +38,7 @@ export const PinterestEmbed = ({ placeholderDisabled = false, ...divProps }: PinterestEmbedProps) => { - const [ready, setReady] = React.useState(false); + const [ready, setReady] = React.useState(false) // === Placeholder === const placeholderStyle: React.CSSProperties = { @@ -47,12 +48,13 @@ export const PinterestEmbed = ({ height: typeof height !== 'undefined' ? height - : typeof divProps.style?.height !== 'undefined' || typeof divProps.style?.maxHeight !== 'undefined' + : typeof divProps.style?.height !== 'undefined' || + typeof divProps.style?.maxHeight !== 'undefined' ? '100%' : defaultPlaceholderHeight, border: 'solid 1px rgba(0, 0, 0, 0.15)', borderRadius, - }; + } const placeholder = embedPlaceholder ?? ( - ); + ) // Example URL: https://www.pinterest.com/pin/875105771321194304/sent/?invite_code=e86262c989ee4f559a08a4494c300ba3&sfo=1 - const postIdMatch = url.match(/pin\/([\w\d_-]+)/)?.[1]; - const postId = postIdMatch ?? '000000000000000000'; + const postIdMatch = url.match(/pin\/([\w\d_-]+)/)?.[1] + const postId = postIdMatch ?? '000000000000000000' return (
{!ready && !placeholderDisabled && placeholder}
- ); -}; + ) +} diff --git a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/TikTokEmbed.tsx b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/TikTokEmbed.tsx index a692c883..c539698d 100644 --- a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/TikTokEmbed.tsx +++ b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/TikTokEmbed.tsx @@ -1,40 +1,41 @@ -import classNames from 'classnames'; -import React from 'react'; -import { DivProps } from 'react-html-props'; -import { Subs } from 'react-sub-unsub'; -import { useFrame, Frame } from '../hooks/useFrame'; -import { PlaceholderEmbed, PlaceholderEmbedProps } from '../placeholder/PlaceholderEmbed'; -import { generateUUID } from '../uuid'; -import { EmbedStyle } from './EmbedStyle'; +import React from 'react' +import classNames from 'classnames' +import { DivProps } from 'react-html-props' +import { Subs } from 'react-sub-unsub' -const embedJsScriptSrc = 'https://www.tiktok.com/embed.js'; -const minPlaceholderWidth = 325; -const maxPlaceholderWidth = 480; -const defaultPlaceholderHeight = 550; -const borderRadius = 8; +import { Frame, useFrame } from '../hooks/useFrame' +import { PlaceholderEmbed, PlaceholderEmbedProps } from '../placeholder/PlaceholderEmbed' +import { generateUUID } from '../uuid' +import { EmbedStyle } from './EmbedStyle' + +const embedJsScriptSrc = 'https://www.tiktok.com/embed.js' +const minPlaceholderWidth = 325 +const maxPlaceholderWidth = 480 +const defaultPlaceholderHeight = 550 +const borderRadius = 8 // Embed Stages -const PROCESS_EMBED_STAGE = 'process-embed'; -const CONFIRM_EMBED_SUCCESS_STAGE = 'confirm-embed-success'; -const RETRYING_STAGE = 'retrying'; -const EMBED_SUCCESS_STAGE = 'embed-success'; +const PROCESS_EMBED_STAGE = 'process-embed' +const CONFIRM_EMBED_SUCCESS_STAGE = 'confirm-embed-success' +const RETRYING_STAGE = 'retrying' +const EMBED_SUCCESS_STAGE = 'embed-success' export interface TikTokEmbedProps extends DivProps { - url: string; - width?: string | number; - height?: string | number; - linkText?: string; - placeholderImageUrl?: string; - placeholderSpinner?: React.ReactNode; - placeholderSpinnerDisabled?: boolean; - placeholderProps?: PlaceholderEmbedProps; - embedPlaceholder?: React.ReactNode; - placeholderDisabled?: boolean; - scriptLoadDisabled?: boolean; - retryDelay?: number; - retryDisabled?: boolean; - frame?: Frame; - debug?: boolean; + url: string + width?: string | number + height?: string | number + linkText?: string + placeholderImageUrl?: string + placeholderSpinner?: React.ReactNode + placeholderSpinnerDisabled?: boolean + placeholderProps?: PlaceholderEmbedProps + embedPlaceholder?: React.ReactNode + placeholderDisabled?: boolean + scriptLoadDisabled?: boolean + retryDelay?: number + retryDisabled?: boolean + frame?: Frame + debug?: boolean } export const TikTokEmbed = ({ @@ -55,16 +56,19 @@ export const TikTokEmbed = ({ debug = false, ...divProps }: TikTokEmbedProps): JSX.Element => { - const [stage, setStage] = React.useState(PROCESS_EMBED_STAGE); - const uuidRef = React.useRef(generateUUID()); - const [processTime, setProcessTime] = React.useState(Date.now()); - const embedContainerKey = React.useMemo(() => `${uuidRef.current}-${processTime}`, [processTime]); - const frm = useFrame(frame); + const [stage, setStage] = React.useState(PROCESS_EMBED_STAGE) + const uuidRef = React.useRef(generateUUID()) + const [processTime, setProcessTime] = React.useState(Date.now()) + const embedContainerKey = React.useMemo( + () => `${uuidRef.current}-${processTime}`, + [processTime] + ) + const frm = useFrame(frame) // Debug Output React.useEffect(() => { - debug && console.log(`[${new Date().toISOString()}]: ${stage}`); - }, [debug, stage]); + debug && console.log(`[${new Date().toISOString()}]: ${stage}`) + }, [debug, stage]) // === === === === === === === === === === === === === === === === === === === // Embed Stages @@ -74,55 +78,55 @@ export const TikTokEmbed = ({ React.useEffect(() => { if (stage === PROCESS_EMBED_STAGE) { if (frm.document && !scriptLoadDisabled) { - const scriptId = `tiktok-embed-script`; - const prevScript = frm.document.getElementById(scriptId); + const scriptId = `tiktok-embed-script` + const prevScript = frm.document.getElementById(scriptId) if (prevScript) { - prevScript.remove(); + prevScript.remove() } - const scriptElement = frm.document.createElement('script'); - scriptElement.setAttribute('src', `${embedJsScriptSrc}?t=${Date.now()}`); - scriptElement.setAttribute('id', scriptId); - frm.document.head.appendChild(scriptElement); - setStage(CONFIRM_EMBED_SUCCESS_STAGE); + const scriptElement = frm.document.createElement('script') + scriptElement.setAttribute('src', `${embedJsScriptSrc}?t=${Date.now()}`) + scriptElement.setAttribute('id', scriptId) + frm.document.head.appendChild(scriptElement) + setStage(CONFIRM_EMBED_SUCCESS_STAGE) } } - }, [scriptLoadDisabled, stage, frm.document]); + }, [scriptLoadDisabled, stage, frm.document]) // Confirm Embed Success Stage React.useEffect(() => { - const subs = new Subs(); + const subs = new Subs() if (stage === CONFIRM_EMBED_SUCCESS_STAGE) { subs.setInterval(() => { if (frm.document) { - const preEmbedElement = frm.document.getElementById(uuidRef.current); + const preEmbedElement = frm.document.getElementById(uuidRef.current) if (!preEmbedElement) { - setStage(EMBED_SUCCESS_STAGE); + setStage(EMBED_SUCCESS_STAGE) } } - }, 1); + }, 1) if (!retryDisabled) { subs.setTimeout(() => { - setStage(RETRYING_STAGE); - }, retryDelay); + setStage(RETRYING_STAGE) + }, retryDelay) } } - return subs.createCleanup(); - }, [retryDelay, retryDisabled, stage, frm.document]); + return subs.createCleanup() + }, [retryDelay, retryDisabled, stage, frm.document]) // Retrying Stage React.useEffect(() => { if (stage === RETRYING_STAGE) { // This forces the embed container to remount - setProcessTime(Date.now()); - setStage(PROCESS_EMBED_STAGE); + setProcessTime(Date.now()) + setStage(PROCESS_EMBED_STAGE) } - }, [stage]); + }, [stage]) // END Embed Stages // === === === === === === === === === === === === === === === === === === === // Format: https://www.tiktok.com/@epicgardening/video/7055411162212633903?is_copy_url=1&is_from_webapp=v1 - const embedId = url.replace(/[?].*$/, '').replace(/^.+\//, ''); + const embedId = url.replace(/[?].*$/, '').replace(/^.+\//, '') // === Placeholder === const placeholderStyle: React.CSSProperties = { @@ -132,12 +136,13 @@ export const TikTokEmbed = ({ height: typeof height !== 'undefined' ? height - : typeof divProps.style?.height !== 'undefined' || typeof divProps.style?.maxHeight !== 'undefined' + : typeof divProps.style?.height !== 'undefined' || + typeof divProps.style?.maxHeight !== 'undefined' ? '100%' : defaultPlaceholderHeight, border: 'solid 1px rgba(22,24,35,0.12)', borderRadius, - }; + } const placeholder = embedPlaceholder ?? ( - ); + ) // === END Placeholder === return ( @@ -165,9 +170,17 @@ export const TikTokEmbed = ({ >
-
+
{!placeholderDisabled ? ( -
+
{placeholder}
) : ( @@ -178,5 +191,5 @@ export const TikTokEmbed = ({
- ); -}; + ) +} diff --git a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/TwitterEmbed.tsx b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/TwitterEmbed.tsx index 70e347fd..bcb29d20 100644 --- a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/TwitterEmbed.tsx +++ b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/TwitterEmbed.tsx @@ -1,4 +1,4 @@ -import { XEmbed, XEmbedProps } from './XEmbed'; +import { XEmbed, XEmbedProps } from './XEmbed' /** * @deprecated Twitter was rebranded to the name X in July 2023. Use `XEmbedProps` instead. @@ -7,4 +7,4 @@ export interface TwitterEmbedProps extends XEmbedProps {} /** * @deprecated Twitter was rebranded to the name X in July 2023. Use `XEmbed` instead. */ -export const TwitterEmbed = XEmbed; +export const TwitterEmbed = XEmbed diff --git a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/YouTubeEmbed.tsx b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/YouTubeEmbed.tsx index 015ca627..bdc8fcb1 100644 --- a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/YouTubeEmbed.tsx +++ b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/embeds/YouTubeEmbed.tsx @@ -1,27 +1,28 @@ -import classNames from 'classnames'; -import * as React from 'react'; -import { DivPropsWithoutRef } from 'react-html-props'; -import YouTube, { YouTubeProps } from 'react-youtube'; -import { Options } from 'youtube-player/dist/types'; -import { PlaceholderEmbed, PlaceholderEmbedProps } from '../placeholder/PlaceholderEmbed'; -import { EmbedStyle } from './EmbedStyle'; +import * as React from 'react' +import classNames from 'classnames' +import { DivPropsWithoutRef } from 'react-html-props' +import YouTube, { YouTubeProps } from 'react-youtube' +import { Options } from 'youtube-player/dist/types' -const maxPlaceholderWidth = 640; -const defaultPlaceholderHeight = 360; -const borderRadius = 0; +import { PlaceholderEmbed, PlaceholderEmbedProps } from '../placeholder/PlaceholderEmbed' +import { EmbedStyle } from './EmbedStyle' + +const maxPlaceholderWidth = 640 +const defaultPlaceholderHeight = 360 +const borderRadius = 0 export interface YouTubeEmbedProps extends DivPropsWithoutRef { - url: string; - width?: string | number; - height?: string | number; - linkText?: string; - placeholderImageUrl?: string; - placeholderSpinner?: React.ReactNode; - placeholderSpinnerDisabled?: boolean; - placeholderProps?: PlaceholderEmbedProps; - embedPlaceholder?: React.ReactNode; - placeholderDisabled?: boolean; - youTubeProps?: YouTubeProps; + url: string + width?: string | number + height?: string | number + linkText?: string + placeholderImageUrl?: string + placeholderSpinner?: React.ReactNode + placeholderSpinnerDisabled?: boolean + placeholderProps?: PlaceholderEmbedProps + embedPlaceholder?: React.ReactNode + placeholderDisabled?: boolean + youTubeProps?: YouTubeProps } export const YouTubeEmbed = ({ @@ -38,29 +39,34 @@ export const YouTubeEmbed = ({ youTubeProps, ...divProps }: YouTubeEmbedProps) => { - const [ready, setReady] = React.useState(false); + const [ready, setReady] = React.useState(false) - const videoIdMatch = url.match(/[?&]v=(.+?)(?:$|[&?])/)?.[1]; - const shortsIdMatch = url.match(/https:\/\/(?:www\.)?youtube\.com\/shorts\/(.+?)(?:$|[&?])/)?.[1]; - const shortLinkMatch = url.match(/https:\/\/youtu\.be\/(.+?)(?:$|[&?])/)?.[1]; - const embedLinkMatch = url.match(/https:\/\/(?:www\.)youtube(-nocookie)?\.com\/embed\/(.+?)(?:$|[&?])/)?.[2]; - const videoId = videoIdMatch ?? shortsIdMatch ?? shortLinkMatch ?? embedLinkMatch ?? '00000000'; - const start = +(url.match(/(.+?)(?:$|[&?])start=(\d+)/)?.[2] ?? 0); + const videoIdMatch = url.match(/[?&]v=(.+?)(?:$|[&?])/)?.[1] + const shortsIdMatch = url.match( + /https:\/\/(?:www\.)?youtube\.com\/shorts\/(.+?)(?:$|[&?])/ + )?.[1] + const shortLinkMatch = url.match(/https:\/\/youtu\.be\/(.+?)(?:$|[&?])/)?.[1] + const embedLinkMatch = url.match( + /https:\/\/(?:www\.)youtube(-nocookie)?\.com\/embed\/(.+?)(?:$|[&?])/ + )?.[2] + const videoId = + videoIdMatch ?? shortsIdMatch ?? shortLinkMatch ?? embedLinkMatch ?? '00000000' + const start = +(url.match(/(.+?)(?:$|[&?])start=(\d+)/)?.[2] ?? 0) - const isPercentageWidth = !!width?.toString().includes('%'); - const isPercentageHeight = !!height?.toString().includes('%'); + const isPercentageWidth = !!width?.toString().includes('%') + const isPercentageHeight = !!height?.toString().includes('%') - let opts: Options = {}; + let opts: Options = {} if (!!start) { - opts.playerVars = { start }; + opts.playerVars = { start } } if (typeof width !== 'undefined') { - opts.width = isPercentageWidth ? '100%' : `${width}`; + opts.width = isPercentageWidth ? '100%' : `${width}` } if (typeof height !== 'undefined') { - opts.height = isPercentageHeight ? '100%' : `${height}`; + opts.height = isPercentageHeight ? '100%' : `${height}` } - opts = { ...opts, ...youTubeProps?.opts }; + opts = { ...opts, ...youTubeProps?.opts } // === Placeholder === const placeholderStyle: React.CSSProperties = { @@ -70,12 +76,13 @@ export const YouTubeEmbed = ({ ? '100%' : typeof height !== 'undefined' ? height - : typeof divProps.style?.height !== 'undefined' || typeof divProps.style?.maxHeight !== 'undefined' + : typeof divProps.style?.height !== 'undefined' || + typeof divProps.style?.maxHeight !== 'undefined' ? '100%' : defaultPlaceholderHeight, border: '1px solid #dee2e6', borderRadius, - }; + } const placeholder = embedPlaceholder ?? ( - ); + ) // === END Placeholder === return ( @@ -108,15 +115,15 @@ export const YouTubeEmbed = ({ className={youTubeProps?.className ?? 'youtube-iframe'} videoId={youTubeProps?.videoId ?? videoId} opts={opts} - onReady={(e) => { - setReady(true); + onReady={e => { + setReady(true) if (youTubeProps && youTubeProps.onReady) { - youTubeProps?.onReady(e); + youTubeProps?.onReady(e) } }} />
{!ready && !placeholderDisabled && placeholder} - ); -}; + ) +} diff --git a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/hooks/useFrame.ts b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/hooks/useFrame.ts index ffa673e3..d2501fe6 100644 --- a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/hooks/useFrame.ts +++ b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/hooks/useFrame.ts @@ -1,12 +1,12 @@ -import React from 'react'; +import React from 'react' /** * Specifies a frame's [browser APIs](https://developer.mozilla.org/en-US/docs/Web/API), * such as `window` and `document`. */ export interface Frame { - window?: Window; - document?: Document; + window?: Window + document?: Document } /** @@ -21,11 +21,11 @@ export interface Frame { export const useFrame = (frame?: Frame) => { return React.useMemo(() => { if (frame) { - return frame; + return frame } return { document: typeof document !== 'undefined' ? document : undefined, window: typeof window !== 'undefined' ? window : undefined, - }; - }, [frame]); -}; + } + }, [frame]) +} diff --git a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/BorderSpinner.tsx b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/BorderSpinner.tsx index 81b14722..c3bb20ce 100644 --- a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/BorderSpinner.tsx +++ b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/BorderSpinner.tsx @@ -1,6 +1,6 @@ -import classNames from 'classnames'; -import React from 'react'; -import { DivProps } from 'react-html-props'; +import React from 'react' +import classNames from 'classnames' +import { DivProps } from 'react-html-props' export interface BorderSpinnerProps extends DivProps {} @@ -31,5 +31,5 @@ export const BorderSpinner = ({ ...divProps }: BorderSpinnerProps) => { style={{ width: 10, height: 10, ...divProps.style }} /> - ); -}; + ) +} diff --git a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/CaptionPlaceholder.tsx b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/CaptionPlaceholder.tsx index 2b784d1c..77026258 100644 --- a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/CaptionPlaceholder.tsx +++ b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/CaptionPlaceholder.tsx @@ -1,12 +1,16 @@ -import classNames from 'classnames'; -import React from 'react'; -import { DivProps } from 'react-html-props'; +import React from 'react' +import classNames from 'classnames' +import { DivProps } from 'react-html-props' export interface CaptionPlaceholderProps extends DivProps {} export const CaptionPlaceholder = ({ ...divProps }: CaptionPlaceholderProps) => { return ( -
+
width: '224px', }} /> -
+
- ); -}; + ) +} diff --git a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/EngagementIconsPlaceholder.tsx b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/EngagementIconsPlaceholder.tsx index a2c2ebaa..faa3e2bd 100644 --- a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/EngagementIconsPlaceholder.tsx +++ b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/EngagementIconsPlaceholder.tsx @@ -1,10 +1,12 @@ -import classNames from 'classnames'; -import React from 'react'; -import { DivProps } from 'react-html-props'; +import React from 'react' +import classNames from 'classnames' +import { DivProps } from 'react-html-props' export interface EngagementIconsPlaceholderProps extends DivProps {} -export const EngagementIconsPlaceholder = ({ ...divProps }: EngagementIconsPlaceholderProps) => { +export const EngagementIconsPlaceholder = ({ + ...divProps +}: EngagementIconsPlaceholderProps) => { return (
- ); -}; + ) +} export const HeartIcon = (props: DivProps) => { return ( @@ -51,8 +53,8 @@ export const HeartIcon = (props: DivProps) => { }} />
- ); -}; + ) +} export const ChatBubbleIcon = (props: DivProps) => { return ( @@ -76,8 +78,8 @@ export const ChatBubbleIcon = (props: DivProps) => { }} />
- ); -}; + ) +} export const ShareArrowIcon = (props: DivProps) => { return ( @@ -111,5 +113,5 @@ c59.905-109.171,178.724-165.463,295.204-151.033v145.035L512,253z" />
- ); -}; + ) +} diff --git a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/FooterLinkText.tsx b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/FooterLinkText.tsx index 357dd3a4..e03a09b3 100644 --- a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/FooterLinkText.tsx +++ b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/FooterLinkText.tsx @@ -1,6 +1,6 @@ -import classNames from 'classnames'; -import React from 'react'; -import { DivProps } from 'react-html-props'; +import React from 'react' +import classNames from 'classnames' +import { DivProps } from 'react-html-props' export interface FooterLinkTextProps extends DivProps {} @@ -21,5 +21,5 @@ export const FooterLinkText = ({ ...divProps }: FooterLinkTextProps) => { > {divProps.children} - ); -}; + ) +} diff --git a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/FooterPlaceholder.tsx b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/FooterPlaceholder.tsx index 787fe9e3..cc14e517 100644 --- a/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/FooterPlaceholder.tsx +++ b/packages/pastebar-app-ui/src/components/libs/social-media-embed/components/placeholder/parts/FooterPlaceholder.tsx @@ -1,6 +1,6 @@ -import classNames from 'classnames'; -import React from 'react'; -import { DivProps } from 'react-html-props'; +import React from 'react' +import classNames from 'classnames' +import { DivProps } from 'react-html-props' export interface PlaceholderFooterProps extends DivProps {} @@ -13,5 +13,5 @@ export const PlaceholderFooter = ({ ...divProps }: PlaceholderFooterProps) => { > {divProps.children} - ); -}; + ) +} diff --git a/packages/pastebar-app-ui/src/components/libs/split-view/docs/index.md b/packages/pastebar-app-ui/src/components/libs/split-view/docs/index.md index 2e3626e1..5b2fce72 100644 --- a/packages/pastebar-app-ui/src/components/libs/split-view/docs/index.md +++ b/packages/pastebar-app-ui/src/components/libs/split-view/docs/index.md @@ -1,7 +1,6 @@ --- title: SplitView -description: - A split view is two sections or "panes", including a moveable separator +description: A split view is two sections or "panes", including a moveable separator between them that allows users to change the relative size of the panes. category: Layout --- @@ -9,12 +8,7 @@ category: Layout ## Example ```jsx {% live=true %} - + Primary @@ -33,12 +27,7 @@ the pane. In this context, primary indicates which pane the resize handle controls, while the secondary pane fills the remaining space. ```jsx {% live=true %} - + Secondary diff --git a/packages/pastebar-app-ui/src/components/libs/split-view/storage.ts b/packages/pastebar-app-ui/src/components/libs/split-view/storage.ts index 24758cea..ee17ae4a 100644 --- a/packages/pastebar-app-ui/src/components/libs/split-view/storage.ts +++ b/packages/pastebar-app-ui/src/components/libs/split-view/storage.ts @@ -1,5 +1,5 @@ // Credit: https://github.com/bvaughn/react-resizable-panels/blob/main/packages/react-resizable-panels/src/PanelGroup.ts -import { SplitViewStorage } from './types'; +import { SplitViewStorage } from './types' // SplitView might be rendering in a server-side environment where // `localStorage` is not available or on a browser with cookies/storage @@ -10,29 +10,29 @@ function initializeDefaultStorage(storageObject: SplitViewStorage) { if (typeof localStorage !== 'undefined') { // Bypass this check for future calls storageObject.getItem = (name: string) => { - return localStorage.getItem(name); - }; + return localStorage.getItem(name) + } storageObject.setItem = (name: string, value: string) => { - localStorage.setItem(name, value); - }; + localStorage.setItem(name, value) + } } else { - throw new Error('localStorage not supported in this environment'); + throw new Error('localStorage not supported in this environment') } } catch (error) { - console.error(error); + console.error(error) - storageObject.getItem = () => null; - storageObject.setItem = () => {}; + storageObject.getItem = () => null + storageObject.setItem = () => {} } } export const defaultStorage: SplitViewStorage = { getItem: (name: string) => { - initializeDefaultStorage(defaultStorage); - return defaultStorage.getItem(name); + initializeDefaultStorage(defaultStorage) + return defaultStorage.getItem(name) }, setItem: (name: string, value: string) => { - initializeDefaultStorage(defaultStorage); - defaultStorage.setItem(name, value); + initializeDefaultStorage(defaultStorage) + defaultStorage.setItem(name, value) }, -}; +} diff --git a/packages/pastebar-app-ui/src/components/molecules/select/next-select/components/containers.tsx b/packages/pastebar-app-ui/src/components/molecules/select/next-select/components/containers.tsx index e5e0fa75..da5cce18 100644 --- a/packages/pastebar-app-ui/src/components/molecules/select/next-select/components/containers.tsx +++ b/packages/pastebar-app-ui/src/components/molecules/select/next-select/components/containers.tsx @@ -1,12 +1,13 @@ -import clsx from "clsx" -import React, { ComponentPropsWithRef, forwardRef } from "react" +import React, { ComponentPropsWithRef, forwardRef } from 'react' +import clsx from 'clsx' import { ContainerProps, GroupBase, IndicatorsContainerProps, ValueContainerProps, -} from "react-select" -import InputError from "../../../../atoms/input-error" +} from 'react-select' + +import InputError from '../../../../atoms/input-error' type AdjacentContainerProps = { label?: string @@ -16,30 +17,17 @@ type AdjacentContainerProps = { name?: string errors?: Record children?: React.ReactNode -} & ComponentPropsWithRef<"div"> +} & ComponentPropsWithRef<'div'> -export const AdjacentContainer = forwardRef< - HTMLDivElement, - AdjacentContainerProps ->( +export const AdjacentContainer = forwardRef( ( - { - label, - helperText, - required, - errors, - name, - children, - }: AdjacentContainerProps, + { label, helperText, required, errors, name, children }: AdjacentContainerProps, ref ) => { return (
{label && ( -