@sanity/document-internationalization 0.0.1-beta.8 → 0.1.1

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +22 -13
  2. package/lib/actions/index.js +264 -17457
  3. package/lib/actions/index.js.map +1 -1
  4. package/lib/badges/index.js +1 -17206
  5. package/lib/badges/index.js.map +1 -1
  6. package/lib/constants/SupportedEmojiFlagCodes.d.ts +1 -0
  7. package/lib/constants/UiMessages.d.ts +11 -0
  8. package/lib/constants/index.d.ts +1 -0
  9. package/lib/constants/index.js +19 -1
  10. package/lib/constants/index.js.map +1 -1
  11. package/lib/language-select/components/LanguageSelect/LanguageSelect.d.ts +9 -0
  12. package/lib/language-select/components/LanguageSelect/LanguageSelectContext.d.ts +10 -0
  13. package/lib/language-select/components/LanguageSelect/LanguageSelectLabel.d.ts +2 -0
  14. package/lib/language-select/components/LanguageSelect/LanguageSelectList.d.ts +9 -0
  15. package/lib/language-select/components/LanguageSelect/LanguageSelectListItem.d.ts +8 -0
  16. package/lib/language-select/components/LanguageSelect/index.d.ts +1 -0
  17. package/lib/{structure/components/LangCultureFlagsBlock → language-select/components/SingleFlag}/SingleFlag.d.ts +2 -1
  18. package/lib/{structure/components/LangCultureFlagsBlock → language-select/components/SingleFlag}/allEmojiFlagCodes.d.ts +0 -0
  19. package/lib/language-select/components/SingleFlag/index.d.ts +1 -0
  20. package/lib/language-select/components/SplitPaneIcon/SplitPaneIcon.d.ts +2 -0
  21. package/lib/language-select/components/SplitPaneIcon/index.d.ts +1 -0
  22. package/lib/language-select/components/index.d.ts +2 -0
  23. package/lib/language-select/hooks/index.d.ts +2 -0
  24. package/lib/language-select/hooks/useLanguages.d.ts +3 -0
  25. package/lib/language-select/hooks/useManyEditStates.d.ts +1 -0
  26. package/lib/language-select/hooks/useManyObservables.d.ts +2 -0
  27. package/lib/language-select/index.d.ts +7 -0
  28. package/lib/language-select/index.js +1972 -0
  29. package/lib/language-select/index.js.map +1 -0
  30. package/lib/structure/index.d.ts +1 -3
  31. package/lib/structure/index.js +194 -17951
  32. package/lib/structure/index.js.map +1 -1
  33. package/lib/types/IExtendedLanguageObject.d.ts +5 -0
  34. package/lib/types/ILanguageObject.d.ts +0 -2
  35. package/lib/types/index.d.ts +1 -0
  36. package/lib/utils/baseToTop.d.ts +2 -1
  37. package/lib/utils/getTranslationsForId.d.ts +2 -2
  38. package/lib/utils/index.js +9 -17212
  39. package/lib/utils/index.js.map +1 -1
  40. package/lib/validators/index.js +11 -17211
  41. package/lib/validators/index.js.map +1 -1
  42. package/package.json +20 -27
  43. package/sanity.json +4 -0
  44. package/lib/structure/components/LangCultureFlagsBlock/LangCultureFlagsBlock.d.ts +0 -8
  45. package/lib/structure/components/LangCultureFlagsBlock/index.d.ts +0 -1
  46. package/lib/structure/components/TranslationLink/TranslationLink.d.ts +0 -12
  47. package/lib/structure/components/TranslationLink/index.d.ts +0 -1
  48. package/lib/structure/components/TranslationsComponentFactory/TranslationsComponentFactory.d.ts +0 -5
  49. package/lib/structure/components/TranslationsComponentFactory/index.d.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/document-internationalization",
3
- "version": "0.0.1-beta.8",
3
+ "version": "0.1.1",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": ">=14"
@@ -33,12 +33,11 @@
33
33
  "lint": "npm run eslint -- .",
34
34
  "eslint": "eslint --ext=.js,.jsx,.mjs,.ts,.tsx --quiet",
35
35
  "lint:fix": "eslint . --quiet --fix",
36
- "stylelint": "stylelint \"**/*.scss\"",
37
- "stylelint:fix": "stylelint \"**/*.scss\" --fix",
38
36
  "build": "run-p build:*",
39
37
  "build:type": "tsc -p .",
40
38
  "build:badges": "rollup -c src/badges/rollup.config.js",
41
39
  "build:structure": "rollup -c src/structure/rollup.config.js",
40
+ "build:language-select": "rollup -c src/language-select/rollup.config.js",
42
41
  "build:actions": "rollup -c src/actions/rollup.config.js",
43
42
  "build:constants": "rollup -c src/constants/rollup.config.js",
44
43
  "build:utils": "rollup -c src/utils/rollup.config.js",
@@ -68,15 +67,17 @@
68
67
  "@sanity/base": "^2.20.0",
69
68
  "@sanity/check": "^2.0.9",
70
69
  "@sanity/client": "^2.19.0",
71
- "@sanity/desk-tool": "^2.21.0",
70
+ "@sanity/color": "^2.0.0",
71
+ "@sanity/desk-tool": "^2.28.0",
72
72
  "@sanity/form-builder": "^2.20.0",
73
- "@sanity/icons": "^1.2.3",
73
+ "@sanity/icons": "^1.2.5",
74
74
  "@sanity/react-hooks": "^2.20.0",
75
+ "@sanity/state-router": "^2.0.0",
75
76
  "@sanity/structure": "^2.20.0",
76
77
  "@sanity/types": "^2.19.0",
77
78
  "@sanity/ui": "^0.36.10",
78
- "@types/classnames": "^2.2.11",
79
- "@types/jest": "^27.4.0",
79
+ "@sanity/uuid": "^3.0.0",
80
+ "@types/lodash": "^4.14.179",
80
81
  "@types/react": "^17.0.0",
81
82
  "@types/react-router": "^5.1.11",
82
83
  "@types/react-router-dom": "^5.1.7",
@@ -88,7 +89,6 @@
88
89
  "eslint": "^8.3.0",
89
90
  "eslint-config-prettier": "^8.3.0",
90
91
  "eslint-config-sanity": "^5.1.0",
91
- "eslint-import-resolver-webpack": "^0.13.2",
92
92
  "eslint-plugin-cypress": "^2.12.1",
93
93
  "eslint-plugin-es5": "^1.5.0",
94
94
  "eslint-plugin-import": "^2.25.3",
@@ -96,12 +96,10 @@
96
96
  "eslint-plugin-react": "^7.27.1",
97
97
  "eslint-plugin-react-hooks": "^4.3.0",
98
98
  "husky": "^7.0.0",
99
- "lerna": "^3.22.1",
100
99
  "lint-staged": "^12.1.2",
101
- "node-sass": "^6.0.0",
100
+ "lodash": "^4.17.21",
102
101
  "npm-run-all": "^4.1.5",
103
102
  "postcss": "^8.2.10",
104
- "postcss-scss": "^4.0.2",
105
103
  "prettier": "^2.5.0",
106
104
  "react": "^16.0.0",
107
105
  "react-router": "^5.1.0",
@@ -110,46 +108,41 @@
110
108
  "rollup-plugin-cleaner": "^1.0.0",
111
109
  "rollup-plugin-peer-deps-external": "^2.2.4",
112
110
  "rollup-plugin-postcss": "^4.0.2",
113
- "rollup-plugin-typescript2": "^0.29.0",
111
+ "rxjs": "^6.6.0",
114
112
  "styled-components": "^5.3.1",
115
- "stylelint": "^14.1.0",
116
- "stylelint-config-prettier": "^9.0.3",
117
- "stylelint-prettier": "^2.0.0",
118
- "stylelint-scss": "^4.0.0",
119
113
  "typescript": "^4.1.3"
