Skip to content

Commit

Permalink
[TASK] general refactor, use fields types from hubspot react modules
Browse files Browse the repository at this point in the history
  • Loading branch information
dmh committed Jun 25, 2024
1 parent ecf3f6b commit c7e7d44
Show file tree
Hide file tree
Showing 83 changed files with 2,712 additions and 7,286 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ node_modules
.env*
.idea
.tmp
.DS_Store
4 changes: 0 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
npm run docs
70 changes: 13 additions & 57 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,73 +1,29 @@
import { init, writeJson } from './lib/init.js'
import { init } from './lib/init.js'
import { group, styleGroup } from './lib/group.js'
import {
alignment,
spacing,
gradient,
backgroundimage,
border,
textalignment
} from './lib/style-tab-fields.js'
import {
boolean,
choice,
number,
color,
icon,
image,
font
} from './lib/fields.js'
import {
text,
link,
richtext,
url,
video,
embed,
cta
} from './lib/content-tab-fields.js'
import * as styleTabFields from './lib/style-tab-fields.js'
import * as fields from './lib/fields.js'
import * as contentTabFields from './lib/content-tab-fields.js'

/**
* #### Module fields entry point
* @ignore
* @constant
*/
const moduleFields = {
text,
link,
richtext,
url,
boolean,
choice,
number,
color,
icon,
image,
font,
alignment,
spacing,
gradient,
backgroundimage,
border,
textalignment,
video,
embed,
cta
...contentTabFields,
...styleTabFields,
...fields
}

/**
* #### Theme fields entry point
* @ignore
* @constant
*/
*/
const themeFields = {
boolean,
choice,
number,
color,
image,
font,
spacing,
border
...fields,
...styleTabFields.spacing,
...styleTabFields.border
}

export { moduleFields, themeFields, group, styleGroup, init, writeJson }
export { moduleFields, themeFields, group, styleGroup, init }
Loading

0 comments on commit c7e7d44

Please sign in to comment.