@react-native-menu/menu 0.5.2 → 0.6.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/android/gradle.properties +3 -3
- package/lib/commonjs/UIMenuView.android.js.map +1 -1
- package/lib/commonjs/UIMenuView.ios.js.map +1 -1
- package/lib/commonjs/UIMenuView.js.map +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/UIMenuView.android.js.map +1 -1
- package/lib/module/UIMenuView.ios.js.map +1 -1
- package/lib/module/UIMenuView.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/types.d.ts +4 -2
- package/package.json +8 -8
- package/src/index.tsx +2 -1
- package/src/types.ts +6 -2
- package/.editorconfig +0 -15
- package/.gitattributes +0 -3
- package/.github/CODEOWNERS +0 -1
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/.github/dependabot.yml +0 -51
- package/.github/workflows/ci.yml +0 -90
- package/.gitignore +0 -60
- package/CONTRIBUTING.md +0 -184
- package/babel.config.js +0 -3
- package/example/.gitignore +0 -14
- package/example/.watchmanconfig +0 -1
- package/example/android/build.gradle +0 -14
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/example/android/gradle.properties +0 -6
- package/example/android/gradlew +0 -185
- package/example/android/gradlew.bat +0 -89
- package/example/android/settings.gradle +0 -12
- package/example/app.json +0 -28
- package/example/babel.config.js +0 -3
- package/example/index.tsx +0 -5
- package/example/ios/Podfile +0 -7
- package/example/ios/Podfile.lock +0 -515
- package/example/metro.config.js +0 -44
- package/example/package.json +0 -34
- package/example/react-native.config.js +0 -61
- package/example/src/App.tsx +0 -187
- package/example/yarn.lock +0 -6542
- package/lib/typescript/example/index.d.ts +0 -1
- package/lib/typescript/example/src/App.d.ts +0 -2
- package/lib/typescript/src/__tests__/index.test.d.ts +0 -0
- package/src/__tests__/index.test.tsx +0 -1
- package/tsconfig.json +0 -27
- package/yarn.lock +0 -9701
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Menu_kotlinVersion=1.
|
|
2
|
-
Menu_compileSdkVersion=
|
|
1
|
+
Menu_kotlinVersion=1.6.10
|
|
2
|
+
Menu_compileSdkVersion=30
|
|
3
3
|
Menu_buildToolsVersion=30.0.3
|
|
4
|
-
Menu_targetSdkVersion=
|
|
4
|
+
Menu_targetSdkVersion=30
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["MenuComponent","requireNativeComponent"],"sources":["UIMenuView.android.tsx"],"sourcesContent":["import { HostComponent, requireNativeComponent } from 'react-native';\nimport type { NativeMenuComponentProps } from './types';\n\nconst MenuComponent = requireNativeComponent(\n 'MenuView'\n) as HostComponent<NativeMenuComponentProps>;\n\nexport default MenuComponent;\n"],"mappings":";;;;;;;AAAA;;AAGA,MAAMA,aAAa,GAAG,IAAAC,mCAAA,EACpB,UADoB,CAAtB;eAIeD,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["MenuComponent","requireNativeComponent"],"sources":["UIMenuView.ios.tsx"],"sourcesContent":["import { HostComponent, requireNativeComponent } from 'react-native';\nimport type { NativeMenuComponentProps } from './types';\n\nconst MenuComponent = requireNativeComponent(\n 'RCTUIMenu'\n) as HostComponent<NativeMenuComponentProps>;\n\nexport default MenuComponent;\n"],"mappings":";;;;;;;AAAA;;AAGA,MAAMA,aAAa,GAAG,IAAAC,mCAAA,EACpB,WADoB,CAAtB;eAIeD,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["MenuView","style","children"],"sources":["UIMenuView.tsx"],"sourcesContent":["import * as React from 'react';\nimport { View } from 'react-native';\nimport type { NativeMenuComponentProps } from './types';\n\n/**\n * TODO: implement for Web\n */\nconst MenuView: React.FC<NativeMenuComponentProps> = ({ style, children }) => {\n return <View style={style}>{children}</View>;\n};\n\nexport default MenuView;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAGA;AACA;AACA;AACA,MAAMA,QAA4C,GAAG,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KAAyB;EAC5E,oBAAO,oBAAC,iBAAD;IAAM,KAAK,EAAED;EAAb,GAAqBC,QAArB,CAAP;AACD,CAFD;;eAIeF,Q"}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var _UIMenuView = _interopRequireDefault(require("./UIMenuView"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
17
|
|
|
18
18
|
function processAction(action) {
|
|
19
19
|
var _action$subactions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["processAction","action","imageColor","processColor","titleColor","subactions","map","subAction","MenuView","actions","props","processedActions"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { processColor } from 'react-native';\n\nimport UIMenuView from './UIMenuView';\nimport type {\n MenuComponentProps,\n MenuAction,\n ProcessedMenuAction,\n NativeActionEvent,\n} from './types';\n\nfunction processAction(action: MenuAction): ProcessedMenuAction {\n return {\n ...action,\n imageColor: processColor(action.imageColor),\n titleColor: processColor(action.titleColor),\n subactions: action.subactions?.map((subAction) => processAction(subAction)),\n };\n}\n\nconst MenuView: React.FC<MenuComponentProps> = ({ actions, ...props }) => {\n const processedActions = actions.map<ProcessedMenuAction>((action) =>\n processAction(action)\n );\n return <UIMenuView {...props} actions={processedActions} />;\n};\n\nexport { MenuView };\nexport type { MenuComponentProps, MenuAction, NativeActionEvent };\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;AAQA,SAASA,aAAT,CAAuBC,MAAvB,EAAgE;EAAA;;EAC9D,OAAO,EACL,GAAGA,MADE;IAELC,UAAU,EAAE,IAAAC,yBAAA,EAAaF,MAAM,CAACC,UAApB,CAFP;IAGLE,UAAU,EAAE,IAAAD,yBAAA,EAAaF,MAAM,CAACG,UAApB,CAHP;IAILC,UAAU,wBAAEJ,MAAM,CAACI,UAAT,uDAAE,mBAAmBC,GAAnB,CAAwBC,SAAD,IAAeP,aAAa,CAACO,SAAD,CAAnD;EAJP,CAAP;AAMD;;AAED,MAAMC,QAAsC,GAAG,CAAC;EAAEC,OAAF;EAAW,GAAGC;AAAd,CAAD,KAA2B;EACxE,MAAMC,gBAAgB,GAAGF,OAAO,CAACH,GAAR,CAAkCL,MAAD,IACxDD,aAAa,CAACC,MAAD,CADU,CAAzB;EAGA,oBAAO,6BAAC,mBAAD,eAAgBS,KAAhB;IAAuB,OAAO,EAAEC;EAAhC,GAAP;AACD,CALD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n ColorValue,\n processColor,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport type * as React from 'react';\n\nexport type NativeActionEvent = {\n nativeEvent: {\n event: string;\n };\n};\n\ntype MenuAttributes = {\n /**\n * An attribute indicating the destructive style.\n */\n destructive?: boolean;\n /**\n * An attribute indicating the disabled style.\n */\n disabled?: boolean;\n /**\n * An attribute indicating the hidden style.\n */\n hidden?: boolean;\n};\n\n/**\n * The state of the action.\n * - off: A constant indicating the menu element is in the “off” state.\n * - on: A constant indicating the menu element is in the “on” state.\n * - mixed: A constant indicating the menu element is in the “mixed” state.\n */\ntype MenuState = 'off' | 'on' | 'mixed';\n\nexport type MenuAction = {\n /**\n * Identifier of the menu action.\n * The value set in this id will be returned when menu is selected.\n */\n id?: string;\n /**\n * The action's title.\n */\n title: string;\n /**\n * (Android only)\n * The action's title color.\n * @platform Android\n */\n titleColor?: number | ColorValue;\n /**\n * (iOS14+ only)\n * An elaborated title that explains the purpose of the action.\n * @platform iOS\n */\n subtitle?: string;\n /**\n * The attributes indicating the style of the action.\n */\n attributes?: MenuAttributes;\n /**\n * (iOS14+ only)\n * The state of the action.\n * @platform iOS\n */\n state?: MenuState;\n /**\n * (Android and iOS13+ only)\n * - The action's image.\n * - Allows icon name included in project or system (Android) resources drawables and\n * in SF Symbol (iOS)\n * @example // (iOS)\n * image=\"plus\"\n * @example // (Android)\n * image=\"ic_menu_add\"\n * - TODO: Allow images other than those included in SF Symbol and resources drawables\n */\n image?: string;\n /**\n * (Android and iOS13+ only)\n * - The action's image color.\n */\n imageColor?: number | ColorValue;\n /**\n * (Android and iOS14+ only)\n * - Actions to be displayed in the sub menu\n * - On Android it does not support nesting next sub menus in sub menu item\n */\n subactions?: MenuAction[];\n};\n\ntype MenuComponentPropsBase = {\n style?: StyleProp<ViewStyle>;\n /**\n * Callback function that will be called when selecting a menu item.\n * It will contain id of the given action.\n */\n onPressAction?: ({ nativeEvent }: NativeActionEvent) => void;\n /**\n * Actions to be displayed in the menu.\n */\n actions: MenuAction[];\n /**\n * The title of the menu.\n */\n title?: string;\n /**\n * (Android API 23+)\n * Boolean value determines whether popup menu should be anchored\n * to right corner of parent view - default value is `false`\n * @platform Android\n */\n isAnchoredToRight?: boolean;\n /**\n * Determines if menu should open after long press or on normal press\n *\n * @default false\n */\n shouldOpenOnLongPress?: boolean;\n};\n\nexport type MenuComponentProps =\n React.PropsWithChildren<MenuComponentPropsBase>;\n\nexport type ProcessedMenuAction = Omit<\n MenuAction,\n 'imageColor' | 'titleColor' | 'subactions'\n> & {\n imageColor: ReturnType<typeof processColor>;\n titleColor: ReturnType<typeof processColor>;\n subactions?: ProcessedMenuAction[];\n};\n\nexport type NativeMenuComponentProps = {\n style?: StyleProp<ViewStyle>;\n onPressAction?: ({ nativeEvent }: NativeActionEvent) => void;\n actions: ProcessedMenuAction[];\n title?: string;\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["requireNativeComponent","MenuComponent"],"sources":["UIMenuView.android.tsx"],"sourcesContent":["import { HostComponent, requireNativeComponent } from 'react-native';\nimport type { NativeMenuComponentProps } from './types';\n\nconst MenuComponent = requireNativeComponent(\n 'MenuView'\n) as HostComponent<NativeMenuComponentProps>;\n\nexport default MenuComponent;\n"],"mappings":"AAAA,SAAwBA,sBAAxB,QAAsD,cAAtD;AAGA,MAAMC,aAAa,GAAGD,sBAAsB,CAC1C,UAD0C,CAA5C;AAIA,eAAeC,aAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["requireNativeComponent","MenuComponent"],"sources":["UIMenuView.ios.tsx"],"sourcesContent":["import { HostComponent, requireNativeComponent } from 'react-native';\nimport type { NativeMenuComponentProps } from './types';\n\nconst MenuComponent = requireNativeComponent(\n 'RCTUIMenu'\n) as HostComponent<NativeMenuComponentProps>;\n\nexport default MenuComponent;\n"],"mappings":"AAAA,SAAwBA,sBAAxB,QAAsD,cAAtD;AAGA,MAAMC,aAAa,GAAGD,sBAAsB,CAC1C,WAD0C,CAA5C;AAIA,eAAeC,aAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","View","MenuView","style","children"],"sources":["UIMenuView.tsx"],"sourcesContent":["import * as React from 'react';\nimport { View } from 'react-native';\nimport type { NativeMenuComponentProps } from './types';\n\n/**\n * TODO: implement for Web\n */\nconst MenuView: React.FC<NativeMenuComponentProps> = ({ style, children }) => {\n return <View style={style}>{children}</View>;\n};\n\nexport default MenuView;\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAqB,cAArB;;AAGA;AACA;AACA;AACA,MAAMC,QAA4C,GAAG,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KAAyB;EAC5E,oBAAO,oBAAC,IAAD;IAAM,KAAK,EAAED;EAAb,GAAqBC,QAArB,CAAP;AACD,CAFD;;AAIA,eAAeF,QAAf"}
|
package/lib/module/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { processColor } from 'react-native';
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["React","processColor","UIMenuView","processAction","action","imageColor","titleColor","subactions","map","subAction","MenuView","actions","props","processedActions"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { processColor } from 'react-native';\n\nimport UIMenuView from './UIMenuView';\nimport type {\n MenuComponentProps,\n MenuAction,\n ProcessedMenuAction,\n NativeActionEvent,\n} from './types';\n\nfunction processAction(action: MenuAction): ProcessedMenuAction {\n return {\n ...action,\n imageColor: processColor(action.imageColor),\n titleColor: processColor(action.titleColor),\n subactions: action.subactions?.map((subAction) => processAction(subAction)),\n };\n}\n\nconst MenuView: React.FC<MenuComponentProps> = ({ actions, ...props }) => {\n const processedActions = actions.map<ProcessedMenuAction>((action) =>\n processAction(action)\n );\n return <UIMenuView {...props} actions={processedActions} />;\n};\n\nexport { MenuView };\nexport type { MenuComponentProps, MenuAction, NativeActionEvent };\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,YAAT,QAA6B,cAA7B;AAEA,OAAOC,UAAP,MAAuB,cAAvB;;AAQA,SAASC,aAAT,CAAuBC,MAAvB,EAAgE;EAAA;;EAC9D,OAAO,EACL,GAAGA,MADE;IAELC,UAAU,EAAEJ,YAAY,CAACG,MAAM,CAACC,UAAR,CAFnB;IAGLC,UAAU,EAAEL,YAAY,CAACG,MAAM,CAACE,UAAR,CAHnB;IAILC,UAAU,wBAAEH,MAAM,CAACG,UAAT,uDAAE,mBAAmBC,GAAnB,CAAwBC,SAAD,IAAeN,aAAa,CAACM,SAAD,CAAnD;EAJP,CAAP;AAMD;;AAED,MAAMC,QAAsC,GAAG,CAAC;EAAEC,OAAF;EAAW,GAAGC;AAAd,CAAD,KAA2B;EACxE,MAAMC,gBAAgB,GAAGF,OAAO,CAACH,GAAR,CAAkCJ,MAAD,IACxDD,aAAa,CAACC,MAAD,CADU,CAAzB;EAGA,oBAAO,oBAAC,UAAD,eAAgBQ,KAAhB;IAAuB,OAAO,EAAEC;EAAhC,GAAP;AACD,CALD;;AAOA,SAASH,QAAT"}
|
package/lib/module/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n ColorValue,\n processColor,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport type * as React from 'react';\n\nexport type NativeActionEvent = {\n nativeEvent: {\n event: string;\n };\n};\n\ntype MenuAttributes = {\n /**\n * An attribute indicating the destructive style.\n */\n destructive?: boolean;\n /**\n * An attribute indicating the disabled style.\n */\n disabled?: boolean;\n /**\n * An attribute indicating the hidden style.\n */\n hidden?: boolean;\n};\n\n/**\n * The state of the action.\n * - off: A constant indicating the menu element is in the “off” state.\n * - on: A constant indicating the menu element is in the “on” state.\n * - mixed: A constant indicating the menu element is in the “mixed” state.\n */\ntype MenuState = 'off' | 'on' | 'mixed';\n\nexport type MenuAction = {\n /**\n * Identifier of the menu action.\n * The value set in this id will be returned when menu is selected.\n */\n id?: string;\n /**\n * The action's title.\n */\n title: string;\n /**\n * (Android only)\n * The action's title color.\n * @platform Android\n */\n titleColor?: number | ColorValue;\n /**\n * (iOS14+ only)\n * An elaborated title that explains the purpose of the action.\n * @platform iOS\n */\n subtitle?: string;\n /**\n * The attributes indicating the style of the action.\n */\n attributes?: MenuAttributes;\n /**\n * (iOS14+ only)\n * The state of the action.\n * @platform iOS\n */\n state?: MenuState;\n /**\n * (Android and iOS13+ only)\n * - The action's image.\n * - Allows icon name included in project or system (Android) resources drawables and\n * in SF Symbol (iOS)\n * @example // (iOS)\n * image=\"plus\"\n * @example // (Android)\n * image=\"ic_menu_add\"\n * - TODO: Allow images other than those included in SF Symbol and resources drawables\n */\n image?: string;\n /**\n * (Android and iOS13+ only)\n * - The action's image color.\n */\n imageColor?: number | ColorValue;\n /**\n * (Android and iOS14+ only)\n * - Actions to be displayed in the sub menu\n * - On Android it does not support nesting next sub menus in sub menu item\n */\n subactions?: MenuAction[];\n};\n\ntype MenuComponentPropsBase = {\n style?: StyleProp<ViewStyle>;\n /**\n * Callback function that will be called when selecting a menu item.\n * It will contain id of the given action.\n */\n onPressAction?: ({ nativeEvent }: NativeActionEvent) => void;\n /**\n * Actions to be displayed in the menu.\n */\n actions: MenuAction[];\n /**\n * The title of the menu.\n */\n title?: string;\n /**\n * (Android API 23+)\n * Boolean value determines whether popup menu should be anchored\n * to right corner of parent view - default value is `false`\n * @platform Android\n */\n isAnchoredToRight?: boolean;\n /**\n * Determines if menu should open after long press or on normal press\n *\n * @default false\n */\n shouldOpenOnLongPress?: boolean;\n};\n\nexport type MenuComponentProps =\n React.PropsWithChildren<MenuComponentPropsBase>;\n\nexport type ProcessedMenuAction = Omit<\n MenuAction,\n 'imageColor' | 'titleColor' | 'subactions'\n> & {\n imageColor: ReturnType<typeof processColor>;\n titleColor: ReturnType<typeof processColor>;\n subactions?: ProcessedMenuAction[];\n};\n\nexport type NativeMenuComponentProps = {\n style?: StyleProp<ViewStyle>;\n onPressAction?: ({ nativeEvent }: NativeActionEvent) => void;\n actions: ProcessedMenuAction[];\n title?: string;\n};\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { MenuComponentProps, MenuAction } from './types';
|
|
2
|
+
import type { MenuComponentProps, MenuAction, NativeActionEvent } from './types';
|
|
3
3
|
declare const MenuView: React.FC<MenuComponentProps>;
|
|
4
4
|
export { MenuView };
|
|
5
|
-
export type { MenuComponentProps, MenuAction };
|
|
5
|
+
export type { MenuComponentProps, MenuAction, NativeActionEvent };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ColorValue, processColor, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
export declare type NativeActionEvent = {
|
|
3
4
|
nativeEvent: {
|
|
4
5
|
event: string;
|
|
5
6
|
};
|
|
@@ -81,7 +82,7 @@ export declare type MenuAction = {
|
|
|
81
82
|
*/
|
|
82
83
|
subactions?: MenuAction[];
|
|
83
84
|
};
|
|
84
|
-
|
|
85
|
+
declare type MenuComponentPropsBase = {
|
|
85
86
|
style?: StyleProp<ViewStyle>;
|
|
86
87
|
/**
|
|
87
88
|
* Callback function that will be called when selecting a menu item.
|
|
@@ -110,6 +111,7 @@ export declare type MenuComponentProps = {
|
|
|
110
111
|
*/
|
|
111
112
|
shouldOpenOnLongPress?: boolean;
|
|
112
113
|
};
|
|
114
|
+
export declare type MenuComponentProps = React.PropsWithChildren<MenuComponentPropsBase>;
|
|
113
115
|
export declare type ProcessedMenuAction = Omit<MenuAction, 'imageColor' | 'titleColor' | 'subactions'> & {
|
|
114
116
|
imageColor: ReturnType<typeof processColor>;
|
|
115
117
|
titleColor: ReturnType<typeof processColor>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-menu/menu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "UIMenu component for react-native",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@react-native-community/bob": "^0.17.1",
|
|
46
46
|
"@react-native-community/eslint-config": "^3.0.0",
|
|
47
|
-
"@release-it/conventional-changelog": "^
|
|
48
|
-
"@types/jest": "^
|
|
47
|
+
"@release-it/conventional-changelog": "^3.0.1",
|
|
48
|
+
"@types/jest": "^29.1.2",
|
|
49
49
|
"@types/react": "^17.0.1",
|
|
50
|
-
"@types/react-native": "0.
|
|
51
|
-
"eslint": "
|
|
50
|
+
"@types/react-native": "0.67.6",
|
|
51
|
+
"eslint": "8.25.0",
|
|
52
52
|
"eslint-config-prettier": "^8.1.0",
|
|
53
|
-
"eslint-plugin-prettier": "^
|
|
54
|
-
"jest": "^
|
|
53
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
54
|
+
"jest": "^29.1.2",
|
|
55
55
|
"pod-install": "^0.1.0",
|
|
56
56
|
"prettier": "^2.2.1",
|
|
57
57
|
"react": "17.0.1",
|
|
58
58
|
"react-native": "0.64.1",
|
|
59
|
-
"react-native-test-app": "^0.
|
|
59
|
+
"react-native-test-app": "^2.0.0",
|
|
60
60
|
"release-it": "^14.10.0",
|
|
61
61
|
"typescript": "^4.1.3"
|
|
62
62
|
},
|
package/src/index.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
MenuComponentProps,
|
|
7
7
|
MenuAction,
|
|
8
8
|
ProcessedMenuAction,
|
|
9
|
+
NativeActionEvent,
|
|
9
10
|
} from './types';
|
|
10
11
|
|
|
11
12
|
function processAction(action: MenuAction): ProcessedMenuAction {
|
|
@@ -25,4 +26,4 @@ const MenuView: React.FC<MenuComponentProps> = ({ actions, ...props }) => {
|
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
export { MenuView };
|
|
28
|
-
export type { MenuComponentProps, MenuAction };
|
|
29
|
+
export type { MenuComponentProps, MenuAction, NativeActionEvent };
|
package/src/types.ts
CHANGED
|
@@ -4,8 +4,9 @@ import type {
|
|
|
4
4
|
StyleProp,
|
|
5
5
|
ViewStyle,
|
|
6
6
|
} from 'react-native';
|
|
7
|
+
import type * as React from 'react';
|
|
7
8
|
|
|
8
|
-
type NativeActionEvent = {
|
|
9
|
+
export type NativeActionEvent = {
|
|
9
10
|
nativeEvent: {
|
|
10
11
|
event: string;
|
|
11
12
|
};
|
|
@@ -91,7 +92,7 @@ export type MenuAction = {
|
|
|
91
92
|
subactions?: MenuAction[];
|
|
92
93
|
};
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
type MenuComponentPropsBase = {
|
|
95
96
|
style?: StyleProp<ViewStyle>;
|
|
96
97
|
/**
|
|
97
98
|
* Callback function that will be called when selecting a menu item.
|
|
@@ -121,6 +122,9 @@ export type MenuComponentProps = {
|
|
|
121
122
|
shouldOpenOnLongPress?: boolean;
|
|
122
123
|
};
|
|
123
124
|
|
|
125
|
+
export type MenuComponentProps =
|
|
126
|
+
React.PropsWithChildren<MenuComponentPropsBase>;
|
|
127
|
+
|
|
124
128
|
export type ProcessedMenuAction = Omit<
|
|
125
129
|
MenuAction,
|
|
126
130
|
'imageColor' | 'titleColor' | 'subactions'
|
package/.editorconfig
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# EditorConfig helps developers define and maintain consistent
|
|
2
|
-
# coding styles between different editors and IDEs
|
|
3
|
-
# editorconfig.org
|
|
4
|
-
|
|
5
|
-
root = true
|
|
6
|
-
|
|
7
|
-
[*]
|
|
8
|
-
|
|
9
|
-
indent_style = space
|
|
10
|
-
indent_size = 2
|
|
11
|
-
|
|
12
|
-
end_of_line = lf
|
|
13
|
-
charset = utf-8
|
|
14
|
-
trim_trailing_whitespace = true
|
|
15
|
-
insert_final_newline = true
|
package/.gitattributes
DELETED
package/.github/CODEOWNERS
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
* @Naturalclar
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Overview
|
|
2
|
-
|
|
3
|
-
<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. -->
|
|
4
|
-
<!-- Help us understand your motivation by explaining why you decided to make this change -->
|
|
5
|
-
|
|
6
|
-
# Test Plan
|
|
7
|
-
|
|
8
|
-
<!-- Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! Increase test coverage whenever possible. -->
|
package/.github/dependabot.yml
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: npm
|
|
4
|
-
directory: "/"
|
|
5
|
-
schedule:
|
|
6
|
-
interval: daily
|
|
7
|
-
open-pull-requests-limit: 10
|
|
8
|
-
ignore:
|
|
9
|
-
- dependency-name: pod-install
|
|
10
|
-
versions:
|
|
11
|
-
- 0.1.16
|
|
12
|
-
- 0.1.17
|
|
13
|
-
- 0.1.19
|
|
14
|
-
- 0.1.20
|
|
15
|
-
- dependency-name: release-it
|
|
16
|
-
versions:
|
|
17
|
-
- 14.2.2
|
|
18
|
-
- 14.3.0
|
|
19
|
-
- 14.4.0
|
|
20
|
-
- 14.4.1
|
|
21
|
-
- 14.5.0
|
|
22
|
-
- 14.5.1
|
|
23
|
-
- dependency-name: eslint
|
|
24
|
-
versions:
|
|
25
|
-
- 7.18.0
|
|
26
|
-
- 7.20.0
|
|
27
|
-
- 7.23.0
|
|
28
|
-
- dependency-name: "@types/react-native"
|
|
29
|
-
versions:
|
|
30
|
-
- 0.63.49
|
|
31
|
-
- 0.63.51
|
|
32
|
-
- 0.64.0
|
|
33
|
-
- dependency-name: react-native
|
|
34
|
-
versions:
|
|
35
|
-
- 0.64.0
|
|
36
|
-
- dependency-name: react
|
|
37
|
-
versions:
|
|
38
|
-
- 17.0.1
|
|
39
|
-
- dependency-name: typescript
|
|
40
|
-
versions:
|
|
41
|
-
- 4.1.4
|
|
42
|
-
- 4.2.3
|
|
43
|
-
- dependency-name: eslint-config-prettier
|
|
44
|
-
versions:
|
|
45
|
-
- 8.0.0
|
|
46
|
-
- dependency-name: prettier
|
|
47
|
-
versions:
|
|
48
|
-
- 2.2.1
|
|
49
|
-
- dependency-name: "@types/react"
|
|
50
|
-
versions:
|
|
51
|
-
- 17.0.0
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
name: Build
|
|
2
|
-
on: push
|
|
3
|
-
|
|
4
|
-
jobs:
|
|
5
|
-
lint:
|
|
6
|
-
runs-on: ubuntu-18.04
|
|
7
|
-
strategy:
|
|
8
|
-
matrix:
|
|
9
|
-
node-version: [12]
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v2
|
|
12
|
-
- uses: actions/setup-node@v1
|
|
13
|
-
with:
|
|
14
|
-
node-version: ${{ matrix.node-version }}
|
|
15
|
-
- name: Get yarn cache
|
|
16
|
-
id: yarn-cache
|
|
17
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
18
|
-
- uses: actions/cache@v2
|
|
19
|
-
with:
|
|
20
|
-
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
21
|
-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
22
|
-
- name: Install Dependencies
|
|
23
|
-
run: yarn
|
|
24
|
-
- name: ESLint Checks
|
|
25
|
-
run: yarn lint
|
|
26
|
-
tsc:
|
|
27
|
-
runs-on: ubuntu-18.04
|
|
28
|
-
strategy:
|
|
29
|
-
matrix:
|
|
30
|
-
node-version: [12]
|
|
31
|
-
steps:
|
|
32
|
-
- uses: actions/checkout@v2
|
|
33
|
-
- uses: actions/setup-node@v1
|
|
34
|
-
with:
|
|
35
|
-
node-version: ${{ matrix.node-version }}
|
|
36
|
-
- name: Get yarn cache
|
|
37
|
-
id: yarn-cache
|
|
38
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
39
|
-
- uses: actions/cache@v2
|
|
40
|
-
with:
|
|
41
|
-
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
42
|
-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
43
|
-
- name: Install Dependencies
|
|
44
|
-
run: yarn
|
|
45
|
-
- name: TypeScript type check
|
|
46
|
-
run: yarn typescript
|
|
47
|
-
android:
|
|
48
|
-
runs-on: ubuntu-18.04
|
|
49
|
-
strategy:
|
|
50
|
-
matrix:
|
|
51
|
-
node-version: [12]
|
|
52
|
-
steps:
|
|
53
|
-
- uses: actions/checkout@v2
|
|
54
|
-
- uses: actions/setup-node@v1
|
|
55
|
-
with:
|
|
56
|
-
node-version: ${{ matrix.node-version }}
|
|
57
|
-
- name: Get yarn cache
|
|
58
|
-
id: yarn-cache
|
|
59
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
60
|
-
- uses: actions/cache@v2
|
|
61
|
-
with:
|
|
62
|
-
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
63
|
-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
64
|
-
- name: Install Dependencies
|
|
65
|
-
run: yarn && yarn bootstrap
|
|
66
|
-
- name: Build Android Example App and Library
|
|
67
|
-
run: cd example/android && ./gradlew clean assembleDebug
|
|
68
|
-
ios:
|
|
69
|
-
runs-on: macos-latest
|
|
70
|
-
strategy:
|
|
71
|
-
matrix:
|
|
72
|
-
node-version: [12]
|
|
73
|
-
steps:
|
|
74
|
-
- uses: actions/checkout@v2
|
|
75
|
-
- uses: actions/setup-node@v1
|
|
76
|
-
with:
|
|
77
|
-
node-version: ${{ matrix.node-version }}
|
|
78
|
-
- name: Get yarn cache
|
|
79
|
-
id: yarn-cache
|
|
80
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
81
|
-
- uses: actions/cache@v2
|
|
82
|
-
with:
|
|
83
|
-
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
84
|
-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
85
|
-
- name: Install Dependencies
|
|
86
|
-
run: yarn && yarn bootstrap
|
|
87
|
-
- name: Install Podfiles
|
|
88
|
-
run: cd example && npx pod-install
|
|
89
|
-
- name: Build example app
|
|
90
|
-
run: cd example && yarn ios
|
package/.gitignore
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# OSX
|
|
2
|
-
#
|
|
3
|
-
.DS_Store
|
|
4
|
-
|
|
5
|
-
# XDE
|
|
6
|
-
.expo/
|
|
7
|
-
|
|
8
|
-
# VSCode
|
|
9
|
-
.vscode/
|
|
10
|
-
jsconfig.json
|
|
11
|
-
|
|
12
|
-
# Xcode
|
|
13
|
-
#
|
|
14
|
-
build/
|
|
15
|
-
*.pbxuser
|
|
16
|
-
!default.pbxuser
|
|
17
|
-
*.mode1v3
|
|
18
|
-
!default.mode1v3
|
|
19
|
-
*.mode2v3
|
|
20
|
-
!default.mode2v3
|
|
21
|
-
*.perspectivev3
|
|
22
|
-
!default.perspectivev3
|
|
23
|
-
xcuserdata
|
|
24
|
-
*.xccheckout
|
|
25
|
-
*.moved-aside
|
|
26
|
-
DerivedData
|
|
27
|
-
*.hmap
|
|
28
|
-
*.ipa
|
|
29
|
-
*.xcuserstate
|
|
30
|
-
project.xcworkspace
|
|
31
|
-
|
|
32
|
-
# Android/IJ
|
|
33
|
-
#
|
|
34
|
-
.idea
|
|
35
|
-
.gradle
|
|
36
|
-
local.properties
|
|
37
|
-
android.iml
|
|
38
|
-
|
|
39
|
-
# Cocoapods
|
|
40
|
-
#
|
|
41
|
-
example/ios/Pods
|
|
42
|
-
|
|
43
|
-
# node.js
|
|
44
|
-
#
|
|
45
|
-
node_modules/
|
|
46
|
-
npm-debug.log
|
|
47
|
-
yarn-debug.log
|
|
48
|
-
yarn-error.log
|
|
49
|
-
|
|
50
|
-
# BUCK
|
|
51
|
-
buck-out/
|
|
52
|
-
\.buckd/
|
|
53
|
-
android/app/libs
|
|
54
|
-
android/keystores/debug.keystore
|
|
55
|
-
|
|
56
|
-
# Expo
|
|
57
|
-
.expo/*
|
|
58
|
-
|
|
59
|
-
# generated by bob
|
|
60
|
-
lib/
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project.
|
|
4
|
-
|
|
5
|
-
## Development workflow
|
|
6
|
-
|
|
7
|
-
To get started with the project, run `yarn bootstrap` in the root directory to install the required dependencies for each package:
|
|
8
|
-
|
|
9
|
-
```sh
|
|
10
|
-
yarn bootstrap
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
While developing, you can run the [example app](/example/) to test your changes.
|
|
14
|
-
|
|
15
|
-
To start the packager:
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
yarn example start
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
To run the example app on Android:
|
|
22
|
-
|
|
23
|
-
```sh
|
|
24
|
-
yarn example android
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
To run the example app on iOS:
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
yarn example ios
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Make sure your code passes TypeScript and ESLint. Run the following to verify:
|
|
34
|
-
|
|
35
|
-
```sh
|
|
36
|
-
yarn typescript
|
|
37
|
-
yarn lint
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
To fix formatting errors, run the following:
|
|
41
|
-
|
|
42
|
-
```sh
|
|
43
|
-
yarn lint --fix
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Remember to add tests for your change if possible. Run the unit tests by:
|
|
47
|
-
|
|
48
|
-
```sh
|
|
49
|
-
yarn test
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
To edit the Objective-C files, open `example/ios/MenuExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-menu`.
|
|
53
|
-
|
|
54
|
-
To edit the Kotlin files, open `example/android` in Android studio and find the source files at `reactnativemenu` under `Android`.
|
|
55
|
-
|
|
56
|
-
### Commit message convention
|
|
57
|
-
|
|
58
|
-
We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
|
|
59
|
-
|
|
60
|
-
- `fix`: bug fixes, e.g. fix crash due to deprecated method.
|
|
61
|
-
- `feat`: new features, e.g. add new method to the module.
|
|
62
|
-
- `refactor`: code refactor, e.g. migrate from class components to hooks.
|
|
63
|
-
- `docs`: changes into documentation, e.g. add usage example for the module..
|
|
64
|
-
- `test`: adding or updating tests, eg add integration tests using detox.
|
|
65
|
-
- `chore`: tooling changes, e.g. change CI config.
|
|
66
|
-
|
|
67
|
-
Our pre-commit hooks verify that your commit message matches this format when committing.
|
|
68
|
-
|
|
69
|
-
### Linting and tests
|
|
70
|
-
|
|
71
|
-
[ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/)
|
|
72
|
-
|
|
73
|
-
We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.
|
|
74
|
-
|
|
75
|
-
Our pre-commit hooks verify that the linter and tests pass when committing.
|
|
76
|
-
|
|
77
|
-
### Scripts
|
|
78
|
-
|
|
79
|
-
The `package.json` file contains various scripts for common tasks:
|
|
80
|
-
|
|
81
|
-
- `yarn bootstrap`: setup project by installing all dependencies and pods.
|
|
82
|
-
- `yarn typescript`: type-check files with TypeScript.
|
|
83
|
-
- `yarn lint`: lint files with ESLint.
|
|
84
|
-
- `yarn test`: run unit tests with Jest.
|
|
85
|
-
- `yarn example start`: start the Metro server for the example app.
|
|
86
|
-
- `yarn example android`: run the example app on Android.
|
|
87
|
-
- `yarn example ios`: run the example app on iOS.
|
|
88
|
-
|
|
89
|
-
### Sending a pull request
|
|
90
|
-
|
|
91
|
-
> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
|
|
92
|
-
|
|
93
|
-
When you're sending a pull request:
|
|
94
|
-
|
|
95
|
-
- Prefer small pull requests focused on one change.
|
|
96
|
-
- Verify that linters and tests are passing.
|
|
97
|
-
- Review the documentation to make sure it looks good.
|
|
98
|
-
- Follow the pull request template when opening a pull request.
|
|
99
|
-
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
|
|
100
|
-
|
|
101
|
-
## Code of Conduct
|
|
102
|
-
|
|
103
|
-
### Our Pledge
|
|
104
|
-
|
|
105
|
-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
106
|
-
|
|
107
|
-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
108
|
-
|
|
109
|
-
### Our Standards
|
|
110
|
-
|
|
111
|
-
Examples of behavior that contributes to a positive environment for our community include:
|
|
112
|
-
|
|
113
|
-
- Demonstrating empathy and kindness toward other people
|
|
114
|
-
- Being respectful of differing opinions, viewpoints, and experiences
|
|
115
|
-
- Giving and gracefully accepting constructive feedback
|
|
116
|
-
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
117
|
-
- Focusing on what is best not just for us as individuals, but for the overall community
|
|
118
|
-
|
|
119
|
-
Examples of unacceptable behavior include:
|
|
120
|
-
|
|
121
|
-
- The use of sexualized language or imagery, and sexual attention or
|
|
122
|
-
advances of any kind
|
|
123
|
-
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
124
|
-
- Public or private harassment
|
|
125
|
-
- Publishing others' private information, such as a physical or email
|
|
126
|
-
address, without their explicit permission
|
|
127
|
-
- Other conduct which could reasonably be considered inappropriate in a
|
|
128
|
-
professional setting
|
|
129
|
-
|
|
130
|
-
### Enforcement Responsibilities
|
|
131
|
-
|
|
132
|
-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
133
|
-
|
|
134
|
-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
135
|
-
|
|
136
|
-
### Scope
|
|
137
|
-
|
|
138
|
-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
139
|
-
|
|
140
|
-
### Enforcement
|
|
141
|
-
|
|
142
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.
|
|
143
|
-
|
|
144
|
-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
145
|
-
|
|
146
|
-
### Enforcement Guidelines
|
|
147
|
-
|
|
148
|
-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
149
|
-
|
|
150
|
-
#### 1. Correction
|
|
151
|
-
|
|
152
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
153
|
-
|
|
154
|
-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
155
|
-
|
|
156
|
-
#### 2. Warning
|
|
157
|
-
|
|
158
|
-
**Community Impact**: A violation through a single incident or series of actions.
|
|
159
|
-
|
|
160
|
-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
161
|
-
|
|
162
|
-
#### 3. Temporary Ban
|
|
163
|
-
|
|
164
|
-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
165
|
-
|
|
166
|
-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
167
|
-
|
|
168
|
-
#### 4. Permanent Ban
|
|
169
|
-
|
|
170
|
-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
171
|
-
|
|
172
|
-
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
173
|
-
|
|
174
|
-
### Attribution
|
|
175
|
-
|
|
176
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
|
177
|
-
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
178
|
-
|
|
179
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
|
180
|
-
|
|
181
|
-
[homepage]: https://www.contributor-covenant.org
|
|
182
|
-
|
|
183
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
184
|
-
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|