@csg-org/block-spacer 0.0.4-alpha.3 → 0.0.9

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.
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { z } from 'zod';
3
+
4
+ declare const SpacerPropsSchema: z.ZodObject<{
5
+ props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
6
+ height: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ height?: number | null | undefined;
9
+ }, {
10
+ height?: number | null | undefined;
11
+ }>>>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ props?: {
14
+ height?: number | null | undefined;
15
+ } | null | undefined;
16
+ }, {
17
+ props?: {
18
+ height?: number | null | undefined;
19
+ } | null | undefined;
20
+ }>;
21
+ type SpacerProps = z.infer<typeof SpacerPropsSchema>;
22
+ declare const SpacerPropsDefaults: {
23
+ height: number;
24
+ };
25
+ declare function Spacer({ props }: SpacerProps): React.JSX.Element;
26
+
27
+ export { Spacer, type SpacerProps, SpacerPropsDefaults, SpacerPropsSchema };
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { z } from 'zod';
3
+
4
+ declare const SpacerPropsSchema: z.ZodObject<{
5
+ props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
6
+ height: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ height?: number | null | undefined;
9
+ }, {
10
+ height?: number | null | undefined;
11
+ }>>>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ props?: {
14
+ height?: number | null | undefined;
15
+ } | null | undefined;
16
+ }, {
17
+ props?: {
18
+ height?: number | null | undefined;
19
+ } | null | undefined;
20
+ }>;
21
+ type SpacerProps = z.infer<typeof SpacerPropsSchema>;
22
+ declare const SpacerPropsDefaults: {
23
+ height: number;
24
+ };
25
+ declare function Spacer({ props }: SpacerProps): React.JSX.Element;
26
+
27
+ export { Spacer, type SpacerProps, SpacerPropsDefaults, SpacerPropsSchema };
package/dist/index.js ADDED
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.tsx
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Spacer: () => Spacer,
34
+ SpacerPropsDefaults: () => SpacerPropsDefaults,
35
+ SpacerPropsSchema: () => SpacerPropsSchema
36
+ });
37
+ module.exports = __toCommonJS(index_exports);
38
+ var import_react = __toESM(require("react"));
39
+ var import_zod = require("zod");
40
+ var SpacerPropsSchema = import_zod.z.object({
41
+ props: import_zod.z.object({
42
+ height: import_zod.z.number().gte(0).optional().nullish()
43
+ }).optional().nullable()
44
+ });
45
+ var SpacerPropsDefaults = {
46
+ height: 16
47
+ };
48
+ function Spacer({ props }) {
49
+ var _a;
50
+ const style = {
51
+ height: (_a = props == null ? void 0 : props.height) != null ? _a : SpacerPropsDefaults.height
52
+ };
53
+ return /* @__PURE__ */ import_react.default.createElement("div", { style });
54
+ }
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ Spacer,
58
+ SpacerPropsDefaults,
59
+ SpacerPropsSchema
60
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,23 @@
1
+ // src/index.tsx
2
+ import React from "react";
3
+ import { z } from "zod";
4
+ var SpacerPropsSchema = z.object({
5
+ props: z.object({
6
+ height: z.number().gte(0).optional().nullish()
7
+ }).optional().nullable()
8
+ });
9
+ var SpacerPropsDefaults = {
10
+ height: 16
11
+ };
12
+ function Spacer({ props }) {
13
+ var _a;
14
+ const style = {
15
+ height: (_a = props == null ? void 0 : props.height) != null ? _a : SpacerPropsDefaults.height
16
+ };
17
+ return /* @__PURE__ */ React.createElement("div", { style });
18
+ }
19
+ export {
20
+ Spacer,
21
+ SpacerPropsDefaults,
22
+ SpacerPropsSchema
23
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@csg-org/block-spacer",
3
- "version": "0.0.4-alpha.3",
3
+ "version": "0.0.9",
4
4
  "description": "@csg-org/document compatible Spacer component",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",