tinymce-solid 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -15
- package/dist/dev.jsx +602 -19
- package/dist/{dev.js → dev.mjs} +595 -23
- package/dist/index.jsx +9 -7
- package/dist/{index.js → index.mjs} +583 -11
- package/package.json +4 -3
- package/tailwind.config.js +53 -0
- package/.github/ISSUE_TEMPLATE/bug-report.yml +0 -31
- package/.github/ISSUE_TEMPLATE/feature-request.yml +0 -27
- package/.github/codeql/codeql-config.yml +0 -2
- package/.github/workflows/badges.yml +0 -30
- package/.github/workflows/ci.yml +0 -47
- package/.github/workflows/codeql.yml +0 -75
package/tailwind.config.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
const plugin = require("tailwindcss/plugin");
|
|
2
|
+
// const defaultTheme = require("tailwindcss/defaultTheme");
|
|
3
|
+
|
|
1
4
|
/** @type {import('tailwindcss').Config} */
|
|
2
5
|
module.exports = {
|
|
3
6
|
darkMode: ["class", '[data-kb-theme="dark"]'],
|
|
4
7
|
content: ["src/**/*.{ts,tsx}", "demo/**/*.{ts,tsx}"],
|
|
5
8
|
prefix: "",
|
|
6
9
|
theme: {
|
|
10
|
+
fontFamily: {
|
|
11
|
+
sans: ["Hubot Sans", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Roboto", "Oxygen",
|
|
12
|
+
"Ubuntu", "Cantarell", "Open Sans", "Helvetica Neue", "sans-serif"],
|
|
13
|
+
},
|
|
7
14
|
container: {
|
|
8
15
|
center: true,
|
|
9
16
|
padding: "2rem",
|
|
@@ -77,8 +84,54 @@ module.exports = {
|
|
|
77
84
|
"collapsible-up": "collapsible-up 0.2s ease-out",
|
|
78
85
|
},
|
|
79
86
|
},
|
|
87
|
+
fontVariationSettings: {
|
|
88
|
+
stretch: [75, 90, 125],
|
|
89
|
+
weight: [200, 300, 400, 500, 600, 700, 800, 900],
|
|
90
|
+
italic: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
|
|
91
|
+
},
|
|
80
92
|
},
|
|
81
93
|
plugins: [
|
|
82
94
|
require("tailwindcss-animate"),
|
|
95
|
+
plugin(function fontVariations({ addComponents, matchUtilities, theme }) {
|
|
96
|
+
const fontVariationProps = Object.entries(theme("fontVariationSettings"))
|
|
97
|
+
.map(([key, values]) => {
|
|
98
|
+
/**
|
|
99
|
+
* Generate the value for a CSS property based on the given key and value.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} key - The key of the CSS property.
|
|
102
|
+
* @param {string|number} value - The value of the CSS property.
|
|
103
|
+
* @return {string} - The generated value for the CSS property.
|
|
104
|
+
*/
|
|
105
|
+
const cssPropValue = (key, value) =>
|
|
106
|
+
key === "stretch"
|
|
107
|
+
? `${value}%` // .font-stretch
|
|
108
|
+
: key === "italic"
|
|
109
|
+
? `oblique ${value}deg` // .font-oblique
|
|
110
|
+
: value; // font-weight
|
|
111
|
+
return values.map(value => [
|
|
112
|
+
`.font-${key}-${value}`,
|
|
113
|
+
{ [`font-${key.replace(/italic/g, "style")}`]: cssPropValue(key, value) },
|
|
114
|
+
]);
|
|
115
|
+
})
|
|
116
|
+
.flat();
|
|
117
|
+
|
|
118
|
+
// console.log(Object.fromEntries(fontVariationProps));
|
|
119
|
+
addComponents(Object.fromEntries(fontVariationProps));
|
|
120
|
+
|
|
121
|
+
matchUtilities(
|
|
122
|
+
{
|
|
123
|
+
"font-weight": value => ({
|
|
124
|
+
"font-weight": value,
|
|
125
|
+
}),
|
|
126
|
+
"font-stretch": value => ({
|
|
127
|
+
"font-stretch": `${value}%`,
|
|
128
|
+
}),
|
|
129
|
+
"font-italic": value => ({
|
|
130
|
+
"font-style": `oblique ${value}deg`,
|
|
131
|
+
}),
|
|
132
|
+
},
|
|
133
|
+
{ values: Object.fromEntries(fontVariationProps) },
|
|
134
|
+
);
|
|
135
|
+
}),
|
|
83
136
|
],
|
|
84
137
|
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
name: "🐛 Bug report"
|
|
2
|
-
description: Create a report to help us improve
|
|
3
|
-
body:
|
|
4
|
-
- type: markdown
|
|
5
|
-
attributes:
|
|
6
|
-
value: |
|
|
7
|
-
Thank you for reporting an issue :pray:.
|
|
8
|
-
|
|
9
|
-
The more information you fill in, the better the community can help you.
|
|
10
|
-
- type: textarea
|
|
11
|
-
id: description
|
|
12
|
-
attributes:
|
|
13
|
-
label: Describe the bug
|
|
14
|
-
description: Provide a clear and concise description of the challenge you are running into.
|
|
15
|
-
validations:
|
|
16
|
-
required: true
|
|
17
|
-
- type: input
|
|
18
|
-
id: link
|
|
19
|
-
attributes:
|
|
20
|
-
label: Minimal Reproduction Link
|
|
21
|
-
description: |
|
|
22
|
-
Please provide a link to a minimal reproduction of the bug you are running into.
|
|
23
|
-
It makes the process of verifying and fixing the bug much easier.
|
|
24
|
-
Note:
|
|
25
|
-
- Your bug will may get fixed much faster if we can run your code and it doesn't have dependencies other than the solid-js and solid-primitives.
|
|
26
|
-
- To create a shareable code example you can use [Stackblitz](https://stackblitz.com/) (https://solid.new). Please no localhost URLs.
|
|
27
|
-
- Please read these tips for providing a minimal example: https://stackoverflow.com/help/mcve.
|
|
28
|
-
placeholder: |
|
|
29
|
-
e.g. https://stackblitz.com/edit/...... OR Github Repo
|
|
30
|
-
validations:
|
|
31
|
-
required: true
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: "Feature Request"
|
|
2
|
-
description: For feature/enhancement requests. Please search for existing issues first.
|
|
3
|
-
body:
|
|
4
|
-
- type: markdown
|
|
5
|
-
attributes:
|
|
6
|
-
value: |
|
|
7
|
-
Thank you for bringing your ideas here :pray:.
|
|
8
|
-
|
|
9
|
-
The more information you fill in, the better the community can understand your idea.
|
|
10
|
-
- type: textarea
|
|
11
|
-
id: problem
|
|
12
|
-
attributes:
|
|
13
|
-
label: Describe The Problem To Be Solved
|
|
14
|
-
description: Provide a clear and concise description of the challenge you are running into.
|
|
15
|
-
validations:
|
|
16
|
-
required: true
|
|
17
|
-
- type: textarea
|
|
18
|
-
id: solution
|
|
19
|
-
attributes:
|
|
20
|
-
label: Suggest A Solution
|
|
21
|
-
description: |
|
|
22
|
-
A concise description of your preferred solution. Things to address include:
|
|
23
|
-
- Details of the technical implementation
|
|
24
|
-
- Tradeoffs made in design decisions
|
|
25
|
-
- Caveats and considerations for the future
|
|
26
|
-
validations:
|
|
27
|
-
required: true
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
name: Badges
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
# [push, pull_request]
|
|
5
|
-
# update README badge only if the README file changes
|
|
6
|
-
# or if the package.json file changes, or this file changes
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
paths:
|
|
10
|
-
- README.md
|
|
11
|
-
- package.json
|
|
12
|
-
- .github/workflows/badges.yml
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
badges:
|
|
16
|
-
name: Badges
|
|
17
|
-
runs-on: ubuntu-20.04
|
|
18
|
-
steps:
|
|
19
|
-
- name: Checkout 🛎
|
|
20
|
-
uses: actions/checkout@v3
|
|
21
|
-
|
|
22
|
-
- name: Update version badges 🏷
|
|
23
|
-
run: npx -p dependency-version-badge update-badge solid-js tinymce typescript prettier vite
|
|
24
|
-
|
|
25
|
-
- name: Commit any changed files 💾
|
|
26
|
-
uses: stefanzweifel/git-auto-commit-action@v4
|
|
27
|
-
with:
|
|
28
|
-
commit_message: Updated badges
|
|
29
|
-
branch: main
|
|
30
|
-
file_pattern: README.md
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
name: CI & Test
|
|
2
|
-
|
|
3
|
-
on: [push]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
runs-on: ${{ matrix.operating-system }}
|
|
8
|
-
|
|
9
|
-
strategy:
|
|
10
|
-
matrix:
|
|
11
|
-
node-version: [18.x]
|
|
12
|
-
operating-system: [ubuntu-latest]
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- name: Checkout repo
|
|
16
|
-
uses: actions/checkout@v2
|
|
17
|
-
with:
|
|
18
|
-
fetch-depth: 2
|
|
19
|
-
|
|
20
|
-
- uses: pnpm/action-setup@v2.2.2
|
|
21
|
-
|
|
22
|
-
- name: Setup Node.js environment ${{ matrix.node-version }}
|
|
23
|
-
uses: actions/setup-node@v3
|
|
24
|
-
with:
|
|
25
|
-
node-version: ${{ matrix.node-version }}
|
|
26
|
-
cache: pnpm
|
|
27
|
-
|
|
28
|
-
- name: Install dependencies
|
|
29
|
-
run: pnpm install --no-frozen-lockfile
|
|
30
|
-
|
|
31
|
-
- name: Typecheck & ESLint
|
|
32
|
-
run: pnpm lint
|
|
33
|
-
|
|
34
|
-
- name: Build
|
|
35
|
-
run: pnpm build
|
|
36
|
-
|
|
37
|
-
- name: Build Docs
|
|
38
|
-
run: pnpm build:docs
|
|
39
|
-
# env:
|
|
40
|
-
# BASE_PATH: '/tinymce-solid'
|
|
41
|
-
|
|
42
|
-
- name: Deploy pages
|
|
43
|
-
uses: JamesIves/github-pages-deploy-action@v4.4.1
|
|
44
|
-
with:
|
|
45
|
-
branch: gh-pages
|
|
46
|
-
node-version: 18.x
|
|
47
|
-
folder: docs
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
-
# to commit it to your repository.
|
|
3
|
-
#
|
|
4
|
-
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
-
# or to provide custom queries or build logic.
|
|
6
|
-
#
|
|
7
|
-
# ******** NOTE ********
|
|
8
|
-
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
-
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
-
# supported CodeQL languages.
|
|
11
|
-
#
|
|
12
|
-
name: "CodeQL"
|
|
13
|
-
|
|
14
|
-
on:
|
|
15
|
-
push:
|
|
16
|
-
branches: [ main ]
|
|
17
|
-
pull_request:
|
|
18
|
-
# The branches below must be a subset of the branches above
|
|
19
|
-
branches: [ main ]
|
|
20
|
-
|
|
21
|
-
jobs:
|
|
22
|
-
analyze:
|
|
23
|
-
name: Analyze
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
permissions:
|
|
26
|
-
actions: read
|
|
27
|
-
contents: read
|
|
28
|
-
security-events: write
|
|
29
|
-
|
|
30
|
-
strategy:
|
|
31
|
-
fail-fast: false
|
|
32
|
-
matrix:
|
|
33
|
-
language: [ 'typescript' ]
|
|
34
|
-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
35
|
-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
36
|
-
|
|
37
|
-
steps:
|
|
38
|
-
- name: Checkout repository
|
|
39
|
-
uses: actions/checkout@v3
|
|
40
|
-
|
|
41
|
-
- name: Install dependencies
|
|
42
|
-
run: npm install
|
|
43
|
-
|
|
44
|
-
- name: Build
|
|
45
|
-
run: npm run build
|
|
46
|
-
|
|
47
|
-
# Initializes the CodeQL tools for scanning.
|
|
48
|
-
- name: Initialize CodeQL
|
|
49
|
-
uses: github/codeql-action/init@v2
|
|
50
|
-
with:
|
|
51
|
-
languages: ${{ matrix.language }}
|
|
52
|
-
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
53
|
-
# By default, queries listed here will override any specified in a config file.
|
|
54
|
-
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
55
|
-
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
56
|
-
# queries: security-extended,security-and-quality
|
|
57
|
-
config-file: ./.github/codeql/codeql-config.yml
|
|
58
|
-
|
|
59
|
-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
60
|
-
# If this step fails, then you should remove it and run the build manually (see below)
|
|
61
|
-
- name: Autobuild
|
|
62
|
-
uses: github/codeql-action/autobuild@v2
|
|
63
|
-
|
|
64
|
-
# ℹ️ Command-line programs to run using the OS shell.
|
|
65
|
-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
66
|
-
|
|
67
|
-
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
|
68
|
-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
|
69
|
-
|
|
70
|
-
# - run: |
|
|
71
|
-
# echo "Run, Build Application using script"
|
|
72
|
-
# ./location_of_script_within_repo/buildscript.sh
|
|
73
|
-
|
|
74
|
-
- name: Perform CodeQL Analysis
|
|
75
|
-
uses: github/codeql-action/analyze@v2
|