@builder.io/sdk-react-nextjs 0.14.29 → 0.14.30-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.
Files changed (118) hide show
  1. package/lib/browser/blocks-exports.cjs +188 -0
  2. package/lib/browser/blocks-exports.mjs +2812 -0
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +25 -26
  5. package/lib/browser/init.cjs +8 -0
  6. package/lib/browser/init.mjs +60 -0
  7. package/lib/browser/server-entry-5cac64f5.js +720 -0
  8. package/lib/browser/server-entry-c9d4cfc0.cjs +2 -0
  9. package/lib/browser/server-entry.cjs +1 -0
  10. package/lib/browser/server-entry.mjs +16 -0
  11. package/lib/edge/blocks-exports.cjs +208 -0
  12. package/lib/edge/{bundle-f748b05a.js → blocks-exports.mjs} +2381 -2401
  13. package/lib/edge/index.cjs +1 -1
  14. package/lib/edge/index.mjs +25 -26
  15. package/lib/edge/init.cjs +8 -0
  16. package/lib/edge/init.mjs +60 -0
  17. package/lib/edge/server-entry-5cac64f5.js +720 -0
  18. package/lib/edge/server-entry-c9d4cfc0.cjs +2 -0
  19. package/lib/edge/server-entry.cjs +1 -0
  20. package/lib/edge/server-entry.mjs +16 -0
  21. package/lib/node/blocks-exports.cjs +188 -0
  22. package/lib/node/blocks-exports.mjs +2788 -0
  23. package/lib/node/index.cjs +1 -1
  24. package/lib/node/index.mjs +23 -23
  25. package/lib/node/init.cjs +1 -0
  26. package/lib/node/init.mjs +13 -0
  27. package/lib/node/node-runtime-591c4640.cjs +48 -0
  28. package/lib/node/node-runtime-8d503570.js +167 -0
  29. package/lib/node/server-entry-00baa89f.js +720 -0
  30. package/lib/node/server-entry-1c6e06e6.cjs +2 -0
  31. package/lib/node/server-entry.cjs +1 -0
  32. package/lib/node/server-entry.mjs +16 -0
  33. package/package.json +14 -9
  34. package/types/cjs/blocks/BaseText.d.ts +6 -0
  35. package/types/cjs/blocks/form/component-info.d.ts +2 -0
  36. package/types/cjs/blocks/form/form.d.ts +33 -0
  37. package/types/cjs/blocks/input/component-info.d.ts +2 -0
  38. package/types/cjs/blocks/input/input.d.ts +15 -0
  39. package/types/cjs/blocks/raw-text/component-info.d.ts +2 -0
  40. package/types/cjs/blocks/raw-text/index.d.ts +1 -0
  41. package/types/cjs/blocks/raw-text/raw-text.d.ts +7 -0
  42. package/types/cjs/blocks/submit-button/component-info.d.ts +2 -0
  43. package/types/cjs/blocks/submit-button/submit-button.d.ts +10 -0
  44. package/types/cjs/blocks/textarea/component-info.d.ts +2 -0
  45. package/types/cjs/blocks/textarea/index.d.ts +1 -0
  46. package/types/cjs/blocks/textarea/textarea.d.ts +13 -0
  47. package/types/cjs/components/content/index.d.ts +1 -0
  48. package/types/cjs/components/error-boundary.d.ts +11 -0
  49. package/types/cjs/constants/sdk-name.d.ts +1 -0
  50. package/types/cjs/constants/sdk-version.d.ts +1 -1
  51. package/types/cjs/functions/apply-patch-with-mutation.d.ts +10 -0
  52. package/types/cjs/functions/evaluate/edge-runtime/acorn-interpreter.d.ts +2 -0
  53. package/types/cjs/functions/evaluate/edge-runtime/edge-runtime.d.ts +2 -0
  54. package/types/cjs/functions/evaluate/edge-runtime/index.d.ts +1 -0
  55. package/types/cjs/functions/evaluate/node-runtime/index.d.ts +1 -0
  56. package/types/cjs/functions/evaluate/node-runtime/init.d.ts +13 -0
  57. package/types/cjs/functions/evaluate/node-runtime/node-runtime.d.ts +11 -0
  58. package/types/cjs/functions/evaluate/node-runtime/safeDynamicRequire.d.ts +8 -0
  59. package/types/cjs/functions/evaluate/placeholder-runtime.d.ts +2 -0
  60. package/types/cjs/functions/extract-css-var-default-value.d.ts +1 -0
  61. package/types/cjs/functions/get-react-native-block-styles.d.ts +15 -0
  62. package/types/cjs/functions/is-edge-runtime.d.ts +4 -0
  63. package/types/cjs/functions/on-change.d.ts +7 -0
  64. package/types/cjs/functions/sanitize-react-native-block-styles.d.ts +3 -0
  65. package/types/cjs/functions/sanitize-rn-allowed-css.d.ts +8 -0
  66. package/types/cjs/helpers/omit.d.ts +1 -0
  67. package/types/cjs/helpers/time.d.ts +1 -0
  68. package/types/esm/blocks/BaseText.d.ts +6 -0
  69. package/types/esm/blocks/form/component-info.d.ts +2 -0
  70. package/types/esm/blocks/form/form.d.ts +33 -0
  71. package/types/esm/blocks/input/component-info.d.ts +2 -0
  72. package/types/esm/blocks/input/input.d.ts +15 -0
  73. package/types/esm/blocks/raw-text/component-info.d.ts +2 -0
  74. package/types/esm/blocks/raw-text/index.d.ts +1 -0
  75. package/types/esm/blocks/raw-text/raw-text.d.ts +7 -0
  76. package/types/esm/blocks/submit-button/component-info.d.ts +2 -0
  77. package/types/esm/blocks/submit-button/submit-button.d.ts +10 -0
  78. package/types/esm/blocks/textarea/component-info.d.ts +2 -0
  79. package/types/esm/blocks/textarea/index.d.ts +1 -0
  80. package/types/esm/blocks/textarea/textarea.d.ts +13 -0
  81. package/types/esm/components/content/index.d.ts +1 -0
  82. package/types/esm/components/error-boundary.d.ts +11 -0
  83. package/types/esm/constants/sdk-name.d.ts +1 -0
  84. package/types/esm/constants/sdk-version.d.ts +1 -1
  85. package/types/esm/functions/apply-patch-with-mutation.d.ts +10 -0
  86. package/types/esm/functions/evaluate/edge-runtime/acorn-interpreter.d.ts +2 -0
  87. package/types/esm/functions/evaluate/edge-runtime/edge-runtime.d.ts +2 -0
  88. package/types/esm/functions/evaluate/edge-runtime/index.d.ts +1 -0
  89. package/types/esm/functions/evaluate/node-runtime/index.d.ts +1 -0
  90. package/types/esm/functions/evaluate/node-runtime/init.d.ts +13 -0
  91. package/types/esm/functions/evaluate/node-runtime/node-runtime.d.ts +11 -0
  92. package/types/esm/functions/evaluate/node-runtime/safeDynamicRequire.d.ts +8 -0
  93. package/types/esm/functions/evaluate/placeholder-runtime.d.ts +2 -0
  94. package/types/esm/functions/extract-css-var-default-value.d.ts +1 -0
  95. package/types/esm/functions/get-react-native-block-styles.d.ts +15 -0
  96. package/types/esm/functions/is-edge-runtime.d.ts +4 -0
  97. package/types/esm/functions/on-change.d.ts +7 -0
  98. package/types/esm/functions/sanitize-react-native-block-styles.d.ts +3 -0
  99. package/types/esm/functions/sanitize-rn-allowed-css.d.ts +8 -0
  100. package/types/esm/helpers/omit.d.ts +1 -0
  101. package/types/esm/helpers/time.d.ts +1 -0
  102. package/lib/browser/USE_CLIENT_BUNDLE-2675ec3a.js +0 -703
  103. package/lib/browser/USE_CLIENT_BUNDLE-d62c0e9f.cjs +0 -21
  104. package/lib/browser/USE_SERVER_BUNDLE-22146bcb.cjs +0 -1
  105. package/lib/browser/USE_SERVER_BUNDLE-a878761a.js +0 -11
  106. package/lib/browser/bundle-4aca3c04.cjs +0 -169
  107. package/lib/browser/bundle-9acde1f6.js +0 -2832
  108. package/lib/edge/USE_CLIENT_BUNDLE-744a0d92.js +0 -703
  109. package/lib/edge/USE_CLIENT_BUNDLE-ad07ada0.cjs +0 -21
  110. package/lib/edge/USE_SERVER_BUNDLE-50d2bf59.cjs +0 -1
  111. package/lib/edge/USE_SERVER_BUNDLE-d2138019.js +0 -11
  112. package/lib/edge/bundle-6770809f.cjs +0 -189
  113. package/lib/node/USE_CLIENT_BUNDLE-2f8a2b0f.cjs +0 -21
  114. package/lib/node/USE_CLIENT_BUNDLE-bdfd3683.js +0 -703
  115. package/lib/node/USE_SERVER_BUNDLE-786cc2c7.cjs +0 -1
  116. package/lib/node/USE_SERVER_BUNDLE-a6561926.js +0 -11
  117. package/lib/node/bundle-8b02f7d4.cjs +0 -216
  118. package/lib/node/bundle-ca4c205c.js +0 -2953
