@fmfi-uk-1-ain-412/structure-explorer 0.0.6

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 (52) hide show
  1. package/README.md +54 -0
  2. package/dist/App.d.ts +2 -0
  3. package/dist/AppComponent.d.ts +18 -0
  4. package/dist/__tests__/Formula.test.d.ts +1 -0
  5. package/dist/app/hooks.d.ts +4 -0
  6. package/dist/app/store.d.ts +16 -0
  7. package/dist/components_helper/ChoiceBubble.d.ts +8 -0
  8. package/dist/components_helper/ErrorFeedback.d.ts +7 -0
  9. package/dist/components_helper/InputGroupTitle.d.ts +14 -0
  10. package/dist/components_helper/MessageBubble.d.ts +13 -0
  11. package/dist/components_helper/SelectBubble.d.ts +10 -0
  12. package/dist/components_helper/TooltipButton.d.ts +6 -0
  13. package/dist/features/formulas/FormulaCard.d.ts +1 -0
  14. package/dist/features/formulas/FormulaComponent.d.ts +7 -0
  15. package/dist/features/formulas/formulasSlice.d.ts +12373 -0
  16. package/dist/features/game/GameComponent.d.ts +8 -0
  17. package/dist/features/game/GameControls.d.ts +5 -0
  18. package/dist/features/game/GameHistory.d.ts +5 -0
  19. package/dist/features/import/importThunk.d.ts +2 -0
  20. package/dist/features/language/LanguageComponent.d.ts +1 -0
  21. package/dist/features/language/languageSlice.d.ts +588 -0
  22. package/dist/features/structure/InterpretationInput.d.ts +14 -0
  23. package/dist/features/structure/StructureComponent.d.ts +1 -0
  24. package/dist/features/structure/structureSlice.d.ts +886 -0
  25. package/dist/features/variables/VariablesComponent.d.ts +1 -0
  26. package/dist/features/variables/variablesSlice.d.ts +719 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/logicContext.d.ts +27 -0
  29. package/dist/main.d.ts +6 -0
  30. package/dist/model/Expression.d.ts +8 -0
  31. package/dist/model/Language.d.ts +32 -0
  32. package/dist/model/Structure.d.ts +19 -0
  33. package/dist/model/formula/Formula.Conjunction.d.ts +30 -0
  34. package/dist/model/formula/Formula.Disjunction.d.ts +30 -0
  35. package/dist/model/formula/Formula.EqualityAtom.d.ts +36 -0
  36. package/dist/model/formula/Formula.Equivalence.d.ts +35 -0
  37. package/dist/model/formula/Formula.ExistentialQuant.d.ts +29 -0
  38. package/dist/model/formula/Formula.Implication.d.ts +35 -0
  39. package/dist/model/formula/Formula.Negation.d.ts +35 -0
  40. package/dist/model/formula/Formula.PredicateAtom.d.ts +37 -0
  41. package/dist/model/formula/Formula.UniversalQuant.d.ts +29 -0
  42. package/dist/model/formula/Formula.d.ts +37 -0
  43. package/dist/model/formula/QuantifiedFormula.d.ts +18 -0
  44. package/dist/model/term/Term.Constant.d.ts +32 -0
  45. package/dist/model/term/Term.FunctionTerm.d.ts +34 -0
  46. package/dist/model/term/Term.Variable.d.ts +33 -0
  47. package/dist/model/term/Term.d.ts +15 -0
  48. package/dist/structure-explorer.css +5 -0
  49. package/dist/structure-explorer.es.js +25155 -0
  50. package/dist/structure-explorer.umd.js +920 -0
  51. package/dist/vite.svg +1 -0
  52. package/package.json +55 -0
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
13
+
14
+ ```js
15
+ export default tseslint.config({
16
+ extends: [
17
+ // Remove ...tseslint.configs.recommended and replace with this
18
+ ...tseslint.configs.recommendedTypeChecked,
19
+ // Alternatively, use this for stricter rules
20
+ ...tseslint.configs.strictTypeChecked,
21
+ // Optionally, add this for stylistic rules
22
+ ...tseslint.configs.stylisticTypeChecked,
23
+ ],
24
+ languageOptions: {
25
+ // other options...
26
+ parserOptions: {
27
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
28
+ tsconfigRootDir: import.meta.dirname,
29
+ },
30
+ },
31
+ })
32
+ ```
33
+
34
+ You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
35
+
36
+ ```js
37
+ // eslint.config.js
38
+ import reactX from 'eslint-plugin-react-x'
39
+ import reactDom from 'eslint-plugin-react-dom'
40
+
41
+ export default tseslint.config({
42
+ plugins: {
43
+ // Add the react-x and react-dom plugins
44
+ 'react-x': reactX,
45
+ 'react-dom': reactDom,
46
+ },
47
+ rules: {
48
+ // other rules...
49
+ // Enable its recommended typescript rules
50
+ ...reactX.configs['recommended-typescript'].rules,
51
+ ...reactDom.configs.recommended.rules,
52
+ },
53
+ })
54
+ ```
package/dist/App.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare function App(): import("react/jsx-runtime").JSX.Element;
2
+ export default App;
@@ -0,0 +1,18 @@
1
+ import { CellContext } from './logicContext';
2
+ interface PrepareResult {
3
+ instance: any;
4
+ getState: (instance: any) => any;
5
+ }
6
+ export declare function prepare(initialState?: any): PrepareResult;
7
+ interface AppComponentProps {
8
+ instance: any;
9
+ onStateChange: () => void;
10
+ isEdited: boolean;
11
+ context?: CellContext;
12
+ }
13
+ export declare function AppComponent({ instance, onStateChange, isEdited, context, }: AppComponentProps): JSX.Element;
14
+ declare const _default: {
15
+ prepare: typeof prepare;
16
+ AppComponent: typeof AppComponent;
17
+ };
18
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { TypedUseSelectorHook } from 'react-redux';
2
+ import { AppDispatch, RootState } from './store';
3
+ export declare const useAppDispatch: () => AppDispatch;
4
+ export declare const useAppSelector: TypedUseSelectorHook<RootState>;
@@ -0,0 +1,16 @@
1
+ export declare const createStore: () => import('@reduxjs/toolkit').EnhancedStore<{
2
+ formulas: import('../features/formulas/formulasSlice').FormulasState;
3
+ language: import('../features/language/languageSlice').LanguageState;
4
+ structure: import('../features/structure/structureSlice').StructureState;
5
+ variables: import('../features/variables/variablesSlice').VariablesState;
6
+ }, import('redux').UnknownAction, import('@reduxjs/toolkit').Tuple<[import('redux').StoreEnhancer<{
7
+ dispatch: import('redux-thunk').ThunkDispatch<{
8
+ formulas: import('../features/formulas/formulasSlice').FormulasState;
9
+ language: import('../features/language/languageSlice').LanguageState;
10
+ structure: import('../features/structure/structureSlice').StructureState;
11
+ variables: import('../features/variables/variablesSlice').VariablesState;
12
+ }, undefined, import('redux').UnknownAction>;
13
+ }>, import('redux').StoreEnhancer]>>;
14
+ export type AppStore = ReturnType<typeof createStore>;
15
+ export type RootState = ReturnType<AppStore["getState"]>;
16
+ export type AppDispatch = AppStore["dispatch"];
@@ -0,0 +1,8 @@
1
+ interface Props {
2
+ id: number;
3
+ choices: string[];
4
+ type: string;
5
+ onclicks: (() => void)[];
6
+ }
7
+ export default function ChoiceBubble({ choices, onclicks }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { SyntaxError } from '@fmfi-uk-1-ain-412/js-fol-parser';
2
+ interface Props {
3
+ error: SyntaxError | Error | undefined;
4
+ text: string;
5
+ }
6
+ export default function ErrorFeedback({ error, text }: Props): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ChangeEvent, ReactNode } from 'react';
2
+ import { SyntaxError } from '@fmfi-uk-1-ain-412/js-fol-parser';
3
+ interface Props {
4
+ label: string;
5
+ id: string;
6
+ prefix: ReactNode;
7
+ suffix: ReactNode;
8
+ placeholder: string;
9
+ text: string;
10
+ onChange(event: ChangeEvent<HTMLInputElement>): void;
11
+ error?: Error | SyntaxError;
12
+ }
13
+ export default function InputGroupTitle({ label, id, prefix, suffix, placeholder, text, onChange, error, }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ interface Props {
3
+ children: ReactNode;
4
+ sent?: boolean;
5
+ recieved?: boolean;
6
+ change?: boolean;
7
+ win?: boolean;
8
+ lose?: boolean;
9
+ onClick?: () => void;
10
+ }
11
+ export default function MessageBubble({ children: message, //react children?
12
+ sent, change, win, lose, onClick, }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ interface Props {
3
+ id: number;
4
+ title: ReactNode;
5
+ choices: string[];
6
+ type: string;
7
+ onclicks: (() => void)[];
8
+ }
9
+ export default function SelectBubble({ title, choices, onclicks }: Props): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ interface TooltipButtonProps {
3
+ text: ReactNode;
4
+ }
5
+ export default function TooltipButton({ text }: TooltipButtonProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export default function FormulaCard(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ id: number;
3
+ text: string;
4
+ guess: boolean | null;
5
+ }
6
+ export default function FormulaComponent({ id, text, guess }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};