@factorialco/rjsf-f0 1.1.2 → 2.0.0
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 +6 -3
- package/dist/rjsf-f0.cjs.js +29 -16
- package/dist/rjsf-f0.cjs.js.map +1 -1
- package/dist/rjsf-f0.es.js +5341 -4261
- package/dist/rjsf-f0.es.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/markdown/markdown-components.d.ts +2 -0
- package/dist/src/templates/field-template.d.ts +2 -3
- package/dist/src/utils/markdown-content.d.ts +6 -0
- package/dist/styles.css +41 -0
- package/package.json +3 -3
- package/dist/src/utils/sanitize-html.d.ts +0 -8
package/dist/src/index.d.ts
CHANGED
|
@@ -8,8 +8,7 @@ import { FieldTemplateProps } from '@rjsf/utils';
|
|
|
8
8
|
* therefore hide the f0 label and keep the plain text only as the control's
|
|
9
9
|
* accessible name.
|
|
10
10
|
*
|
|
11
|
-
* `schema.
|
|
12
|
-
* form author
|
|
13
|
-
* and simply absent for schemas that do not use it.
|
|
11
|
+
* `schema.markdown.before/after` is a Factorial Code schema extension that lets
|
|
12
|
+
* a form author put markdown content around a field; HTML is never rendered.
|
|
14
13
|
*/
|
|
15
14
|
export declare function FieldTemplate(props: FieldTemplateProps): React.JSX.Element;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { Options as ReactMarkdownProps } from 'react-markdown';
|
|
2
2
|
export declare function MarkdownContent(props: ReactMarkdownProps): import("react").JSX.Element;
|
|
3
|
+
/**
|
|
4
|
+
* Block-level markdown (GFM) for standalone content: execution result
|
|
5
|
+
* messages and `schema.markdown.before/after`. `MarkdownContent` above stays
|
|
6
|
+
* intentionally narrow for inline field text.
|
|
7
|
+
*/
|
|
8
|
+
export declare function MarkdownBlock(props: ReactMarkdownProps): import("react").JSX.Element;
|
package/dist/styles.css
CHANGED
|
@@ -388,6 +388,47 @@
|
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
+
/*
|
|
392
|
+
* Markdown blocks: the result message and `schema.markdown.before/after`.
|
|
393
|
+
*
|
|
394
|
+
* Most tags come styled from f0's `markdownRenderers` (headings h1-h3, links,
|
|
395
|
+
* lists, code, blockquote, tables). These rules only cover what falls through
|
|
396
|
+
* to native elements — h4-h6, `del`, task-list checkboxes and image sizing —
|
|
397
|
+
* plus the spacing between stacked blocks, using the same f1 variables as the
|
|
398
|
+
* rest of this sheet.
|
|
399
|
+
*/
|
|
400
|
+
.fcode-form-markdown {
|
|
401
|
+
display: flex;
|
|
402
|
+
flex-direction: column;
|
|
403
|
+
gap: 0.75rem;
|
|
404
|
+
color: var(--f1-foreground, inherit);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.fcode-form-markdown p {
|
|
408
|
+
margin: 0;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.fcode-form-markdown h4,
|
|
412
|
+
.fcode-form-markdown h5,
|
|
413
|
+
.fcode-form-markdown h6 {
|
|
414
|
+
margin: 0;
|
|
415
|
+
font-size: 0.875rem;
|
|
416
|
+
font-weight: 600;
|
|
417
|
+
line-height: 1.5;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.fcode-form-markdown del {
|
|
421
|
+
color: var(--f1-foreground-secondary, inherit);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.fcode-form-markdown img {
|
|
425
|
+
max-width: 100%;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.fcode-form-markdown li > input[type='checkbox'] {
|
|
429
|
+
margin-right: 0.5rem;
|
|
430
|
+
}
|
|
431
|
+
|
|
391
432
|
/*
|
|
392
433
|
* The SDK's `json` field.
|
|
393
434
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factorialco/rjsf-f0",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Factorial f0 theme for react-jsonschema-form: renders RJSF forms with f0 components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://code.factorialhr.com/docs/forms/",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"react-dom": "^18.3.1 || ^19.0.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
50
|
+
"react-markdown": "^10.1.0",
|
|
51
|
+
"remark-gfm": "^4.0.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@factorialco/f0-react": "6.8.3",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sanitizes authored HTML so it can be rendered without executing scripts.
|
|
3
|
-
*
|
|
4
|
-
* @param dirty - The HTML string as authored in the schema or returned by a
|
|
5
|
-
* process execution.
|
|
6
|
-
* @returns The same markup with every script-execution vector removed.
|
|
7
|
-
*/
|
|
8
|
-
export declare function sanitizeHtml(dirty: string): string;
|