// npm 패키지
@antv/narrative-text-editor
React component of narrative text editor
버전
30
메인테이너
51
라이선스
MIT
최초 publish
2022-04-22
publisher
bbsqq
tarball
20,743,961 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2023-09-03
// publisher 캠페인by bbsqq
이 계정에서 catch된 패키지 5건고립된 catch가 아닙니다. 동일 publisher가 4개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @0.2.20· 2 files flagged
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
- @0.2.20··AUTO-PUBLISHED·publisher: bbsqqheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-4072reads-env-vars
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
// offending code· 2 files flaggedpatterns: 1
--- package/lib/index.js (excerpt) --- 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var React = require('react'); var ReactDOM = require('react-dom'); var antd = require('antd'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } function _interopNamespace(e) { if (e && e.__esModule) return e; var n = Object.create(null); if (e) { Object.keys(e).forEach(function (k) { if (k !== 'default') { var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty(n, k, d.get ? d : { enumerable: true, get: function () { return e[k]; } }); } }); } n["default"] = e; return Object.freeze(n); } var React__default = /*#__PURE__*/_interopDefaultLegacy(React); var React__namespace = /*#__PURE__*/_interopNamespace(React); var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM); var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM); /****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHA --- package/es/index.js (excerpt) --- import * as React from 'react'; import React__default, { useContext, createContext, useRef, useCallback, useEffect, useState, useLayoutEffect, useMemo, Fragment, useReducer, useDebugValue, createElement as createElement$1, memo, isValidElement, cloneElement, forwardRef as forwardRef$2, Component, useImperativeHandle } from 'react'; import * as ReactDOM from 'react-dom'; import ReactDOM__default, { createPortal } from 'react-dom'; import { Tooltip, Form, Input, Row, Col, Button as Button$1, Space, Alert } from 'antd'; /****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var __assign$1 = function() { __assign$1 = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/ErrorFallback.d.ts (bundled) --- import { ErrorBoundaryProps } from 'react-error-boundary'; export declare const ErrorFallback: ErrorBoundaryProps['FallbackComponent']; --- dist/TemplateEditor.d.ts (bundled) --- import React from 'react'; import { NarrativeTextEditorRef } from './types'; declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<import("./types").NarrativeTextEditorProps, "plugins" | "platePlugins"> & { variableMap: import("./types").VariableMap; } & { children?: React.ReactNode; } & React.RefAttributes<NarrativeTextEditorRef>>>; export default _default; --- dist/constants.d.ts (bundled) --- export declare const safeSlateValue: { type: string; children: { text: string; }[]; }[]; export declare const BLOCK_KEYS: readonly [...string[], "p", "ul", "ol"]; export type BlockKey = typeof BLOCK_KEYS[number]; --- dist/editor.d.ts (bundled) --- import React from 'react'; import { PlateEditor, TDescendant } from '@udecode/plate-core'; import { NarrativeTextEditorRef } from './types'; import 'tippy.js/dist/tippy.css'; declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<{ id: string; initialValue?: import("@udecode/plate-core").Value; onChange?: (val: TDescendant[]) => void; plugins?: import("./plugins/custom").CustomPlugin[]; platePlugins?: import("@udecode/plate-core").PlatePlugin<import("@udecode/plate-core").AnyObject, import("@udecode/plate-core").Value, PlateEditor<import("@udecode/plate-core").Value>>[]; style?: React.CSSProperties; showHeadingToolbar?: boolean | import("./toolbar/HeadingToolbar").HeadingToolbarProps; showHoveringToolbar?: boolean; draggable?: boolean; placeholders?: boolean | Partial<import("@udecode/plate-ui-placeholder").PlaceholderProps<import("@udecode/plate-core").Value> & { key: string; keys: string[]; }>[]; readOnly?: boolean; singleLine?: boolean; locale?: Record<string, string>; } & { children?: React.ReactNode; } & React.RefAttributes<NarrativeTextEditorRef>>>; export default _default; --- dist/globalStyles.d.ts (bundled) --- export declare const POP_TOOLBAR_CLS = "nte-pop-toolbar"; export declare const GlobalStyle: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>; --- dist/index.d.ts (bundled) --- import TemplateEditor from './TemplateEditor'; import InnerNarrativeTextEditor from './editor'; type NarrativeTextEditor = typeof InnerNarrativeTextEditor & { Template: typeof TemplateEditor; }; export declare const NarrativeTextEditor: NarrativeTextEditor; export { ELEMENT_VARIABLE, ELEMENT_VARIABLE_INPUT } from './plugins/variable'; export { CustomBlockToolbarButton, CustomInlineToolbarButton } from './plugins/custom'; export type { NarrativeTextEditorProps, NarrativeTextEditorRef, TemplateEditorProps } from './types'; export type { CustomElementComponent } from './plugins/custom'; export { useEditorRef } from '@udecode/plate-core'; export * from './locale'; export { default as ConfigProvider } from './components/ConfigProvider'; export { BLOCK_KEYS } from './constants'; --- dist/narrative-text-editor.min.js (bundled) --- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("antd")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","antd"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).NarrativeTextEditor={},e.React,e.ReactDOM,e.antd)}(this,(function(e,t,r,n){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var a=o(t),s=i(t),u=o(r),c=i(r),l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},l.apply(this,arguments)};function d(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function f(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function p(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||(( --- dist/plateTypes.d.ts (bundled) --- /** * FIXME plate 11.x 之后需要自己指定类型,编辑器暂不支持的类型之后可能增加,所以当前文件只做注释 */ import { CreatePlateEditorOptions, Decorate, DecorateEntry, DOMHandler, EDescendant, EElement, EElementEntry, EElementOrText, EMarks, ENode, ENodeEntry, EText, ETextEntry, InjectComponent, InjectProps, KeyboardHandler, NoInfer, OnChange, OverrideByKey, PlateEditor, PlatePlugin, PlatePluginComponent, PlatePluginInsertData, PlatePluginProps, PlateProps, PluginOptions, SerializeHtml, TElement, TNodeEntry, TReactEditor, TText, WithOverride } from '@udecode/plate-core'; import { ELEMENT_H1, ELEMENT_H2, ELEMENT_H3 } from '@udecode/plate-heading'; import { ELEMENT_PARAGRAPH } from '@udecode/plate-paragraph'; import { ELEMENT_LINK, TLinkElement } from '@udecode/plate-link'; import { ELEMENT_LI, ELEMENT_OL, ELEMENT_UL } from '@udecode/plate-list'; import { AutoformatRule } from '@udecode/plate-autoformat'; import { CSSProperties } from 'styled-components'; import { VariableInputNode, VariableNode } from './plugins/variable/types'; /** * Text */ export type EmptyText = { text: ''; }; export type PlainText = { text: string; }; export interface RichText extends TText { bold?: boolean; italic?: boolean; underline?: boolean; strikethrough?: boolean; code?: boolean; kbd?: boolean; subscript?: boolean; backgroundColor?: CSSProperties['backgroundColor']; fontFamily?: CSSProperties['fontFamily']; color?: CSSProperties['color']; fontSize?: CSSProperties['fontSize']; fontWeight?: CSSProperties['fontWeight']; } /** * Inline Elements */ export interface MyLinkElement extends TLinkElement { type: typeof ELEMENT_LINK; children: RichText[]; } export type MyInlineElement = MyLinkElement | VariableInputNode | VariableNode; export type MyInlineDescendant = MyInlineElement | RichText; export type MyInlineChildren = MyInlineDescendant[]; /** * Block props */ export interface MyIndentProps { indent?: number; } export interface MyIndentListProps extends MyInd --- dist/types.d.ts (bundled) --- import { CSSProperties, PropsWithChildren } from 'react'; import { PlateStoreState, Value, TDescendant, PlatePlugin } from '@udecode/plate-core'; import { PlaceholderProps } from '@udecode/plate-ui-placeholder'; import { CustomPlugin } from './plugins/custom'; import { HeadingToolbarProps } from './toolbar/HeadingToolbar'; import { VariableNodeData } from './plugins/variable'; import { BlockKey } from './constants'; export type VariableMap = Record<string, VariableNodeData>; export type NarrativeTextEditorProps = PropsWithChildren<{ /** editor key, must unique */ id: string; /** uncontrolled initial value */ initialValue?: PlateStoreState<Value>['value']; /** control