@@ -0,0 +1,15 @@
1
+ import type { BuilderContextInterface } from '../context/types.js';
2
+ import type { BuilderBlock } from '../types/builder-block.js';
3
+ /**
4
+ * @description Cleans styles that RN can't handle and css-to-react-native doesn't fix
5
+ */
6
+ export declare const cleanCssStyleProps: (styles: {
7
+ [key: string]: string;
8
+ }) => {
9
+ [key: string]: string;
10
+ };
11
+ export declare function getReactNativeBlockStyles({ block, context, blockStyles }: {
12
+ block: BuilderBlock;
13
+ context: BuilderContextInterface;
14
+ blockStyles: any;
15
+ }): CSSStyleDeclaration | Record<string, string | undefined>;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Identifies edge runtimes (edge, workers, serverless, etc.)
3
+ */
4
+ export declare function isEdgeRuntime(): boolean;
@@ -0,0 +1,7 @@
1
+ export declare const onChangeProxySymbol: unique symbol;
2
+ /**
3
+ * Deeply observe an object and run a callback when it changes
4
+ *
5
+ * See ./on-change.test.ts for more info
6
+ */
7
+ export declare function onChange<T extends object = any>(obj: T, cb: () => void): T;
@@ -0,0 +1,3 @@
1
+ type Styles = Record<string, string | number>;
2
+ export declare const sanitizeReactNativeBlockStyles: (styles: Styles) => Styles;
3
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
2
+ type StyleSheetProperties = ImageStyle & TextStyle & ViewStyle;
3
+ /**
4
+ * @description List of allowed css properties.
5
+ * We use this to filter out web CSS from Builder.io that would crash RN.
6
+ */
7
+ export declare const ALLOWED_CSS_PROPERTIES: Array<keyof StyleSheetProperties>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export declare function omit<T extends object>(obj: T, ...values: (keyof T)[]): Partial<T>;
@@ -0,0 +1 @@
1
+ export declare const getCurrentDatePlusMinutes: (minutes?: number) => Date;