diff --git a/ags-validator-app/app/globals.css b/ags-validator-app/app/globals.css index cc5b5b8..ec92b8c 100644 --- a/ags-validator-app/app/globals.css +++ b/ags-validator-app/app/globals.css @@ -18,7 +18,7 @@ --secondary-foreground: 0 0% 0%; --alternative: 30 100% 30%; --alternative-foreground: 0 0% 100%; - --muted: 207 86 95%; + --muted: 207 86% 95%; --muted-foreground: 0 0% 0%; --accent: 0 0% 96%; --accent-foreground: 0 0% 0%; @@ -47,7 +47,7 @@ --secondary-foreground: 0 0% 98%; --alternative: 30 100% 30%; --alternative-foreground: 0 0% 100%; - --muted: 207 90 3%; + --muted: 207 90% 3%; --muted-foreground: 0 0% 85%; --accent: 0 0% 20%; --accent-foreground: 0 0% 98%; diff --git a/ags-validator-app/components/mobile-nav.tsx b/ags-validator-app/components/mobile-nav.tsx index 228be3f..2d562a6 100644 --- a/ags-validator-app/components/mobile-nav.tsx +++ b/ags-validator-app/components/mobile-nav.tsx @@ -37,14 +37,15 @@ export function MobileNav() {

Visit our website to learn more about GroundUp.

- - - + diff --git a/ags-validator-app/components/validator/GridView/GridView.tsx b/ags-validator-app/components/validator/GridView/GridView.tsx index 304183d..4e62607 100644 --- a/ags-validator-app/components/validator/GridView/GridView.tsx +++ b/ags-validator-app/components/validator/GridView/GridView.tsx @@ -93,8 +93,6 @@ const GridView: React.FC = ({ } }, [selection, setSelectedRows]); - console.log("theme", customTheme); - const scrollToError = useCallback( (error: AgsError) => { if (group.name !== error.group) { @@ -203,8 +201,6 @@ const GridView: React.FC = ({ dispatch(applySetRowDataEffect()); }; - const onCellEdited = () => {}; - const getData = useCallback( ([colNum, rowNum]: Item): GridCell => { const lineNumber = group.lineNumber + 4 + rowNum; @@ -290,7 +286,6 @@ const GridView: React.FC = ({ columns={columns} getCellContent={getData} getCellsForSelection={true} - onCellEdited={onCellEdited} rows={Object.keys(group.rows).length} onPaste={onPaste} maxColumnAutoWidth={200} diff --git a/ags-validator-app/components/validator/TextArea/CodeMirrorTextArea.tsx b/ags-validator-app/components/validator/TextArea/CodeMirrorTextArea.tsx index 1230f09..a289850 100644 --- a/ags-validator-app/components/validator/TextArea/CodeMirrorTextArea.tsx +++ b/ags-validator-app/components/validator/TextArea/CodeMirrorTextArea.tsx @@ -16,12 +16,11 @@ const CodeMirrorTextArea: React.FC = ({ setGoToErrorCallback, }) => { const { theme } = useTheme(); + const isDark = theme === "dark"; const agsData = useAppSelector((state) => state.ags.rawData); const errors = useAppSelector((state) => state.ags.errors); const dispatch = useAppDispatch(); - const isDark = theme === "dark"; - const errorLines = errors?.map((error) => error.lineNumber); const editorRef = useRef(null); @@ -61,9 +60,7 @@ const CodeMirrorTextArea: React.FC = ({ [errorLines] ); - const themeDemo = useMemo( - () => - EditorView.baseTheme({ + const themeDemo = EditorView.baseTheme({ "&": { backgroundColor: "transparent", }, @@ -124,9 +121,7 @@ const CodeMirrorTextArea: React.FC = ({ ".cm-string": { color: "hsl(var(--success))" }, ".cm-number": { color: "hsl(var(--warning))" }, ".cm-comment": { color: "hsl(var(--muted-foreground))" }, - }), - [] - ); + }); return (
diff --git a/ags-validator-app/hooks/useGridTheme.ts b/ags-validator-app/hooks/useGridTheme.ts index 4db522f..e8ce8de 100644 --- a/ags-validator-app/hooks/useGridTheme.ts +++ b/ags-validator-app/hooks/useGridTheme.ts @@ -40,13 +40,6 @@ export const useGridTheme = () => { ? `hsla(${formattedH}, ${formattedS}, ${formattedL}, ${opacity})` : `hsl(${formattedH}, ${formattedS}, ${formattedL})`; - console.log(`Getting CSS var ${variableName}:`, { - rawValue: value, - opacity, - result, - components: { h: formattedH, s: formattedS, l: formattedL }, - }); - return result; } diff --git a/ags-validator-app/lib/redux/ags.ts b/ags-validator-app/lib/redux/ags.ts index ee62b5b..ae6ca3f 100644 --- a/ags-validator-app/lib/redux/ags.ts +++ b/ags-validator-app/lib/redux/ags.ts @@ -49,8 +49,6 @@ type AgsState = { agsDictionaryVersion: AgsDictionaryVersion; past: HistoryAction[]; future: HistoryAction[]; - canUndo: boolean; - canRedo: boolean; }; interface SetRowDataPayload { @@ -66,8 +64,6 @@ const initialState: AgsState = { loading: false, agsDictionaryVersion: "v4_0_4", - canUndo: false, - canRedo: false, past: [], future: [], rulesConfig: { @@ -127,6 +123,7 @@ export const applySetRowDataEffect = createAsyncThunk< return new Promise<{ rawData: string; errors: AgsError[] }>((resolve) => { worker.onmessage = (event) => { const { rawData, errors } = event.data; + worker.terminate(); resolve({ rawData, errors }); }; @@ -156,7 +153,7 @@ export const applySetRawDataEffect = createAsyncThunk< }>((resolve) => { worker.onmessage = (event) => { const { parsedAgsNormalized, errors } = event.data; - + worker.terminate(); resolve({ parsedAgsNormalized, errors }); }; diff --git a/ags-validator-app/tsconfig.json b/ags-validator-app/tsconfig.json index 53279e8..d57abaa 100644 --- a/ags-validator-app/tsconfig.json +++ b/ags-validator-app/tsconfig.json @@ -52,7 +52,7 @@ "allowJs": true, "skipLibCheck": true, "noEmit": true, - "moduleResolution": "node", + "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true }, diff --git a/ags/package.json b/ags/package.json index a2e5518..9aea688 100644 --- a/ags/package.json +++ b/ags/package.json @@ -1,6 +1,6 @@ { "name": "@groundup-dev/ags", - "version": "0.2.2", + "version": "0.2.3", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", diff --git a/ags/src/rules/rulesForParsedAgs/checkGroupAndHeadings.ts b/ags/src/rules/rulesForParsedAgs/checkGroupAndHeadings.ts index 9a76cf9..e5c6037 100644 --- a/ags/src/rules/rulesForParsedAgs/checkGroupAndHeadings.ts +++ b/ags/src/rules/rulesForParsedAgs/checkGroupAndHeadings.ts @@ -52,7 +52,7 @@ export const rule19: AgsValidationStepParsed = { // Rule 19a A HEADING name shall not be more than 9 characters long and shall consist of uppercase letters, // numbers or the underscore character only. export const rule19a: AgsValidationStepParsed = { - rule: 19, + rule: "19a", description: "A HEADING name shall not be more than 9 characters long and shall consist of uppercase letters, numbers or the underscore character only.", validate: function (ags: AgsRaw): AgsError[] { diff --git a/ags/src/validate.ts b/ags/src/validate.ts index c58dfd0..b408354 100644 --- a/ags/src/validate.ts +++ b/ags/src/validate.ts @@ -15,8 +15,6 @@ export type RulesConfig = { [key in RuleName]: boolean; }; -// happy to overwrite ts here - export const defaultRulesConfig = Object.fromEntries( [ ...Object.keys(rulesForParsedAgs), diff --git a/ags/tsconfig.json b/ags/tsconfig.json index 88982f6..67d6bf4 100644 --- a/ags/tsconfig.json +++ b/ags/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { - "target": "ES2018", + "target": "ES2019", "module": "ESNext", - "moduleResolution": "node", - "lib": ["ES2018", "DOM"], + "moduleResolution": "bundler", + "lib": ["ES2019", "DOM"], "declaration": true, "declarationMap": true, "sourceMap": true,