120
114
  },
121
115
  "peerDependencies": {
122
116
  "@sanity/base": "^2.0.0",
123
- "@sanity/desk-tool": "^2.21.0",
117
+ "@sanity/desk-tool": ">=2.28.0",
124
118
  "@sanity/form-builder": "^2.0.0",
119
+ "@sanity/icons": "^1.2.3",
125
120
  "@sanity/react-hooks": "^2.0.0",
126
121
  "@sanity/structure": "^2.0.0",
127
122
  "@sanity/ui": "^0.36.12",
128
- "@sanity/icons": "^1.2.3",
123
+ "lodash": "^4.0.0",
129
124
  "react": "^17.0.0",
130
125
  "react-router": "^5.0.0",
131
126
  "react-router-dom": "^5.0.0",
132
- "styled-components": "^5.0.0"
127
+ "rxjs": "^6.0.0",
128
+ "styled-components": "^5.0.0",
129
+ "@sanity/color": "^2.0.0",
130
+ "@sanity/state-router": "^2.0.0",
131
+ "@sanity/uuid": "^3.0.0"
133
132
  },
134
133
  "dependencies": {
135
134
  "@babel/runtime": "^7.12.5",
136
135
  "@cprecioso/country-flag-emoji": "^1.0.0",
137
- "a11y-react-emoji": "^1.1.3",
138
- "classnames": "^2.2.6",
139
136
  "just-omit": "^2.0.1",
140
137
  "just-safe-get": "^4.0.1",
141
138
  "just-split": "^3.0.1",
142
- "moment": "^2.29.1",
143
139
  "pinst": "^2.1.6",
144
- "regenerator-runtime": "^0.13.7",
145
- "slugify": "^1.4.6"
140
+ "react-easy-emoji": "^1.6.1",
141
+ "regenerator-runtime": "^0.13.7"
146
142
  },
147
143
  "lint-staged": {
148
144
  "src/**/*.{ts,tsx}": [
149
145
  "eslint . --quiet --fix"
150
- ],
151
- "src/**/*.scss": [
152
- "stylelint \"**/*.scss\" --fix"
153
146
  ]
154
147
  }
155
148
  }
package/sanity.json CHANGED
@@ -12,6 +12,10 @@
12
12
  "implements": "part:@sanity/base/document-actions/resolver",
13
13
  "path": "actions/index.js"
14
14
  },
15
+ {
16
+ "implements": "part:@sanity/desk-tool/language-select-component",
17
+ "path": "language-select/index.js"
18
+ },
15
19
  {
16
20
  "name": "part:@sanity/document-internationalization/languages/loader",
17
21
  "description": "User implementable languages loader function"
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { ILanguageObject } from '../../../types';
3
- declare type Props = {
4
- isMissing?: boolean;
5
- language: ILanguageObject;
6
- };
7
- export declare const LangCultureFlagsBlock: React.FC<Props>;
8
- export {};
@@ -1 +0,0 @@
1
- export * from './LangCultureFlagsBlock';
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { ILanguageObject, Ti18nSchema } from '../../../types';
3
- interface IProps {
4
- docId: string;
5
- index: number;
6
- schema: Ti18nSchema;
7
- lang: ILanguageObject;
8
- isCurrentLanguage: boolean;
9
- baseDocument?: any;
10
- }
11
- export declare const TranslationLink: React.FunctionComponent<IProps>;
12
- export {};
@@ -1 +0,0 @@
1
- export * from './TranslationLink';
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { IDefaultDocumentNodeStructureProps } from '../../IDefaultDocumentNodeStructureProps';
3
- import { Ti18nSchema } from '../../../types';
4
- export declare const TranslationsComponent: (schema: Ti18nSchema, props: IDefaultDocumentNodeStructureProps) => JSX.Element;
5
- export declare const TranslationsComponentFactory: (schema: Ti18nSchema) => any;
@@ -1 +0,0 @@
1
- export * from './TranslationsComponentFactory';