@magmamath/students-features 0.5.3 → 0.5.4-rc.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.
- package/dist/commonjs/features/celebrations/components/Spark.js.map +1 -1
- package/dist/commonjs/features/celebrations/helpers.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -1
- package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js.map +1 -1
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js +52 -0
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js.map +1 -0
- package/dist/commonjs/features/formulaSheet/components/FormulaSheetModal.js +64 -0
- package/dist/commonjs/features/formulaSheet/components/FormulaSheetModal.js.map +1 -0
- package/dist/commonjs/features/formulaSheet/index.js +20 -0
- package/dist/commonjs/features/formulaSheet/index.js.map +1 -0
- package/dist/commonjs/features/formulaSheet/model/api.model.js +15 -0
- package/dist/commonjs/features/formulaSheet/model/api.model.js.map +1 -0
- package/dist/commonjs/features/formulaSheet/model/file.model.js +19 -0
- package/dist/commonjs/features/formulaSheet/model/file.model.js.map +1 -0
- package/dist/commonjs/features/formulaSheet/model/modal.model.js +15 -0
- package/dist/commonjs/features/formulaSheet/model/modal.model.js.map +1 -0
- package/dist/commonjs/features/formulaSheet/model/model.js +35 -0
- package/dist/commonjs/features/formulaSheet/model/model.js.map +1 -0
- package/dist/commonjs/index.js +12 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/icons/Halloween.js.map +1 -1
- package/dist/commonjs/shared/icons/HighlighterIcon.js.map +1 -1
- package/dist/commonjs/shared/icons/Pi.js.map +1 -1
- package/dist/commonjs/shared/icons/Star.js.map +1 -1
- package/dist/commonjs/shared/icons/Valentine.js.map +1 -1
- package/dist/commonjs/shared/icons/Winter.js.map +1 -1
- package/dist/module/features/celebrations/components/Spark.js.map +1 -1
- package/dist/module/features/celebrations/helpers.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -1
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -1
- package/dist/module/features/endOfAssignment/ui/SparkIcon.js.map +1 -1
- package/dist/module/features/formulaSheet/components/FormulaSheet.js +46 -0
- package/dist/module/features/formulaSheet/components/FormulaSheet.js.map +1 -0
- package/dist/module/features/formulaSheet/components/FormulaSheetModal.js +58 -0
- package/dist/module/features/formulaSheet/components/FormulaSheetModal.js.map +1 -0
- package/dist/module/features/formulaSheet/index.js +5 -0
- package/dist/module/features/formulaSheet/index.js.map +1 -0
- package/dist/module/features/formulaSheet/model/api.model.js +10 -0
- package/dist/module/features/formulaSheet/model/api.model.js.map +1 -0
- package/dist/module/features/formulaSheet/model/file.model.js +14 -0
- package/dist/module/features/formulaSheet/model/file.model.js.map +1 -0
- package/dist/module/features/formulaSheet/model/modal.model.js +10 -0
- package/dist/module/features/formulaSheet/model/modal.model.js.map +1 -0
- package/dist/module/features/formulaSheet/model/model.js +30 -0
- package/dist/module/features/formulaSheet/model/model.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/icons/Halloween.js.map +1 -1
- package/dist/module/shared/icons/HighlighterIcon.js.map +1 -1
- package/dist/module/shared/icons/Pi.js.map +1 -1
- package/dist/module/shared/icons/Star.js.map +1 -1
- package/dist/module/shared/icons/Valentine.js.map +1 -1
- package/dist/module/shared/icons/Winter.js.map +1 -1
- package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts +1 -1
- package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts +1 -1
- package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheet.d.ts +15 -0
- package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheetModal.d.ts +10 -0
- package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheetModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/formulaSheet/index.d.ts +3 -0
- package/dist/typescript/commonjs/features/formulaSheet/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/formulaSheet/model/api.model.d.ts +9 -0
- package/dist/typescript/commonjs/features/formulaSheet/model/api.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/formulaSheet/model/file.model.d.ts +14 -0
- package/dist/typescript/commonjs/features/formulaSheet/model/file.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/formulaSheet/model/modal.model.d.ts +7 -0
- package/dist/typescript/commonjs/features/formulaSheet/model/modal.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/formulaSheet/model/model.d.ts +14 -0
- package/dist/typescript/commonjs/features/formulaSheet/model/model.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/Halloween.d.ts +1 -1
- package/dist/typescript/commonjs/shared/icons/Halloween.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/HighlighterIcon.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/Pi.d.ts +1 -1
- package/dist/typescript/commonjs/shared/icons/Pi.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/Star.d.ts +1 -1
- package/dist/typescript/commonjs/shared/icons/Star.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/Valentine.d.ts +1 -1
- package/dist/typescript/commonjs/shared/icons/Valentine.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/Winter.d.ts +1 -1
- package/dist/typescript/commonjs/shared/icons/Winter.d.ts.map +1 -1
- package/dist/typescript/module/features/celebrations/components/Spark.d.ts +1 -1
- package/dist/typescript/module/features/celebrations/components/Spark.d.ts.map +1 -1
- package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +1 -1
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -1
- package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts +1 -1
- package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -1
- package/dist/typescript/module/features/formulaSheet/components/FormulaSheet.d.ts +15 -0
- package/dist/typescript/module/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -0
- package/dist/typescript/module/features/formulaSheet/components/FormulaSheetModal.d.ts +10 -0
- package/dist/typescript/module/features/formulaSheet/components/FormulaSheetModal.d.ts.map +1 -0
- package/dist/typescript/module/features/formulaSheet/index.d.ts +3 -0
- package/dist/typescript/module/features/formulaSheet/index.d.ts.map +1 -0
- package/dist/typescript/module/features/formulaSheet/model/api.model.d.ts +9 -0
- package/dist/typescript/module/features/formulaSheet/model/api.model.d.ts.map +1 -0
- package/dist/typescript/module/features/formulaSheet/model/file.model.d.ts +14 -0
- package/dist/typescript/module/features/formulaSheet/model/file.model.d.ts.map +1 -0
- package/dist/typescript/module/features/formulaSheet/model/modal.model.d.ts +7 -0
- package/dist/typescript/module/features/formulaSheet/model/modal.model.d.ts.map +1 -0
- package/dist/typescript/module/features/formulaSheet/model/model.d.ts +14 -0
- package/dist/typescript/module/features/formulaSheet/model/model.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/Halloween.d.ts +1 -1
- package/dist/typescript/module/shared/icons/Halloween.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/HighlighterIcon.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/Pi.d.ts +1 -1
- package/dist/typescript/module/shared/icons/Pi.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/Star.d.ts +1 -1
- package/dist/typescript/module/shared/icons/Star.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/Valentine.d.ts +1 -1
- package/dist/typescript/module/shared/icons/Valentine.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/Winter.d.ts +1 -1
- package/dist/typescript/module/shared/icons/Winter.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/features/celebrations/components/Spark.tsx +4 -4
- package/src/features/celebrations/helpers.ts +34 -35
- package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +74 -74
- package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +24 -24
- package/src/features/endOfAssignment/ui/SparkIcon.tsx +1 -2
- package/src/features/formulaSheet/components/FormulaSheet.tsx +74 -0
- package/src/features/formulaSheet/components/FormulaSheetModal.tsx +64 -0
- package/src/features/formulaSheet/index.ts +2 -0
- package/src/features/formulaSheet/model/api.model.ts +13 -0
- package/src/features/formulaSheet/model/file.model.ts +18 -0
- package/src/features/formulaSheet/model/modal.model.ts +10 -0
- package/src/features/formulaSheet/model/model.ts +31 -0
- package/src/index.ts +1 -0
- package/src/shared/icons/Halloween.tsx +2 -2
- package/src/shared/icons/HighlighterIcon.tsx +1 -1
- package/src/shared/icons/Pi.tsx +2 -1
- package/src/shared/icons/Star.tsx +2 -1
- package/src/shared/icons/Valentine.tsx +2 -1
- package/src/shared/icons/Winter.tsx +2 -2
package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconProps } from '@magmamath/react-native-ui';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import { IconProps } from '../../../../../shared/icons/icon.types';
|
|
3
3
|
export declare const TrophyIcon: (props: IconProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=TrophyIcon.d.ts.map
|
package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrophyIcon.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TrophyIcon.d.ts","sourceRoot":"","sources":["../../../../../../../../src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAElE,eAAO,MAAM,UAAU,UAAW,SAAS,sBAyD1C,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IconProps } from '
|
|
2
|
+
import { IconProps } from '../../../shared/icons/icon.types';
|
|
3
3
|
export declare const SparkIcon: ({ size, color }: IconProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=SparkIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparkIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/features/endOfAssignment/ui/SparkIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SparkIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/features/endOfAssignment/ui/SparkIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAA;AAE5D,eAAO,MAAM,SAAS,oBAA0B,SAAS,sBASxD,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ButtonColor, ButtonSize, ButtonRef, LoaderColor } from '@magmamath/react-native-ui';
|
|
3
|
+
import { FormulaSheetModel } from '../model/model';
|
|
4
|
+
type FormulaSheetProps = {
|
|
5
|
+
model: FormulaSheetModel;
|
|
6
|
+
fileId: string;
|
|
7
|
+
renderer: (fileBlob: string) => ReactNode;
|
|
8
|
+
buttonSize: ButtonSize;
|
|
9
|
+
buttonColor: ButtonColor;
|
|
10
|
+
loaderColor: LoaderColor;
|
|
11
|
+
onPress?: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const FormulaSheet: React.ForwardRefExoticComponent<FormulaSheetProps & React.RefAttributes<ButtonRef | null>>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=FormulaSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormulaSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAa,MAAM,OAAO,CAAA;AAE/D,OAAO,EAEL,WAAW,EACX,UAAU,EAIV,SAAS,EACT,WAAW,EACZ,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,iBAAiB,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,SAAS,CAAA;IACzC,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;IACxB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,YAAY,4FAgDxB,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { LoaderColor } from '@magmamath/react-native-ui';
|
|
3
|
+
type FormulaSheetModalProps = {
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
loaderColor: LoaderColor;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const FormulaSheetModal: ({ children, loaderColor, isLoading, onClose, }: PropsWithChildren<FormulaSheetModalProps>) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=FormulaSheetModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormulaSheetModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/components/FormulaSheetModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAIL,WAAW,EAIZ,MAAM,4BAA4B,CAAA;AAEnC,KAAK,sBAAsB,GAAG;IAC5B,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,iBAAiB,mDAK3B,iBAAiB,CAAC,sBAAsB,CAAC,sBAkB3C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/formulaSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Effect } from 'effector';
|
|
2
|
+
export type FormulaSheetApiProps = {
|
|
3
|
+
getPDFFileBlob: (id: string) => Promise<string>;
|
|
4
|
+
};
|
|
5
|
+
export declare class FormulaSheetAPI {
|
|
6
|
+
readonly getPDFFileBlobFx: Effect<string, string>;
|
|
7
|
+
setupRequests(api: FormulaSheetApiProps): void;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=api.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAChD,CAAA;AAED,qBAAa,eAAe;IAC1B,SAAgB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAiB;IAElE,aAAa,CAAC,GAAG,EAAE,oBAAoB;CAG/C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StoreWritable } from 'effector';
|
|
2
|
+
import { FormulaSheetAPI } from './api.model';
|
|
3
|
+
type FormulaSheetFileProps = {
|
|
4
|
+
api: FormulaSheetAPI;
|
|
5
|
+
};
|
|
6
|
+
export declare class FormulaSheetFile {
|
|
7
|
+
readonly reset: import("effector").EventCallable<void>;
|
|
8
|
+
readonly $blob: StoreWritable<string | null>;
|
|
9
|
+
readonly setId: import("effector").EventCallable<string>;
|
|
10
|
+
readonly $id: StoreWritable<string | null>;
|
|
11
|
+
constructor({ api }: FormulaSheetFileProps);
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=file.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/file.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,aAAa,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,KAAK,qBAAqB,GAAG;IAC3B,GAAG,EAAE,eAAe,CAAA;CACrB,CAAA;AAED,qBAAa,gBAAgB;IAC3B,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,KAAK,EAAE,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAEnD,SAAgB,KAAK,2CAAwB;IAC7C,SAAgB,GAAG,+BAA4B;gBAEnC,EAAE,GAAG,EAAE,EAAE,qBAAqB;CAG3C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare class FormulaSheetModal {
|
|
2
|
+
readonly reset: import("effector").EventCallable<void>;
|
|
3
|
+
readonly toggle: import("effector").EventCallable<void>;
|
|
4
|
+
readonly setIsOpen: import("effector").EventCallable<boolean>;
|
|
5
|
+
readonly $isOpen: import("effector").StoreWritable<boolean>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=modal.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/modal.model.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IAC5B,SAAgB,KAAK,yCAAgB;IACrC,SAAgB,MAAM,yCAAgB;IACtC,SAAgB,SAAS,4CAAyB;IAClD,SAAgB,OAAO,4CAEH;CACrB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormulaSheetAPI, type FormulaSheetApiProps } from './api.model';
|
|
2
|
+
import { FormulaSheetModal } from './modal.model';
|
|
3
|
+
import { FormulaSheetFile } from './file.model';
|
|
4
|
+
type FormulaSheetModelProps = {
|
|
5
|
+
api: FormulaSheetApiProps;
|
|
6
|
+
};
|
|
7
|
+
export declare class FormulaSheetModel {
|
|
8
|
+
readonly api: FormulaSheetAPI;
|
|
9
|
+
readonly modal: FormulaSheetModal;
|
|
10
|
+
readonly file: FormulaSheetFile;
|
|
11
|
+
constructor({ api }: FormulaSheetModelProps);
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/formulaSheet/model/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE/C,KAAK,sBAAsB,GAAG;IAC5B,GAAG,EAAE,oBAAoB,CAAA;CAC1B,CAAA;AAED,qBAAa,iBAAiB;IAC5B,SAAgB,GAAG,kBAAwB;IAC3C,SAAgB,KAAK,oBAA0B;IAC/C,SAAgB,IAAI,mBAA0C;gBAElD,EAAE,GAAG,EAAE,EAAE,sBAAsB;CAgB5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IconProps } from '
|
|
2
|
+
import { IconProps } from './icon.types';
|
|
3
3
|
declare function Halloween({ size, color }: IconProps): React.JSX.Element;
|
|
4
4
|
export default Halloween;
|
|
5
5
|
//# sourceMappingURL=Halloween.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Halloween.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/Halloween.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,
|
|
1
|
+
{"version":3,"file":"Halloween.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/Halloween.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,iBAAS,SAAS,CAAC,EAAE,IAAS,EAAE,KAAwB,EAAE,EAAE,SAAS,qBAyBpE;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HighlighterIcon.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/HighlighterIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"HighlighterIcon.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/HighlighterIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,wBAAgB,eAAe,CAAC,EAAE,IAAS,EAAE,KAAwB,EAAE,KAAK,EAAE,EAAE,SAAS,qBAexF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pi.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/Pi.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Pi.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/Pi.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,iBAAS,EAAE,CAAC,EAAE,IAAS,EAAE,KAAwB,EAAE,EAAE,SAAS,qBAS7D;AAED,eAAe,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Star.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/Star.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Star.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/Star.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,iBAAS,IAAI,CAAC,EAAE,IAAS,EAAE,KAAwB,EAAE,EAAE,SAAS,qBAS/D;AAED,eAAe,IAAI,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IconProps } from '
|
|
2
|
+
import { IconProps } from './icon.types';
|
|
3
3
|
declare function Valentine({ size, color }: IconProps): React.JSX.Element;
|
|
4
4
|
export default Valentine;
|
|
5
5
|
//# sourceMappingURL=Valentine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Valentine.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/Valentine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Valentine.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/Valentine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,iBAAS,SAAS,CAAC,EAAE,IAAS,EAAE,KAAwB,EAAE,EAAE,SAAS,qBASpE;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Winter.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/Winter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,
|
|
1
|
+
{"version":3,"file":"Winter.d.ts","sourceRoot":"","sources":["../../../../../src/shared/icons/Winter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,iBAAS,MAAM,CAAC,EAAE,IAAS,EAAE,KAAwB,EAAE,EAAE,SAAS,qBAWjE;AAED,eAAe,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magmamath/students-features",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4-rc.1",
|
|
4
4
|
"description": "Magmamath features library",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react-native-svg": "^15.10.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@magmamath/react-native-ui": "0.4.
|
|
32
|
+
"@magmamath/react-native-ui": "0.4.12",
|
|
33
33
|
"@react-native/eslint-config": "^0.73.1",
|
|
34
34
|
"@release-it/conventional-changelog": "^9.0.2",
|
|
35
35
|
"@types/jest": "^29.5.5",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View } from 'react-native'
|
|
3
|
+
import { IconProps } from '../../../shared/icons/icon.types'
|
|
4
4
|
|
|
5
5
|
export const Spark = ({ size = 10, color }: IconProps) => (
|
|
6
6
|
<View
|
|
@@ -11,4 +11,4 @@ export const Spark = ({ size = 10, color }: IconProps) => (
|
|
|
11
11
|
borderRadius: size / 2,
|
|
12
12
|
}}
|
|
13
13
|
/>
|
|
14
|
-
)
|
|
14
|
+
)
|
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
import { ParticlesBatch } from './components/ParticleBatch'
|
|
2
|
-
import { Spark } from './components/Spark'
|
|
3
|
-
import { CELEBRATION_ICON_CONFIG, CELEBRATION_VARIANTS } from './config'
|
|
4
|
-
import { CelebrationVariant } from './types'
|
|
1
|
+
import { ParticlesBatch } from './components/ParticleBatch'
|
|
2
|
+
import { Spark } from './components/Spark'
|
|
3
|
+
import { CELEBRATION_ICON_CONFIG, CELEBRATION_VARIANTS } from './config'
|
|
4
|
+
import { CelebrationVariant } from './types'
|
|
5
5
|
|
|
6
|
-
export const randomRange = (min: number, max: number) => Math.random() * (max - min) + min
|
|
6
|
+
export const randomRange = (min: number, max: number) => Math.random() * (max - min) + min
|
|
7
7
|
|
|
8
8
|
const isDateInRange = (currentDate: Date, startDateStr: string, endDateStr: string) => {
|
|
9
|
-
const [startDay, startMonth] = startDateStr.split('-').map(Number)
|
|
10
|
-
const [endDay, endMonth] = endDateStr.split('-').map(Number)
|
|
9
|
+
const [startDay, startMonth] = startDateStr.split('-').map(Number)
|
|
10
|
+
const [endDay, endMonth] = endDateStr.split('-').map(Number)
|
|
11
11
|
|
|
12
|
-
const currentYear = currentDate.getFullYear()
|
|
13
|
-
const startDate = new Date(currentYear, startMonth - 1, startDay)
|
|
14
|
-
const endDate = new Date(currentYear, endMonth - 1, endDay + 1)
|
|
12
|
+
const currentYear = currentDate.getFullYear()
|
|
13
|
+
const startDate = new Date(currentYear, startMonth - 1, startDay)
|
|
14
|
+
const endDate = new Date(currentYear, endMonth - 1, endDay + 1)
|
|
15
15
|
|
|
16
|
-
return currentDate >= startDate && currentDate <= endDate
|
|
17
|
-
}
|
|
16
|
+
return currentDate >= startDate && currentDate <= endDate
|
|
17
|
+
}
|
|
18
18
|
|
|
19
19
|
export const getIconForCurrentDate = () => {
|
|
20
|
-
const currentDate = new Date()
|
|
20
|
+
const currentDate = new Date()
|
|
21
21
|
|
|
22
22
|
for (const celebration of CELEBRATION_ICON_CONFIG) {
|
|
23
23
|
if (celebration.activePeriod) {
|
|
24
|
-
const { start, end } = celebration.activePeriod
|
|
24
|
+
const { start, end } = celebration.activePeriod
|
|
25
25
|
if (isDateInRange(currentDate, start, end)) {
|
|
26
|
-
return celebration.Icon
|
|
26
|
+
return celebration.Icon
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
return CELEBRATION_ICON_CONFIG[0].Icon
|
|
32
|
-
}
|
|
31
|
+
return CELEBRATION_ICON_CONFIG[0].Icon
|
|
32
|
+
}
|
|
33
33
|
|
|
34
|
-
const MainIcon = getIconForCurrentDate()
|
|
35
|
-
export const generateParticle = (variant: CelebrationVariant
|
|
36
|
-
) => {
|
|
34
|
+
const MainIcon = getIconForCurrentDate()
|
|
35
|
+
export const generateParticle = (variant: CelebrationVariant) => {
|
|
37
36
|
const {
|
|
38
37
|
elementsCount,
|
|
39
38
|
angle,
|
|
@@ -44,20 +43,20 @@ export const generateParticle = (variant: CelebrationVariant
|
|
|
44
43
|
friction,
|
|
45
44
|
life,
|
|
46
45
|
angularAcceleration,
|
|
47
|
-
speedRange
|
|
48
|
-
} = CELEBRATION_VARIANTS[variant]
|
|
46
|
+
speedRange,
|
|
47
|
+
} = CELEBRATION_VARIANTS[variant]
|
|
49
48
|
|
|
50
49
|
const sparkSpeedMin = speedRange?.spark?.[0]
|
|
51
50
|
const sparkSpeedMax = speedRange?.spark?.[1]
|
|
52
51
|
const mainSpeedMin = speedRange?.main?.[0]
|
|
53
52
|
const mainSpeedMax = speedRange?.main?.[1]
|
|
54
53
|
|
|
55
|
-
const particles: ParticlesBatch[] = []
|
|
54
|
+
const particles: ParticlesBatch[] = []
|
|
56
55
|
|
|
57
56
|
for (let i = 0; i < elementsCount.spark; i++) {
|
|
58
|
-
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180)
|
|
59
|
-
const randomSpeed = randomRange(sparkSpeedMin, sparkSpeedMax)
|
|
60
|
-
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to)
|
|
57
|
+
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180)
|
|
58
|
+
const randomSpeed = randomRange(sparkSpeedMin, sparkSpeedMax)
|
|
59
|
+
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to)
|
|
61
60
|
|
|
62
61
|
particles.push({
|
|
63
62
|
id: Math.random(),
|
|
@@ -72,14 +71,14 @@ export const generateParticle = (variant: CelebrationVariant
|
|
|
72
71
|
rotationSpeed: 0,
|
|
73
72
|
angularAcceleration: randomAngularAcceleration,
|
|
74
73
|
friction,
|
|
75
|
-
Component: Spark,
|
|
74
|
+
Component: Spark as any,
|
|
76
75
|
life,
|
|
77
|
-
})
|
|
76
|
+
})
|
|
78
77
|
}
|
|
79
78
|
for (let i = 0; i < elementsCount.star; i++) {
|
|
80
|
-
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180)
|
|
81
|
-
const randomSpeed = randomRange(mainSpeedMin, mainSpeedMax)
|
|
82
|
-
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to)
|
|
79
|
+
const randomAngle = randomRange((angle.from * Math.PI) / 180, (angle.to * Math.PI) / 180)
|
|
80
|
+
const randomSpeed = randomRange(mainSpeedMin, mainSpeedMax)
|
|
81
|
+
const randomAngularAcceleration = randomRange(angularAcceleration.from, angularAcceleration.to)
|
|
83
82
|
|
|
84
83
|
particles.push({
|
|
85
84
|
id: Math.random(),
|
|
@@ -94,10 +93,10 @@ export const generateParticle = (variant: CelebrationVariant
|
|
|
94
93
|
rotationSpeed: randomRange(-2, 2),
|
|
95
94
|
angularAcceleration: randomAngularAcceleration,
|
|
96
95
|
friction,
|
|
97
|
-
Component: MainIcon,
|
|
96
|
+
Component: MainIcon as any,
|
|
98
97
|
life,
|
|
99
|
-
})
|
|
98
|
+
})
|
|
100
99
|
}
|
|
101
100
|
|
|
102
|
-
return particles
|
|
103
|
-
}
|
|
101
|
+
return particles
|
|
102
|
+
}
|