New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

google-docs-components

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

google-docs-components - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

dist/cjs/processTable.d.ts

5

dist/cjs/index.d.ts
import type { document, element } from "google-docs-parser";
import { ComponentData, Config, ElementData } from "./types";
export declare type ProcessedContent = Array<ElementData | ComponentData>;
import { ComponentData, Config, ContentData, ElementData } from "./types";
import { ProcessedContent } from "./types";
export declare type ParseContent = (element: Array<element>) => ProcessedContent;
export type { ProcessedContent, ComponentData, ContentData, ElementData, Config };
export declare type ProcessedDocument = {

@@ -6,0 +7,0 @@ body: ProcessedContent;

11

dist/cjs/index.js

@@ -7,3 +7,3 @@ "use strict";

exports.componentsFromDoc = void 0;
const componentFromTable_1 = __importDefault(require("./componentFromTable"));
const processTable_1 = __importDefault(require("./processTable"));
function componentsFromDoc(config, doc) {

@@ -25,11 +25,8 @@ const footnoteMap = {};

const styledText = element;
const data = {
element: "span",
children: [styledText.html],
style: styledText.css,
};
const tag = styledText.link ? "a" : "span";
const data = Object.assign({ element: tag, children: [styledText.text], style: styledText.css }, (styledText.link && { attrs: { href: styledText.link } }));
return data;
}
if (element.type == "table") {
const component = componentFromTable_1.default(config.components, element, parseContent);
const component = processTable_1.default(config.components, element, parseContent);
if ("error" in component) {

@@ -36,0 +33,0 @@ console.error(component.message);

@@ -0,8 +1,16 @@

export declare type ContentData = ElementData | ComponentData | DevSlotData;
export declare type ProcessedContent = Array<ContentData>;
export declare type ElementData = string | {
element: string;
children: Array<ElementData | ComponentData>;
children: ProcessedContent;
style?: {
[propertyName: string]: string | number;
};
attrs?: {
href?: string;
};
};
export declare type DevSlotData = {
slot: string;
};
export declare type PropsDef = {

@@ -22,4 +30,4 @@ [propName: string]: {

export declare type SlotsData = {
default?: Array<ComponentData | ElementData>;
[propName: string]: Array<ComponentData | ElementData>;
default?: ProcessedContent;
[propName: string]: ProcessedContent;
};

@@ -26,0 +34,0 @@ export declare type ComponentDef = {

import type { document, element } from "google-docs-parser";
import { ComponentData, Config, ElementData } from "./types";
export declare type ProcessedContent = Array<ElementData | ComponentData>;
import { ComponentData, Config, ContentData, ElementData } from "./types";
import { ProcessedContent } from "./types";
export declare type ParseContent = (element: Array<element>) => ProcessedContent;
export type { ProcessedContent, ComponentData, ContentData, ElementData, Config };
export declare type ProcessedDocument = {

@@ -6,0 +7,0 @@ body: ProcessedContent;

@@ -1,2 +0,2 @@

import componentFromTable from "./componentFromTable";
import componentFromTable from "./processTable";
export function componentsFromDoc(config, doc) {

@@ -18,7 +18,4 @@ const footnoteMap = {};

const styledText = element;
const data = {
element: "span",
children: [styledText.html],
style: styledText.css,
};
const tag = styledText.link ? "a" : "span";
const data = Object.assign({ element: tag, children: [styledText.text], style: styledText.css }, (styledText.link && { attrs: { href: styledText.link } }));
return data;

@@ -25,0 +22,0 @@ }

@@ -0,8 +1,16 @@

export declare type ContentData = ElementData | ComponentData | DevSlotData;
export declare type ProcessedContent = Array<ContentData>;
export declare type ElementData = string | {
element: string;
children: Array<ElementData | ComponentData>;
children: ProcessedContent;
style?: {
[propertyName: string]: string | number;
};
attrs?: {
href?: string;
};
};
export declare type DevSlotData = {
slot: string;
};
export declare type PropsDef = {

@@ -22,4 +30,4 @@ [propName: string]: {

export declare type SlotsData = {
default?: Array<ComponentData | ElementData>;
[propName: string]: Array<ComponentData | ElementData>;
default?: ProcessedContent;
[propName: string]: ProcessedContent;
};

@@ -26,0 +34,0 @@ export declare type ComponentDef = {

{
"name": "google-docs-components",
"version": "1.0.0",
"version": "1.0.1",
"main": "./dist/cjs/index.js",

@@ -5,0 +5,0 @@ "module": "./dist/esm/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc