canvu-react 0.4.60 → 0.4.62

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.
package/dist/native.cjs CHANGED
@@ -7148,6 +7148,139 @@ var styles4 = reactNative.StyleSheet.create({
7148
7148
  fontWeight: "700"
7149
7149
  }
7150
7150
  });
7151
+ var DEFAULT_NATIVE_VECTOR_ZOOM_CONTROLS_LABELS = {
7152
+ zoomOut: "Zoom out",
7153
+ zoomIn: "Zoom in"
7154
+ };
7155
+ function NativeVectorZoomControls({
7156
+ zoomPercent,
7157
+ onZoomOut,
7158
+ onZoomIn,
7159
+ labels,
7160
+ disabled = false,
7161
+ style,
7162
+ buttonStyle,
7163
+ iconStyle,
7164
+ labelStyle
7165
+ }) {
7166
+ const resolvedLabels = {
7167
+ ...DEFAULT_NATIVE_VECTOR_ZOOM_CONTROLS_LABELS,
7168
+ ...labels
7169
+ };
7170
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles5.root, style], children: [
7171
+ /* @__PURE__ */ jsxRuntime.jsx(
7172
+ reactNative.Pressable,
7173
+ {
7174
+ accessibilityRole: "button",
7175
+ accessibilityLabel: resolvedLabels.zoomOut,
7176
+ accessibilityState: { disabled },
7177
+ disabled,
7178
+ onPress: onZoomOut,
7179
+ style: ({ pressed }) => [
7180
+ styles5.button,
7181
+ pressed && !disabled ? styles5.buttonPressed : null,
7182
+ disabled ? styles5.buttonDisabled : null,
7183
+ buttonStyle
7184
+ ],
7185
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7186
+ reactNative.Text,
7187
+ {
7188
+ style: [styles5.icon, disabled ? styles5.disabledText : null, iconStyle],
7189
+ children: "-"
7190
+ }
7191
+ )
7192
+ }
7193
+ ),
7194
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles5.labelWrap, children: /* @__PURE__ */ jsxRuntime.jsxs(
7195
+ reactNative.Text,
7196
+ {
7197
+ accessibilityRole: "text",
7198
+ style: [styles5.label, disabled ? styles5.disabledText : null, labelStyle],
7199
+ children: [
7200
+ zoomPercent,
7201
+ "%"
7202
+ ]
7203
+ }
7204
+ ) }),
7205
+ /* @__PURE__ */ jsxRuntime.jsx(
7206
+ reactNative.Pressable,
7207
+ {
7208
+ accessibilityRole: "button",
7209
+ accessibilityLabel: resolvedLabels.zoomIn,
7210
+ accessibilityState: { disabled },
7211
+ disabled,
7212
+ onPress: onZoomIn,
7213
+ style: ({ pressed }) => [
7214
+ styles5.button,
7215
+ pressed && !disabled ? styles5.buttonPressed : null,
7216
+ disabled ? styles5.buttonDisabled : null,
7217
+ buttonStyle
7218
+ ],
7219
+ children: /* @__PURE__ */ jsxRuntime.jsx(
7220
+ reactNative.Text,
7221
+ {
7222
+ style: [styles5.icon, disabled ? styles5.disabledText : null, iconStyle],
7223
+ children: "+"
7224
+ }
7225
+ )
7226
+ }
7227
+ )
7228
+ ] });
7229
+ }
7230
+ var styles5 = reactNative.StyleSheet.create({
7231
+ root: {
7232
+ alignItems: "center",
7233
+ backgroundColor: "#ffffff",
7234
+ borderColor: "rgba(15, 23, 42, 0.12)",
7235
+ borderRadius: 18,
7236
+ borderWidth: 1,
7237
+ elevation: 4,
7238
+ flexDirection: "row",
7239
+ paddingHorizontal: 12,
7240
+ paddingVertical: 8,
7241
+ shadowColor: "#0f172a",
7242
+ shadowOffset: { width: 0, height: 1 },
7243
+ shadowOpacity: 0.16,
7244
+ shadowRadius: 3
7245
+ },
7246
+ button: {
7247
+ alignItems: "center",
7248
+ borderRadius: 12,
7249
+ height: 36,
7250
+ justifyContent: "center",
7251
+ width: 36
7252
+ },
7253
+ buttonPressed: {
7254
+ backgroundColor: "rgba(15, 23, 42, 0.08)"
7255
+ },
7256
+ buttonDisabled: {
7257
+ opacity: 0.54
7258
+ },
7259
+ icon: {
7260
+ color: "#0f172a",
7261
+ fontSize: 30,
7262
+ fontWeight: "400",
7263
+ includeFontPadding: false,
7264
+ lineHeight: 32,
7265
+ textAlign: "center"
7266
+ },
7267
+ labelWrap: {
7268
+ alignItems: "center",
7269
+ justifyContent: "center",
7270
+ minWidth: 64,
7271
+ paddingHorizontal: 8
7272
+ },
7273
+ label: {
7274
+ color: "#0f172a",
7275
+ fontSize: 16,
7276
+ fontWeight: "700",
7277
+ includeFontPadding: false,
7278
+ lineHeight: 20
7279
+ },
7280
+ disabledText: {
7281
+ color: "#64748b"
7282
+ }
7283
+ });
7151
7284
 
7152
7285
  exports.DEFAULT_LINK_CARD_SIZE = DEFAULT_LINK_CARD_SIZE;
7153
7286
  exports.DEFAULT_NATIVE_OVERFLOW_TOOL_IDS = DEFAULT_NATIVE_OVERFLOW_TOOL_IDS;
@@ -7160,6 +7293,7 @@ exports.NativeShapeRenderer = NativeShapeRenderer;
7160
7293
  exports.NativeVectorStyleInspector = NativeVectorStyleInspector;
7161
7294
  exports.NativeVectorToolbar = NativeVectorToolbar;
7162
7295
  exports.NativeVectorViewport = NativeVectorViewport;
7296
+ exports.NativeVectorZoomControls = NativeVectorZoomControls;
7163
7297
  exports.createFreehandStrokeItem = createFreehandStrokeItem;
7164
7298
  exports.createImageItem = createImageItem;
7165
7299
  exports.createLinkItem = createLinkItem;