MIT License Copyright (c) 2023 TheoryOfNekomata <allan.crisostomo@outlook.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
packages/web-kitchensink-reactnext/src/categories/blob/react/components/FileSelectBox/index.tsx → categories/blob/react/src/components/FileSelectBox/index.tsxZobrazit soubor
@@ -1,27 +1,20 @@
import * as React from 'react';
import {ContentType, FileWithResolvedContentType, getContentType, getMimeTypeDescription} from '@/utils/blob';
import {formatFileSize} from '@/utils/numeral';
import {AudioFilePreview} from '../AudioFilePreview';
import {BinaryFilePreview} from '../BinaryFilePreview';
import {ImageFilePreview} from '../ImageFilePreview';
import {VideoFilePreview} from '../VideoFilePreview';
import {TextFilePreview} from '../TextFilePreview';
import {AudioMiniFilePreview} from '../AudioMiniFilePreview';
import {delegateTriggerEvent, useClientSide} from '@modal-sh/react-utils';
import { delegateTriggerEvent, useClientSide } from '@modal-sh/react-utils';
import clsx from 'clsx';
import {FilePreviewComponent} from '@/categories/blob/react/common';
MIT License Copyright (c) 2023 TheoryOfNekomata <allan.crisostomo@outlook.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License Copyright (c) 2023 TheoryOfNekomata <allan.crisostomo@outlook.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
packages/web-kitchensink-reactnext/src/categories/blob/react/components/AudioFilePreview/index.tsx → packages/react-blob-previews/src/components/AudioFilePreview/index.tsxZobrazit soubor
@@ -1,21 +1,21 @@
import * as React from 'react';
import {augmentAudioFile, getMimeTypeDescription} from '@/utils/blob';
import {augmentAudioFile, getMimeTypeDescription} from 'packages/web-kitchensink-reactnext/src/utils/blob';
import {
formatFileSize,
formatNumeral,
formatSecondsDurationConcise,
formatSecondsDurationPrecise,
} from '@/utils/numeral';
import theme from '@/styles/theme';
} from 'packages/web-kitchensink-reactnext/src/utils/numeral';
import theme from 'packages/web-kitchensink-reactnext/src/styles/theme';
import {useMediaControls} from '../../hooks/interactive';
import {useFileMetadata, useFileUrl} from '@/categories/blob/react';
import {useFileMetadata, useFileUrl} from 'src/index';
import clsx from 'clsx';
import {SpectrogramCanvas, WaveformCanvas} from '@modal-sh/react-wavesurfer';
import {Slider} from '@tesseract-design/web-number-react';
import {KeyValueTable} from '@tesseract-design/web-information-react';
import {useClientSide} from '@modal-sh/react-utils';
import {CommonPreviewProps} from '@/categories/blob/react/common';
import {SpectrogramCanvas, WaveformCanvas} from 'packages/web-kitchensink-reactnext/src/packages/react-wavesurfer';
import {Slider} from 'categories/number/react';
import {KeyValueTable} from 'categories/information/react';
import {useClientSide} from 'packages/react-utils';
import type {CommonPreviewProps} from '../../../../../categories/blob/react/src/components/FileSelectBox';
export type AudioFilePreviewDerivedElement = HTMLAudioElement;
packages/web-kitchensink-reactnext/src/categories/blob/react/components/AudioMiniFilePreview/index.tsx → packages/react-blob-previews/src/components/AudioMiniFilePreview/index.tsxZobrazit soubor
@@ -1,11 +1,11 @@
import * as React from 'react';
import {augmentAudioFile} from '@/utils/blob';
import theme from '@/styles/theme';
import {augmentAudioFile} from 'packages/web-kitchensink-reactnext/src/utils/blob';
import theme from 'packages/web-kitchensink-reactnext/src/styles/theme';
import {useMediaControls} from '../../hooks/interactive';
import {useFileMetadata, useFileUrl} from '@/categories/blob/react';
import {useFileMetadata, useFileUrl} from 'src/index';
import clsx from 'clsx';
import {SpectrogramCanvas, WaveformCanvas} from '@modal-sh/react-wavesurfer';
import {useClientSide} from '@modal-sh/react-utils';
import {SpectrogramCanvas, WaveformCanvas} from 'packages/web-kitchensink-reactnext/src/packages/react-wavesurfer';
import {useClientSide} from 'packages/react-utils';
export type AudioMiniFilePreviewDerivedElement = HTMLAudioElement;
packages/web-kitchensink-reactnext/src/categories/blob/react/components/BinaryFilePreview/index.tsx → packages/react-blob-previews/src/components/BinaryFilePreview/index.tsxZobrazit soubor
@@ -1,12 +1,12 @@
import * as React from 'react';
import {augmentBinaryFile, getMimeTypeDescription} from '@/utils/blob';
import {formatFileSize, formatNumeral} from '@/utils/numeral';
import {useFileMetadata, useFileUrl} from '@/categories/blob/react';
import {augmentBinaryFile, getMimeTypeDescription} from 'packages/web-kitchensink-reactnext/src/utils/blob';
import {formatFileSize, formatNumeral} from 'packages/web-kitchensink-reactnext/src/utils/numeral';
import {useFileMetadata, useFileUrl} from 'src/index';
import clsx from 'clsx';
import {KeyValueTable} from '@tesseract-design/web-information-react';
import {BinaryDataCanvas} from '@modal-sh/react-binary-data-canvas';
import {useClientSide} from '@modal-sh/react-utils';
import {CommonPreviewProps} from '@/categories/blob/react/common';
import {KeyValueTable} from 'categories/information/react';
import {BinaryDataCanvas} from 'packages/react-binary-data-canvas';
import {useClientSide} from 'packages/react-utils';
import type {CommonPreviewProps} from '../../../../../categories/blob/react/src/components/FileSelectBox';
export type BinaryFilePreviewDerivedElement = HTMLDivElement;
packages/web-kitchensink-reactnext/src/categories/blob/react/components/ImageFilePreview/index.tsx → packages/react-blob-previews/src/components/ImageFilePreview/index.tsxZobrazit soubor
@@ -1,12 +1,12 @@
import * as React from 'react';
import {augmentImageFile, getMimeTypeDescription} from '@/utils/blob';
import {formatFileSize, formatNumeral} from '@/utils/numeral';
import {augmentImageFile, getMimeTypeDescription} from 'packages/web-kitchensink-reactnext/src/utils/blob';
import {formatFileSize, formatNumeral} from 'packages/web-kitchensink-reactnext/src/utils/numeral';
import clsx from 'clsx';
import {useFileMetadata, useFileUrl, useImageControls} from '@/categories/blob/react';
import {KeyValueTable} from '@tesseract-design/web-information-react';
import {useClientSide} from '@modal-sh/react-utils';
import {CommonPreviewProps} from '@/categories/blob/react/common';
import {Swatch} from '@tesseract-design/web-color-react';
import {useFileMetadata, useFileUrl, useImageControls} from 'src/index';
import {KeyValueTable} from 'categories/information/react';
import {useClientSide} from 'packages/react-utils';
import type {CommonPreviewProps} from '../../../../../categories/blob/react/src/components/FileSelectBox';
import {Swatch} from 'categories/color/react';
export type ImageFilePreviewDerivedElement = HTMLImageElement;
packages/web-kitchensink-reactnext/src/categories/blob/react/components/TextFilePreview/index.tsx → packages/react-blob-previews/src/components/TextFilePreview/index.tsxZobrazit soubor
@@ -1,12 +1,12 @@
import * as React from 'react';
import {formatFileSize, formatNumeral} from '@/utils/numeral';
import {useFileMetadata, useFileUrl} from '@/categories/blob/react';
import {augmentTextFile, getMimeTypeDescription} from '@/utils/blob';
import {formatFileSize, formatNumeral} from 'packages/web-kitchensink-reactnext/src/utils/numeral';
import {useFileMetadata, useFileUrl} from 'src/index';
import {augmentTextFile, getMimeTypeDescription} from 'packages/web-kitchensink-reactnext/src/utils/blob';
import clsx from 'clsx';
import {KeyValueTable} from '@tesseract-design/web-information-react';
import {Refractor} from '@modal-sh/react-refractor';
import {useClientSide} from '@modal-sh/react-utils';
import {CommonPreviewProps} from '@/categories/blob/react/common';
import {KeyValueTable} from 'categories/information/react';
import {Refractor} from 'packages/web-kitchensink-reactnext/src/packages/react-refractor';
import {useClientSide} from 'packages/react-utils';
import type {CommonPreviewProps} from '../../../../../categories/blob/react/src/components/FileSelectBox';
type TextFilePreviewDerivedComponent = HTMLDivElement;
packages/web-kitchensink-reactnext/src/categories/blob/react/components/VideoFilePreview/index.tsx → packages/react-blob-previews/src/components/VideoFilePreview/index.tsxZobrazit soubor
@@ -1,12 +1,12 @@
import * as React from 'react';
import {augmentVideoFile, getMimeTypeDescription} from '@/utils/blob';
import {formatFileSize, formatNumeral, formatSecondsDurationConcise} from '@/utils/numeral';
import {useFileMetadata, useFileUrl, useMediaControls} from '@tesseract-design/web-blob-react';
import {augmentVideoFile, getMimeTypeDescription} from 'packages/web-kitchensink-reactnext/src/utils/blob';
import {formatFileSize, formatNumeral, formatSecondsDurationConcise} from 'packages/web-kitchensink-reactnext/src/utils/numeral';
import {useFileMetadata, useFileUrl, useMediaControls} from 'src/index';
import clsx from 'clsx';
import {Slider} from '@tesseract-design/web-number-react';
import {KeyValueTable} from '@tesseract-design/web-information-react';
import {useClientSide} from '@modal-sh/react-utils';
import {CommonPreviewProps} from '@/categories/blob/react/common';
import {Slider} from 'categories/number/react';
import {KeyValueTable} from 'categories/information/react';
import {useClientSide} from 'packages/react-utils';
import type {CommonPreviewProps} from '../../../../../categories/blob/react/src/components/FileSelectBox';
export type VideoFilePreviewDerivedComponent = HTMLVideoElement;
packages/web-kitchensink-reactnext/src/categories/blob/react/hooks/blob/index.ts → packages/react-blob-previews/src/hooks/blob/index.tsZobrazit soubor
packages/web-kitchensink-reactnext/src/categories/blob/react/hooks/blob/metadata.ts → packages/react-blob-previews/src/hooks/blob/metadata.tsZobrazit soubor
@@ -1,5 +1,5 @@
import * as React from 'react';
import {addDataUrl, FileWithDataUrl} from '@/utils/blob';
import {addDataUrl, FileWithDataUrl} from 'packages/web-kitchensink-reactnext/src/utils/blob';
export interface UseFileUrlOptions {
file?: Partial<File>;
packages/web-kitchensink-reactnext/src/categories/blob/react/hooks/interactive/image.ts → packages/react-blob-previews/src/hooks/interactive/image.tsZobrazit soubor
packages/web-kitchensink-reactnext/src/categories/blob/react/hooks/interactive/index.ts → packages/react-blob-previews/src/hooks/interactive/index.tsZobrazit soubor
packages/web-kitchensink-reactnext/src/categories/blob/react/hooks/interactive/media.ts → packages/react-blob-previews/src/hooks/interactive/media.tsZobrazit soubor
packages/web-kitchensink-reactnext/src/categories/blob/react/index.ts → packages/react-blob-previews/src/index.tsZobrazit soubor
@@ -1,7 +1,6 @@
export * from './components/AudioFilePreview';
export * from './components/AudioMiniFilePreview';
export * from './components/BinaryFilePreview';
export * from './components/FileSelectBox';
export * from './components/ImageFilePreview';
export * from './components/TextFilePreview';
export * from './components/VideoFilePreview';
+ 21- 0
packages/react-blob-previews/tsconfig.eslint.jsonZobrazit soubor
packages/web-kitchensink-reactnext/pnpm-lock.yaml → showcases/web-kitchensink-reactnext/pnpm-lock.yamlZobrazit soubor
packages/web-kitchensink-reactnext/postcss.config.js → showcases/web-kitchensink-reactnext/postcss.config.jsZobrazit soubor
packages/web-kitchensink-reactnext/public/audio.wav → showcases/web-kitchensink-reactnext/public/audio.wavZobrazit soubor
packages/web-kitchensink-reactnext/public/binary.bin → showcases/web-kitchensink-reactnext/public/binary.binZobrazit soubor
packages/web-kitchensink-reactnext/public/code.py → showcases/web-kitchensink-reactnext/public/code.pyZobrazit soubor
packages/web-kitchensink-reactnext/public/favicon.ico → showcases/web-kitchensink-reactnext/public/favicon.icoZobrazit soubor
packages/web-kitchensink-reactnext/public/image.png → showcases/web-kitchensink-reactnext/public/image.pngZobrazit soubor
packages/web-kitchensink-reactnext/public/next.svg → showcases/web-kitchensink-reactnext/public/next.svgZobrazit soubor
packages/web-kitchensink-reactnext/public/plaintext.txt → showcases/web-kitchensink-reactnext/public/plaintext.txtZobrazit soubor
packages/web-kitchensink-reactnext/public/vercel.svg → showcases/web-kitchensink-reactnext/public/vercel.svgZobrazit soubor
packages/web-kitchensink-reactnext/public/video.mp4 → showcases/web-kitchensink-reactnext/public/video.mp4Zobrazit soubor
packages/web-kitchensink-reactnext/react-refractor.d.ts → showcases/web-kitchensink-reactnext/react-refractor.d.tsZobrazit soubor
packages/web-kitchensink-reactnext/src/components/DefaultLayout/index.tsx → showcases/web-kitchensink-reactnext/src/components/DefaultLayout/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/components/Section/index.tsx → showcases/web-kitchensink-reactnext/src/components/Section/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/packages/react-refractor/index.tsx → showcases/web-kitchensink-reactnext/src/packages/react-refractor/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/packages/react-refractor/style.module.css → showcases/web-kitchensink-reactnext/src/packages/react-refractor/style.module.cssZobrazit soubor
packages/web-kitchensink-reactnext/src/packages/react-wavesurfer/SpectrogramCanvas/index.tsx → showcases/web-kitchensink-reactnext/src/packages/react-wavesurfer/SpectrogramCanvas/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/packages/react-wavesurfer/WaveformCanvas/index.tsx → showcases/web-kitchensink-reactnext/src/packages/react-wavesurfer/WaveformCanvas/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/packages/react-wavesurfer/index.ts → showcases/web-kitchensink-reactnext/src/packages/react-wavesurfer/index.tsZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/_app.tsx → showcases/web-kitchensink-reactnext/src/pages/_app.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/_document.tsx → showcases/web-kitchensink-reactnext/src/pages/_document.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/api/hello.ts → showcases/web-kitchensink-reactnext/src/pages/api/hello.tsZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/categories/action/index.tsx → showcases/web-kitchensink-reactnext/src/pages/categories/action/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/categories/code/index.tsx → showcases/web-kitchensink-reactnext/src/pages/categories/code/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/categories/freeform/index.tsx → showcases/web-kitchensink-reactnext/src/pages/categories/freeform/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/categories/navigation/index.tsx → showcases/web-kitchensink-reactnext/src/pages/categories/navigation/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/categories/number/index.tsx → showcases/web-kitchensink-reactnext/src/pages/categories/number/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/categories/option/index.tsx → showcases/web-kitchensink-reactnext/src/pages/categories/option/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/categories/presentation/index.tsx → showcases/web-kitchensink-reactnext/src/pages/categories/presentation/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/examples/blog-post/index.tsx → showcases/web-kitchensink-reactnext/src/pages/examples/blog-post/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/pages/examples/registration-form/index.tsx → showcases/web-kitchensink-reactnext/src/pages/examples/registration-form/index.tsxZobrazit soubor
@@ -1,5 +1,5 @@
import { NextPage } from 'next';
import * as Freeform from '../../../../../../categories/freeform/react/src';
import * as Freeform from '@tesseract-design/web-freeform-react';
import * as Action from '@tesseract-design/web-action-react';
const RegistrationFormPage: NextPage = () => {
packages/web-kitchensink-reactnext/src/pages/index.tsx → showcases/web-kitchensink-reactnext/src/pages/index.tsxZobrazit soubor
packages/web-kitchensink-reactnext/src/styles/globals.css → showcases/web-kitchensink-reactnext/src/styles/globals.cssZobrazit soubor
packages/web-kitchensink-reactnext/src/styles/kitchen-sink.css → showcases/web-kitchensink-reactnext/src/styles/kitchen-sink.cssZobrazit soubor
packages/web-kitchensink-reactnext/src/styles/theme.ts → showcases/web-kitchensink-reactnext/src/styles/theme.tsZobrazit soubor
packages/web-kitchensink-reactnext/src/utils/blob.ts → showcases/web-kitchensink-reactnext/src/utils/blob.tsZobrazit soubor
@@ -1,117 +1,8 @@
import * as mimeTypes from 'mime-types';
import {getTextMetadata, TextMetadata} from '@modal-sh/text-utils';
import {getMetadataFromUrl as getImageMetadataFromUrl, ImageMetadata} from '@modal-sh/image-utils';
import {getMetadataFromUrl as getAudioMetadataFromUrl, AudioMetadata} from '@modal-sh/audio-utils';
import {getMetadataFromUrl as getVideoMetadataFromUrl, VideoMetadata} from '@modal-sh/video-utils';
const MIME_TYPE_DESCRIPTIONS = {
'image/gif': 'GIF Image',
'image/jpeg': 'JPEG Image',
'image/png': 'PNG Image',
'image/tiff': 'TIFF Image',
'image/svg+xml': 'SVG Image',
'image/webp': 'WEBP Image',
'audio/wav': 'WAVE Audio',
'audio/ogg': 'OGG Audio',
'audio/mpeg': 'MPEG Audio',
'audio/mid': 'MIDI Track',
'application/json': 'JSON Data',
'application/xml': 'XML Data',
'application/x-bittorrent': 'Torrent File',
'application/x-zip-compressed': 'Compressed ZIP Archive',