diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 700387c..cc03389 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,10 +4,15 @@
-
+
-
-
+
+
+
+
+
+
+
@@ -24,60 +29,65 @@
{
- "history": [
+ "history": [
{
- "assignee": "iib0011"
+ "assignee": "iib0011"
}
- ],
- "lastFilter": {
- "assignee": "iib0011"
- }
- }
- {
- "prStates": [
+ ],
+ "lastFilter": {}
+}
+
+}]]>
{
- "selectedUrlAndAccountId": {
+ "selectedUrlAndAccountId": {
"url": "https://github.com/iib0011/omni-tools.git",
"accountId": "45f8cd51-000f-4ba4-a4c6-c4d96ac9b1e5"
- }
- }
+ }
+}
{
"isMigrated": true
}
@@ -96,52 +106,52 @@
- {
- "keyToString": {
- "ASKED_ADD_EXTERNAL_FILES": "true",
- "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
- "Docker.Dockerfile build.executor": "Run",
- "Docker.Dockerfile.executor": "Run",
- "Playwright.JoinText Component.executor": "Run",
- "Playwright.JoinText Component.should merge text pieces with specified join character.executor": "Run",
- "RunOnceActivity.OpenProjectViewOnStart": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "RunOnceActivity.git.unshallow": "true",
- "Vitest.compute function (1).executor": "Run",
- "Vitest.compute function.executor": "Run",
- "Vitest.mergeText.executor": "Run",
- "Vitest.mergeText.should merge lines and preserve blank lines when deleteBlankLines is false.executor": "Run",
- "Vitest.mergeText.should merge lines, preserve blank lines and trailing spaces when both deleteBlankLines and deleteTrailingSpaces are false.executor": "Run",
- "Vitest.removeDuplicateLines function.executor": "Run",
- "Vitest.removeDuplicateLines function.newlines option.executor": "Run",
- "Vitest.removeDuplicateLines function.newlines option.should filter newlines when newlines is set to filter.executor": "Run",
- "Vitest.replaceText function.executor": "Run",
- "git-widget-placeholder": "main",
- "ignore.virus.scanning.warn.message": "true",
- "kotlin-language-version-configured": "true",
- "last_opened_file_path": "C:/Users/Ibrahima/IdeaProjects/omni-tools/public/assets",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "npm.build.executor": "Run",
- "npm.dev.executor": "Run",
- "npm.lint.executor": "Run",
- "npm.prebuild.executor": "Run",
- "npm.script:create:tool.executor": "Run",
- "npm.test.executor": "Run",
- "npm.test:e2e.executor": "Run",
- "npm.test:e2e:run.executor": "Run",
- "prettierjs.PrettierConfiguration.Package": "C:\\Users\\Ibrahima\\IdeaProjects\\omni-tools\\node_modules\\prettier",
- "project.structure.last.edited": "Problems",
- "project.structure.proportion": "0.0",
- "project.structure.side.proportion": "0.2",
- "settings.editor.selected.configurable": "settings.typescriptcompiler",
- "ts.external.directory.path": "C:\\Users\\Ibrahima\\IdeaProjects\\omni-tools\\node_modules\\typescript\\lib",
- "vue.rearranger.settings.migration": "true"
+
+}]]>
+
-
@@ -329,22 +339,7 @@
-
-
-
- 1720914702655
-
-
-
- 1720914702656
-
-
-
- 1720914810712
-
-
-
- 1720914810713
+
@@ -722,7 +717,23 @@
1741423117739
-
+
+
+ 1741423587662
+
+
+
+ 1741423587662
+
+
+
+ 1741480927080
+
+
+
+ 1741480927080
+
+
@@ -781,7 +792,6 @@
-
@@ -806,7 +816,8 @@
-
+
+
diff --git a/src/components/ToolContent.tsx b/src/components/ToolContent.tsx
index dc6ae0e..4eb02fb 100644
--- a/src/components/ToolContent.tsx
+++ b/src/components/ToolContent.tsx
@@ -25,7 +25,7 @@ interface ToolContentProps extends ToolComponentProps {
// Tool info (optional)
toolInfo?: {
title: string;
- description: string;
+ description?: string;
};
// Input value to pass to the compute function
@@ -66,7 +66,7 @@ export default function ToolContent({
validationSchema={validationSchema}
/>
- {toolInfo && (
+ {toolInfo && toolInfo.title && toolInfo.description && (
)}
diff --git a/src/pages/tools/number/arithmetic-sequence/index.tsx b/src/pages/tools/number/arithmetic-sequence/index.tsx
index 11451bd..6835d99 100644
--- a/src/pages/tools/number/arithmetic-sequence/index.tsx
+++ b/src/pages/tools/number/arithmetic-sequence/index.tsx
@@ -6,6 +6,7 @@ import TextFieldWithDesc from '@components/options/TextFieldWithDesc';
import { generateArithmeticSequence } from './service';
import * as Yup from 'yup';
import { CardExampleType } from '@components/examples/ToolExamples';
+import { ToolComponentProps } from '@tools/defineTool';
type InitialValuesType = {
firstTerm: string;
@@ -68,11 +69,12 @@ const exampleCards: CardExampleType[] = [
}
];
-export default function ArithmeticSequence() {
+export default function ArithmeticSequence({ title }: ToolComponentProps) {
const [result, setResult] = useState('');
return (
diff --git a/src/pages/tools/string/create-palindrome/index.tsx b/src/pages/tools/string/create-palindrome/index.tsx
index ff00f2b..0f200b7 100644
--- a/src/pages/tools/string/create-palindrome/index.tsx
+++ b/src/pages/tools/string/create-palindrome/index.tsx
@@ -1,16 +1,12 @@
-import { Box } from '@mui/material';
-import React, { useState, useRef } from 'react';
+import React, { useState } from 'react';
import ToolTextInput from '@components/input/ToolTextInput';
import ToolTextResult from '@components/result/ToolTextResult';
-import ToolOptions, { GetGroupsType } from '@components/options/ToolOptions';
+import { GetGroupsType } from '@components/options/ToolOptions';
import { createPalindromeList } from './service';
import CheckboxWithDesc from '@components/options/CheckboxWithDesc';
-import ToolInputAndResult from '@components/ToolInputAndResult';
-import ToolExamples, {
- CardExampleType
-} from '@components/examples/ToolExamples';
+import { CardExampleType } from '@components/examples/ToolExamples';
import { ToolComponentProps } from '@tools/defineTool';
-import { FormikProps } from 'formik';
+import ToolContent from '@components/ToolContent';
const initialValues = {
lastChar: true,
@@ -53,10 +49,12 @@ const exampleCards: CardExampleType[] = [
}
];
-export default function CreatePalindrome({ title }: ToolComponentProps) {
+export default function CreatePalindrome({
+ title,
+ longDescription
+}: ToolComponentProps) {
const [input, setInput] = useState('');
const [result, setResult] = useState('');
- const formRef = useRef>(null);
const computeExternal = (
optionsValues: typeof initialValues,
@@ -92,24 +90,24 @@ export default function CreatePalindrome({ title }: ToolComponentProps) {
];
return (
-
- }
- result={}
- />
-
-
-
+
+ }
+ resultComponent={
+
+ }
+ toolInfo={{
+ title: 'What Is a String Palindrome Creator?',
+ description: longDescription
+ }}
+ exampleCards={exampleCards}
+ />
);
}
diff --git a/src/pages/tools/string/create-palindrome/meta.ts b/src/pages/tools/string/create-palindrome/meta.ts
index a5b82ac..cee5acc 100644
--- a/src/pages/tools/string/create-palindrome/meta.ts
+++ b/src/pages/tools/string/create-palindrome/meta.ts
@@ -9,6 +9,8 @@ export const tool = defineTool('string', {
description:
"World's simplest browser-based utility for creating palindromes from any text. Input text and instantly transform it into a palindrome that reads the same forward and backward. Perfect for word games, creating symmetrical text patterns, or exploring linguistic curiosities.",
shortDescription: 'Create text that reads the same forward and backward',
+ longDescription:
+ 'This tool creates a palindrome from the given string. It does it by generating a copy of the string, reversing it, and appending it at the end of the original string. This method creates a palindrome with the last character duplicated twice. There is also another way to do it, which deletes the first letter of the reversed copy. In this case, when the string and the copy are joined together, you also get a palindrome but without the repeating last character. You can compare the two types of palindromes by switching between them in the options. You can also enable the multi-line mode that will create palindromes of every string on every line. Stringabulous!',
keywords: ['create', 'palindrome'],
component: lazy(() => import('./index'))
});
diff --git a/src/pages/tools/string/extract-substring/index.tsx b/src/pages/tools/string/extract-substring/index.tsx
index 8cd8974..a5b7a5e 100644
--- a/src/pages/tools/string/extract-substring/index.tsx
+++ b/src/pages/tools/string/extract-substring/index.tsx
@@ -138,6 +138,7 @@ export default function ExtractSubstring({ title }: ToolComponentProps) {
getGroups={getGroups}
initialValues={initialValues}
input={input}
+ formRef={formRef}
/>
import('./index'))
});
diff --git a/src/tools/defineTool.tsx b/src/tools/defineTool.tsx
index 0e4dcbd..0fc538d 100644
--- a/src/tools/defineTool.tsx
+++ b/src/tools/defineTool.tsx
@@ -10,6 +10,7 @@ interface ToolOptions {
name: string;
description: string;
shortDescription: string;
+ longDescription?: string;
}
export type ToolCategory =
@@ -32,7 +33,8 @@ export interface DefinedTool {
}
export interface ToolComponentProps {
- title?: any;
+ title: string;
+ longDescription?: string;
}
export const defineTool = (
@@ -46,7 +48,8 @@ export const defineTool = (
description,
keywords,
component,
- shortDescription
+ shortDescription,
+ longDescription
} = options;
const Component = component;
return {
@@ -65,7 +68,7 @@ export const defineTool = (
icon={icon}
type={basePath}
>
-
+
);
}