sanity-plugin-transifex 0.9.65 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yml +1 -1
- package/.github/workflows/npm-publish.yml +19 -0
- package/dist/helpers.d.ts +5 -0
- package/dist/index.d.ts +13 -11
- package/dist/sanity-plugin-transifex.cjs.development.js +315 -960
- package/dist/sanity-plugin-transifex.cjs.development.js.map +1 -1
- package/dist/sanity-plugin-transifex.cjs.production.min.js +1 -1
- package/dist/sanity-plugin-transifex.cjs.production.min.js.map +1 -1
- package/dist/sanity-plugin-transifex.esm.js +281 -953
- package/dist/sanity-plugin-transifex.esm.js.map +1 -1
- package/dist/transifexAdapter.d.ts +1 -1
- package/package.json +13 -18
- package/src/3rdparty-typings/sanity-parts.d.ts +0 -2
- package/src/helpers.ts +116 -0
- package/src/index.ts +39 -40
- package/src/transifexAdapter.ts +14 -11
- package/.github/workflows/size.yml +0 -12
- package/dist/components/LanguageStatus.d.ts +0 -7
- package/dist/components/NewTask.d.ts +0 -6
- package/dist/components/Settings.d.ts +0 -5
- package/dist/components/TaskView.d.ts +0 -7
- package/dist/components/TranslationContext.d.ts +0 -11
- package/dist/components/TranslationTab.d.ts +0 -15
- package/dist/components/TranslationView.d.ts +0 -1
- package/dist/hooks/useSecrets.d.ts +0 -4
- package/dist/mergeTranslation.d.ts +0 -1
- package/dist/serialization/BaseDocumentDeserializer.d.ts +0 -3
- package/dist/serialization/BaseDocumentPatcher.d.ts +0 -2
- package/dist/serialization/BaseDocumentSerializer.d.ts +0 -2
- package/dist/serialization/BaseSerializationConfig.d.ts +0 -4
- package/dist/serialization/helpers.d.ts +0 -1
- package/dist/serialization/index.d.ts +0 -5
- package/dist/types.d.ts +0 -47
- package/sanity.json +0 -12
- package/src/components/LanguageStatus.tsx +0 -48
- package/src/components/NewTask.tsx +0 -113
- package/src/components/Settings.tsx +0 -16
- package/src/components/TaskView.tsx +0 -67
- package/src/components/TranslationContext.tsx +0 -17
- package/src/components/TranslationTab.tsx +0 -100
- package/src/components/TranslationView.tsx +0 -49
- package/src/components/exampleSchema.js +0 -18
- package/src/hooks/useSecrets.ts +0 -30
- package/src/mergeTranslation.ts +0 -52
- package/src/serialization/BaseDocumentDeserializer.ts +0 -176
- package/src/serialization/BaseDocumentPatcher.ts +0 -118
- package/src/serialization/BaseDocumentSerializer.ts +0 -214
- package/src/serialization/BaseSerializationConfig.ts +0 -42
- package/src/serialization/helpers.ts +0 -15
- package/src/serialization/index.ts +0 -12
- package/src/types.ts +0 -110
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Node.js Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish-npm:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v2
|
|
12
|
+
- uses: actions/setup-node@v1
|
|
13
|
+
with:
|
|
14
|
+
node-version: 15
|
|
15
|
+
registry-url: https://registry.npmjs.org/
|
|
16
|
+
- run: npm ci
|
|
17
|
+
- run: npm publish
|
|
18
|
+
env:
|
|
19
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SanityDocument } from '@sanity/types';
|
|
2
|
+
export declare const findLatestDraft: (documentId: string, ignoreI18n?: boolean) => any;
|
|
3
|
+
export declare const findDocumentAtRevision: (documentId: string, rev: string) => Promise<any>;
|
|
4
|
+
export declare const documentLevelPatch: (documentId: string, translatedFields: SanityDocument, localeId: string) => Promise<void>;
|
|
5
|
+
export declare const fieldLevelPatch: (documentId: string, translatedFields: SanityDocument, localeId: string) => Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BaseDocumentDeserializer, BaseDocumentSerializer,
|
|
1
|
+
import { TranslationsTab } from 'sanity-translations-tab';
|
|
2
|
+
import { BaseDocumentDeserializer, BaseDocumentSerializer, BaseDocumentMerger, defaultStopTypes, customSerializers } from 'sanity-naive-html-serializer';
|
|
3
3
|
import { TransifexAdapter } from './transifexAdapter';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
declare const defaultDocumentLevelConfig: {
|
|
5
|
+
exportForTranslation: (id: string) => Promise<import("sanity-naive-html-serializer/dist/types").SerializedDocument>;
|
|
6
|
+
importTranslation: (id: string, localeId: string, document: string) => void;
|
|
7
|
+
adapter: import("sanity-translations-tab").Adapter;
|
|
8
|
+
secretsNamespace: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
exportForTranslation: (id: string) => Promise<import("
|
|
12
|
-
importTranslation: (id: string, localeId: string, document: string) =>
|
|
13
|
-
adapter: import("
|
|
10
|
+
declare const defaultFieldLevelConfig: {
|
|
11
|
+
exportForTranslation: (id: string) => Promise<import("sanity-naive-html-serializer/dist/types").SerializedDocument>;
|
|
12
|
+
importTranslation: (id: string, localeId: string, document: string) => void;
|
|
13
|
+
adapter: import("sanity-translations-tab").Adapter;
|
|
14
|
+
secretsNamespace: string;
|
|
14
15
|
};
|
|
16
|
+
export { TranslationsTab, BaseDocumentDeserializer, BaseDocumentSerializer, BaseDocumentMerger, defaultStopTypes, customSerializers, TransifexAdapter, defaultDocumentLevelConfig, defaultFieldLevelConfig, };
|