Skip to content

Refactor all styles to use "upup-" prefix and fix darkmode calls #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ pnpm-lock.yaml
tsconfig.json
postcss.config.js
tailwind.config.js
tsdx.config.js
tsup.config.ts
!dist
Binary file added devino-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added devino-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 75 additions & 0 deletions dist-node/index.node.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import { S3ClientConfig } from '@aws-sdk/client-s3'

declare enum UpupProvider {
AWS = 'aws',
Azure = 'azure',
BackBlaze = 'backblaze',
DigitalOcean = 'digitalocean',
}
type PresignedUrlResponse = {
key: string
publicUrl: string
uploadUrl: string
expiresIn: number
}

interface FileParams {
name: string
type: string
size: number
accept?: string
maxFileSize?: number
multiple?: boolean
}
interface UrlParams {
fileParams: FileParams
expiresIn?: number
}
type S3PresignedUrlParams = UrlParams & {
bucketName: string
s3ClientConfig: S3ClientConfig
origin: string
provider: UpupProvider
enableAutoCorsConfig?: boolean
}
type AzureSasUrlParams = UrlParams & {
containerName: string
credentials: AzureCredentials
}
type AzureCredentials = {
tenantId: string
clientId: string
clientSecret: string
storageAccount: string
}

declare function s3GeneratePresignedUrl({
fileParams,
bucketName: Bucket,
s3ClientConfig,
expiresIn,
origin,
provider,
enableAutoCorsConfig,
}: S3PresignedUrlParams): Promise<PresignedUrlResponse>

declare function s3GenerateSignedUrl(
s3ClientConfig: S3ClientConfig,
Key: string,
Bucket: string,
expiresIn?: number,
): Promise<string>

declare function azureGenerateSasUrl({
fileParams,
containerName,
credentials,
expiresIn,
}: AzureSasUrlParams): Promise<PresignedUrlResponse>

export {
azureGenerateSasUrl,
s3GeneratePresignedUrl,
s3GenerateSignedUrl,
UpupProvider,
}
Loading