Skip to content

Commit

Permalink
Merge pull request #223 from nuxt-modules/feat/3.0.0
Browse files Browse the repository at this point in the history
Feat/3.0.0
  • Loading branch information
Baroshem authored Jun 26, 2024
2 parents dd79eb0 + c566cc7 commit 2662a7a
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .stackblitz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"nuxt": "^3.11.2"
},
"dependencies": {
"@nuxtjs/cloudinary": "^3.0.0-rc.4"
"@nuxtjs/cloudinary": "^3.0.0"
}
}
8 changes: 4 additions & 4 deletions .stackblitz/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1169,10 +1169,10 @@
vite-plugin-checker "^0.6.4"
vue-bundle-renderer "^2.0.0"

"@nuxtjs/cloudinary@^3.0.0-rc.4":
version "3.0.0-rc.4"
resolved "https://registry.yarnpkg.com/@nuxtjs/cloudinary/-/cloudinary-3.0.0-rc.4.tgz#1349ce2d7aae9b1281ba3dedc4538d0b51a8a2c7"
integrity sha512-MR9Nth1u65u31W0Ia0C4lPJpdHRvtHQ9d0ETKnEg7xNNrYE/TL5C5Pollp9EJwGO1eqtyLnU6Blj2gB2Qjh/BA==
"@nuxtjs/cloudinary@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@nuxtjs/cloudinary/-/cloudinary-3.0.0.tgz#06031868cc146555929ac7a2cf3d249c27842935"
integrity sha512-FvFNjAQHeRJxRXH7395gUZq60HUdfwHNuy48xGOdJbfo8A7rcv643AFFuXGrXqKtF5IB8KXZhL/XoVAjnIDuLA==
dependencies:
"@cloudinary-util/types" "1.0.2"
"@cloudinary-util/url-loader" "^5.3.1"
Expand Down
15 changes: 8 additions & 7 deletions docs/content/2.components/CldUploadWidget.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description:
description:
---

The CldUploadWidget creates a new instance of the [Cloudinary Upload Widget](https://cloudinary.com/documentation/upload_widget) giving you an easy way to add upload capabilities to your Nuxt app.
Expand Down Expand Up @@ -68,12 +68,13 @@ To use the above, create a Node-based API route, add the snippet, and use that e

## General Props

| Prop Name | Type | Example |
| ----------------- | -------- | ---------------------------------- |
| children | function | `{ (options) => {} }` |
| options | object | `{ encryption: {...} }` |
| signatureEndpoint | string | `"/api/sign-cloudinary-params.js"` |
| uploadPreset | string | `"my-upload-preset"` |
| Prop Name | Type | Example |
| ----------------- | ------ | ---------------------------------- |
| options | object | `{ encryption: {...} }` |
| signatureEndpoint | string | `"/api/sign-cloudinary-params.js"` |
| uploadPreset | string | `"my-upload-preset"` |
| config | object | `{ cloud: {}, url: {} }` |
| tags | array | `['music', 'sad']` |

## Event Props

Expand Down
1 change: 1 addition & 0 deletions docs/content/2.components/CldVideoPlayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Adding a button to select chapters (you can pass `chapters` prop as a boolean if
| pictureInPictureToogle | boolean | - | Enable Picture in Picture mode | true |
| chaptersButton | boolean | - | Enable Chapters button | true |
| chapters | object/boolean | - | Chapters configuration | { 0: 'Chapter 1', 6: 'Chapter 2', 9: 'Chapter 3' } |
| disableRemotePlayback | boolean | - | Indicate if media element may have a remote playback UI | true |

## Colors Prop

Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"typescript": "^5.4.5"
},
"dependencies": {
"@nuxtjs/cloudinary": "^3.0.0-rc.4"
"@nuxtjs/cloudinary": "^3.0.0"
}
}
8 changes: 4 additions & 4 deletions docs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxtjs/cloudinary",
"version": "3.0.0-rc.4",
"version": "3.0.0",
"description": "Cloudinary module for Nuxt",
"license": "MIT",
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const colors = {
<CldUploadWidget
v-slot="{ open }"
upload-preset="nuxt-cloudinary-unsigned"
:tags="['sad', 'music']"
>
<button
type="button"
Expand Down
9 changes: 9 additions & 0 deletions src/runtime/components/CldUploadWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export interface CldUploadWidgetProps {
signatureEndpoint?: URL | RequestInfo
uploadPreset?: string
config?: ConfigOptions
tags?: Array<string>
}
// Parameters sourced from:
Expand Down Expand Up @@ -250,6 +251,14 @@ if (signed) {
}
}
if (props.tags?.length) {
uploadOptions.showAdvancedOptions = true
// eslint-disable-next-line @typescript-eslint/ban-types
uploadOptions.getTags = (cb: Function, prefix: string) =>
cb(prefix ? props.tags?.filter(t => !t.indexOf(prefix)) : props.tags)
}
// Handle result states and callbacks
watch(results, () => {
Expand Down
3 changes: 3 additions & 0 deletions src/runtime/components/CldVideoPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export interface CloudinaryVideoPlayerOptions {
pictureInPictureToggle?: boolean
chapters?: Record<string | number, string> | boolean
chaptersButton?: boolean
disableRemotePlayback?: boolean
}
export interface CloudinaryVideoPlayerOptionsColors {
Expand Down Expand Up @@ -87,6 +88,7 @@ export type CldVideoPlayerProps = Pick<
pictureInPictureToggle?: boolean
chapters?: Record<string | number, string> | boolean
chaptersButton?: boolean
disableRemotePlayback?: boolean
}
const props = withDefaults(defineProps<CldVideoPlayerProps>(), {
Expand Down Expand Up @@ -244,6 +246,7 @@ useHead({
:class="playerClassName"
:width="width"
:height="height"
:disableRemotePlayback="disableRemotePlayback"
/>
</div>
</template>

0 comments on commit 2662a7a

Please sign in to comment.