mirror of
https://github.com/Shiva108/ai-llm-red-team-handbook.git
synced 2026-10-14 03:31:24 +02:00
adding mermaid packages
This commit is contained in:
1 parent
91dccbba6f
commit
2ec4191721
9491 files changed
+1062059
-1
No files matched your search
+2
@@ -0,0 +1,2 @@
|
||||
declare function _exports(data: any): string;
|
||||
export = _exports;
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
const TAB = ' ';
|
||||
const SIZE_PROPS = key => /(width|height|background\-size)/g.test(key);
|
||||
const PROP_VALUE = (size, key) => (key === 'background-size') ?
|
||||
`${size.width}px ${size.height}px`
|
||||
: `${size[key]}px`;
|
||||
const PROP_SIZE = (size, key) => `${TAB}${key}: ${PROP_VALUE(size, key)};`;
|
||||
const BASE_CSS = (data) => [
|
||||
'',
|
||||
`.${data.class.replace(/\s+/gi, '_')} {`,
|
||||
`${TAB}background-image: url('${data.background}');`
|
||||
];
|
||||
const SIZE = data => Object.keys(data).filter(SIZE_PROPS).map(PROP_SIZE.bind(null, data.dimensions));
|
||||
module.exports = data => BASE_CSS(data).concat(SIZE(data), ['}']).join('\n');
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
declare function _exports(data: any): string;
|
||||
export = _exports;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
'use strict';
|
||||
module.exports = data => `data:${data.mimetype};base64,${data.base64 || ''}`;
|
||||
Reference in new issue
Block a user