Bhargava 6063bd1724 Help Project:
1. Initial Commit - a boiler plate code and POC to realize the concept of context
sensitive help
2. Frontend code written in ReactJS
3. Backend code written in Java, Spring Boot Framework
4. Frontend Start:
        pre-requisites : node, npm
	npm run dev  ==> to start the frontend vite server
5. Backend Start:
	pre-requisites : java, mvn
        mvn spring-boot:run  ==> to start the backend server
6. Visit http://localhost:5173/ for basic demo of help, press F1 in textboxes
7. Visit http://localhost:5173/editor and enter "admin123" to add/modify texts.

Happy Coding !!!

Thank you,
Bhargava.
2025-07-04 15:54:13 +05:30

148 lines
4.2 KiB
TypeScript

/**
* @param {Schema} schema
* Schema to use.
* @param {string} defaultTagName
* Default tag name.
* @param {ReadonlyArray<string> | undefined} [caseSensitive]
* Case-sensitive tag names (default: `undefined`).
* @returns
* `h`.
*/
export function createH(schema: Schema, defaultTagName: string, caseSensitive?: ReadonlyArray<string> | undefined): {
/**
* Hyperscript compatible DSL for creating virtual hast trees.
*
* @overload
* @param {null | undefined} [selector]
* @param {...Child} children
* @returns {Root}
*
* @overload
* @param {string} selector
* @param {Properties} properties
* @param {...Child} children
* @returns {Element}
*
* @overload
* @param {string} selector
* @param {...Child} children
* @returns {Element}
*
* @param {string | null | undefined} [selector]
* Selector.
* @param {Child | Properties | null | undefined} [properties]
* Properties (or first child) (default: `undefined`).
* @param {...Child} children
* Children.
* @returns {Result}
* Result.
*/
(selector?: null | undefined, ...children: Child[]): Root;
/**
* Hyperscript compatible DSL for creating virtual hast trees.
*
* @overload
* @param {null | undefined} [selector]
* @param {...Child} children
* @returns {Root}
*
* @overload
* @param {string} selector
* @param {Properties} properties
* @param {...Child} children
* @returns {Element}
*
* @overload
* @param {string} selector
* @param {...Child} children
* @returns {Element}
*
* @param {string | null | undefined} [selector]
* Selector.
* @param {Child | Properties | null | undefined} [properties]
* Properties (or first child) (default: `undefined`).
* @param {...Child} children
* Children.
* @returns {Result}
* Result.
*/
(selector: string, properties: Properties, ...children: Child[]): Element;
/**
* Hyperscript compatible DSL for creating virtual hast trees.
*
* @overload
* @param {null | undefined} [selector]
* @param {...Child} children
* @returns {Root}
*
* @overload
* @param {string} selector
* @param {Properties} properties
* @param {...Child} children
* @returns {Element}
*
* @overload
* @param {string} selector
* @param {...Child} children
* @returns {Element}
*
* @param {string | null | undefined} [selector]
* Selector.
* @param {Child | Properties | null | undefined} [properties]
* Properties (or first child) (default: `undefined`).
* @param {...Child} children
* Children.
* @returns {Result}
* Result.
*/
(selector: string, ...children: Child[]): Element;
};
/**
* List of children (deep).
*/
export type ArrayChildNested = Array<Nodes | PrimitiveChild>;
/**
* List of children.
*/
export type ArrayChild = Array<ArrayChildNested | Nodes | PrimitiveChild>;
/**
* List of property values for space- or comma separated values (such as `className`).
*/
export type ArrayValue = Array<number | string>;
/**
* Acceptable child value.
*/
export type Child = ArrayChild | Nodes | PrimitiveChild;
/**
* Primitive children, either ignored (nullish), or turned into text nodes.
*/
export type PrimitiveChild = number | string | null | undefined;
/**
* Primitive property value.
*/
export type PrimitiveValue = boolean | number | string | null | undefined;
/**
* Acceptable value for element properties.
*/
export type Properties = Record<string, PropertyValue | Style>;
/**
* Primitive value or list value.
*/
export type PropertyValue = ArrayValue | PrimitiveValue;
/**
* Result from a `h` (or `s`) call.
*/
export type Result = Element | Root;
/**
* Value for a CSS style field.
*/
export type StyleValue = number | string;
/**
* Supported value of a `style` prop.
*/
export type Style = Record<string, StyleValue>;
import type { Schema } from 'property-information';
import type { Root } from 'hast';
import type { Element } from 'hast';
import type { Nodes } from 'hast';
//# sourceMappingURL=create-h.d.ts.map