From 0cead8701f132670bd5618ceeb8fdee8e9a3ad27 Mon Sep 17 00:00:00 2001 From: Puru Vijay <47742487+PuruVJ@users.noreply.github.com> Date: Sat, 7 Dec 2024 00:52:19 +0530 Subject: [PATCH] deprecate legacyTranslate and gpuAcceleration (#176) * Push * Add changeset --- .changeset/seven-schools-relax.md | 10 +++++++ docs/src/components/options/Options.astro | 9 ++++--- docs/src/data/sizes.json | 26 +++++++++---------- .../options/gpuAcceleration/+option.mdx | 2 ++ .../options/legacyTranslate/+option.mdx | 2 ++ docs/src/layouts/DocsLayout.astro | 12 ++++----- docs/src/layouts/MainDocsLayout.astro | 12 ++++----- packages/core/src/index.ts | 13 ++++------ 8 files changed, 50 insertions(+), 36 deletions(-) create mode 100644 .changeset/seven-schools-relax.md diff --git a/.changeset/seven-schools-relax.md b/.changeset/seven-schools-relax.md new file mode 100644 index 000000000..021c92400 --- /dev/null +++ b/.changeset/seven-schools-relax.md @@ -0,0 +1,10 @@ +--- +"@neodrag/core": minor +"@neodrag/react": minor +"@neodrag/solid": minor +"@neodrag/svelte": minor +"@neodrag/vanilla": minor +"@neodrag/vue": minor +--- + +deprecate: legacyTranslate and gpuAcceleration diff --git a/docs/src/components/options/Options.astro b/docs/src/components/options/Options.astro index e615a8904..3ef9e5e11 100644 --- a/docs/src/components/options/Options.astro +++ b/docs/src/components/options/Options.astro @@ -70,7 +70,10 @@ const orderedOptionsMD = ORDER.map(
{ orderedOptionsMD.map( - ({ Content, frontmatter: { defaultValue, title, type } }) => ( + ({ + Content, + frontmatter: { defaultValue, title, type, deprecated, deprecatedText }, + }) => ( <>

{title} @@ -82,8 +85,6 @@ const orderedOptionsMD = ORDER.map( href={`#${slugify(title)}`} >

+ {deprecated === true ? `⚠️ Deprecated: ${deprecatedText}` : ''} +
Type: {type} diff --git a/docs/src/data/sizes.json b/docs/src/data/sizes.json index 528dec727..3646f24b9 100644 --- a/docs/src/data/sizes.json +++ b/docs/src/data/sizes.json @@ -1,22 +1,22 @@ { - "react": { - "size": "2.20", - "version": "2.0.4" - }, "svelte": { "size": "1.97", - "version": "2.0.6" + "version": "2.1.0" }, - "solid": { - "size": "1.99", - "version": "2.0.4" + "react": { + "size": "2.21", + "version": "2.1.0" + }, + "vanilla": { + "size": "2.00", + "version": "2.1.0" }, "vue": { - "size": "1.99", - "version": "2.0.4" + "size": "2.00", + "version": "2.1.0" }, - "vanilla": { - "size": "2.01", - "version": "2.0.5" + "solid": { + "size": "2.00", + "version": "2.1.0" } } \ No newline at end of file diff --git a/docs/src/documentation/options/gpuAcceleration/+option.mdx b/docs/src/documentation/options/gpuAcceleration/+option.mdx index 17b6fe10a..fb6787e6a 100644 --- a/docs/src/documentation/options/gpuAcceleration/+option.mdx +++ b/docs/src/documentation/options/gpuAcceleration/+option.mdx @@ -2,6 +2,8 @@ title: 'gpuAcceleration' type: 'boolean' defaultValue: 'true' +deprecated: true +deprecatedText: 'Will be removed in v3' --- import Code from '$components/options/OptionsCode.astro'; diff --git a/docs/src/documentation/options/legacyTranslate/+option.mdx b/docs/src/documentation/options/legacyTranslate/+option.mdx index 056e14d5d..5c7fca096 100644 --- a/docs/src/documentation/options/legacyTranslate/+option.mdx +++ b/docs/src/documentation/options/legacyTranslate/+option.mdx @@ -2,6 +2,8 @@ title: legacyTranslate type: 'boolean' defaultValue: 'true' +deprecated: true +deprecatedText: 'Will be removed in v3' --- import Code from '$components/options/OptionsCode.astro'; diff --git a/docs/src/layouts/DocsLayout.astro b/docs/src/layouts/DocsLayout.astro index 6f0fe3dcd..a1db2c189 100644 --- a/docs/src/layouts/DocsLayout.astro +++ b/docs/src/layouts/DocsLayout.astro @@ -21,13 +21,13 @@ const { title: frontmatterTitle } = frontmatter || {}; -

- +
+
-
+
@@ -38,7 +38,7 @@ const { title: frontmatterTitle } = frontmatter || {};
- -