Skip to content

Commit

Permalink
feat: export more utility functions (fixes #454)
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Jul 10, 2024
1 parent 5d5124a commit bfb0a43
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,9 @@ The library exports a set of utility functions. The exact definitions of those f
- `EnumValue`
- `ReadonlyValue`
- `TimestampTag`
- HTML:
- `getValueClass`
- `keyComboFromEvent`
- Validation:
- `createAjvValidator`
- Query languages:
Expand Down Expand Up @@ -857,6 +860,11 @@ The library exports a set of utility functions. The exact definitions of those f
- `createInsideSelection`,
- `createAfterSelection`
- `createMultiSelection`
- `getFocusPath`
- `getAnchorPath`
- `getStartPath`
- `getEndPath`
- `getSelectionPaths`
- Parser:
- `isEqualParser`
- Path:
Expand All @@ -865,6 +873,14 @@ The library exports a set of utility functions. The exact definitions of those f
- Actions:
- `resizeObserver`
- `onEscape`
- Type checking:
- `valueType`
- `isObject`
- `isObjectOrArray`
- `isBoolean`
- `isTimestamp`
- `isColor`
- `isUrl`
- Typeguards:
- `isContentParseError`
- `isContentValidationErrors`
Expand Down
22 changes: 21 additions & 1 deletion src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export { renderValue } from './plugins/value/renderValue.js'
export { renderJSONSchemaEnum } from './plugins/value/renderJSONSchemaEnum.js'
export { BooleanToggle, ColorPicker, EditableValue, EnumValue, ReadonlyValue, TimestampTag }

// HTML
export { getValueClass } from './plugins/value/components/utils/getValueClass'
export { keyComboFromEvent } from './utils/keyBindings'

// validator plugins
export * from './plugins/validator/createAjvValidator.js'

Expand Down Expand Up @@ -49,7 +53,12 @@ export {
createKeySelection,
createInsideSelection,
createAfterSelection,
createMultiSelection
createMultiSelection,
getFocusPath,
getAnchorPath,
getStartPath,
getEndPath,
getSelectionPaths
} from './logic/selection.js'

// parser
Expand All @@ -62,5 +71,16 @@ export { parseJSONPath, stringifyJSONPath } from './utils/pathUtils.js'
export { resizeObserver } from './actions/resizeObserver.js'
export { onEscape } from './actions/onEscape.js'

// type checking
export {
valueType,
isObject,
isObjectOrArray,
isBoolean,
isTimestamp,
isColor,
isUrl
} from './utils/typeUtils'

// typeguards
export * from './typeguards.js'

0 comments on commit bfb0a43

Please sign in to comment.